From 676f9abf30198b496e86a41333df86d65084cb41 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 30 Jun 2009 17:19:42 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2924 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/fix_rigid.html | 65 ++++++++++++++++++++----- doc/fix_rigid.txt | 63 +++++++++++++++++++----- tools/pymol_asphere/src/asphere_vis.cpp | 2 +- 3 files changed, 103 insertions(+), 27 deletions(-) diff --git a/doc/fix_rigid.html b/doc/fix_rigid.html index 386b46c198..d7d61a28d7 100644 --- a/doc/fix_rigid.html +++ b/doc/fix_rigid.html @@ -51,21 +51,52 @@ fix 2 fluid rigid group 3 clump1 clump2 clump3 torque * off off off

Description:

-

Treat one or more sets of atoms as an independent rigid body. This +

Treat one or more sets of atoms as independent rigid bodies. This means that each timestep the total force and torque on each rigid body -is computed and the coordinates and velocities of the atoms in each -body are updated so that they move as a rigid body. This can be -useful for freezing one or more portions of a large biomolecule, or -for simulating a system of colloidal particles. +is computed as the sum of the forces and torques on its constituent +particles and the coordinates, velocities, and orientations of the +atoms in each body are updated so that the body moves and rotates as a +single entity.

-

IMPORTANT NOTE: This fix is overkill if you just want to hold group of -atoms stationary of have them move with a constant velocity. A -simpler way to hold atoms stationary is to not include those atoms in -your time integration fix. E.g. use "fix 1 mobile nve" instead of -"fix 1 all nve", where "mobile" is the group of atoms that you want to -move. You can move atoms with a constant velocity by assigning them -an initial velocity (via the velocity command), -setting the force on them to 0.0 (via the fix +

Examples of large rigid bodies are a large colloidal particle, or +portions of a large biomolecule such as a protein. +

+

Example of small rigid bodies are patchy nanoparticles, such as those +modeled by the Glotzer group, clumps of granular particles, +lipid molecules consiting of one or more point dipoles connected to +other spheroids or ellipsoids, and coarse-grain models of nano or +colloidal particles consisting of a small number of constituent +particles. Note that the fix shake command can also be +used to rigidify small molecules of 2, 3, or 4 atoms, e.g. water +molecules. That fix treats the constituent atoms as point masses. +

+

The constituent particles within a rigid body can be point particles +(the default in LAMMPS) or finite-size particles, such as spheroids +and ellipsoids. See the shape command and atom_style +granular for more details on these kinds of +particles. Finite-size particles contribute differently to the moment +of inertia of a rigid body than do point particles. Finite-size +particles can also experience torque (e.g. due to frictional granular +interactions) and have an orientation. These +contributions are accounted for by the fix. +

+

Forces between particles within a body do not contribute to the +external force or torque on the body. Thus for computational +efficiency, you may wish to turn off pairwise and bond interactions +between particles within each rigid body. The neigh_modify +exclude and delete_bonds +commands are used to do this. For finite-size particles this also +means the particles can be highly overlapped when creating the rigid +body. +

+

IMPORTANT NOTE: This fix is overkill if you simply want to hold a +collection of atoms stationary or have them move with a constant +velocity. A simpler way to hold atoms stationary is to not include +those atoms in your time integration fix. E.g. use "fix 1 mobile nve" +instead of "fix 1 all nve", where "mobile" is the group of atoms that +you want to move. You can move atoms with a constant velocity by +assigning them an initial velocity (via the velocity +command), setting the force on them to 0.0 (via the fix setforce command), and integrating them as usual (e.g. via the fix nve command).

@@ -73,6 +104,8 @@ setforce command), and integrating them as usual rigid atoms with a constant-energy time integration, so you should not update the same atoms via other fixes (e.g. nve, nvt, npt).

+
+

Each body must have two or more atoms. An atom can belong to at most one rigid body. Which atoms are in which bodies can be defined via several options. @@ -214,4 +247,10 @@ exclude

The option defaults are force * on on on and torque * on on on meaning all rigid bodies are acted on by center-of-mass force and torque.

+
+ + + +

(Zhang) Zhang, Glotzer, Nanoletters, 4, 1407-1413 (2004). +

diff --git a/doc/fix_rigid.txt b/doc/fix_rigid.txt index 775ca867ab..69ab1fd4cf 100644 --- a/doc/fix_rigid.txt +++ b/doc/fix_rigid.txt @@ -42,21 +42,52 @@ fix 2 fluid rigid group 3 clump1 clump2 clump3 torque * off off off :pre [Description:] -Treat one or more sets of atoms as an independent rigid body. This +Treat one or more sets of atoms as independent rigid bodies. This means that each timestep the total force and torque on each rigid body -is computed and the coordinates and velocities of the atoms in each -body are updated so that they move as a rigid body. This can be -useful for freezing one or more portions of a large biomolecule, or -for simulating a system of colloidal particles. +is computed as the sum of the forces and torques on its constituent +particles and the coordinates, velocities, and orientations of the +atoms in each body are updated so that the body moves and rotates as a +single entity. -IMPORTANT NOTE: This fix is overkill if you just want to hold group of -atoms stationary of have them move with a constant velocity. A -simpler way to hold atoms stationary is to not include those atoms in -your time integration fix. E.g. use "fix 1 mobile nve" instead of -"fix 1 all nve", where "mobile" is the group of atoms that you want to -move. You can move atoms with a constant velocity by assigning them -an initial velocity (via the "velocity"_velocity.html command), -setting the force on them to 0.0 (via the "fix +Examples of large rigid bodies are a large colloidal particle, or +portions of a large biomolecule such as a protein. + +Example of small rigid bodies are patchy nanoparticles, such as those +modeled by the "Glotzer group"_Glotzer, clumps of granular particles, +lipid molecules consiting of one or more point dipoles connected to +other spheroids or ellipsoids, and coarse-grain models of nano or +colloidal particles consisting of a small number of constituent +particles. Note that the "fix shake"_fix_shake command can also be +used to rigidify small molecules of 2, 3, or 4 atoms, e.g. water +molecules. That fix treats the constituent atoms as point masses. + +The constituent particles within a rigid body can be point particles +(the default in LAMMPS) or finite-size particles, such as spheroids +and ellipsoids. See the "shape"_shape.html command and "atom_style +granular"_atom_style.html for more details on these kinds of +particles. Finite-size particles contribute differently to the moment +of inertia of a rigid body than do point particles. Finite-size +particles can also experience torque (e.g. due to "frictional granular +interactions"_pair_gran.html) and have an orientation. These +contributions are accounted for by the fix. + +Forces between particles within a body do not contribute to the +external force or torque on the body. Thus for computational +efficiency, you may wish to turn off pairwise and bond interactions +between particles within each rigid body. The "neigh_modify +exclude"_neigh_modify.html and "delete_bonds"_delete_bonds.html +commands are used to do this. For finite-size particles this also +means the particles can be highly overlapped when creating the rigid +body. + +IMPORTANT NOTE: This fix is overkill if you simply want to hold a +collection of atoms stationary or have them move with a constant +velocity. A simpler way to hold atoms stationary is to not include +those atoms in your time integration fix. E.g. use "fix 1 mobile nve" +instead of "fix 1 all nve", where "mobile" is the group of atoms that +you want to move. You can move atoms with a constant velocity by +assigning them an initial velocity (via the "velocity"_velocity.html +command), setting the force on them to 0.0 (via the "fix setforce"_fix_setforce.html command), and integrating them as usual (e.g. via the "fix nve"_fix_nve.html command). @@ -64,6 +95,8 @@ IMPORTANT NOTE: This fix updates the positions and velocities of the rigid atoms with a constant-energy time integration, so you should not update the same atoms via other fixes (e.g. nve, nvt, npt). +:line + Each body must have two or more atoms. An atom can belong to at most one rigid body. Which atoms are in which bodies can be defined via several options. @@ -205,3 +238,7 @@ exclude The option defaults are force * on on on and torque * on on on meaning all rigid bodies are acted on by center-of-mass force and torque. +:line + +:link(Glotzer_group) +[(Zhang)] Zhang, Glotzer, Nanoletters, 4, 1407-1413 (2004). diff --git a/tools/pymol_asphere/src/asphere_vis.cpp b/tools/pymol_asphere/src/asphere_vis.cpp index 2bf8b2a48b..8009bb2738 100644 --- a/tools/pymol_asphere/src/asphere_vis.cpp +++ b/tools/pymol_asphere/src/asphere_vis.cpp @@ -394,7 +394,7 @@ bool parse_to(const char * token,ifstream &in) { in.getline(iline,5000); if (in.eof() || !in) return false; - if (strcmp(token,iline)==0) + if (strncmp(token,iline,strlen(token))==0) return true; } }