"/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/coordinates/chemfiles.py:108: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.\n",
"/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/PDBParser.py:317: UserWarning: Element information is missing, elements attribute will not be populated. If needed these can be guessed using MDAnalysis.topology.guessers.\n",
" warnings.warn(\"Element information is missing, elements attribute \"\n",
"/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/guessers.py:146: UserWarning: Failed to guess the mass for the following atom types: A\n",
" warnings.warn(\"Failed to guess the mass for the following atom types: {}\".format(atom_type))\n"
"/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/PDBParser.py:317: UserWarning: Element information is missing, elements attribute will not be populated. If needed these can be guessed using MDAnalysis.topology.guessers.\n",
" warnings.warn(\"Element information is missing, elements attribute \"\n",
"/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/guessers.py:146: UserWarning: Failed to guess the mass for the following atom types: A\n",
" warnings.warn(\"Failed to guess the mass for the following atom types: {}\".format(atom_type))\n"
"\u001b[0;32m<ipython-input-5-c1d63cbeb26c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;31m## Go through every other index\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchildren\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 8\u001b[0m \u001b[0mj\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mi\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 9\u001b[0m model.add_bond( model.children[i],\n",
"\u001b[0;31mNameError\u001b[0m: name 'model' is not defined"
"/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/coordinates/base.py:892: UserWarning: Reader has no dt information, set to 1.0 ps\n",
" warnings.warn(\"Reader has no dt information, set to 1.0 ps\")\n"
"print(bond.range_) ## Distances are in Angstroms\n",
"print(bond.range_) ## Distances are in Angstroms\n",
...
@@ -778,25 +285,6 @@
...
@@ -778,25 +285,6 @@
"\n",
"\n",
"Also, please note that ARBD is under development; some keywords have been deprecated, and the syntax is subject to evolve. The user-oriented interface of the arbdmodel package is less likely to change, which is one of the reasons we strongly recommend using arbdmodel to set up your simulation systems. Nevertheless, if you want to use ARBD, it's a good idea to familiarize yourself with the configuration file syntax."
"Also, please note that ARBD is under development; some keywords have been deprecated, and the syntax is subject to evolve. The user-oriented interface of the arbdmodel package is less likely to change, which is one of the reasons we strongly recommend using arbdmodel to set up your simulation systems. Nevertheless, if you want to use ARBD, it's a good idea to familiarize yourself with the configuration file syntax."
]
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### More to come shortly...\n",
"First, we'll introduce some classes helpful for working with polymers, and we'll show the polymer models that ship with the class.\n",
"\n",
"We'll show how beads can experience grid-based potentials.\n",
"\n",
"Then we'll show how to construct simple rigid body models."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
}
],
],
"metadata": {
"metadata": {
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# Basic usage of the `arbdmodel` package
# Basic usage of the `arbdmodel` package
We'll learn how to build simple models using the arbdmodel Python package that will run on the Atomic Resolution Brownian Dynamics (ARBD/arbd) simulation engine. ARBD requires a GPU and linux operating system.
We'll learn how to build simple models using the arbdmodel Python package that will run on the Atomic Resolution Brownian Dynamics (ARBD/arbd) simulation engine. ARBD requires a GPU and linux operating system.
This tutorial assumes you have a working knowledge of Python, including its object-oriented features, and the numpy package.
This tutorial assumes you have a working knowledge of Python, including its object-oriented features, and the numpy package.
Also, a word of caution: at the time of writing ARBD will not prevent you from simulating with poorly selected runtime parameters (e.g. too large a timestep; or too large a decomposition period with too small a pairlist distance; or simply potentials that prescribe unreasonably large forces). Hence it is crucial to have a good understanding of the MD/BD algorithm if you are using it in production settings.
Also, a word of caution: at the time of writing ARBD will not prevent you from simulating with poorly selected runtime parameters (e.g. too large a timestep; or too large a decomposition period with too small a pairlist distance; or simply potentials that prescribe unreasonably large forces). Hence it is crucial to have a good understanding of the MD/BD algorithm if you are using it in production settings.
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Step 1: Create particle types
### Step 1: Create particle types
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
importipdb# in case we need to debug, after a crash, run `ipdb.pm()`
importipdb# in case we need to debug, after a crash, run `ipdb.pm()`
/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/coordinates/chemfiles.py:108: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
MIN_CHEMFILES_VERSION = LooseVersion("0.9")
/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/PDBParser.py:317: UserWarning: Element information is missing, elements attribute will not be populated. If needed these can be guessed using MDAnalysis.topology.guessers.
warnings.warn("Element information is missing, elements attribute "
/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/guessers.py:146: UserWarning: Failed to guess the mass for the following atom types: A
warnings.warn("Failed to guess the mass for the following atom types: {}".format(atom_type))
/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/PDBParser.py:317: UserWarning: Element information is missing, elements attribute will not be populated. If needed these can be guessed using MDAnalysis.topology.guessers.
warnings.warn("Element information is missing, elements attribute "
/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/topology/guessers.py:146: UserWarning: Failed to guess the mass for the following atom types: A
warnings.warn("Failed to guess the mass for the following atom types: {}".format(atom_type))
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Step 7: Add bonds
### Step 7: Add bonds
Argon is, of course, a noble gas and will not form bonds; this is a demonstration only, and not representative of a physical system
Argon is, of course, a noble gas and will not form bonds; this is a demonstration only, and not representative of a physical system
/data/server1/cmaffeo2/miniconda3/lib/python3.8/site-packages/MDAnalysis/coordinates/base.py:892: UserWarning: Reader has no dt information, set to 1.0 ps
warnings.warn("Reader has no dt information, set to 1.0 ps")
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
## Why are there so many long bonds?
## Why are there so many long bonds?
print(bond.range_)## Distances are in Angstroms
print(bond.range_)## Distances are in Angstroms
r=np.linspace(*bond.range_,20)
r=np.linspace(*bond.range_,20)
print(r)
print(r)
print(bond.potential(r))## Energies are kcal/mol
print(bond.potential(r))## Energies are kcal/mol
## Outside of this range, the bond applies zero force
## Outside of this range, the bond applies zero force
Use your favorite editor to examine the files named `sims/1-argon/*.bd`.
Use your favorite editor to examine the files named `sims/1-argon/*.bd`.
ARBD uses *key-value* pairs to configure most features. The configuration parser does not use an interpretter, so math and string operations may not be used inside .bd files. For a list of the available keywords, see the documentation that comes with ARBD.
ARBD uses *key-value* pairs to configure most features. The configuration parser does not use an interpretter, so math and string operations may not be used inside .bd files. For a list of the available keywords, see the documentation that comes with ARBD.
Also, please note that ARBD is under development; some keywords have been deprecated, and the syntax is subject to evolve. The user-oriented interface of the arbdmodel package is less likely to change, which is one of the reasons we strongly recommend using arbdmodel to set up your simulation systems. Nevertheless, if you want to use ARBD, it's a good idea to familiarize yourself with the configuration file syntax.
Also, please note that ARBD is under development; some keywords have been deprecated, and the syntax is subject to evolve. The user-oriented interface of the arbdmodel package is less likely to change, which is one of the reasons we strongly recommend using arbdmodel to set up your simulation systems. Nevertheless, if you want to use ARBD, it's a good idea to familiarize yourself with the configuration file syntax.
%% Cell type:markdown id: tags:
### More to come shortly...
First, we'll introduce some classes helpful for working with polymers, and we'll show the polymer models that ship with the class.
We'll show how beads can experience grid-based potentials.
Then we'll show how to construct simple rigid body models.