diff --git a/doc/Eqs/pair_srp2.jpg b/doc/Eqs/pair_srp2.jpg new file mode 100644 index 0000000000..c5d20dc212 Binary files /dev/null and b/doc/Eqs/pair_srp2.jpg differ diff --git a/doc/Eqs/pair_srp2.tex b/doc/Eqs/pair_srp2.tex new file mode 100644 index 0000000000..19cb19ae72 --- /dev/null +++ b/doc/Eqs/pair_srp2.tex @@ -0,0 +1,10 @@ +\documentclass[12pt]{article} + +\begin{document} + +\begin{eqnarray*} + F_{i1}^{SRP} & = & F^{SRP}_{ij}(L) \\ + F_{i2}^{SRP} & = & F^{SRP}_{ij}(1-L) +\end{eqnarray*} + +\end{document} diff --git a/doc/Section_commands.html b/doc/Section_commands.html index ac73579568..579be9dcb1 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -515,7 +515,7 @@ package.
The GPU-accelerated versions of these styles are implemented based on the work of (Afshar) and (Phillips).
+IMPORTANT NOTE: If you are modeling DPD polymer chains, you may want +to use the pair_style srp command in conjuction with +these pair styles. It is a soft segmental repulsive potential (SRP) +that can prevent DPD polymer chains from crossing each other. +
Styles with a cuda, gpu, intel, kk, omp, or opt suffix are @@ -189,7 +194,7 @@ compute depend on atom velocities. See the
Related commands:
pair_coeff, fix nvt, fix -langevin +langevin, pair_style srp
Default: none
diff --git a/doc/pair_dpd.txt b/doc/pair_dpd.txt index 00918ad713..1ebffdea2a 100644 --- a/doc/pair_dpd.txt +++ b/doc/pair_dpd.txt @@ -95,6 +95,11 @@ except that A is not included. The GPU-accelerated versions of these styles are implemented based on the work of "(Afshar)"_#Afshar and "(Phillips)"_#Phillips. +IMPORTANT NOTE: If you are modeling DPD polymer chains, you may want +to use the "pair_style srp"_pair_srp.html command in conjuction with +these pair styles. It is a soft segmental repulsive potential (SRP) +that can prevent DPD polymer chains from crossing each other. + :line Styles with a {cuda}, {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are @@ -181,7 +186,7 @@ compute depend on atom velocities. See the [Related commands:] "pair_coeff"_pair_coeff.html, "fix nvt"_fix_nh.html, "fix -langevin"_fix_langevin.html +langevin"_fix_langevin.html, "pair_style srp"_pair_srp.html [Default:] none diff --git a/doc/pair_srp.html b/doc/pair_srp.html new file mode 100644 index 0000000000..eb29965e24 --- /dev/null +++ b/doc/pair_srp.html @@ -0,0 +1,164 @@ + +Syntax: +
+pair_style srp cutoff bond_type dist keyword value ... +
+exclude value = yes or no ++ +
Examples: +
+pair_style hybrid dpd 1.0 1.0 12345 srp 0.8 1 mid exclude yes +pair_coeff 1 1 dpd 60.0 4.5 1.0 +pair_coeff 1 2 none +pair_coeff 2 2 srp 100.0 0.8 ++
pair_style hybrid srp 0.8 1 mid exclude yes +pair_coeff 1 1 none +pair_coeff 1 2 none +pair_coeff 2 2 srp 100.0 0.8 ++
Description: +
+Style srp computes a soft segmental repulsive potential (SRP) that +acts between bonds. This potential is useful in preventing bonds from +passing through one another when a soft non-bonded potential acts +between beads in, for example, DPD polymer chains. +An example input script that uses this command is provided +in examples/USER/srp. +
+Bonds of type btype interact with one another through a +bond-pairwise potential, such that the force on bond i due to bond +j is as follows +
+
+where r and rij are the distance and unit vector between the two +bonds. The mid option computes r and rij from the midpoint +distance between bonds. The min option computes r and rij from +the minimum distance between bonds. The force acting on a bond is +mapped onto the two bond atoms according to the lever rule, +
+
+where L is the normalized distance from the atom to the point of +closest approach of bond i and j. The mid option takes L as +0.5 for each interaction as described in (Sirk). +
+The following coefficients must be defined via the +pair_coeff command as in the examples above, or in +the data file or restart file read by the read_data +or read_restart commands: +
+The last coefficient is optional. If not specified, the global cutoff +is used. +
+IMPORTANT NOTE: Pair style srp considers each bond of type btype as +a fictitious particle of type bptype, where bptype is the largest +atom type in the system. These "bond particles" are inserted at the +beginning of the run, and serve as placeholders that define the +position of the bonds. This allows neighbor lists to be constructed +and pairwise interactions to be computed in almost the same way as is +done for point particles. Because bonds interact only with other +bonds, pair_style hybrid should be used to turn off +interactions between atom type bptype and all other types of atoms. +An error will be flagged if pair_style hybrid is +not used. Further, only bond particles should be given an atom type +of bptype; a check is done at the beginning of the run to ensure +there are no regular atoms of bptype. +
+The optional exclude keyword determines if forces are computed +between first neighbor (directly connected) bonds. For a setting of +yes they are, for no they are not. +
+Pair style srp turns off normalization of thermodynamic properties +by particle number, as if the command thermo_modify norm +no had been issued. A warning will be given if +this setting is overridden in the input script. +
+The pairwise energy associated with style srp is shifted to be zero +at the cutoff distance Rc. +
+Mixing, shift, table, tail correction, restart, rRESPA info: +
+This pair styles does not support mixing. +
+This pair style does not support the pair_modify +shift option for the energy of the pair interaction. Note that as +discussed above, the energy term is already shifted to be 0.0 at the +cutoff distance rc. +
+The pair_modify table option is not relevant for +this pair style. +
+This pair style does not support the pair_modify +tail option for adding long-range tail corrections to energy and +pressure. +
+This pair style writes global and per-atom information to binary +restart files. Pair srp should be used with pair_style +hybrid, thus the pair_coeff commands need to be +specified in the input script when reading a restart file. +
+This pair style can only be used via the pair keyword of the +run_style respa command. It does not support the +inner, middle, outer keywords. +
+Restrictions: +
+This pair style is part of the USER-MISC package. It is only enabled +if LAMMPS was built with that package. See the Making LAMMPS section +for more info. +
+This pair style must be used with pair_style hybrid. +
+This pair style requires the newton command to be on +for non-bonded interactions. +
+Related commands: +
+pair_style hybrid, pair_coeff, +pair dpd +
+Default: +
+The default keyword value is exclude = yes. +
+(Sirk) Sirk TW, Slizoberg YR, Brennan JK, Lisal M, Andzelm JW, J +Chem Phys, 136 (13) 134903, 2012. +
+ diff --git a/doc/pair_srp.txt b/doc/pair_srp.txt new file mode 100644 index 0000000000..feaef1b59b --- /dev/null +++ b/doc/pair_srp.txt @@ -0,0 +1,152 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Section_commands.html#comm) + +:line + +pair_style srp command :h3 + +[Syntax:] + +pair_style srp cutoff bond_type dist keyword value ... + +cutoff = global cutoff for SRP interactions (distance units) :ulb,l +bond_type = bond type to apply SRP interactions :l +dist = {min} or {mid} :l +zero or more keyword/value pairs may be appended :l +keyword = {exclude} :l + {exclude} value = {yes} or {no} :pre +:ule + +[Examples:] + +pair_style hybrid dpd 1.0 1.0 12345 srp 0.8 1 mid exclude yes +pair_coeff 1 1 dpd 60.0 4.5 1.0 +pair_coeff 1 2 none +pair_coeff 2 2 srp 100.0 0.8 :pre + +pair_style hybrid srp 0.8 1 mid exclude yes +pair_coeff 1 1 none +pair_coeff 1 2 none +pair_coeff 2 2 srp 100.0 0.8 :pre + +[Description:] + +Style {srp} computes a soft segmental repulsive potential (SRP) that +acts between bonds. This potential is useful in preventing bonds from +passing through one another when a soft non-bonded potential acts +between beads in, for example, DPD polymer chains. +An example input script that uses this command is provided +in examples/USER/srp. + +Bonds of type {btype} interact with one another through a +bond-pairwise potential, such that the force on bond {i} due to bond +{j} is as follows + +:c,image(Eqs/pair_srp1.jpg) + +where {r} and {rij} are the distance and unit vector between the two +bonds. The {mid} option computes {r} and {rij} from the midpoint +distance between bonds. The {min} option computes {r} and {rij} from +the minimum distance between bonds. The force acting on a bond is +mapped onto the two bond atoms according to the lever rule, + +:c,image(Eqs/pair_srp2.jpg) + +where {L} is the normalized distance from the atom to the point of +closest approach of bond {i} and {j}. The {mid} option takes {L} as +0.5 for each interaction as described in "(Sirk)"_#Sirk. + +The following coefficients must be defined via the +"pair_coeff"_pair_coeff.html command as in the examples above, or in +the data file or restart file read by the "read_data"_read_data.html +or "read_restart"_read_restart.html commands: + +{C} (force units) +{Rc} (distance units) :ul + +The last coefficient is optional. If not specified, the global cutoff +is used. + +IMPORTANT NOTE: Pair style srp considers each bond of type {btype} as +a fictitious particle of type {bptype}, where {bptype} is the largest +atom type in the system. These "bond particles" are inserted at the +beginning of the run, and serve as placeholders that define the +position of the bonds. This allows neighbor lists to be constructed +and pairwise interactions to be computed in almost the same way as is +done for point particles. Because bonds interact only with other +bonds, "pair_style hybrid"_pair_hybrid.html should be used to turn off +interactions between atom type {bptype} and all other types of atoms. +An error will be flagged if "pair_style hybrid"_pair_hybrid.html is +not used. Further, only bond particles should be given an atom type +of {bptype}; a check is done at the beginning of the run to ensure +there are no regular atoms of {bptype}. + +The optional {exclude} keyword determines if forces are computed +between first neighbor (directly connected) bonds. For a setting of +{yes} they are, for {no} they are not. + +Pair style {srp} turns off normalization of thermodynamic properties +by particle number, as if the command "thermo_modify norm +no"_thermo_modify.html had been issued. A warning will be given if +this setting is overridden in the input script. + +The pairwise energy associated with style {srp} is shifted to be zero +at the cutoff distance {Rc}. + +:line + +[Mixing, shift, table, tail correction, restart, rRESPA info]: + +This pair styles does not support mixing. + +This pair style does not support the "pair_modify"_pair_modify.html +shift option for the energy of the pair interaction. Note that as +discussed above, the energy term is already shifted to be 0.0 at the +cutoff distance {rc}. + +The "pair_modify"_pair_modify.html table option is not relevant for +this pair style. + +This pair style does not support the "pair_modify"_pair_modify.html +tail option for adding long-range tail corrections to energy and +pressure. + +This pair style writes global and per-atom information to "binary +restart files"_restart.html. Pair srp should be used with "pair_style +hybrid"_pair_hybrid.html, thus the pair_coeff commands need to be +specified in the input script when reading a restart file. + +This pair style can only be used via the {pair} keyword of the +"run_style respa"_run_style.html command. It does not support the +{inner}, {middle}, {outer} keywords. + +:line + +[Restrictions:] + +This pair style is part of the USER-MISC package. It is only enabled +if LAMMPS was built with that package. See the Making LAMMPS section +for more info. + +This pair style must be used with "pair_style hybrid"_pair_hybrid.html. + +This pair style requires the "newton"_newton.html command to be {on} +for non-bonded interactions. + +[Related commands:] + +"pair_style hybrid"_pair_hybrid.html, "pair_coeff"_pair_coeff.html, +"pair dpd"_pair_dpd.html + +[Default:] + +The default keyword value is exclude = yes. + +:line + +:link(Sirk) +[(Sirk)] Sirk TW, Slizoberg YR, Brennan JK, Lisal M, Andzelm JW, J +Chem Phys, 136 (13) 134903, 2012. diff --git a/src/atom.cpp b/src/atom.cpp index 458ab1c523..f9053a6e22 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -519,7 +519,7 @@ void Atom::modify_params(int narg, char **arg) else if (strcmp(arg[iarg+1],"no") == 0) tag_enable = 2; else error->all(FLERR,"Illegal atom_modify command"); iarg += 2; - } if (strcmp(arg[iarg],"map") == 0) { + } else if (strcmp(arg[iarg],"map") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal atom_modify command"); if (domain->box_exist) error->all(FLERR,