diff --git a/doc/src/Manual.txt b/doc/src/Manual.txt index 6582d24455b568c57a807efb5bc1a7893ddcc76f..a6bc459530b15ee9750c1cc7a2c05e716f36e410 100644 --- a/doc/src/Manual.txt +++ b/doc/src/Manual.txt @@ -1,7 +1,7 @@ <!-- HTML_ONLY --> <HEAD> <TITLE>LAMMPS Users Manual</TITLE> -<META NAME="docnumber" CONTENT="24 Mar 2017 version"> +<META NAME="docnumber" CONTENT="13 Apr 2017 version"> <META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories"> <META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License."> </HEAD> @@ -21,7 +21,7 @@ <H1></H1> LAMMPS Documentation :c,h3 -24 Mar 2017 version :c,h4 +13 Apr 2017 version :c,h4 Version info: :h4 diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 63a63b373693198c9950adcf1c1bbc05cc329177..3f1d6ff2039cd77b32b8bbb888422731c3e5c952 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -1047,6 +1047,10 @@ package"_Section_start.html#start_3. "oxdna/hbond"_pair_oxdna.html, "oxdna/stk"_pair_oxdna.html, "oxdna/xstk"_pair_oxdna.html, +"oxdna2/coaxstk"_pair_oxdna2.html, +"oxdna2/dh"_pair_oxdna2.html, +"oxdna2/excv"_pair_oxdna2.html, +"oxdna2/stk"_pair_oxdna2.html, "quip"_pair_quip.html, "reax/c (k)"_pair_reax_c.html, "smd/hertz"_pair_smd_hertz.html, @@ -1096,7 +1100,8 @@ package"_Section_start.html#start_3. "harmonic/shift (o)"_bond_harmonic_shift.html, "harmonic/shift/cut (o)"_bond_harmonic_shift_cut.html, -"oxdna/fene"_bond_oxdna.html :tb(c=4,ea=c) +"oxdna/fene"_bond_oxdna.html, +"oxdna2/fene"_bond_oxdna.html :tb(c=4,ea=c) :line @@ -1150,7 +1155,7 @@ USER-OMP, t = OPT. "zero"_dihedral_zero.html, "hybrid"_dihedral_hybrid.html, "charmm (ko)"_dihedral_charmm.html, -"charmmfsh"_dihedral_charmm.html, +"charmmfsw"_dihedral_charmm.html, "class2 (ko)"_dihedral_class2.html, "harmonic (io)"_dihedral_harmonic.html, "helix (o)"_dihedral_helix.html, diff --git a/doc/src/Section_howto.txt b/doc/src/Section_howto.txt index 78478c3fe6ffb85593b6a1634110db8bb5f5a0b1..579cb684740513eba174adfa2e07c68ddee50ee5 100644 --- a/doc/src/Section_howto.txt +++ b/doc/src/Section_howto.txt @@ -215,7 +215,7 @@ documentation for the formula it computes. "special_bonds"_special_bonds.html charmm "special_bonds"_special_bonds.html amber :ul -NOTE: For CHARMM, the newer {charmmfsw} or {charmmfsh} styles were +NOTE: For CHARMM, newer {charmmfsw} or {charmmfsh} styles were released in March 2017. We recommend they be used instead of the older {charmm} styles. See discussion of the differences on the "pair charmm"_pair_charmm.html and "dihedral charmm"_dihedral_charmm.html @@ -1686,7 +1686,7 @@ nph) and Berendsen: The "fix npt"_fix_nh.html commands include a Nose-Hoover thermostat and barostat. "Fix nph"_fix_nh.html is just a Nose/Hoover barostat; it does no thermostatting. Both "fix nph"_fix_nh.html and "fix -press/bernendsen"_fix_press_berendsen.html can be used in conjunction +press/berendsen"_fix_press_berendsen.html can be used in conjunction with any of the thermostatting fixes. As with the thermostats, "fix npt"_fix_nh.html and "fix diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 5c6463a71a211385b97e635f51ae29588b87799f..b327b7b1ceccebbbd77111a5d239ba5cfb6ea4dd 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -1308,8 +1308,8 @@ oxdna/..."_pair_oxdna.html, "pair_style oxdna2/..."_pair_oxdna2.html, "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html -Author: Oliver Henrich at the University of Strathclyde, Glasgow, UK and -University of Edinburgh (ohenrich@ph.ed.ac.uk). +Author: Oliver Henrich at the University of Strathclyde, Glasgow +(oliver.henrich at strath.ac.uk, also ohenrich at ph.ed.ac.uk). Contact him directly if you have any questions. :line diff --git a/doc/src/Section_start.txt b/doc/src/Section_start.txt index 47643569e66f38409c9e7534f7dffe37da9de570..5a5de9ac9bb8d09d6a84ea42efab7d4059f4b21a 100644 --- a/doc/src/Section_start.txt +++ b/doc/src/Section_start.txt @@ -455,8 +455,7 @@ and related PPPM operations are somewhat insensitive to floating point truncation errors and thus do not always need to be performed in double precision. Using the -DFFT_SINGLE setting trades off a little accuracy for reduced memory use and parallel communication costs for -transposing 3d FFT data. Note that single precision FFTs have only -been tested with the FFTW3, FFTW2, MKL, and KISS FFT options. +transposing 3d FFT data. Step 7 :h6 diff --git a/doc/src/bond_oxdna.txt b/doc/src/bond_oxdna.txt index 6cdbbd3546a8188dd0b15ed104f02c98e713d45b..f9b35a167c5f82275cf47e605f9eb8504e8f4757 100644 --- a/doc/src/bond_oxdna.txt +++ b/doc/src/bond_oxdna.txt @@ -46,9 +46,7 @@ for excluded volume interaction {oxdna/excv}, stacking {oxdna/stk}, cross-stacki and coaxial stacking interaction {oxdna/coaxstk} as well as hydrogen-bonding interaction {oxdna/hbond} (see also documentation of "pair_style oxdna/excv"_pair_oxdna.html). For the oxDNA2 "(Snodin)"_#oxdna2 bond style the analogous pair styles and an additional Debye-Hueckel pair style {oxdna2/dh} have to be defined. - -The coefficients -in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. +The coefficients in the above example have to be kept fixed and cannot be changed without reparametrizing the entire model. Example input and data files for DNA duplexes can be found in examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. A simple python setup tool which creates single straight or helical DNA strands, diff --git a/doc/src/dihedral_charmm.txt b/doc/src/dihedral_charmm.txt index f4637e776d6d3ab5ca2365cc0bb8f682e8f880dd..918755ec3889678eacc5625f5b43bc401fb1a301 100644 --- a/doc/src/dihedral_charmm.txt +++ b/doc/src/dihedral_charmm.txt @@ -10,25 +10,25 @@ dihedral_style charmm command :h3 dihedral_style charmm/intel command :h3 dihedral_style charmm/kk command :h3 dihedral_style charmm/omp command :h3 -dihedral_style charmmfsh command :h3 +dihedral_style charmmfsw command :h3 [Syntax:] dihedral_style style :pre -style = {charmm} or {charmmfsh} :ul +style = {charmm} or {charmmfsw} :ul [Examples:] dihedral_style charmm -dihedral_style charmmfsh +dihedral_style charmmfsw dihedral_coeff 1 0.2 1 180 1.0 dihedral_coeff 2 1.8 1 0 1.0 dihedral_coeff 1 3.1 2 180 0.5 :pre [Description:] -The {charmm} and {charmmfsh} dihedral styles use the potential +The {charmm} and {charmmfsw} dihedral styles use the potential :c,image(Eqs/dihedral_charmm.jpg) @@ -38,10 +38,12 @@ field (see comment on weighting factors below). See "(Cornell)"_#dihedral-Cornell for a description of the AMBER force field. -NOTE: The newer {charmmfsh} style was released in March 2017. We +NOTE: The newer {charmmfsw} style was released in March 2017. We recommend it be used instead of the older {charmm} style when running -a simulation with the CHARMM force field and Coulomb cutoffs, via the -"pair_style lj/charmmfsw/coul/charmmfsh"_pair_charmm.html command. +a simulation with the CHARMM force field, either with long-range +Coulombics or a Coulomb cutoff, via the "pair_style +lj/charmmfsw/coul/long"_pair_charmm.html and "pair_style +lj/charmmfsw/coul/charmmfsh"_pair_charmm.html commands respectively. Otherwise the older {charmm} style is fine to use. See the discussion below and more details on the "pair_style charmm"_pair_charmm.html doc page. @@ -86,17 +88,18 @@ default). Otherwise 1-4 non-bonded interactions in dihedrals will be computed twice. For simulations using the CHARMM force field with a Coulomb cutoff, -the difference between the {charmm} and {charmmfsh} styles is in the +the difference between the {charmm} and {charmmfsw} styles is in the computation of the 1-4 non-bond interactions, though only if the distance between the two atoms is within the switching region of the pairwise potential defined by the corresponding CHARMM pair style, -i.e. between the inner and outer cutoffs specified for the pair style. -The {charmmfsh} style should only be used when using the "pair_style -lj/charmmfsw/coul/charmmfsh"_pair_charmm.html to make the Coulombic -pairwise calculations consistent. Use the {charmm} style with -long-range Coulombics or the older "pair_style -lj/charmm/coul/charmm"_pair_charmm.html command. See the discussion -on the "CHARMM pair_style"_pair_charmm.html doc page for details. +i.e. within the outer cutoff specified for the pair style. The +{charmmfsw} style should only be used when using the corresponding +"pair_style lj/charmmfsw/coul/charmmfsw"_pair_charmm.html or +"pair_style lj/charmmfsw/coul/long"_pair_charmm.html commands. Use +the {charmm} style with the older "pair_style"_pair_charmm.html +commands that have just "charmm" in their style name. See the +discussion on the "CHARMM pair_style"_pair_charmm.html doc page for +details. Note that for AMBER force fields, which use pair styles with "lj/cut", the special_bonds 1-4 scaling factor should be set to the AMBER @@ -104,7 +107,7 @@ defaults (1/2 and 5/6) and all the dihedral weighting factors (4th coeff above) must be set to 0.0. In this case, you can use any pair style you wish, since the dihedral does not need any Lennard-Jones parameter information and will not compute any 1-4 non-bonded -interactions. Likewise the {charmm} or {charmmfsh} styles are +interactions. Likewise the {charmm} or {charmmfsw} styles are identical in this case since no 1-4 non-bonded interactions are computed. diff --git a/doc/src/fix_adapt.txt b/doc/src/fix_adapt.txt index a35357a7ec811236d9d5fe5cb17865423bf7b700..d7c32bef3d0d360fb52cc098684ff8dc9ba3c08b 100644 --- a/doc/src/fix_adapt.txt +++ b/doc/src/fix_adapt.txt @@ -22,6 +22,11 @@ attribute = {pair} or {kspace} or {atom} :l pparam = parameter to adapt over time I,J = type pair(s) to set parameter for v_name = variable with name that calculates value of pparam + {bond} args = bstyle bparam I v_name + bstyle = bond style name, e.g. harmonic + bparam = parameter to adapt over time + I = type bond to set parameter for + v_name = variable with name that calculates value of bparam {kspace} arg = v_name v_name = variable with name that calculates scale factor on K-space terms {atom} args = aparam v_name @@ -42,7 +47,10 @@ keyword = {scale} or {reset} :l fix 1 all adapt 1 pair soft a 1 1 v_prefactor fix 1 all adapt 1 pair soft a 2* 3 v_prefactor fix 1 all adapt 1 pair lj/cut epsilon * * v_scale1 coul/cut scale 3 3 v_scale2 scale yes reset yes -fix 1 all adapt 10 atom diameter v_size :pre +fix 1 all adapt 10 atom diameter v_size + +variable ramp_up equal "ramp(0.01,0.5)" +fix stretch all adapt 1 bond harmonic r0 1 v_ramp_up :pre [Description:] @@ -192,6 +200,19 @@ fix 1 all adapt 1 pair soft a * * v_prefactor :pre :line +The {bond} keyword uses the specified variable to change the value of +a bond coefficient over time, very similar to how the {pair} keyword +operates. The only difference is that now a bond coefficient for a +given bond type is adapted. + +Currently {bond} does not support bond_style hybrid nor bond_style +hybrid/overlay as bond styles. The only bonds that currently are +working with fix_adapt are + +"harmonic"_bond_harmonic.html: k,r0: type bonds :tb(c=3,s=:) + +:line + The {kspace} keyword used the specified variable as a scale factor on the energy, forces, virial calculated by whatever K-Space solver is defined by the "kspace_style"_kspace_style.html command. If the diff --git a/doc/src/fix_gcmc.txt b/doc/src/fix_gcmc.txt index 723e0ec6d9899585faedbce58478e65e4b8600e7..53973cdfb816b78bc86e4c16d6bf5d2ff4fa7074 100644 --- a/doc/src/fix_gcmc.txt +++ b/doc/src/fix_gcmc.txt @@ -56,26 +56,25 @@ fix 4 my_gas gcmc 1 10 10 1 123456543 300.0 -12.5 1.0 region disk :pre [Description:] This fix performs grand canonical Monte Carlo (GCMC) exchanges of -atoms or molecules of the given type with an imaginary ideal gas reservoir at -the specified T and chemical potential (mu) as discussed in -"(Frenkel)"_#Frenkel. If used with the "fix nvt"_fix_nh.html command, -simulations in the grand canonical ensemble (muVT, constant chemical -potential, constant volume, and constant temperature) can be +atoms or molecules of the given type with an imaginary ideal gas +reservoir at the specified T and chemical potential (mu) as discussed +in "(Frenkel)"_#Frenkel. If used with the "fix nvt"_fix_nh.html +command, simulations in the grand canonical ensemble (muVT, constant +chemical potential, constant volume, and constant temperature) can be performed. Specific uses include computing isotherms in microporous materials, or computing vapor-liquid coexistence curves. -Every N timesteps the fix attempts a number of GCMC exchanges (insertions -or deletions) of gas atoms or molecules of -the given type between the simulation cell and the imaginary -reservoir. It also attempts a number of Monte Carlo -moves (translations and molecule rotations) of gas of the given type -within the simulation cell or region. The average number of -attempted GCMC exchanges is X. The average number of attempted MC moves is M. -M should typically be chosen to be -approximately equal to the expected number of gas atoms or molecules -of the given type within the simulation cell or region, -which will result in roughly one -MC translation per atom or molecule per MC cycle. +Every N timesteps the fix attempts a number of GCMC exchanges +(insertions or deletions) of gas atoms or molecules of the given type +between the simulation cell and the imaginary reservoir. It also +attempts a number of Monte Carlo moves (translations and molecule +rotations) of gas of the given type within the simulation cell or +region. The average number of attempted GCMC exchanges is X. The +average number of attempted MC moves is M. M should typically be +chosen to be approximately equal to the expected number of gas atoms +or molecules of the given type within the simulation cell or region, +which will result in roughly one MC translation per atom or molecule +per MC cycle. For MC moves of molecular gasses, rotations and translations are each attempted with 50% probability. For MC moves of atomic gasses, @@ -83,47 +82,47 @@ translations are attempted 100% of the time. For MC exchanges of either molecular or atomic gasses, deletions and insertions are each attempted with 50% probability. -All inserted particles are always assigned to two groups: the default group -"all" and the group specified in the fix gcmc command (which can also -be "all"). In addition, particles are also added to any groups specified -by the {group} and {grouptype} keywords. -If inserted particles are individual atoms, they are -assigned the atom type given by the type argument. If they are molecules, -the type argument has no effect and must be set to zero. Instead, -the type of each atom in the inserted molecule is specified -in the file read by the "molecule"_molecule.html command. +All inserted particles are always assigned to two groups: the default +group "all" and the group specified in the fix gcmc command (which can +also be "all"). In addition, particles are also added to any groups +specified by the {group} and {grouptype} keywords. If inserted +particles are individual atoms, they are assigned the atom type given +by the type argument. If they are molecules, the type argument has no +effect and must be set to zero. Instead, the type of each atom in the +inserted molecule is specified in the file read by the +"molecule"_molecule.html command. This fix cannot be used to perform MC insertions of gas atoms or molecules other than the exchanged type, but MC deletions, translations, and rotations can be performed on any atom/molecule in the fix group. All atoms in the simulation cell can be moved using -regular time integration translations, e.g. via -"fix nvt"_fix_nh.html, resulting in a hybrid GCMC+MD simulation. A -smaller-than-usual timestep size may be needed when running such a -hybrid simulation, especially if the inserted molecules are not well -equilibrated. +regular time integration translations, e.g. via "fix nvt"_fix_nh.html, +resulting in a hybrid GCMC+MD simulation. A smaller-than-usual +timestep size may be needed when running such a hybrid simulation, +especially if the inserted molecules are not well equilibrated. This command may optionally use the {region} keyword to define an exchange and move volume. The specified region must have been previously defined with a "region"_region.html command. It must be defined with side = {in}. Insertion attempts occur only within the -specified region. For non-rectangular regions, random trial -points are generated within the rectangular bounding box until a point is found -that lies inside the region. If no valid point is generated after 1000 trials, -no insertion is performed, but it is counted as an attempted insertion. -Move and deletion attempt candidates are selected -from gas atoms or molecules within the region. If there are no candidates, -no move or deletion is performed, but it is counted as an attempt move -or deletion. If an attempted move places the atom or molecule center-of-mass outside -the specified region, a new attempted move is generated. This process is repeated -until the atom or molecule center-of-mass is inside the specified region. +specified region. For non-rectangular regions, random trial points are +generated within the rectangular bounding box until a point is found +that lies inside the region. If no valid point is generated after 1000 +trials, no insertion is performed, but it is counted as an attempted +insertion. Move and deletion attempt candidates are selected from gas +atoms or molecules within the region. If there are no candidates, no +move or deletion is performed, but it is counted as an attempt move or +deletion. If an attempted move places the atom or molecule +center-of-mass outside the specified region, a new attempted move is +generated. This process is repeated until the atom or molecule +center-of-mass is inside the specified region. If used with "fix nvt"_fix_nh.html, the temperature of the imaginary reservoir, T, should be set to be equivalent to the target temperature -used in fix nvt. Otherwise, the imaginary reservoir -will not be in thermal equilibrium with the simulation cell. Also, -it is important that the temperature used by fix nvt be dynamic/dof, -which can be achieved as follows: +used in fix nvt. Otherwise, the imaginary reservoir will not be in +thermal equilibrium with the simulation cell. Also, it is important +that the temperature used by fix nvt be dynamic/dof, which can be +achieved as follows: compute mdtemp mdatoms temp compute_modify mdtemp dynamic/dof yes @@ -137,16 +136,16 @@ interactions. Specifically, avoid performing so many MC translations per timestep that atoms can move beyond the neighbor list skin distance. See the "neighbor"_neighbor.html command for details. -When an atom or molecule is to be inserted, its -coordinates are chosen at a random position within the current -simulation cell or region, and new atom velocities are randomly chosen from -the specified temperature distribution given by T. The effective -temperature for new atom velocities can be increased or decreased -using the optional keyword {tfac_insert} (see below). Relative -coordinates for atoms in a molecule are taken from the template -molecule provided by the user. The center of mass of the molecule -is placed at the insertion point. The orientation of the molecule -is chosen at random by rotating about this point. +When an atom or molecule is to be inserted, its coordinates are chosen +at a random position within the current simulation cell or region, and +new atom velocities are randomly chosen from the specified temperature +distribution given by T. The effective temperature for new atom +velocities can be increased or decreased using the optional keyword +{tfac_insert} (see below). Relative coordinates for atoms in a +molecule are taken from the template molecule provided by the +user. The center of mass of the molecule is placed at the insertion +point. The orientation of the molecule is chosen at random by rotating +about this point. Individual atoms are inserted, unless the {mol} keyword is used. It specifies a {template-ID} previously defined using the @@ -158,15 +157,15 @@ command for details. The only settings required to be in this file are the coordinates and types of atoms in the molecule. When not using the {mol} keyword, you should ensure you do not delete -atoms that are bonded to other atoms, or LAMMPS will -soon generate an error when it tries to find bonded neighbors. LAMMPS will -warn you if any of the atoms eligible for deletion have a non-zero -molecule ID, but does not check for this at the time of deletion. +atoms that are bonded to other atoms, or LAMMPS will soon generate an +error when it tries to find bonded neighbors. LAMMPS will warn you if +any of the atoms eligible for deletion have a non-zero molecule ID, +but does not check for this at the time of deletion. If you wish to insert molecules via the {mol} keyword, that will be treated as rigid bodies, use the {rigid} keyword, specifying as its -value the ID of a separate "fix rigid/small"_fix_rigid.html -command which also appears in your input script. +value the ID of a separate "fix rigid/small"_fix_rigid.html command +which also appears in your input script. NOTE: If you wish the new rigid molecules (and other rigid molecules) to be thermostatted correctly via "fix rigid/small/nvt"_fix_rigid.html @@ -179,30 +178,29 @@ their bonds or angles constrained via SHAKE, use the {shake} keyword, specifying as its value the ID of a separate "fix shake"_fix_shake.html command which also appears in your input script. -Optionally, users may specify the maximum rotation angle for -molecular rotations using the {maxangle} keyword and specifying -the angle in degrees. Rotations are performed by generating a random -point on the unit sphere and a random rotation angle on the -range \[0,maxangle). The molecule is then rotated by that angle about an +Optionally, users may specify the maximum rotation angle for molecular +rotations using the {maxangle} keyword and specifying the angle in +degrees. Rotations are performed by generating a random point on the +unit sphere and a random rotation angle on the range +\[0,maxangle). The molecule is then rotated by that angle about an axis passing through the molecule center of mass. The axis is parallel -to the unit vector defined by the point on the unit sphere. -The same procedure is used for randomly rotating molecules when they -are inserted, except that the maximum angle is 360 degrees. +to the unit vector defined by the point on the unit sphere. The same +procedure is used for randomly rotating molecules when they are +inserted, except that the maximum angle is 360 degrees. -Note that fix GCMC does not use configurational bias -MC or any other kind of sampling of intramolecular degrees of freedom. -Inserted molecules can have different orientations, but they will all -have the same intramolecular configuration, -which was specified in the molecule command input. +Note that fix GCMC does not use configurational bias MC or any other +kind of sampling of intramolecular degrees of freedom. Inserted +molecules can have different orientations, but they will all have the +same intramolecular configuration, which was specified in the molecule +command input. For atomic gasses, inserted atoms have the specified atom type, but -deleted atoms are any atoms that have been inserted or that belong -to the user-specified fix group. For molecular gasses, exchanged -molecules use the same atom types as in the template molecule -supplied by the user. In both cases, exchanged -atoms/molecules are assigned to two groups: the default group "all" -and the group specified in the fix gcmc command (which can also be -"all"). +deleted atoms are any atoms that have been inserted or that belong to +the user-specified fix group. For molecular gasses, exchanged +molecules use the same atom types as in the template molecule supplied +by the user. In both cases, exchanged atoms/molecules are assigned to +two groups: the default group "all" and the group specified in the fix +gcmc command (which can also be "all"). The chemical potential is a user-specified input parameter defined as: @@ -211,11 +209,12 @@ as: The second term mu_ex is the excess chemical potential due to energetic interactions and is formally zero for the fictitious gas -reservoir but is non-zero for interacting systems. So, while the chemical -potential of the reservoir and the simulation cell are equal, mu_ex is not, -and as a result, the densities of the two are generally quite different. -The first term mu_id is the ideal gas contribution to the chemical potential. -mu_id can be related to the density or pressure of the fictitious gas reservoir by: +reservoir but is non-zero for interacting systems. So, while the +chemical potential of the reservoir and the simulation cell are equal, +mu_ex is not, and as a result, the densities of the two are generally +quite different. The first term mu_id is the ideal gas contribution +to the chemical potential. mu_id can be related to the density or +pressure of the fictitious gas reservoir by: :c,image(Eqs/fix_gcmc2.jpg) @@ -228,27 +227,27 @@ de Broglie wavelength :c,image(Eqs/fix_gcmc3.jpg) -where h is Planck's constant, and m is the mass of the exchanged atom or molecule. -For unit style {lj}, Lambda is simply set to the unity. Note that prior to March 2017 -Lambda for unit style {lj} was calculated using the above formula with h set to -the rather specific value of 0.18292026. Chemical potential -under the old definition can be converted to an equivalent value under the new -definition by subtracting 3kTln(Lambda_old). +where h is Planck's constant, and m is the mass of the exchanged atom +or molecule. For unit style {lj}, Lambda is simply set to the +unity. Note that prior to March 2017, lambda for unit style {lj} was +calculated using the above formula with h set to the rather specific +value of 0.18292026. Chemical potential under the old definition can +be converted to an equivalent value under the new definition by +subtracting 3kTln(Lambda_old). As an alternative to specifying mu directly, the ideal gas reservoir -can be defined by its pressure P using the {pressure} -keyword, in which case the user-specified chemical potential is -ignored. The user may also specify the -fugacity coefficient phi using the {fugacity_coeff} keyword, which -defaults to unity. +can be defined by its pressure P using the {pressure} keyword, in +which case the user-specified chemical potential is ignored. The user +may also specify the fugacity coefficient phi using the +{fugacity_coeff} keyword, which defaults to unity. The {full_energy} option means that fix GCMC will compute the total potential energy of the entire simulated system. The total system energy before and after the proposed GCMC move is then used in the Metropolis criterion to determine whether or not to accept the -proposed GCMC move. By default, this option is off, in which case -only partial energies are computed to determine the difference in -energy that would be caused by the proposed GCMC move. +proposed GCMC move. By default, this option is off, in which case only +partial energies are computed to determine the difference in energy +that would be caused by the proposed GCMC move. The {full_energy} option is needed for systems with complicated potential energy calculations, including the following: @@ -258,7 +257,6 @@ potential energy calculations, including the following: hybrid pair styles eam pair styles tail corrections - need to include potential energy contributions from other fixes :ul In these cases, LAMMPS will automatically apply the {full_energy} @@ -267,42 +265,43 @@ keyword and issue a warning message. When the {mol} keyword is used, the {full_energy} option also includes the intramolecular energy of inserted and deleted molecules. If this is not desired, the {intra_energy} keyword can be used to define an -amount of energy that is subtracted from the final energy when a molecule -is inserted, and added to the initial energy when a molecule is -deleted. For molecules that have a non-zero intramolecular energy, this -will ensure roughly the same behavior whether or not the {full_energy} -option is used. - -Inserted atoms and molecules are assigned random velocities based on the -specified temperature T. Because the relative velocity of -all atoms in the molecule is zero, this may result in inserted molecules -that are systematically too cold. In addition, the intramolecular potential -energy of the inserted molecule may cause the kinetic energy -of the molecule to quickly increase or decrease after insertion. -The {tfac_insert} keyword allows the user to counteract these effects -by changing the temperature used to assign velocities to -inserted atoms and molecules by a constant factor. For a -particular application, some experimentation may be required -to find a value of {tfac_insert} that results in inserted molecules that -equilibrate quickly to the correct temperature. +amount of energy that is subtracted from the final energy when a +molecule is inserted, and added to the initial energy when a molecule +is deleted. For molecules that have a non-zero intramolecular energy, +this will ensure roughly the same behavior whether or not the +{full_energy} option is used. + +Inserted atoms and molecules are assigned random velocities based on +the specified temperature T. Because the relative velocity of all +atoms in the molecule is zero, this may result in inserted molecules +that are systematically too cold. In addition, the intramolecular +potential energy of the inserted molecule may cause the kinetic energy +of the molecule to quickly increase or decrease after insertion. The +{tfac_insert} keyword allows the user to counteract these effects by +changing the temperature used to assign velocities to inserted atoms +and molecules by a constant factor. For a particular application, some +experimentation may be required to find a value of {tfac_insert} that +results in inserted molecules that equilibrate quickly to the correct +temperature. Some fixes have an associated potential energy. Examples of such fixes include: "efield"_fix_efield.html, "gravity"_fix_gravity.html, "addforce"_fix_addforce.html, "langevin"_fix_langevin.html, -"restrain"_fix_restrain.html, "temp/berendsen"_fix_temp_berendsen.html, +"restrain"_fix_restrain.html, +"temp/berendsen"_fix_temp_berendsen.html, "temp/rescale"_fix_temp_rescale.html, and "wall fixes"_fix_wall.html. For that energy to be included in the total potential energy of the -system (the quantity used when performing GCMC moves), -you MUST enable the "fix_modify"_fix_modify.html {energy} option for -that fix. The doc pages for individual "fix"_fix.html commands -specify if this should be done. +system (the quantity used when performing GCMC moves), you MUST enable +the "fix_modify"_fix_modify.html {energy} option for that fix. The +doc pages for individual "fix"_fix.html commands specify if this +should be done. Use the {charge} option to insert atoms with a user-specified point -charge. Note that doing so will cause the system to become non-neutral. -LAMMPS issues a warning when using long-range electrostatics (kspace) -with non-neutral systems. See the -"compute group/group"_compute_group_group.html documentation for more -details about simulating non-neutral systems with kspace on. +charge. Note that doing so will cause the system to become +non-neutral. LAMMPS issues a warning when using long-range +electrostatics (kspace) with non-neutral systems. See the "compute +group/group"_compute_group_group.html documentation for more details +about simulating non-neutral systems with kspace on. Use of this fix typically will cause the number of atoms to fluctuate, therefore, you will want to use the @@ -310,23 +309,23 @@ therefore, you will want to use the current number of atoms is used as a normalizing factor each time temperature is computed. Here is the necessary command: -NOTE: If the density of the cell is initially very small or zero, -and increases to a much larger density after a period of equilibration, +NOTE: If the density of the cell is initially very small or zero, and +increases to a much larger density after a period of equilibration, then certain quantities that are only calculated once at the start -(kspace parameters, tail corrections) may no longer be accurate. -The solution is to start a new simulation after the equilibrium -density has been reached. +(kspace parameters, tail corrections) may no longer be accurate. The +solution is to start a new simulation after the equilibrium density +has been reached. With some pair_styles, such as "Buckingham"_pair_buck.html, -"Born-Mayer-Huggins"_pair_born.html and "ReaxFF"_pair_reax_c.html, -two atoms placed close to each other may have an arbitrary large, -negative potential energy due to the functional form of the potential. -While these unphysical configurations are inaccessible -to typical dynamical trajectories, -they can be generated by Monte Carlo moves. The {overlap_cutoff} -keyword suppresses these moves by effectively assigning an -infinite positive energy to all new configurations that place any -pair of atoms closer than the specified overlap cutoff distance. +"Born-Mayer-Huggins"_pair_born.html and "ReaxFF"_pair_reax_c.html, two +atoms placed close to each other may have an arbitrary large, negative +potential energy due to the functional form of the potential. While +these unphysical configurations are inaccessible to typical dynamical +trajectories, they can be generated by Monte Carlo moves. The +{overlap_cutoff} keyword suppresses these moves by effectively +assigning an infinite positive energy to all new configurations that +place any pair of atoms closer than the specified overlap cutoff +distance. compute_modify thermo_temp dynamic yes :pre @@ -336,10 +335,10 @@ derived from LJ parameters for argon, where h* = h/sqrt(sigma^2 * epsilon * mass), sigma = 3.429 angstroms, epsilon/k = 121.85 K, and mass = 39.948 amu. -The {group} keyword assigns all inserted atoms to the "group"_group.html -of the group-ID value. The {grouptype} keyword assigns all -inserted atoms of the specified type to the "group"_group.html -of the group-ID value. +The {group} keyword assigns all inserted atoms to the +"group"_group.html of the group-ID value. The {grouptype} keyword +assigns all inserted atoms of the specified type to the +"group"_group.html of the group-ID value. [Restart, fix_modify, output, run start/stop, minimize info:] @@ -387,15 +386,15 @@ well in parallel. Only usable for 3D simulations. Note that very lengthy simulations involving insertions/deletions of billions of gas molecules may run out of atom or molecule IDs and trigger an error, so it is better to run multiple shorter-duration -simulations. Likewise, very large molecules have not been tested -and may turn out to be problematic. +simulations. Likewise, very large molecules have not been tested and +may turn out to be problematic. Use of multiple fix gcmc commands in the same input script can be problematic if using a template molecule. The issue is that the -user-referenced template molecule in the second fix gcmc command -may no longer exist since it might have been deleted by the first -fix gcmc command. An existing template molecule will need to be -referenced by the user for each subsequent fix gcmc command. +user-referenced template molecule in the second fix gcmc command may +no longer exist since it might have been deleted by the first fix gcmc +command. An existing template molecule will need to be referenced by +the user for each subsequent fix gcmc command. [Related commands:] diff --git a/doc/src/kspace_modify.txt b/doc/src/kspace_modify.txt index 7a6c7191f053702655fef2a66ba162f35c094037..b488df9627800e47d27d62849d0e0e18c0348e7d 100644 --- a/doc/src/kspace_modify.txt +++ b/doc/src/kspace_modify.txt @@ -290,9 +290,10 @@ to be specified using the {gewald/disp}, {mesh/disp}, {force/disp/real} or {force/disp/kspace} keywords, or the code will stop with an error message. When this option is set to {yes}, the error message will not appear and the simulation will start. -For a typical application, using the automatic parameter generation will provide -simulations that are either inaccurate or slow. Using this option is thus not -recommended. For guidelines on how to obtain good parameters, see the "How-To"_Section_howto.html#howto_23 discussion. +For a typical application, using the automatic parameter generation +will provide simulations that are either inaccurate or slow. Using this +option is thus not recommended. For guidelines on how to obtain good +parameters, see the "How-To"_Section_howto.html#howto_24 discussion. [Restrictions:] none diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 85fb9f7e9eb54409052112f522f37dede9a1e721..6c68955bc9f8eeb646a88f7dfd617df4119c8146 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -464,6 +464,7 @@ pair_nb3b_harmonic.html pair_nm.html pair_none.html pair_oxdna.html +pair_oxdna2.html pair_peri.html pair_polymorphic.html pair_quip.html diff --git a/doc/src/pair_buck.txt b/doc/src/pair_buck.txt index 1b9f333376afd295143f5f5dfdda163b4c6a6e99..49161404c3dd370f97f922079864dd5eeddebd9b 100644 --- a/doc/src/pair_buck.txt +++ b/doc/src/pair_buck.txt @@ -75,7 +75,7 @@ Lennard-Jones 12/6) given by :c,image(Eqs/pair_buck.jpg) where rho is an ionic-pair dependent length parameter, and Rc is the -cutoff on both terms. +cutoff on both terms. The styles with {coul/cut} or {coul/long} or {coul/msm} add a Coulombic term as described for the "lj/cut"_pair_lj.html pair styles. @@ -120,6 +120,9 @@ cutoff (distance units) cutoff2 (distance units) :ul The second coefficient, rho, must be greater than zero. +The coefficients A, rho, and C can be written as analytical expressions +of epsilon and sigma, in analogy to the Lennard-Jones potential +"(Khrapak)"_#Khrapak. The latter 2 coefficients are optional. If not specified, the global A,C and Coulombic cutoffs are used. If only one cutoff is specified, @@ -127,7 +130,6 @@ it is used as the cutoff for both A,C and Coulombic interactions for this type pair. If both coefficients are specified, they are used as the A,C and Coulombic cutoffs for this type pair. You cannot specify 2 cutoffs for style {buck}, since it has no Coulombic terms. - For {buck/coul/long} only the LJ cutoff can be specified since a Coulombic cutoff cannot be specified for an individual I,J type pair. All type pairs use the same global Coulombic cutoff specified in the @@ -194,3 +196,6 @@ only enabled if LAMMPS was built with that package. See the "pair_coeff"_pair_coeff.html, "pair_style born"_pair_born.html [Default:] none + +:link(Khrapak) +[(Khrapak)] Khrapak, Chaudhuri, and Morfill, J Chem Phys, 134, 054120 (2011). diff --git a/doc/src/pair_charmm.txt b/doc/src/pair_charmm.txt index 94954a222670b2a8d004acfe4ebad732cb27f272..9c5973c7255e240b5da207e9458c770198cfed43 100644 --- a/doc/src/pair_charmm.txt +++ b/doc/src/pair_charmm.txt @@ -49,8 +49,8 @@ args = list of arguments for a particular style :ul pair_style lj/charmm/coul/charmm 8.0 10.0 pair_style lj/charmm/coul/charmm 8.0 10.0 7.0 9.0 -pair_style lj/charmmfsw/coul/charmmfsh 8.0 10.0 -pair_style lj/charmmfsw/coul/charmmfsh 8.0 10.0 7.0 9.0 +pair_style lj/charmmfsw/coul/charmmfsh 10.0 12.0 +pair_style lj/charmmfsw/coul/charmmfsh 10.0 12.0 9.0 pair_coeff * * 100.0 2.0 pair_coeff 1 1 100.0 2.0 150.0 3.5 :pre @@ -99,9 +99,10 @@ artifacts. NOTE: The newer {charmmfsw} or {charmmfsh} styles were released in March 2017. We recommend they be used instead of the older {charmm} -styles. Eventually code from the new styles will propagate into the -related pair styles (e.g. implicit, accelerator, free energy -variants). +styles. This includes the newer "dihedral_style +charmmfsw"_dihedral_charmm.html command. Eventually code from the new +styles will propagate into the related pair styles (e.g. implicit, +accelerator, free energy variants). The general CHARMM formulas are as follows diff --git a/examples/cmap/in.cmap b/examples/cmap/in.cmap index d2b2714b826fc2f25abc00b2ec0c265726dc3e87..3b6f2767edc8cb8cbfcb99cbbb1446458fe7e4a0 100644 --- a/examples/cmap/in.cmap +++ b/examples/cmap/in.cmap @@ -9,11 +9,10 @@ boundary p p p atom_style full bond_style harmonic angle_style charmm -dihedral_style charmm +dihedral_style charmmfsw improper_style harmonic -pair_style lj/charmm/coul/charmm 8 12 -#pair_style lj/charmmfsw/coul/charmmfsh 8 12 +pair_style lj/charmmfsw/coul/charmmfsh 8 12 pair_modify mix arithmetic fix cmap all cmap charmm22.cmap diff --git a/examples/cmap/log.11Apr17.cmap.g++.1 b/examples/cmap/log.11Apr17.cmap.g++.1 new file mode 100644 index 0000000000000000000000000000000000000000..9b4fc299915be074b17d491b84f523246ad114e3 --- /dev/null +++ b/examples/cmap/log.11Apr17.cmap.g++.1 @@ -0,0 +1,205 @@ +LAMMPS (31 Mar 2017) +# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 + +units real +neigh_modify delay 2 every 1 +#newton off + +boundary p p p + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmmfsw +improper_style harmonic + +pair_style lj/charmmfsw/coul/charmmfsh 8 12 +pair_modify mix arithmetic + +fix cmap all cmap charmm22.cmap +Reading potential file charmm22.cmap with DATE: 2016-09-26 +fix_modify cmap energy yes + +read_data gagg.data fix cmap crossterm CMAP + orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 34 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 12 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 33 bonds + reading angles ... + 57 angles + reading dihedrals ... + 75 dihedrals + reading impropers ... + 7 impropers + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 13 = max # of 1-4 neighbors + 16 = max # of special neighbors + +special_bonds charmm +fix 1 all nve + +#fix 1 all nvt temp 300 300 100.0 +#fix 2 all shake 1e-9 500 0 m 1.0 + +velocity all create 0.0 12345678 dist uniform + +thermo 1000 +thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp +timestep 2.0 + +run 100000 +Neighbor list info ... + update every 1 steps, delay 2 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmmfsw/coul/charmmfsh, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.96 | 14.96 | 14.96 Mbytes +Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro + 0 16.287573 -0.85933785 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 + 1000 18.816462 -0.84379243 0.78931817 2.7554247 4.4371421 -2.7762038 0.12697656 + 2000 18.091571 -1.045888 0.72306589 3.0951524 4.6725102 -2.3580092 0.22712496 + 3000 17.835596 -1.2171641 0.72666403 2.6696491 5.4373798 -2.0737041 0.075101693 + 4000 16.211232 -0.42713611 0.99472642 3.8961462 5.2009895 -2.5626866 0.17356243 + 5000 17.72183 -0.57081189 0.90733068 3.4376382 4.5457582 -2.3727543 0.12354518 + 6000 18.753977 -1.5772499 0.81468321 2.9236782 4.6033216 -2.3380859 0.12835782 + 7000 18.186024 -0.84205608 0.58996182 3.0329585 4.7221473 -2.5733243 0.10047631 + 8000 18.214306 -1.1360938 0.72597611 3.7493028 4.7319958 -2.8957969 0.2006046 + 9000 17.248408 -0.48641993 0.90266229 2.9721743 4.7651056 -2.1473354 0.1302043 + 10000 17.760655 -1.2968444 0.92384663 3.7007455 4.7378947 -2.2147779 0.06940579 + 11000 17.633929 -0.57368413 0.84872849 3.4277114 4.285393 -2.236944 0.17204973 + 12000 18.305835 -1.0675148 0.75879532 2.8853173 4.685027 -2.409087 0.087538866 + 13000 17.391558 -0.9975291 0.66671947 3.8065638 5.2285578 -2.4198822 0.06253594 + 14000 17.483387 -0.67727643 0.91966477 3.7317031 4.7770445 -2.6080027 0.11487095 + 15000 18.131749 -1.1918751 1.0025684 3.1238131 4.789742 -2.2546745 0.13782813 + 16000 16.972343 -0.43926531 0.60644597 3.7551592 4.8658618 -2.2627659 0.12353145 + 17000 18.080785 -1.2073565 0.7867072 3.5671106 4.43754 -2.5092904 0.17429146 + 18000 17.474576 -0.97836065 0.8678524 3.7961537 4.3409032 -1.8922572 0.134048 + 19000 17.000911 -1.2286864 0.83615834 3.9322908 4.9319492 -2.3281576 0.056689619 + 20000 17.043286 -0.8506561 0.80966589 3.5087339 4.8603878 -2.3365263 0.096794824 + 21000 17.314495 -1.1430889 0.95363892 4.2446032 4.2756745 -2.1829483 0.17119518 + 22000 18.954881 -0.998673 0.58688334 2.71536 4.6634319 -2.6862804 0.20328442 + 23000 17.160427 -0.97803282 0.86894041 4.0897736 4.3146238 -2.1962289 0.075339092 + 24000 17.602026 -1.0833323 0.94888776 3.7341878 4.3084335 -2.1640414 0.081493681 + 25000 17.845584 -1.3432612 0.93497086 3.8911043 4.468032 -2.3475883 0.093204333 + 26000 17.833261 -1.1020534 0.77931087 3.7628141 4.512381 -2.3134761 0.15568465 + 27000 17.68607 -1.3222026 1.1985872 3.5817624 4.6360755 -2.3492774 0.08427906 + 28000 18.326649 -1.2669291 0.74809075 3.2624429 4.4698564 -2.3679076 0.14677293 + 29000 17.720933 -1.0773886 0.83099482 3.7652834 4.6584594 -2.8255303 0.23092596 + 30000 18.201999 -1.0168706 1.0637455 3.453095 4.3738593 -2.8063214 0.18658217 + 31000 17.823502 -1.2685768 0.84805585 3.8600661 4.2195821 -2.1169716 0.12517101 + 32000 16.883133 -0.62062648 0.84434922 3.5042683 5.1264906 -2.2674699 0.030138165 + 33000 17.805715 -1.679553 1.2430372 4.314677 4.2523894 -2.3008321 0.18591872 + 34000 16.723767 -0.54189072 1.1282827 3.8542159 4.3026559 -2.2186336 0.05392425 + 35000 17.976909 -0.72092075 0.5876319 2.9726396 5.0881439 -2.491692 0.17356291 + 36000 18.782492 -1.514246 0.63237955 3.2777164 4.6077164 -2.502574 0.082537318 + 37000 17.247716 -0.6344626 0.79885976 3.452491 4.7618281 -2.3902444 0.11450271 + 38000 17.996494 -1.6712877 1.0111769 4.1689136 4.46963 -2.4076725 0.11875756 + 39000 17.586857 -0.74508086 0.95970486 3.7395038 4.6011357 -2.9854953 0.30143284 + 40000 17.494879 -0.30772446 0.72047991 3.2604877 4.7283734 -2.3812495 0.16399034 + 41000 15.855772 -0.49642605 0.82496448 4.5139653 4.76884 -2.214141 0.10899661 + 42000 17.898568 -1.3078863 1.1505144 4.0429873 4.3889581 -2.8696559 0.23336417 + 43000 19.014372 -1.6325979 1.1553166 3.5660772 4.4047997 -2.9302044 0.13672127 + 44000 18.250782 -0.97211613 0.72714301 3.2258362 4.7257298 -2.5533613 0.11968073 + 45000 17.335174 0.24746331 1.0415866 3.3220992 4.5251095 -3.0415216 0.24453084 + 46000 17.72846 -0.9541418 0.88153841 3.7893452 4.5251883 -2.4003613 0.051809816 + 47000 18.226762 -0.67057787 0.84352989 3.0609522 4.5449078 -2.4694254 0.073703949 + 48000 17.838074 -0.88768441 1.3812262 3.5890492 4.5827868 -3.0137515 0.21417113 + 49000 17.973733 -0.75118705 0.69667886 3.3989025 4.7058886 -2.8243945 0.26665792 + 50000 17.461583 -0.65040016 0.68943524 2.9374743 5.6971777 -2.4438011 0.1697603 + 51000 16.79766 -0.010684434 0.89795555 3.959039 4.56763 -2.5101098 0.15048853 + 52000 17.566543 -0.7262764 0.74354418 3.3423185 4.8426523 -2.4187649 0.16908776 + 53000 17.964274 -0.9270914 1.065952 3.0397181 4.4682262 -2.2179503 0.07873406 + 54000 17.941256 -0.5807578 0.76516121 3.7262371 4.6975126 -3.179899 0.24433708 + 55000 17.079478 -0.48559832 0.95364453 3.0414645 5.2811414 -2.7064882 0.30102814 + 56000 17.632179 -0.75403299 0.97577942 3.3672363 4.4851336 -2.3683659 0.051117638 + 57000 16.17128 -0.44699325 0.76341543 4.267716 5.0881056 -2.4122329 0.16671692 + 58000 16.899276 -0.76481024 1.0400825 3.973493 4.8823309 -2.4270284 0.048716383 + 59000 18.145412 -0.84968335 0.71698306 3.2024358 4.6115739 -2.2520353 0.19466966 + 60000 17.578258 -1.0067331 0.72822527 3.5375208 4.9110255 -2.2319607 0.11922362 + 61000 17.434762 -1.0244393 0.90593099 3.8446915 4.8571191 -2.6228357 0.23259208 + 62000 17.580489 -1.1135917 0.79577432 3.7043524 4.6058114 -2.351492 0.042904152 + 63000 18.207335 -1.1512268 0.82684507 3.4114738 4.351069 -2.1878441 0.082922105 + 64000 18.333083 -1.1182287 0.74058959 3.6905164 4.3226172 -2.7110393 0.14721704 + 65000 16.271579 -0.7122151 1.0200168 4.6983643 4.3681131 -2.194921 0.12831024 + 66000 17.316444 -0.5729385 0.85254108 3.5769963 4.5526705 -2.3321328 0.040452643 + 67000 17.19011 -0.8814312 1.1381258 3.8605789 4.4183813 -2.299607 0.091527355 + 68000 18.223367 -1.362189 0.74472056 3.259165 4.486512 -2.2181134 0.048952796 + 69000 17.646348 -0.91647162 0.73990335 3.9313692 5.2663097 -3.3816778 0.27769877 + 70000 18.173493 -1.3107718 0.96484426 3.219728 4.5045124 -2.3349534 0.082327407 + 71000 17.0627 -0.58509083 0.85964129 3.8490884 4.437895 -2.1673348 0.24151404 + 72000 17.809764 -0.35128902 0.65479258 3.3945008 4.6160508 -2.5486166 0.10829531 + 73000 18.27769 -1.0739758 0.80890957 3.6070901 4.6256762 -2.4576547 0.080025736 + 74000 18.109437 -1.0691837 0.66679323 3.5923203 4.4825716 -2.5048169 0.21372319 + 75000 17.914569 -1.3500765 1.2993494 3.362421 4.4160377 -2.1278163 0.19397641 + 76000 16.563928 -0.16539261 1.0067302 3.5742755 4.8581915 -2.1362429 0.059822408 + 77000 18.130477 -0.38361279 0.43406954 3.4725995 4.7005855 -2.8836242 0.11958174 + 78000 16.746204 -1.1732959 0.7455507 3.6296638 5.6344113 -2.459208 0.16099803 + 79000 18.243999 -1.5850155 1.0108545 3.4727867 4.3367411 -2.316686 0.070480814 + 80000 16.960715 -0.84100929 0.91604996 3.862215 4.780949 -2.3711596 0.073916605 + 81000 17.697722 -1.1126605 0.952804 3.7114455 4.4216316 -2.2770085 0.091372066 + 82000 17.835901 -1.3091474 0.71867629 3.8168122 5.0150205 -2.4730634 0.062592852 + 83000 19.168418 -1.476938 0.75592316 3.2304519 4.3946471 -2.2991395 0.13083324 + 84000 17.945778 -1.5223622 1.0859941 3.4334011 5.0286682 -2.7550892 0.2476269 + 85000 17.950251 -0.85843846 0.86888218 3.3101287 4.5511879 -2.3640013 0.12080834 + 86000 17.480699 -0.97493649 0.85049761 3.4973085 4.6344922 -2.343121 0.2009677 + 87000 17.980244 -1.114983 0.88796989 3.4113329 4.3535853 -2.2535412 0.14494917 + 88000 18.023866 -1.226683 0.62339706 3.7649269 4.5923973 -2.3923523 0.10464375 + 89000 16.362829 -0.311462 1.0265375 4.0101723 4.4184777 -2.0314129 0.056570704 + 90000 17.533149 -0.41526788 1.0362029 3.4247412 4.2734431 -2.4776658 0.16960663 + 91000 17.719099 -1.1956801 1.0069945 3.2380672 4.8982805 -2.2154906 0.12950936 + 92000 17.762654 -1.170027 0.95814525 3.5217717 4.5405343 -2.5983677 0.15037754 + 93000 17.393958 -0.45641026 0.6579069 3.6002204 4.5942053 -2.5559641 0.12026544 + 94000 16.8182 -0.92962066 0.86801362 4.2914398 4.659848 -2.5251987 0.18000415 + 95000 17.642086 -0.7994896 0.7003756 3.8036697 4.5252487 -2.4166307 0.15686517 + 96000 18.114292 -1.5102104 1.2635908 3.2764427 5.0659496 -2.2777806 0.054309645 + 97000 18.575765 -1.6015311 0.69500699 3.1649317 4.9945742 -2.4012125 0.067373724 + 98000 16.578893 -0.78030229 0.91524222 4.4429655 4.4622392 -2.4052655 0.15355705 + 99000 17.26063 -0.57832833 0.7098846 3.9000046 4.5576484 -2.5333026 0.25517222 + 100000 18.377235 -0.89109577 0.68988617 2.8751751 4.4115591 -2.3560731 0.12185212 +Loop time of 2.96043 on 1 procs for 100000 steps with 34 atoms + +Performance: 5836.990 ns/day, 0.004 hours/ns, 33778.875 timesteps/s +99.9% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.074 | 1.074 | 1.074 | 0.0 | 36.28 +Bond | 1.6497 | 1.6497 | 1.6497 | 0.0 | 55.72 +Neigh | 0.007576 | 0.007576 | 0.007576 | 0.0 | 0.26 +Comm | 0.012847 | 0.012847 | 0.012847 | 0.0 | 0.43 +Output | 0.0010746 | 0.0010746 | 0.0010746 | 0.0 | 0.04 +Modify | 0.16485 | 0.16485 | 0.16485 | 0.0 | 5.57 +Other | | 0.05037 | | | 1.70 + +Nlocal: 34 ave 34 max 34 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 395 ave 395 max 395 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 395 +Ave neighs/atom = 11.6176 +Ave special neighs/atom = 9.52941 +Neighbor list builds = 253 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/cmap/log.11Apr17.cmap.g++.4 b/examples/cmap/log.11Apr17.cmap.g++.4 new file mode 100644 index 0000000000000000000000000000000000000000..ec471d5a7e683d379713e0862ddc7074c8d48915 --- /dev/null +++ b/examples/cmap/log.11Apr17.cmap.g++.4 @@ -0,0 +1,205 @@ +LAMMPS (31 Mar 2017) +# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 + +units real +neigh_modify delay 2 every 1 +#newton off + +boundary p p p + +atom_style full +bond_style harmonic +angle_style charmm +dihedral_style charmmfsw +improper_style harmonic + +pair_style lj/charmmfsw/coul/charmmfsh 8 12 +pair_modify mix arithmetic + +fix cmap all cmap charmm22.cmap +Reading potential file charmm22.cmap with DATE: 2016-09-26 +fix_modify cmap energy yes + +read_data gagg.data fix cmap crossterm CMAP + orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 34 atoms + scanning bonds ... + 4 = max bonds/atom + scanning angles ... + 6 = max angles/atom + scanning dihedrals ... + 12 = max dihedrals/atom + scanning impropers ... + 1 = max impropers/atom + reading bonds ... + 33 bonds + reading angles ... + 57 angles + reading dihedrals ... + 75 dihedrals + reading impropers ... + 7 impropers + 4 = max # of 1-2 neighbors + 7 = max # of 1-3 neighbors + 13 = max # of 1-4 neighbors + 16 = max # of special neighbors + +special_bonds charmm +fix 1 all nve + +#fix 1 all nvt temp 300 300 100.0 +#fix 2 all shake 1e-9 500 0 m 1.0 + +velocity all create 0.0 12345678 dist uniform + +thermo 1000 +thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp +timestep 2.0 + +run 100000 +Neighbor list info ... + update every 1 steps, delay 2 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 14 + ghost atom cutoff = 14 + binsize = 7, bins = 12 12 12 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair lj/charmmfsw/coul/charmmfsh, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard +Per MPI rank memory allocation (min/avg/max) = 14.94 | 15.57 | 16.2 Mbytes +Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro + 0 16.287573 -0.85933785 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 + 1000 18.816462 -0.84379243 0.78931817 2.7554247 4.4371421 -2.7762038 0.12697656 + 2000 18.091571 -1.045888 0.72306589 3.0951524 4.6725102 -2.3580092 0.22712496 + 3000 17.835596 -1.2171641 0.72666403 2.6696491 5.4373798 -2.0737041 0.075101693 + 4000 16.211232 -0.42713611 0.99472642 3.8961462 5.2009895 -2.5626866 0.17356243 + 5000 17.72183 -0.57081189 0.90733068 3.4376382 4.5457582 -2.3727543 0.12354518 + 6000 18.753977 -1.5772499 0.81468321 2.9236782 4.6033216 -2.3380859 0.12835782 + 7000 18.186024 -0.84205609 0.58996181 3.0329584 4.7221473 -2.5733244 0.10047631 + 8000 18.214306 -1.1360934 0.72597583 3.7493032 4.7319959 -2.8957975 0.20060467 + 9000 17.248415 -0.48642024 0.90266262 2.9721744 4.7651003 -2.1473349 0.13020438 + 10000 17.760663 -1.2968458 0.92384687 3.7007432 4.7378917 -2.2147799 0.06940514 + 11000 17.63395 -0.57366075 0.84871737 3.4276851 4.2853865 -2.2369491 0.17205075 + 12000 18.305713 -1.0672299 0.75876262 2.8852171 4.6850229 -2.4090072 0.087568888 + 13000 17.383367 -0.99678627 0.66712651 3.8060954 5.233865 -2.4180629 0.062014239 + 14000 17.510901 -0.68723297 0.92448551 3.7550867 4.7321218 -2.6059088 0.11504409 + 15000 18.080165 -1.13316 0.99982253 3.09947 4.8171402 -2.2713372 0.14580371 + 16000 17.383245 -0.4535296 0.57826268 3.6453593 4.6541138 -2.2434512 0.13285609 + 17000 17.111153 -0.3414839 0.73667584 3.7485311 4.6262965 -2.6166049 0.12635815 + 18000 16.862046 -1.3592061 1.2371142 4.4878937 4.2937117 -2.2112584 0.066145125 + 19000 18.313891 -1.654238 0.90644101 3.3934089 4.550735 -2.1862171 0.081267736 + 20000 19.083561 -1.3081747 0.56257812 2.7633848 4.6211438 -2.5196707 0.13763071 + 21000 18.23741 -1.051353 0.64408722 3.1735565 4.6912533 -2.2491947 0.099394904 + 22000 17.914515 -0.89769621 0.61793801 3.1224992 4.8683543 -2.282475 0.14524537 + 23000 16.756122 -0.98277883 1.2554905 3.7916115 4.7301443 -2.3094994 0.10226772 + 24000 16.109857 -0.54593177 0.86934462 4.4293574 4.926985 -2.2652264 0.11414331 + 25000 18.590559 -1.497327 1.1898361 2.9134403 4.7854107 -2.4437918 0.067416154 + 26000 18.493391 -1.0533797 0.4889578 3.6563013 4.6171721 -2.3240835 0.11607829 + 27000 18.646522 -1.1229601 0.67956815 2.7937638 4.8991207 -2.4068997 0.10109147 + 28000 18.545103 -1.7237438 0.72488022 3.8041665 4.6459974 -2.4339333 0.21943258 + 29000 17.840505 -1.0909667 0.88133248 3.3698456 5.0311644 -2.5116617 0.08102693 + 30000 17.649527 -0.65409177 0.86781692 3.24112 4.9903073 -2.6234925 0.14799777 + 31000 18.156812 -0.77476556 0.83192789 2.9620784 4.9160635 -2.8571635 0.22283201 + 32000 18.251583 -1.3384075 0.8059007 3.2588176 4.4365328 -2.1875071 0.087883637 + 33000 17.702785 -0.88311587 0.98573641 3.4645713 4.2650091 -2.0909158 0.14233004 + 34000 17.123413 -1.4873429 1.0419563 4.2628178 4.6318762 -2.2292095 0.105354 + 35000 18.162061 -1.0136007 0.82436129 3.6365024 4.5801677 -2.6856989 0.28648222 + 36000 17.65618 -1.094718 0.8872444 3.5075241 4.6382423 -2.3895134 0.18116961 + 37000 17.336475 -1.0657995 0.98869254 3.9252927 4.4383632 -2.2048244 0.22285949 + 38000 17.369467 -0.97623132 0.6712095 4.1349304 4.597754 -2.4088341 0.14608514 + 39000 18.170206 -1.2344285 0.77546195 3.6451049 4.7482287 -2.9895286 0.25768859 + 40000 16.210866 -0.81407781 0.99246271 4.2676233 5.0253763 -2.2929865 0.13348624 + 41000 17.641798 -1.0868157 0.80119513 3.4302526 5.280872 -2.4025406 0.22747391 + 42000 18.349848 -1.613759 1.1497004 3.7800682 4.3237683 -2.8676401 0.2120425 + 43000 19.130245 -1.196778 0.71845659 2.9325758 4.3684415 -2.433424 0.12240982 + 44000 18.061321 -1.2410101 1.0329373 3.0751569 4.7138313 -2.2880904 0.075814461 + 45000 18.162713 -1.4414622 1.009159 4.2298758 4.589593 -2.8502298 0.21606844 + 46000 18.591574 -0.99730412 1.0955215 3.3965004 4.359466 -3.1049731 0.17322629 + 47000 18.380259 -1.2717381 0.72291269 3.3958016 4.6099628 -2.4605065 0.19825185 + 48000 18.130478 -1.5051279 1.2087492 3.2488529 4.6690881 -2.2518174 0.05633061 + 49000 16.419912 -0.89320635 0.98926144 4.0388252 4.9919488 -2.1699511 0.15646479 + 50000 16.453196 -1.0433497 0.778346 4.6078069 4.7320614 -2.3760788 0.17161976 + 51000 18.245221 -0.89550444 0.9310446 3.0758194 4.3944595 -2.3082379 0.19983428 + 52000 17.839632 -1.0221781 0.76425017 3.3331547 4.5368437 -2.0988773 0.21098435 + 53000 18.693035 -1.4231915 0.76333082 3.1612761 4.583242 -2.4485762 0.089191206 + 54000 16.334672 -0.36309884 1.0200365 4.6700448 4.1628702 -2.1713841 0.11431995 + 55000 17.33842 -0.61522682 0.89847366 3.4970659 4.673495 -2.4743036 0.068004878 + 56000 17.790294 -1.0150845 0.73697112 3.6000297 4.5988343 -2.4822509 0.11434632 + 57000 18.913486 -1.0985507 1.0231848 2.7483267 4.4421755 -2.574424 0.1763388 + 58000 17.586896 -0.98284126 0.96965633 3.3330357 4.5325543 -2.1936869 0.083230915 + 59000 17.77788 -1.1649953 0.83092298 3.8004148 4.3940176 -2.3136642 0.017207608 + 60000 17.013042 -0.21728023 1.1688832 3.5374476 4.5462244 -2.4425301 0.15028297 + 61000 17.236242 -1.1342147 1.0301086 3.685948 4.6842331 -2.328108 0.070210812 + 62000 17.529852 -1.2961547 1.0323133 3.4474598 5.1435839 -2.4553423 0.060842687 + 63000 18.754704 -1.1816999 0.51806039 3.140172 4.5832701 -2.2713213 0.06327871 + 64000 17.54594 -1.3592836 0.9694558 4.1363258 4.3547729 -2.3818433 0.12634448 + 65000 16.962312 -0.54192775 0.90321315 4.0788618 4.2008255 -2.1376711 0.039504515 + 66000 18.078619 -1.3552947 1.0716861 3.3285374 4.7229362 -2.3331115 0.21978698 + 67000 17.132732 -1.4376876 0.91486534 4.4461852 4.6894176 -2.3655045 0.068150385 + 68000 18.69286 -1.2856207 0.3895394 3.0620063 4.9922992 -2.3459189 0.079879643 + 69000 18.329552 -1.1545957 0.88632275 3.1741058 4.4562418 -2.7094867 0.25329613 + 70000 16.681168 -0.94434373 1.2450393 4.5737944 4.4902996 -2.4581775 0.15313095 + 71000 17.375032 -1.0514442 1.0741595 3.4896146 4.8407713 -2.5302576 0.13640847 + 72000 17.833013 -0.9047134 0.87067876 3.1658924 4.8825932 -2.4398117 0.2343991 + 73000 17.421411 -1.2190741 0.73706811 4.2895 4.6464636 -2.3872727 0.19696525 + 74000 17.383158 -0.34208984 0.71333984 3.2718891 4.2718495 -2.2484281 0.10827022 + 75000 17.20885 -1.2710479 1.125102 3.8414467 5.3222741 -2.375505 0.12910797 + 76000 16.811578 -0.545162 0.59076961 3.9118604 4.8031296 -2.2777895 0.063015508 + 77000 16.679231 -0.080955983 0.7253398 3.4203454 5.0987608 -2.379614 0.12961874 + 78000 18.164524 -1.3115525 0.92526408 3.5764487 4.3814882 -2.3712488 0.073436724 + 79000 17.738686 -1.0697859 1.2186866 3.0593848 4.6551053 -2.2505871 0.075340661 + 80000 16.767483 -0.84777477 1.03128 4.1982958 4.6992227 -2.4146425 0.079774219 + 81000 16.257265 0.62803774 0.84032194 3.3873471 5.0961071 -2.7219776 0.20467848 + 82000 18.232082 -1.2129302 0.50746051 3.9207128 4.5073437 -2.599371 0.094522372 + 83000 16.618985 -0.60917055 0.8825847 3.805497 4.9560959 -2.2194726 0.14852687 + 84000 17.90762 -0.82336075 0.90504161 3.0324198 4.7444271 -2.5036073 0.15860682 + 85000 16.699883 -0.50297228 0.83405307 3.8598996 4.7971968 -2.2427788 0.10338668 + 86000 16.353038 -0.0096880616 0.80705167 4.0865115 4.5364338 -2.4548873 0.098456203 + 87000 17.887331 -0.75281219 1.0030148 4.0117123 4.3443074 -2.9774392 0.16190152 + 88000 18.583708 -1.4867053 0.86324814 3.3971237 4.3526221 -2.221239 0.14459352 + 89000 17.684828 -1.283764 1.0021118 3.5426808 4.9057005 -2.3921967 0.05844702 + 90000 17.2597 -0.84306489 0.99797936 3.8896866 4.4315457 -2.5662899 0.18270206 + 91000 16.705581 -0.44704047 0.75239556 3.470805 4.976868 -2.1894571 0.12312848 + 92000 17.548071 -1.2222664 0.92898812 4.0813773 4.3432647 -2.1631158 0.14071343 + 93000 17.163675 -0.94994776 0.96876981 3.9137692 4.4388666 -2.1260232 0.13187968 + 94000 18.842071 -1.2822113 0.58767049 3.1393475 4.5820965 -2.7264682 0.10406266 + 95000 18.112287 -1.1011381 0.63546648 3.4672667 4.486275 -2.2991936 0.041589685 + 96000 17.102713 -0.6877313 0.8389032 3.6892719 4.5676004 -2.1905327 0.13507011 + 97000 16.778253 -1.2902153 1.1588744 4.2820083 4.9537657 -2.4798159 0.35696636 + 98000 18.34638 -1.2908146 1.185356 3.0739807 4.4575453 -2.3959144 0.22407922 + 99000 17.995148 -1.3939639 0.7727299 3.8774144 4.4345458 -2.1142776 0.13550099 + 100000 18.444746 -1.2456693 0.86061526 3.468696 4.5264336 -2.4239851 0.074369539 +Loop time of 2.52011 on 4 procs for 100000 steps with 34 atoms + +Performance: 6856.851 ns/day, 0.004 hours/ns, 39680.850 timesteps/s +98.8% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.072506 | 0.28131 | 0.69088 | 46.2 | 11.16 +Bond | 0.050544 | 0.45307 | 0.9416 | 57.6 | 17.98 +Neigh | 0.0060885 | 0.0061619 | 0.0062056 | 0.1 | 0.24 +Comm | 0.44686 | 1.3679 | 2.0111 | 53.5 | 54.28 +Output | 0.0028057 | 0.0029956 | 0.003264 | 0.3 | 0.12 +Modify | 0.028202 | 0.095174 | 0.15782 | 19.8 | 3.78 +Other | | 0.3135 | | | 12.44 + +Nlocal: 8.5 ave 14 max 2 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Nghost: 25.5 ave 32 max 20 min +Histogram: 2 0 0 0 0 0 0 1 0 1 +Neighs: 98.75 ave 242 max 31 min +Histogram: 2 0 1 0 0 0 0 0 0 1 + +Total # of neighbors = 395 +Ave neighs/atom = 11.6176 +Ave special neighs/atom = 9.52941 +Neighbor list builds = 246 +Dangerous builds = 0 +Total wall time: 0:00:02 diff --git a/examples/cmap/log.5Oct16.cmap.g++.1 b/examples/cmap/log.5Oct16.cmap.g++.1 deleted file mode 100644 index fbfc2b8baff4262d4e71a83ea7fb56b202effd6e..0000000000000000000000000000000000000000 --- a/examples/cmap/log.5Oct16.cmap.g++.1 +++ /dev/null @@ -1,201 +0,0 @@ -LAMMPS (5 Oct 2016) -# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 - -units real -neigh_modify delay 2 every 1 -#newton off - -boundary p p p - -atom_style full -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic - -pair_style lj/charmm/coul/charmm 8 12 -#pair_style lj/charmmfsw/coul/charmmfsh 8 12 -pair_modify mix arithmetic - -fix cmap all cmap charmm22.cmap -Reading potential file charmm22.cmap with DATE: 2016-09-26 -fix_modify cmap energy yes - -read_data gagg.data fix cmap crossterm CMAP - orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 34 atoms - scanning bonds ... - 4 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 12 = max dihedrals/atom - scanning impropers ... - 1 = max impropers/atom - reading bonds ... - 33 bonds - reading angles ... - 57 angles - reading dihedrals ... - 75 dihedrals - reading impropers ... - 7 impropers - 4 = max # of 1-2 neighbors - 7 = max # of 1-3 neighbors - 13 = max # of 1-4 neighbors - 16 = max # of special neighbors - -special_bonds charmm -fix 1 all nve - -#fix 1 all nvt temp 300 300 100.0 -#fix 2 all shake 1e-9 500 0 m 1.0 - -velocity all create 0.0 12345678 dist uniform - -thermo 1000 -thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp -timestep 2.0 - -run 100000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 2 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 14 - ghost atom cutoff = 14 - binsize = 7 -> bins = 12 12 12 -Memory usage per processor = 14.6355 Mbytes -Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro - 0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 - 1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953 - 2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436 - 3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884 - 4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631 - 5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792664 -2.3185572 0.088366962 - 6000 29.214175 -0.95299225 0.81926009 3.6805429 4.6742897 -2.9343577 0.26697813 - 7000 27.018614 -0.52423475 0.72502764 3.8840137 4.7780956 -2.3916009 0.24952584 - 8000 29.682167 -1.0939711 0.76111486 3.1090116 4.9359719 -2.5662984 0.1411154 - 9000 27.909695 -0.80905986 0.78952533 4.203187 4.1301204 -2.000402 0.088859259 - 10000 27.480298 -0.86273377 1.1293962 4.3857421 4.899282 -3.3895621 0.12126215 - 11000 28.303203 -1.0221152 0.62762348 4.055414 4.5863024 -2.5842816 0.17996907 - 12000 28.311127 -0.94227367 0.91859012 3.6673926 4.7018632 -3.902715 0.30065704 - 13000 30.818607 -1.5220116 0.95710386 3.3364371 4.543427 -3.0423067 0.16712905 - 14000 27.643736 -1.0144117 0.95806952 4.1046912 4.800236 -4.0534389 0.29293405 - 15000 27.660491 -1.0390086 0.78061056 4.1139174 4.7197202 -2.3670379 0.22126985 - 16000 27.845157 -0.63654502 0.78007478 3.9365994 4.949418 -3.1470214 0.22335355 - 17000 28.44772 -1.0255112 0.70402007 4.0573343 4.2887527 -2.2099596 0.048050962 - 18000 27.128323 -0.96218536 1.1327159 4.3222585 4.326607 -2.2881766 0.13491257 - 19000 27.337633 -0.78999574 0.80152298 4.2239689 4.7073478 -2.2924164 0.12710292 - 20000 27.780537 -0.46458072 0.79707671 3.7232618 4.943417 -2.5290628 0.26191223 - 21000 26.435484 -0.7803224 1.0753217 4.4196051 5.9945933 -2.3340925 0.16448475 - 22000 28.619429 -1.1623149 0.9401731 3.8508844 5.1636737 -2.5551846 0.25318434 - 23000 28.399338 -0.79700962 0.85575503 4.488526 4.5975422 -2.5663549 0.13601693 - 24000 29.645532 -1.158744 0.83180313 3.8193399 4.60319 -2.6847864 0.24260466 - 25000 28.695339 -1.4802204 0.76583757 3.6786272 4.8959496 -2.3627896 0.080867326 - 26000 28.149711 -1.029689 0.79383806 3.7885067 4.3345813 -2.1041553 0.14598209 - 27000 29.580373 -1.0525813 1.0262723 3.7767318 4.6119758 -2.2802386 0.088556038 - 28000 28.44308 -0.93411225 0.8794395 3.948079 4.780246 -2.1814583 0.14340149 - 29000 29.335621 -1.6087988 0.71803091 3.7819186 4.6688385 -2.4282242 0.16061111 - 30000 28.706138 -1.3938241 0.67713818 4.031275 4.4756505 -2.1807056 0.11461356 - 31000 27.451944 0.010297225 0.65064883 3.6402029 4.3607811 -2.5511516 0.12637237 - 32000 27.070878 -1.103158 1.1932199 5.1329709 4.5201653 -2.2224479 0.11215427 - 33000 29.889976 -1.6228316 0.69407996 3.5361991 4.3502767 -1.9847454 0.09089949 - 34000 28.223151 -0.927208 1.043253 3.4650939 5.1028142 -2.8127219 0.10648823 - 35000 27.985986 -0.48153861 0.63878449 3.3724641 4.9551679 -2.6565919 0.12123115 - 36000 28.580688 -1.4500694 1.055762 4.0490064 4.423782 -2.3103578 0.072747638 - 37000 29.192947 -0.49678176 1.1146731 2.9233947 4.5738603 -2.4376144 0.22874047 - 38000 26.954594 -0.53812359 0.79230685 4.3356989 5.0284656 -2.3791255 0.0486081 - 39000 27.567555 -0.57870028 0.73614374 4.191991 4.9209556 -2.6122044 0.08635571 - 40000 28.494172 -0.79057135 0.79072816 4.1893209 4.4826919 -2.4179635 0.14612898 - 41000 28.44904 -1.1002948 0.93405654 4.3586358 4.4338415 -2.2950944 0.15705834 - 42000 28.95725 -1.0297067 1.1632348 4.274711 4.9979487 -2.7611464 0.15944725 - 43000 28.640394 -0.70938882 0.68100893 3.1844315 5.1817454 -2.2837487 0.14189233 - 44000 27.997558 -1.0115099 0.59125208 4.0883422 4.6033907 -2.2775964 0.094273258 - 45000 27.67163 -0.67992747 1.1225552 3.9020703 4.8171056 -2.1952679 0.041418433 - 46000 28.822607 -0.6687953 0.74160059 3.3193715 4.5546965 -2.3024572 0.047569065 - 47000 29.20147 -1.4456785 0.79223353 3.8288813 4.5811826 -2.5154936 0.061230141 - 48000 27.843026 -1.0222301 0.87322137 4.3432743 4.4266307 -2.1414153 0.06802794 - 49000 28.199573 -1.1887794 1.2781088 4.0779644 4.5881353 -2.319775 0.094803547 - 50000 28.759212 -1.354416 0.68534569 3.8394841 4.2308134 -2.1281844 0.1395951 - 51000 27.876455 -1.5705462 0.76557156 4.5335223 4.523708 -2.203702 0.14679803 - 52000 27.930587 -1.2277489 0.96071516 3.960953 5.1152188 -2.4101451 0.060949521 - 53000 27.031236 -1.4746477 1.2341141 5.0540975 4.3656865 -2.1288513 0.092725656 - 54000 28.809394 -1.1162427 0.94350207 3.4013958 4.4755547 -2.3342811 0.18855912 - 55000 28.948415 -1.1560418 0.6260139 3.5386373 4.5244978 -2.340212 0.17474657 - 56000 28.048368 -0.95784532 0.76432571 4.1404665 4.4570033 -2.0899628 0.045693628 - 57000 28.707642 -1.366574 0.9907873 3.729903 4.3131997 -2.2777698 0.065420213 - 58000 26.361663 -1.0424403 1.0452563 5.0977108 4.7035231 -2.3101244 0.13671642 - 59000 29.218218 -1.2210564 0.62435875 3.4236327 4.5481681 -2.1575943 0.037984042 - 60000 27.655546 -1.1053224 0.86323501 3.7641375 4.8946898 -2.2422249 0.077725979 - 61000 27.252108 -1.3744824 1.1150806 5.0444848 4.4878135 -2.2743829 0.058331257 - 62000 27.163469 -1.1715781 0.72099321 4.5295501 4.9509918 -2.2993961 0.050401105 - 63000 29.581575 -1.2238537 0.86303245 3.1194038 5.2218965 -2.5002427 0.055032632 - 64000 27.897822 -1.1011516 0.74540883 4.2869228 4.3394269 -2.2552393 0.1403321 - 65000 27.083245 -1.0633392 0.92771724 5.0805224 4.2747962 -2.2388039 0.064196692 - 66000 29.072723 -1.5514209 0.89798805 4.2600224 4.4261812 -2.3524752 0.15067414 - 67000 27.308181 -0.72224802 0.97109517 4.5074578 4.4559352 -2.1381121 0.089297603 - 68000 27.505686 -0.43855431 0.80785812 4.1917251 5.0157721 -2.3382145 0.11105164 - 69000 29.041681 -0.64735378 0.89874684 3.3891579 4.3753361 -2.2320941 0.14716747 - 70000 29.735756 -1.7061457 0.9206878 3.5767878 4.3851664 -2.2516304 0.097196062 - 71000 28.224352 -0.92217702 0.86093586 3.9507157 4.5596589 -2.2173397 0.089116669 - 72000 29.282336 -1.056142 0.65185725 3.8735742 4.4839333 -2.4314756 0.071909704 - 73000 26.257283 -0.64273826 0.98300685 5.063943 5.045958 -2.5544375 0.2180275 - 74000 28.825119 -0.97736616 0.87201848 3.55875 4.3653309 -2.2303567 0.098963875 - 75000 29.239507 -0.96508809 0.74517323 3.4306236 4.7651921 -2.6077732 0.17883654 - 76000 27.349841 -0.50990238 1.1183613 4.4252451 4.4097775 -2.4125794 0.18483606 - 77000 28.130197 -1.4081219 0.94921357 4.2572132 4.5162849 -2.4013797 0.073744606 - 78000 28.235774 -0.9214321 0.6324981 3.8697686 4.8092154 -2.2272847 0.092108346 - 79000 26.732846 -0.55949486 1.0989617 5.0088609 4.4930687 -2.277945 0.03855146 - 80000 28.529208 -0.94244671 0.79407482 3.961106 4.3930011 -2.3127726 0.091124948 - 81000 29.603852 -1.6116062 1.060847 3.7824932 4.151001 -1.9139868 0.19875986 - 82000 28.232876 -1.1833011 1.0182713 3.4195758 5.1394333 -2.4632697 0.28501012 - 83000 29.565482 -1.3479552 0.99056973 3.7851802 4.4781011 -2.7872481 0.2031991 - 84000 28.780274 -1.3073882 1.0512637 4.004638 4.502282 -2.3789146 0.015656202 - 85000 27.262312 -1.1305346 1.203524 4.7938623 4.1747105 -2.0952844 0.054240361 - 86000 28.157348 -1.0662817 0.81163796 3.9912709 4.8320213 -2.255237 0.14698333 - 87000 28.445543 -1.3365026 0.78156195 4.4767689 4.4457575 -2.5008786 0.13879386 - 88000 27.656717 -1.1490599 0.87974869 4.4629952 4.7023033 -2.3258145 0.081904139 - 89000 28.838821 -1.020709 0.85587929 3.7110705 4.4938307 -2.4914483 0.11447952 - 90000 27.356497 -0.59107077 0.81879666 4.5209332 4.4703836 -2.3806717 0.071307775 - 91000 27.780445 -0.80564513 0.94752313 3.8468943 4.2924253 -2.1011134 0.1118672 - 92000 28.555276 -1.3514732 0.80826674 3.9590742 4.5775954 -2.4891232 0.054254978 - 93000 28.747267 -1.2133243 0.75507246 4.1319789 4.9048611 -2.4913887 0.13045693 - 94000 27.479343 -0.69973695 0.99696121 3.5966229 4.549025 -2.4155312 0.41745762 - 95000 27.726945 -1.1905026 1.1120842 4.7433275 4.5386861 -2.7947142 0.33671682 - 96000 28.021114 -1.0341645 0.6663033 4.2397505 4.6203984 -1.9904034 0.10972565 - 97000 28.382022 -1.3916008 1.180588 4.0729621 4.6741792 -2.554927 0.13462346 - 98000 27.895969 -0.7496449 1.3072185 4.2611888 4.3726077 -2.1320701 0.15376665 - 99000 28.517889 -1.2183957 1.279778 3.957647 4.2638434 -2.2888407 0.042705003 - 100000 28.109211 -1.2538948 0.83671785 4.3734766 4.544545 -2.3076497 0.042189096 -Loop time of 2.84552 on 1 procs for 100000 steps with 34 atoms - -Performance: 6072.706 ns/day, 0.004 hours/ns, 35142.973 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.94207 | 0.94207 | 0.94207 | 0.0 | 33.11 -Bond | 1.6125 | 1.6125 | 1.6125 | 0.0 | 56.67 -Neigh | 0.0073986 | 0.0073986 | 0.0073986 | 0.0 | 0.26 -Comm | 0.012739 | 0.012739 | 0.012739 | 0.0 | 0.45 -Output | 0.00075531 | 0.00075531 | 0.00075531 | 0.0 | 0.03 -Modify | 0.21483 | 0.21483 | 0.21483 | 0.0 | 7.55 -Other | | 0.05524 | | | 1.94 - -Nlocal: 34 ave 34 max 34 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 395 ave 395 max 395 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 395 -Ave neighs/atom = 11.6176 -Ave special neighs/atom = 9.52941 -Neighbor list builds = 237 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/examples/cmap/log.5Oct16.cmap.g++.4 b/examples/cmap/log.5Oct16.cmap.g++.4 deleted file mode 100644 index de5d670073dd10a47f59634bf80160e5f4162a71..0000000000000000000000000000000000000000 --- a/examples/cmap/log.5Oct16.cmap.g++.4 +++ /dev/null @@ -1,201 +0,0 @@ -LAMMPS (5 Oct 2016) -# Created by charmm2lammps v1.8.2.6 beta on Thu Mar 3 20:56:57 EST 2016 - -units real -neigh_modify delay 2 every 1 -#newton off - -boundary p p p - -atom_style full -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic - -pair_style lj/charmm/coul/charmm 8 12 -#pair_style lj/charmmfsw/coul/charmmfsh 8 12 -pair_modify mix arithmetic - -fix cmap all cmap charmm22.cmap -Reading potential file charmm22.cmap with DATE: 2016-09-26 -fix_modify cmap energy yes - -read_data gagg.data fix cmap crossterm CMAP - orthogonal box = (-34.4147 -36.1348 -39.3491) to (45.5853 43.8652 40.6509) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 34 atoms - scanning bonds ... - 4 = max bonds/atom - scanning angles ... - 6 = max angles/atom - scanning dihedrals ... - 12 = max dihedrals/atom - scanning impropers ... - 1 = max impropers/atom - reading bonds ... - 33 bonds - reading angles ... - 57 angles - reading dihedrals ... - 75 dihedrals - reading impropers ... - 7 impropers - 4 = max # of 1-2 neighbors - 7 = max # of 1-3 neighbors - 13 = max # of 1-4 neighbors - 16 = max # of special neighbors - -special_bonds charmm -fix 1 all nve - -#fix 1 all nvt temp 300 300 100.0 -#fix 2 all shake 1e-9 500 0 m 1.0 - -velocity all create 0.0 12345678 dist uniform - -thermo 1000 -thermo_style custom step ecoul evdwl ebond eangle edihed f_cmap eimp -timestep 2.0 - -run 100000 -Neighbor list info ... - 1 neighbor list requests - update every 1 steps, delay 2 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 14 - ghost atom cutoff = 14 - binsize = 7 -> bins = 12 12 12 -Memory usage per processor = 15.9307 Mbytes -Step E_coul E_vdwl E_bond E_angle E_dihed f_cmap E_impro - 0 26.542777 -0.93822087 1.2470497 4.8441789 4.5432816 -1.473352 0.10453023 - 1000 28.673005 -0.47724367 0.80029132 3.151679 4.4684446 -2.3928648 0.18604953 - 2000 27.67955 -1.170342 0.72018905 4.0400131 4.4713764 -2.5490207 0.21834436 - 3000 29.256656 -0.35856055 0.73303546 3.7411606 4.4710568 -2.8939692 0.37728884 - 4000 30.097549 -1.1353905 0.79007053 3.0688444 4.4091469 -2.3383587 0.20743631 - 5000 28.357525 -1.0723742 0.9180297 3.6579424 4.8792663 -2.3185572 0.088366962 - 6000 29.214175 -0.95299239 0.81926011 3.6805428 4.6742897 -2.9343578 0.26697816 - 7000 27.018614 -0.52423469 0.72502751 3.8840141 4.7780958 -2.3916014 0.24952572 - 8000 29.682494 -1.0940368 0.76113051 3.1089345 4.9357863 -2.5662256 0.14112613 - 9000 27.853918 -0.7913741 0.79503268 4.2177256 4.146792 -2.00475 0.090585666 - 10000 27.13754 -0.80551128 1.1325023 4.4718283 5.2460631 -3.4947725 0.11893125 - 11000 28.277434 -1.4897448 0.90075953 4.1895717 4.3594269 -1.9553119 0.090222212 - 12000 28.630973 -1.222206 0.67796385 3.3905661 4.9691334 -2.9052721 0.13897658 - 13000 28.593007 -0.95684026 0.75585196 3.7242568 4.7417932 -2.3893117 0.2074121 - 14000 26.147115 -0.6026921 0.93591488 5.1292829 4.9821952 -2.2571835 0.11872421 - 15000 26.29432 -0.82424162 1.048979 4.5569495 5.1189308 -2.9750422 0.16195676 - 16000 29.189992 -0.80998247 0.74093508 3.8299275 4.4536688 -2.5497538 0.19155639 - 17000 25.878012 -0.3519646 1.0988924 4.7359591 5.3923098 -2.7211029 0.13405223 - 18000 27.726135 -0.28229987 0.63072344 4.1777888 4.7237271 -2.2177157 0.15939372 - 19000 27.153504 -0.66477422 0.77910129 4.2036117 5.113851 -2.3494315 0.094793307 - 20000 28.044833 -1.2835827 0.88745367 3.9955526 4.5077788 -3.0116467 0.17197859 - 21000 27.205696 -0.74090037 1.0023251 4.3421733 4.912671 -2.3473271 0.26089356 - 22000 27.385785 -0.93740972 0.84554838 4.562743 4.883866 -2.2110955 0.11573301 - 23000 27.05534 -0.95605442 0.96719024 3.9277618 5.0359014 -2.6135949 0.21368061 - 24000 28.273378 -0.97543103 0.8983443 4.2067985 4.4782971 -2.4230505 0.30311692 - 25000 27.477789 -0.20383849 0.8380706 3.8037992 4.8312504 -2.5831791 0.093843746 - 26000 30.344199 -1.9773473 0.92882437 3.7821405 4.5176677 -2.3020968 0.2194307 - 27000 27.32767 -0.9803839 0.92988865 3.7611603 5.0328211 -2.4647656 0.18213622 - 28000 27.34208 -1.037938 0.74488346 4.1727342 4.7056812 -2.2718346 0.17741362 - 29000 27.682777 -0.51006495 0.57074224 4.7332237 4.7080462 -2.0491512 0.2130517 - 30000 24.925731 0.13670248 0.84976065 4.4143762 6.0677158 -3.5479173 0.28059419 - 31000 28.623419 -0.90725708 1.0710501 3.6930688 4.6639301 -2.2225373 0.20988139 - 32000 27.732286 -1.1948367 0.89230134 4.4398373 4.8923907 -3.5849327 0.49167488 - 33000 28.800772 -1.5319589 0.93455495 4.1634728 4.6107706 -2.3503486 0.22636535 - 34000 27.374398 -1.0957453 0.89450276 3.9829508 4.991786 -2.3548834 0.15869465 - 35000 28.38753 -0.89261166 0.90000776 3.536864 4.4293294 -2.4218118 0.10640557 - 36000 27.713974 0.088038031 0.85190574 3.8969601 4.6256355 -2.7935475 0.34671662 - 37000 29.13007 -1.378597 0.74412556 3.131538 4.6458653 -2.9373734 0.38035616 - 38000 28.556573 -1.4055344 1.139984 4.0035753 4.2938358 -2.489329 0.25338326 - 39000 26.447036 -1.1829705 0.87032438 5.0804461 4.5772023 -2.7346466 0.32165802 - 40000 27.991454 -0.64295679 0.61020872 4.165871 4.4623087 -2.2244194 0.13826991 - 41000 29.483296 -1.2400745 0.66926627 3.3473666 4.5766617 -2.3051145 0.12171554 - 42000 26.948627 -1.2162288 1.1440628 4.3993073 5.1176533 -2.4734485 0.15497709 - 43000 28.04459 -0.26543193 0.83647367 3.5160747 4.6964397 -2.2805068 0.12618821 - 44000 28.213608 -1.216128 0.9132792 4.0206483 4.9483599 -2.3387049 0.10132022 - 45000 28.283506 -1.0390766 0.86113772 4.504509 4.7209088 -2.3043085 0.14588362 - 46000 27.433853 -0.57912107 0.78448334 4.5998579 5.1181394 -2.6165094 0.18722528 - 47000 27.552939 -1.1128925 0.80087638 4.3448001 4.8062869 -2.4296883 0.2702479 - 48000 28.874034 -1.3242519 0.71770727 3.5648565 4.4671824 -2.2608958 0.16115978 - 49000 29.216186 -1.2210307 0.76937497 3.9260628 4.7550577 -2.7316081 0.085505664 - 50000 28.065856 -1.1545547 0.86953819 4.4137666 4.732157 -2.4450867 0.23320539 - 51000 26.308975 -0.99728352 0.90408444 4.2400186 5.6340425 -2.2090554 0.079882158 - 52000 28.517571 -1.5027398 0.83520278 3.8176552 4.3001251 -2.0731682 0.1665375 - 53000 28.77579 -1.3564268 0.97253881 3.6866407 4.8532347 -2.5330776 0.17668411 - 54000 29.135315 -1.0994106 0.67605671 3.6819254 4.3134408 -1.9796929 0.076951331 - 55000 26.168938 -0.76247492 0.88784685 4.6533473 6.0484793 -2.1334561 0.036876985 - 56000 27.471775 -0.68648837 1.0576168 4.0354311 4.4767052 -2.2368959 0.24950568 - 57000 29.787083 -1.4914384 1.0702944 3.5388133 4.5173097 -2.6694464 0.27937092 - 58000 28.705448 -1.3016617 0.63337853 3.9552713 4.4119825 -1.8774657 0.17540021 - 59000 29.130155 -0.91647363 0.84384883 3.1076903 4.5346348 -2.3457338 0.16674486 - 60000 26.874199 -0.81598034 1.3432151 5.1322624 4.9545484 -2.9566615 0.25950486 - 61000 27.401306 -0.82895856 1.1636949 4.020154 4.5745928 -2.601466 0.18061051 - 62000 28.930313 -1.5231967 0.85173243 4.3517328 4.4878662 -2.5859205 0.1755493 - 63000 26.56874 0.026147233 0.60836216 4.4231618 4.4390677 -2.1721849 0.08594237 - 64000 26.729023 -0.76953985 0.76734633 4.5104288 5.0886456 -2.2118551 0.11339216 - 65000 28.900471 -1.3901477 0.86194657 4.2774976 4.498325 -2.3672362 0.20668335 - 66000 26.884253 -0.21198879 0.98509625 4.0843117 4.4344172 -2.3289416 0.23631017 - 67000 27.210888 -0.84075559 1.0396559 4.7253607 4.4314589 -2.2985702 0.19326507 - 68000 28.042102 -1.1898715 1.053534 3.8748712 4.4358449 -2.3998723 0.2431659 - 69000 28.939141 -1.6968936 0.98155912 4.0460838 5.0075204 -2.5547087 0.28645131 - 70000 27.15577 -0.85202797 1.1469079 4.7645212 4.6133209 -2.3410451 0.086576572 - 71000 25.507417 -0.27780727 0.95157881 4.8759406 4.853401 -2.9598705 0.41011008 - 72000 29.804703 -1.4847015 0.96345767 3.6797304 4.3678377 -2.4594626 0.14480206 - 73000 28.602798 -1.4906143 0.72497266 4.2442974 4.5360598 -2.3621638 0.14385651 - 74000 28.4928 -0.91319873 1.0377472 3.8033127 4.3991601 -2.4051911 0.095567428 - 75000 26.38168 -0.70733237 1.1557817 5.697939 4.5935618 -2.4285007 0.058980519 - 76000 27.16626 -0.83631031 0.84844246 4.7460887 4.5801472 -2.1260014 0.12845946 - 77000 29.040661 -1.3089499 0.80285084 4.664804 4.5215895 -2.6861939 0.13215598 - 78000 27.477871 -1.0600977 0.88595045 4.6264017 5.4095605 -2.474411 0.10987174 - 79000 26.151797 -0.55779685 0.91382436 4.99964 4.9184022 -2.2547241 0.22854038 - 80000 28.14523 -0.54460026 0.8982411 3.5374555 4.3785673 -2.3196807 0.088567964 - 81000 29.029941 -1.6467789 0.79042284 3.7269899 4.7407998 -2.3795824 0.1408727 - 82000 27.920287 -0.72798032 1.0076975 3.4449461 4.5621371 -2.8239074 0.25103454 - 83000 29.131054 -1.114367 0.76887285 3.459639 4.5163922 -2.607825 0.19991648 - 84000 28.249768 -0.69944068 1.0510846 4.0436296 4.6430538 -2.4213355 0.077299966 - 85000 28.06888 -0.62132922 0.91829312 4.1294147 4.3099557 -2.354063 0.15866186 - 86000 28.664264 -1.1022906 0.87831695 4.5773522 4.6045802 -2.9206875 0.33950063 - 87000 27.960967 -1.2852756 0.77694253 3.9011301 4.9114139 -3.2374868 0.3068138 - 88000 27.190678 -1.2803268 1.1545301 4.5769709 5.2404761 -2.3825838 0.10356039 - 89000 26.792931 -0.44516641 1.0236244 4.2007253 4.7098685 -2.3608551 0.034447062 - 90000 27.173991 -0.87185611 1.065719 4.1953618 4.6856408 -2.6539232 0.16957757 - 91000 28.626528 -1.239257 0.89524651 4.7048012 4.6344201 -2.7367901 0.43534143 - 92000 27.661812 -1.109044 0.92817391 5.0294489 4.3890711 -2.4108669 0.12570139 - 93000 28.156793 -1.0820907 0.92812693 4.938385 4.4901426 -2.4023366 0.30135781 - 94000 28.842149 -1.3524969 1.1451109 4.3125908 4.6959035 -2.6747199 0.2254607 - 95000 27.862247 -1.2119045 1.0218976 4.2614082 4.4931316 -2.6902934 0.16345201 - 96000 27.084973 -0.93738328 1.3984324 4.5647189 4.4232205 -2.2834097 0.11217888 - 97000 27.587078 -0.89397255 0.78218462 3.8944421 4.3981479 -2.4205318 0.16570942 - 98000 27.981746 -1.2380545 0.84847869 4.311441 4.7340377 -2.4270441 0.023565612 - 99000 27.476625 -0.8569146 0.82550381 4.1656963 4.4064921 -2.4169708 0.160814 - 100000 26.121325 -0.63610855 1.0803389 4.9257118 4.7073263 -2.4010334 0.066303044 -Loop time of 2.693 on 4 procs for 100000 steps with 34 atoms - -Performance: 6416.646 ns/day, 0.004 hours/ns, 37133.367 timesteps/s -98.4% CPU use with 4 MPI tasks x no OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.065478 | 0.2501 | 0.63682 | 45.6 | 9.29 -Bond | 0.066944 | 0.44772 | 0.88814 | 53.7 | 16.63 -Neigh | 0.0076509 | 0.0077319 | 0.0078275 | 0.1 | 0.29 -Comm | 0.57917 | 1.4166 | 1.9823 | 46.9 | 52.60 -Output | 0.0033755 | 0.0035856 | 0.0037644 | 0.2 | 0.13 -Modify | 0.03866 | 0.1366 | 0.23978 | 24.6 | 5.07 -Other | | 0.4306 | | | 15.99 - -Nlocal: 8.5 ave 15 max 2 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Nghost: 25.5 ave 32 max 19 min -Histogram: 1 1 0 0 0 0 0 0 1 1 -Neighs: 98.75 ave 257 max 18 min -Histogram: 1 1 1 0 0 0 0 0 0 1 - -Total # of neighbors = 395 -Ave neighs/atom = 11.6176 -Ave special neighs/atom = 9.52941 -Neighbor list builds = 294 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py new file mode 100644 index 0000000000000000000000000000000000000000..8ae08917e5bbde5c923617df136cd11e799ffbbc --- /dev/null +++ b/lib/voronoi/Install.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python + +# install.py tool to download, unpack, build, and link to the Voro++ library +# used to automate the steps described in the README file in this dir + +import sys,os,re,urllib,commands + +# help message + +help = """ +Syntax: install.py -v version -g gdir [gname] -b bdir -l ldir + specify one or more options, order does not matter + gdir,bdir,ldir can be paths relative to lib/latte, full paths, or contain ~ + -v = version of Voro++ to download and build + default = voro++-0.4.6 (current as of Jan 2015) + -g = grab (download) from math.lbl.gov/voro++ website + unpack tarfile in gdir to produce version dir (e.g. voro++-0.4.6) + if optional gname specified, rename version dir to gname within gdir + -b = build Voro++, bdir = Voro++ home directory + note that bdir must include the version suffix unless renamed + -l = create 2 softlinks (includelink,liblink) + in lib/voronoi to src dir of ldir = Voro++ home directory + note that ldir must include the version suffix unless renamed +""" + +# settings + +version = "voro++-0.4.6" +url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version + +# print error message or help + +def error(str=None): + if not str: print help + else: print "ERROR",str + sys.exit() + +# expand to full path name +# process leading '~' or relative path + +def fullpath(path): + return os.path.abspath(os.path.expanduser(path)) + +# parse args + +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() + +grabflag = 0 +buildflag = 0 +linkflag = 0 + +iarg = 0 +while iarg < nargs: + if args[iarg] == "-v": + if iarg+2 > nargs: error() + version = args[iarg+1] + iarg += 2 + elif args[iarg] == "-g": + if iarg+2 > nargs: error() + grabflag = 1 + grabdir = args[iarg+1] + grabname = None + if iarg+2 < nargs and args[iarg+2][0] != '-': + grabname = args[iarg+2] + iarg += 1 + iarg += 2 + elif args[iarg] == "-b": + if iarg+2 > nargs: error() + buildflag = 1 + builddir = args[iarg+1] + iarg += 2 + elif args[iarg] == "-l": + if iarg+2 > nargs: error() + linkflag = 1 + linkdir = args[iarg+1] + iarg += 2 + else: error() + +# download and unpack Voro++ tarball + +if grabflag: + print "Downloading Voro++ ..." + grabdir = fullpath(grabdir) + if not os.path.isdir(grabdir): error("Grab directory does not exist") + urllib.urlretrieve(url,"%s/%s.tar.gz" % (grabdir,version)) + + print "Unpacking Voro++ tarball ..." + tardir = "%s/%s" % (grabdir,version) + if os.path.exists(tardir): commands.getoutput("rm -rf %s" % tardir) + cmd = "cd %s; tar zxvf %s.tar.gz" % (grabdir,version) + txt = commands.getoutput(cmd) + print tardir,grabdir,grabname + if grabname: os.rename(tardir,"%s/%s" % (grabdir,grabname)) + +# build Voro++ + +if buildflag: + print "Building Voro++ ..." + cmd = "cd %s; make" % builddir + txt = commands.getoutput(cmd) + print txt + +# create 2 links in lib/voronoi to Voro++ src dir + +if linkflag: + print "Creating links to Voro++ include and lib files" + if os.path.isfile("includelink") or os.path.islink("includelink"): + os.remove("includelink") + if os.path.isfile("liblink") or os.path.islink("liblink"): + os.remove("liblink") + cmd = "ln -s %s/src includelink" % linkdir + commands.getoutput(cmd) + cmd = "ln -s %s/src liblink" % linkdir + commands.getoutput(cmd) diff --git a/lib/voronoi/README b/lib/voronoi/README index 62acb30a5ad9e50587a0caa249b7a5c2bad52050..2507a9bae40d363380ce99404e12291e7986c933 100644 --- a/lib/voronoi/README +++ b/lib/voronoi/README @@ -9,8 +9,8 @@ Laboratory. ----------------- You must perform the following steps yourself, or you can use the -install.py Python script to automate any or all steps of the process. -Type "python install.py" for instructions. +Install.py Python script to automate any or all steps of the process. +Type "python Install.py" for instructions. 1. Download Voro++ at http://math.lbl.gov/voro++/download either as a tarball or via SVN, and unpack the diff --git a/lib/voronoi/install.py b/lib/voronoi/install.py deleted file mode 100644 index 645d1675648fd281c3d3ac5905d29a0c132e66f1..0000000000000000000000000000000000000000 --- a/lib/voronoi/install.py +++ /dev/null @@ -1,163 +0,0 @@ -#!usr/local/python - -# install.py tool to download, unpack, build, and link to the Voro++ library -# used to automate the steps described in the README file in this dir - -import sys,os,re,urllib,commands - -help = """ -Syntax: install.py -d dir -v version -g -b -i installdir -l incdir libdir - specify one or more options, order does not matter - -d = dir to download tarball to, unpack tarball in, perform build in - dir will be created if it doesn't exist (only last level) - default = this dir - -v = version of Voro++ to download and work with - default = voro++-0.4.6 (current as of Jan 2015) - -g = download (grab) tarball from - http://math.lbl.gov/voro++/download/dir/version - -b = build Voro++ by invoking "make" in its home dir - no default - -i = install Voro++ by invoking "make install" in its home dir - installdir arg is optional: - if not specified, installs at PREFIX defined in config.mk file - if specified, will overwrite PREFIX and install there - if PREFIX starts with /usr, will invoke "sudo make install" - -l = create two links to incdir and libdir - incdir and libdir are optional (specify neither or both): - if specified, includelink and liblink are to those two dirs - these are dirs where Voro++ include files and lib file are - if not specified and no install, links are to Voro++ src dir - if not specified and install performed, - links are to include and lib dirs under PREFIX -""" - -def error(): - print help - sys.exit() - -# parse args - -args = sys.argv - -if len(args) == 1: error() - -dir = "." -version = "voro++-0.4.6" -grabflag = 0 -buildflag = 0 -installflag = 0 -linkflag = 0 - -iarg = 1 -while iarg < len(args): - if args[iarg] == "-d": - if iarg+2 > len(args): error() - dir = args[iarg+1] - iarg += 2 - elif args[iarg] == "-v": - if iarg+2 > len(args): error() - version = args[iarg+1] - iarg += 2 - elif args[iarg] == "-g": - grabflag = 1 - iarg += 1 - elif args[iarg] == "-b": - buildflag = 1 - iarg += 1 - elif args[iarg] == "-i": - installflag = 1 - if iarg+1 == len(args) or args[iarg+1][0] == '-': - installdir = "" - iarg += 1 - else: - if iarg+2 > len(args): error() - installdir = args[iarg+1] - iarg += 2 - elif args[iarg] == "-l": - linkflag = 1 - if iarg+1 == len(args) or args[iarg+1][0] == '-' or \ - iarg+2 == len(args) or args[iarg+2][0] == '-': - includedir = libdir = "" - iarg += 1 - else: - if iarg+3 > len(args): error() - includedir = args[iarg+1] - libdir = args[iarg+2] - iarg += 3 - else: error() - -dir = os.path.abspath(dir) -url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version - -# create dir if does not exist - -if not os.path.isdir(dir): - if os.path.isfile(dir): - print "ERROR: Dir already exists as file" - sys.exit() - os.mkdir(dir) - if not os.path.isdir(dir): - print "ERROR: Unable to create dir" - sys.exit() - -# download and unpack tarball - -if grabflag: - print "Downloading Voro++ tarball ..." - urllib.urlretrieve(url,"%s/%s.tar.gz" % (dir,version)) - print "Unpacking Voro++ tarball ..." - cmd = "cd %s; tar zxvf %s.tar.gz" % (dir,version) - txt = commands.getoutput(cmd) - -# build Voro++ in its dir - -if buildflag: - print "Building Voro++ ..." - cmd = "cd %s/%s; make" % (dir,version) - txt = commands.getoutput(cmd) - print txt - -# install Voro++ -# if installdir set, overwrite PREFIX var in its config.mk file -# if PREFIX var starts with /usr, invoke sudo make install, else make install - -if installflag: - print "Installing Voro++ ..." - if installdir: - txt = open("%s/%s/config.mk" % (dir,version),'r').read() - txt = re.sub("PREFIX=.*?\n","PREFIX=%s\n" % installdir,txt) - open("%s/%s/config.mk" % (dir,version),'w').write(txt) - print "TXT:",txt - txt = open("%s/%s/config.mk" % (dir,version),'r').read() - var = re.findall("PREFIX=.*?\n",txt) - prefix = var[0].split('=')[1].strip() - if prefix.startswith("/usr"): - cmd = "cd %s/%s; sudo make install" % (dir,version) - else: - cmd = "cd %s/%s; make install" % (dir,version) - txt = commands.getoutput(cmd) - print txt - -# create links in this dir to Voro++ include and lib files - -if linkflag: - print "Creating links to Voro++ include and lib files" - if os.path.isfile("includelink") or os.path.islink("includelink"): - os.remove("includelink") - if os.path.isfile("liblink") or os.path.islink("liblink"): - os.remove("liblink") - if includedir: - cmd = "ln -s %s includelink" % includedir - txt = commands.getoutput(cmd) - cmd = "ln -s %s liblink" % linkdir - txt = commands.getoutput(cmd) - elif not installflag: - cmd = "ln -s %s/%s/src includelink" % (dir,version) - txt = commands.getoutput(cmd) - cmd = "ln -s %s/%s/src liblink" % (dir,version) - txt = commands.getoutput(cmd) - else: - cmd = "ln -s %s/include includelink" % prefix - txt = commands.getoutput(cmd) - cmd = "ln -s %s/lib liblink" % prefix - txt = commands.getoutput(cmd) diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 029b76cb27f16a94d96ed4bd793e2b7745fb237c..e8d3fcb52776d99d0323699e08cad6d69f85ba50 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -73,6 +73,11 @@ ComputeTempAsphere::ComputeTempAsphere(LAMMPS *lmp, int narg, char **arg) : } else error->all(FLERR,"Illegal compute temp/asphere command"); } + // when computing only the rotational temperature, + // do not remove DOFs for translation as set by default + + if (mode == ROTATE) extra_dof = 0; + vector = new double[6]; } diff --git a/src/COMPRESS/Install.sh b/src/COMPRESS/Install.sh index ef1c8920c8686f3a4737cd6114b445c7aedc83ec..ab9dac33dc92f2b9bfa70f13c32438dfa20d6108 100644 --- a/src/COMPRESS/Install.sh +++ b/src/COMPRESS/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/Install.sh b/src/Install.sh index 307188a09f7e4b2453be98a9c60dd2342584a14b..e9c8b8059554567183dacd6d25324c03a07ee187 100644 --- a/src/Install.sh +++ b/src/Install.sh @@ -33,5 +33,5 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done diff --git a/src/KIM/Install.sh b/src/KIM/Install.sh index bac9d97cc62cc620d618c77a880cf608b6ffdd06..7ddb9c8227ce027476157f9829fd644a2a6e9071 100644 --- a/src/KIM/Install.sh +++ b/src/KIM/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index 53b40423762c0e2750a523fe5f06eb3f60b15b68..e4a3f857d3d24829055c6ce5dc6cfd1ff1a02d52 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -64,14 +64,17 @@ VerletKokkos::VerletKokkos(LAMMPS *lmp, int narg, char **arg) : setup before run ------------------------------------------------------------------------- */ -void VerletKokkos::setup() +void VerletKokkos::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up Verlet run ...\n"); - fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(screen," Time step : %g\n", update->dt); - timer->print_timeout(screen); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); + fprintf(screen," Time step : %g\n", update->dt); + timer->print_timeout(screen); + } } update->setupflag = 1; @@ -169,7 +172,7 @@ void VerletKokkos::setup() if (force->newton) comm->reverse_comm(); modify->setup(vflag); - output->setup(); + output->setup(flag); lmp->kokkos->auto_sync = 1; update->setupflag = 1; } diff --git a/src/KOKKOS/verlet_kokkos.h b/src/KOKKOS/verlet_kokkos.h index 03a93833245dfcf41d36f069eb4b4839b5c156df..6455239204f87844b321aaa63216b7fe67c0a57a 100644 --- a/src/KOKKOS/verlet_kokkos.h +++ b/src/KOKKOS/verlet_kokkos.h @@ -29,7 +29,7 @@ class VerletKokkos : public Verlet { public: VerletKokkos(class LAMMPS *, int, char **); ~VerletKokkos() {} - void setup(); + void setup(int flag=1); void setup_minimal(int); void run(int); diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 407c980729d12f16aa579e9442ff6e412142f11f..73758e36285a5a89003ef5a47a0ffbb74d328d58 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -60,7 +60,7 @@ using namespace MathConst; // this must be lower than MAXENERGYSIGNAL // by a large amount, so that it is still // less than total energy when negative -// energy changes are added to MAXENERGYSIGNAL +// energy contributions are added to MAXENERGYSIGNAL #define MAXENERGYTEST 1.0e50 @@ -260,7 +260,7 @@ void FixGCMC::options(int narg, char **arg) grouptypebits = NULL; energy_intra = 0.0; tfac_insert = 1.0; - overlap_cutoff = 0.0; + overlap_cutoffsq = 0.0; overlap_flag = 0; int iarg = 0; @@ -366,7 +366,8 @@ void FixGCMC::options(int narg, char **arg) iarg += 2; } else if (strcmp(arg[iarg],"overlap_cutoff") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix gcmc command"); - overlap_cutoff = force->numeric(FLERR,arg[iarg+1]); + double rtmp = force->numeric(FLERR,arg[iarg+1]); + overlap_cutoffsq = rtmp*rtmp; overlap_flag = 1; iarg += 2; } else error->all(FLERR,"Illegal fix gcmc command"); @@ -701,6 +702,9 @@ void FixGCMC::pre_exchange() if (full_flag) { energy_stored = energy_full(); + if (overlap_flag && energy_stored > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); if (mode == MOLECULE) { for (int i = 0; i < ncycles; i++) { @@ -778,6 +782,9 @@ void FixGCMC::attempt_atomic_translation() if (i >= 0) { double **x = atom->x; double energy_before = energy(i,ngcmc_type,-1,x[i]); + if (overlap_flag && energy_before > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); double rsq = 1.1; double rx,ry,rz; rx = ry = rz = 0.0; @@ -998,6 +1005,9 @@ void FixGCMC::attempt_molecule_translation() if (translation_molecule == -1) return; double energy_before_sum = molecule_energy(translation_molecule); + if (overlap_flag && energy_before_sum > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); double **x = atom->x; double rx,ry,rz; @@ -1095,6 +1105,9 @@ void FixGCMC::attempt_molecule_rotation() if (rotation_molecule == -1) return; double energy_before_sum = molecule_energy(rotation_molecule); + if (overlap_flag && energy_before_sum > MAXENERGYTEST) + error->warning(FLERR,"Energy of old configuration in " + "fix gcmc is > MAXENERGYTEST."); int nlocal = atom->nlocal; int *mask = atom->mask; @@ -2134,7 +2147,7 @@ double FixGCMC::energy(int i, int itype, tagint imolecule, double *coord) // if overlap check requested, if overlap, // return signal value for energy - if (overlap_flag && rsq < overlap_cutoff) + if (overlap_flag && rsq < overlap_cutoffsq) return MAXENERGYSIGNAL; if (rsq < cutsq[itype][jtype]) @@ -2170,6 +2183,8 @@ double FixGCMC::molecule_energy(tagint gas_molecule_id) double FixGCMC::energy_full() { + int imolecule; + if (triclinic) domain->x2lamda(atom->nlocal); domain->pbc(); comm->exchange(); @@ -2185,14 +2200,15 @@ double FixGCMC::energy_full() // return signal value for energy if (overlap_flag) { + int overlaptestall; + int overlaptest = 0; double delx,dely,delz,rsq; double **x = atom->x; tagint *molecule = atom->molecule; int nall = atom->nlocal + atom->nghost; for (int i = 0; i < atom->nlocal; i++) { - int imolecule = molecule[i]; + if (mode == MOLECULE) imolecule = molecule[i]; for (int j = i+1; j < nall; j++) { - if (mode == MOLECULE) if (imolecule == molecule[j]) continue; @@ -2201,11 +2217,18 @@ double FixGCMC::energy_full() delz = x[i][2] - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; - if (rsq < overlap_cutoff) return MAXENERGYSIGNAL; + if (rsq < overlap_cutoffsq) { + overlaptest = 1; + break; + } } + if (overlaptest) break; } + MPI_Allreduce(&overlaptest, &overlaptestall, 1, + MPI_INT, MPI_MAX, world); + if (overlaptestall) return MAXENERGYSIGNAL; } - + // clear forces so they don't accumulate over multiple // calls within fix gcmc timestep, e.g. for fix shake diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index 9b2184dda2810f1dea8ddf1de0a183b9773bc46d..8a5375eed70ad12bd72c12744bd8f55b5cd3c161 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -106,13 +106,13 @@ class FixGCMC : public Fix { double xlo,xhi,ylo,yhi,zlo,zhi; double region_xlo,region_xhi,region_ylo,region_yhi,region_zlo,region_zhi; double region_volume; - double energy_stored; + double energy_stored; // full energy of old/current configuration double *sublo,*subhi; int *local_gas_list; double **cutsq; double **atom_coord; imageint imagezero; - double overlap_cutoff; + double overlap_cutoffsq; // square distance cutoff for overlap int overlap_flag; double energy_intra; @@ -214,9 +214,14 @@ W: Fix gcmc using full_energy option Fix gcmc has automatically turned on the full_energy option since it is required for systems like the one specified by the user. User input -included one or more of the following: kspace, triclinic, a hybrid -pair style, an eam pair style, or no "single" function for the pair -style. +included one or more of the following: kspace, a hybrid +pair style, an eam pair style, tail correction, +or no "single" function for the pair style. + +W: Energy of old configuration in fix gcmc is > MAXENERGYTEST. + +This probably means that a pair of atoms are closer than the +overlap cutoff distance for keyword overlap_cutoff. E: Invalid atom type in fix gcmc command diff --git a/src/MEAM/Install.sh b/src/MEAM/Install.sh index 1825d4327f461af90310f5a7aa646793b302e291..7bfc76c0e2ed72390f980347ea1130e8d5850c82 100644 --- a/src/MEAM/Install.sh +++ b/src/MEAM/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index f164a51de4309d57cff2d06a90ffa6b67c203639..0763d7d3e24667be3c3d81adbd236c16c3a54c7b 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -13,6 +13,7 @@ #include <math.h> #include <stdlib.h> +#include <string.h> #include "bond_harmonic.h" #include "atom.h" #include "neighbor.h" @@ -26,7 +27,10 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) {} +BondHarmonic::BondHarmonic(LAMMPS *lmp) : Bond(lmp) +{ + reinitflag = 1; +} /* ---------------------------------------------------------------------- */ @@ -196,3 +200,16 @@ double BondHarmonic::single(int type, double rsq, int i, int j, if (r > 0.0) fforce = -2.0*rk/r; return rk*dr; } + +/* ---------------------------------------------------------------------- + Return ptr to internal members upon request. +------------------------------------------------------------------------ */ +void *BondHarmonic::extract( char *str, int &dim ) +{ + dim = 1; + if( strcmp(str,"kappa")==0) return (void*) k; + if( strcmp(str,"r0")==0) return (void*) r0; + return NULL; +} + + diff --git a/src/MOLECULE/bond_harmonic.h b/src/MOLECULE/bond_harmonic.h index 7c7125b04ce233b5543b552ceb65b89ffea146f9..a0fd24577a8988e18fcb7a676a0041c353c52191 100644 --- a/src/MOLECULE/bond_harmonic.h +++ b/src/MOLECULE/bond_harmonic.h @@ -36,6 +36,7 @@ class BondHarmonic : public Bond { void read_restart(FILE *); void write_data(FILE *); double single(int, double, int, int, double &); + virtual void *extract(char *, int &); protected: double *k,*r0; diff --git a/src/MOLECULE/dihedral_charmmfsh.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp similarity index 95% rename from src/MOLECULE/dihedral_charmmfsh.cpp rename to src/MOLECULE/dihedral_charmmfsw.cpp index 93c1853fe53124bd6d9583be6317645631c1a147..613170bbfab6c7eff157a9c97951c371b5a0bf8e 100644 --- a/src/MOLECULE/dihedral_charmmfsh.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -21,7 +21,7 @@ #include <mpi.h> #include <math.h> #include <stdlib.h> -#include "dihedral_charmmfsh.h" +#include "dihedral_charmmfsw.h" #include "atom.h" #include "comm.h" #include "neighbor.h" @@ -40,7 +40,7 @@ using namespace MathConst; /* ---------------------------------------------------------------------- */ -DihedralCharmmfsh::DihedralCharmmfsh(LAMMPS *lmp) : Dihedral(lmp) +DihedralCharmmfsw::DihedralCharmmfsw(LAMMPS *lmp) : Dihedral(lmp) { weightflag = 0; writedata = 1; @@ -48,7 +48,7 @@ DihedralCharmmfsh::DihedralCharmmfsh(LAMMPS *lmp) : Dihedral(lmp) /* ---------------------------------------------------------------------- */ -DihedralCharmmfsh::~DihedralCharmmfsh() +DihedralCharmmfsw::~DihedralCharmmfsw() { if (allocated && !copymode) { memory->destroy(setflag); @@ -63,7 +63,7 @@ DihedralCharmmfsh::~DihedralCharmmfsh() /* ---------------------------------------------------------------------- */ -void DihedralCharmmfsh::compute(int eflag, int vflag) +void DihedralCharmmfsw::compute(int eflag, int vflag) { int i1,i2,i3,i4,i,m,n,type; double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z,vb2xm,vb2ym,vb2zm; @@ -322,7 +322,7 @@ void DihedralCharmmfsh::compute(int eflag, int vflag) /* ---------------------------------------------------------------------- */ -void DihedralCharmmfsh::allocate() +void DihedralCharmmfsw::allocate() { allocated = 1; int n = atom->ndihedraltypes; @@ -342,7 +342,7 @@ void DihedralCharmmfsh::allocate() set coeffs for one type ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::coeff(int narg, char **arg) +void DihedralCharmmfsw::coeff(int narg, char **arg) { if (narg != 5) error->all(FLERR,"Incorrect args for dihedral coefficients"); if (!allocated) allocate(); @@ -384,7 +384,7 @@ void DihedralCharmmfsh::coeff(int narg, char **arg) error check and initialize all values needed for force computation ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::init_style() +void DihedralCharmmfsw::init_style() { // insure use of CHARMM pair_style if any weight factors are non-zero // set local ptrs to LJ 14 arrays setup by Pair @@ -392,14 +392,14 @@ void DihedralCharmmfsh::init_style() if (weightflag) { int itmp; if (force->pair == NULL) - error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style"); + error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); lj14_1 = (double **) force->pair->extract("lj14_1",itmp); lj14_2 = (double **) force->pair->extract("lj14_2",itmp); lj14_3 = (double **) force->pair->extract("lj14_3",itmp); lj14_4 = (double **) force->pair->extract("lj14_4",itmp); int *ptr = (int *) force->pair->extract("implicit",itmp); if (!lj14_1 || !lj14_2 || !lj14_3 || !lj14_4 || !ptr) - error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style"); + error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); implicit = *ptr; } @@ -414,7 +414,7 @@ void DihedralCharmmfsh::init_style() if (p_cutcoul == NULL || p_cutljinner == NULL || p_cutlj == NULL || p_dihedflag == NULL) - error->all(FLERR,"Dihedral charmmfsh is incompatible with Pair style"); + error->all(FLERR,"Dihedral charmmfsw is incompatible with Pair style"); dihedflag = *p_dihedflag; cut_coul14 = *p_cutcoul; @@ -433,7 +433,7 @@ void DihedralCharmmfsh::init_style() proc 0 writes out coeffs to restart file ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::write_restart(FILE *fp) +void DihedralCharmmfsw::write_restart(FILE *fp) { fwrite(&k[1],sizeof(double),atom->ndihedraltypes,fp); fwrite(&multiplicity[1],sizeof(int),atom->ndihedraltypes,fp); @@ -446,7 +446,7 @@ void DihedralCharmmfsh::write_restart(FILE *fp) proc 0 reads coeffs from restart file, bcasts them ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::read_restart(FILE *fp) +void DihedralCharmmfsw::read_restart(FILE *fp) { allocate(); @@ -474,7 +474,7 @@ void DihedralCharmmfsh::read_restart(FILE *fp) proc 0 writes to data file ------------------------------------------------------------------------- */ -void DihedralCharmmfsh::write_data(FILE *fp) +void DihedralCharmmfsw::write_data(FILE *fp) { for (int i = 1; i <= atom->ndihedraltypes; i++) fprintf(fp,"%d %g %d %d %g\n",i,k[i],multiplicity[i],shift[i],weight[i]); diff --git a/src/MOLECULE/dihedral_charmmfsh.h b/src/MOLECULE/dihedral_charmmfsw.h similarity index 84% rename from src/MOLECULE/dihedral_charmmfsh.h rename to src/MOLECULE/dihedral_charmmfsw.h index 44ea9b265860de23625ad4daf0d2aabd074ffc78..ab0ccf675dad3f9667f24cc26ba9815eb307b14e 100644 --- a/src/MOLECULE/dihedral_charmmfsh.h +++ b/src/MOLECULE/dihedral_charmmfsw.h @@ -13,22 +13,22 @@ #ifdef DIHEDRAL_CLASS -DihedralStyle(charmmfsh,DihedralCharmmfsh) +DihedralStyle(charmmfsw,DihedralCharmmfsw) #else -#ifndef LMP_DIHEDRAL_CHARMMFSH_H -#define LMP_DIHEDRAL_CHARMMFSH_H +#ifndef LMP_DIHEDRAL_CHARMMFSW_H +#define LMP_DIHEDRAL_CHARMMFSW_H #include <stdio.h> #include "dihedral.h" namespace LAMMPS_NS { -class DihedralCharmmfsh : public Dihedral { +class DihedralCharmmfsw : public Dihedral { public: - DihedralCharmmfsh(class LAMMPS *); - virtual ~DihedralCharmmfsh(); + DihedralCharmmfsw(class LAMMPS *); + virtual ~DihedralCharmmfsw(); virtual void compute(int, int); virtual void coeff(int, char **); virtual void init_style(); @@ -73,9 +73,9 @@ E: Incorrect weight arg for dihedral coefficients Self-explanatory. Check the input script or data file. -E: Dihedral charmmfsh is incompatible with Pair style +E: Dihedral charmmfsw is incompatible with Pair style -Dihedral style charmmfsh must be used with a pair style charmm +Dihedral style charmmfsw must be used with a pair style charmm in order for the 1-4 epsilon/sigma parameters to be defined. */ diff --git a/src/MPIIO/Install.sh b/src/MPIIO/Install.sh index 3834aea5c5c7498f31dbd8edb5dce3aed9e734ee..902bff2fc8cc2ff23b8742d75f69f6ab2d3712de 100644 --- a/src/MPIIO/Install.sh +++ b/src/MPIIO/Install.sh @@ -36,7 +36,7 @@ touch ../write_restart.cpp # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package to include/exclude LMP_MPIIO setting diff --git a/src/MSCG/Install.sh b/src/MSCG/Install.sh index f7c7452101897ef3d9778072a927fc9d6f8ca69f..353403c7da5b2c09d0023fd49ba6826a2abf6fc9 100755 --- a/src/MSCG/Install.sh +++ b/src/MSCG/Install.sh @@ -25,7 +25,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/Makefile b/src/Makefile index d7e990461fec87e98a928e9322b07e8445683955..e6821646d13c7680e290cee662144e22f1a54286 100644 --- a/src/Makefile +++ b/src/Makefile @@ -43,6 +43,15 @@ endif # Package variables +# PACKAGE = standard packages +# PACKUSER = user packagse +# PACKLIB = all packages that require an additional lib +# PACKSYS = subset that reqiure a common system library +# PACKINT = subset that require an internal (provided) library +# PACKEXT = subset that require an external (downloaded) library +# PACKLIB = PACKSYS + PACKING + PACKEXT +# PACKSCRIPT = libs under lammps/lib that have an Install.py script + PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ granular kim kokkos kspace manybody mc meam misc molecule \ mpiio mscg opt peri poems \ @@ -55,10 +64,21 @@ PACKUSER = user-atc user-awpmd user-cg-cmm user-cgdna user-colvars \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk -PACKLIB = compress gpu kim kokkos meam mpiio mscg poems python reax voronoi \ - user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ +PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \ + python reax voronoi \ + user-atc user-awpmd user-colvars user-h5md user-molfile \ user-nc-dump user-qmmm user-quip user-smd user-vtk +PACKSYS = compress mpiio python + +PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars + +PACKEXT = kim mscg voronoi \ + user-h5md user-molfile user-nc-dump user-qmmm user-quip \ + user-smd user-vtk + +PACKSCRIPT = voronoi + PACKALL = $(PACKAGE) $(PACKUSER) PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z) @@ -66,6 +86,7 @@ PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z) YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z) NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z) +LIBDIR = $(shell echo $(@:lib-%=%)) # List of all targets @@ -75,9 +96,9 @@ help: @echo 'make clean-machine delete object files for one machine' @echo 'make mpi-stubs build dummy MPI library in STUBS' @echo 'make install-python install LAMMPS wrapper in Python' - @echo 'make tar create lmp_src.tar.gz of src dir and packages' + @echo 'make tar create lmp_src.tar.gz for src dir and packages' @echo '' - @echo 'make package list available packages' + @echo 'make package list available packages and their dependencies' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @echo 'make no-package remove a single pkg from src dir' @@ -87,11 +108,16 @@ help: @echo 'make no-standard (no-std) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' - @echo 'make no-lib remove all pkgs with external libs' + @echo 'make yes-lib install all pkgs with libs (incldued or ext)' + @echo 'make no-lib remove all pkgs with libs (included or ext)' + @echo 'make yes-ext install all pkgs with external libs' + @echo 'make no-ext remove all pkgs with external libs' @echo '' @echo 'make package-update (pu) replace src files with updated package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package files' + @echo '' + @echo 'make lib-package download/build/install a package library' @echo 'make purge purge obsolete copies of source files' @echo '' @echo 'make machine build LAMMPS for machine' @@ -221,6 +247,13 @@ package: @echo '' @echo 'User-contributed packages:' $(PACKUSER) @echo '' + @echo 'Packages that need system libraries:' $(PACKSYS) + @echo '' + @echo 'Packages that need provided libraries:' $(PACKINT) + @echo '' + @echo 'Packages that need external libraries:' $(PACKEXT) + @echo '' + @echo 'make package list available packages' @echo 'make package list available packages' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @@ -229,13 +262,18 @@ package: @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' @echo 'make no-standard (no-srd) remove all standard pkgs' - @echo '' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' - @echo 'make no-lib remove all pkgs with external libs' + @echo 'make yes-lib install all pkgs with libs (included or ext)' + @echo 'make no-lib remove all pkgs with libs (included or ext)' + @echo 'make yes-ext install all pkgs with external libs' + @echo 'make no-ext remove all pkgs with external libs' + @echo '' @echo 'make package-update (pu) replace src files with package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package file' + @echo '' + @echo 'make lib-package download/build/install a package library' yes-all: @for p in $(PACKALL); do $(MAKE) yes-$$p; done @@ -255,9 +293,18 @@ yes-user: no-user: @for p in $(PACKUSER); do $(MAKE) no-$$p; done +yes-lib: + @for p in $(PACKLIB); do $(MAKE) yes-$$p; done + no-lib: @for p in $(PACKLIB); do $(MAKE) no-$$p; done +yes-ext: + @for p in $(PACKEXT); do $(MAKE) yes-$$p; done + +no-ext: + @for p in $(PACKEXT); do $(MAKE) no-$$p; done + yes-%: @if [ ! -e Makefile.package ]; \ then cp Makefile.package.empty Makefile.package; fi @@ -288,6 +335,16 @@ no-%: $(SHELL) Depend.sh $(NODIR) 0; \ fi; +# download/build/install a package library + +lib-%: + @if [ ! -e ../lib/$(LIBDIR)/Install.py ]; then \ + echo "Install script for lib $(@:lib-%=%) does not exist"; \ + else \ + echo "Installing lib for package $(@:lib-%=%)"; \ + cd ../lib/$(LIBDIR); python Install.py $(args); \ + fi; + # status = list src files that differ from package files # update = replace src files with newer package files # overwrite = overwrite package files with newer src files diff --git a/src/POEMS/Install.sh b/src/POEMS/Install.sh index 7996f542be37dc8e8a4d5f358329067d9e8e0afe..be407d76f0a65fa58e15fdd7abdb2da48439bdb9 100644 --- a/src/POEMS/Install.sh +++ b/src/POEMS/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/PYTHON/Install.sh b/src/PYTHON/Install.sh index 3d6f71958a7f9caf30ad8365a71eb67622e453f7..71288cf3774127d44970449d7fcf06921caf0e2b 100755 --- a/src/PYTHON/Install.sh +++ b/src/PYTHON/Install.sh @@ -35,7 +35,7 @@ touch ../variable.cpp # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/PYTHON/python.cpp b/src/PYTHON/python.cpp index 11bb848b334f6f177c25506f17b7ea35f5f94ee0..c2ff7f03c7bcd4fc0f3fef83b74f996430d7c498 100644 --- a/src/PYTHON/python.cpp +++ b/src/PYTHON/python.cpp @@ -37,24 +37,34 @@ Python::Python(LAMMPS *lmp) : Pointers(lmp) nfunc = 0; pfuncs = NULL; + + external_interpreter = false; } /* ---------------------------------------------------------------------- */ Python::~Python() { - // clean up - - for (int i = 0; i < nfunc; i++) { - delete [] pfuncs[i].name; - deallocate(i); - PyObject *pFunc = (PyObject *) pfuncs[i].pFunc; - Py_XDECREF(pFunc); - } + if(pyMain) { + // clean up + PyGILState_STATE gstate = PyGILState_Ensure(); + + for (int i = 0; i < nfunc; i++) { + delete [] pfuncs[i].name; + deallocate(i); + PyObject *pFunc = (PyObject *) pfuncs[i].pFunc; + Py_XDECREF(pFunc); + } - // shutdown Python interpreter + // shutdown Python interpreter - if (pyMain) Py_Finalize(); + if (!external_interpreter) { + Py_Finalize(); + } + else { + PyGILState_Release(gstate); + } + } memory->sfree(pfuncs); } @@ -147,27 +157,20 @@ void Python::command(int narg, char **arg) int ifunc = create_entry(arg[0]); // one-time initialization of Python interpreter - // Py_SetArgv() enables finding of *.py module files in current dir - // only needed for module load, not for direct file read into __main__ // pymain stores pointer to main module + PyGILState_STATE gstate; if (pyMain == NULL) { - if (Py_IsInitialized()) - error->all(FLERR,"Cannot embed Python when also " - "extending Python with LAMMPS"); + external_interpreter = Py_IsInitialized(); Py_Initialize(); - - //char *arg = (char *) "./lmp"; - //PySys_SetArgv(1,&arg); - - //PyObject *pName = PyString_FromString("__main__"); - //if (!pName) errorX->all(FLERR,"Bad pName"); - //PyObject *pModule = PyImport_Import(pName); - //Py_DECREF(pName); + PyEval_InitThreads(); + gstate = PyGILState_Ensure(); PyObject *pModule = PyImport_AddModule("__main__"); if (!pModule) error->all(FLERR,"Could not initialize embedded Python"); pyMain = (void *) pModule; + } else { + gstate = PyGILState_Ensure(); } // send Python code to Python interpreter @@ -177,22 +180,44 @@ void Python::command(int narg, char **arg) if (pyfile) { FILE *fp = fopen(pyfile,"r"); - if (fp == NULL) error->all(FLERR,"Could not open Python file"); + + if (fp == NULL) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not open Python file"); + } + int err = PyRun_SimpleFile(fp,pyfile); - if (err) error->all(FLERR,"Could not process Python file"); + + if (err) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not process Python file"); + } + fclose(fp); } else if (herestr) { int err = PyRun_SimpleString(herestr); - if (err) error->all(FLERR,"Could not process Python string"); + + if (err) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not process Python string"); + } } // pFunc = function object for requested function PyObject *pModule = (PyObject *) pyMain; PyObject *pFunc = PyObject_GetAttrString(pModule,pfuncs[ifunc].name); - if (!pFunc) error->all(FLERR,"Could not find Python function"); - if (!PyCallable_Check(pFunc)) + + if (!pFunc) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not find Python function"); + } + + if (!PyCallable_Check(pFunc)) { + PyGILState_Release(gstate); error->all(FLERR,"Python function is not callable"); + } + pfuncs[ifunc].pFunc = (void *) pFunc; // clean-up input storage @@ -200,12 +225,14 @@ void Python::command(int narg, char **arg) delete [] istr; delete [] format; delete [] pyfile; + PyGILState_Release(gstate); } /* ------------------------------------------------------------------ */ void Python::invoke_function(int ifunc, char *result) { + PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *pValue; char *str; @@ -215,29 +242,43 @@ void Python::invoke_function(int ifunc, char *result) int ninput = pfuncs[ifunc].ninput; PyObject *pArgs = PyTuple_New(ninput); - if (!pArgs) error->all(FLERR,"Could not create Python function arguments"); + + if (!pArgs) { + PyGILState_Release(gstate); + error->all(FLERR,"Could not create Python function arguments"); + } for (int i = 0; i < ninput; i++) { int itype = pfuncs[ifunc].itype[i]; if (itype == INT) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); - if (!str) + + if (!str) { + PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); + } + pValue = PyInt_FromLong(atoi(str)); } else pValue = PyInt_FromLong(pfuncs[ifunc].ivalue[i]); } else if (itype == DOUBLE) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); - if (!str) + + if (!str) { + PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); + } + pValue = PyFloat_FromDouble(atof(str)); } else pValue = PyFloat_FromDouble(pfuncs[ifunc].dvalue[i]); } else if (itype == STRING) { if (pfuncs[ifunc].ivarflag[i]) { str = input->variable->retrieve(pfuncs[ifunc].svalue[i]); - if (!str) + if (!str) { + PyGILState_Release(gstate); error->all(FLERR,"Could not evaluate Python function input variable"); + } pValue = PyString_FromString(str); } else pValue = PyString_FromString(pfuncs[ifunc].svalue[i]); } else if (itype == PTR) { @@ -250,7 +291,12 @@ void Python::invoke_function(int ifunc, char *result) // error check with one() since only some procs may fail pValue = PyObject_CallObject(pFunc,pArgs); - if (!pValue) error->one(FLERR,"Python function evaluation failed"); + + if (!pValue) { + PyGILState_Release(gstate); + error->one(FLERR,"Python function evaluation failed"); + } + Py_DECREF(pArgs); // function returned a value @@ -271,6 +317,8 @@ void Python::invoke_function(int ifunc, char *result) } Py_DECREF(pValue); } + + PyGILState_Release(gstate); } /* ------------------------------------------------------------------ */ diff --git a/src/PYTHON/python.h b/src/PYTHON/python.h index 5f65e3970bea5a860d311a55c2b8701e82193d9d..78889b994fb50e6c400e177ae622fd2b67f0291a 100644 --- a/src/PYTHON/python.h +++ b/src/PYTHON/python.h @@ -21,6 +21,7 @@ namespace LAMMPS_NS { class Python : protected Pointers { public: int python_exists; + bool external_interpreter; Python(class LAMMPS *); ~Python(); diff --git a/src/REAX/Install.sh b/src/REAX/Install.sh index f0083810e9b403acc48710010531d217c90621c9..bf8c8dbca2cbdfe488ef3cce5320cf8c4b1dee34 100644 --- a/src/REAX/Install.sh +++ b/src/REAX/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index 1431fc202ebf25be0aababc7faa4ac587abbf2c4..330e2ebca33a522267581e434a81b86cb627ba28 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -84,7 +84,7 @@ void ComputeEventDisplace::init() } /* ---------------------------------------------------------------------- - return non-zero if an atom has moved > displace_dist since last event + return non-zero if any atom has moved > displace_dist since last event ------------------------------------------------------------------------- */ double ComputeEventDisplace::compute_scalar() @@ -145,6 +145,62 @@ double ComputeEventDisplace::compute_scalar() return scalar; } +/* ---------------------------------------------------------------------- + return count of atoms that have moved > displace_dist since last event +------------------------------------------------------------------------- */ + +int ComputeEventDisplace::all_events() +{ + invoked_scalar = update->ntimestep; + + if (id_event == NULL) return 0.0; + + int event = 0; + double **xevent = fix_event->array_atom; + + double **x = atom->x; + int *mask = atom->mask; + imageint *image = atom->image; + int nlocal = atom->nlocal; + + double *h = domain->h; + double xprd = domain->xprd; + double yprd = domain->yprd; + double zprd = domain->zprd; + int xbox,ybox,zbox; + double dx,dy,dz,rsq; + + if (triclinic == 0) { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + xbox = (image[i] & IMGMASK) - IMGMAX; + ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; + zbox = (image[i] >> IMG2BITS) - IMGMAX; + dx = x[i][0] + xbox*xprd - xevent[i][0]; + dy = x[i][1] + ybox*yprd - xevent[i][1]; + dz = x[i][2] + zbox*zprd - xevent[i][2]; + rsq = dx*dx + dy*dy + dz*dz; + if (rsq >= displace_distsq) event++; + } + } else { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + xbox = (image[i] & IMGMASK) - IMGMAX; + ybox = (image[i] >> IMGBITS & IMGMASK) - IMGMAX; + zbox = (image[i] >> IMG2BITS) - IMGMAX; + dx = x[i][0] + h[0]*xbox + h[5]*ybox + h[4]*zbox - xevent[i][0]; + dy = x[i][1] + h[1]*ybox + h[3]*zbox - xevent[i][1]; + dz = x[i][2] + h[2]*zbox - xevent[i][2]; + rsq = dx*dx + dy*dy + dz*dz; + if (rsq >= displace_distsq) event++; + } + } + + int allevents; + MPI_Allreduce(&event,&allevents,1,MPI_INT,MPI_SUM,world); + + return allevents; +} /* ---------------------------------------------------------------------- */ diff --git a/src/REPLICA/compute_event_displace.h b/src/REPLICA/compute_event_displace.h index c545c696a44c5c3223b26ce4093aae9be36843b8..602f3c4b760ba6edfbb2b65771f06c0c155c45a4 100644 --- a/src/REPLICA/compute_event_displace.h +++ b/src/REPLICA/compute_event_displace.h @@ -30,8 +30,11 @@ class ComputeEventDisplace : public Compute { ~ComputeEventDisplace(); void init(); double compute_scalar(); + + int all_events(); void reset_extra_compute_fix(const char *); + private: int triclinic; double displace_distsq; diff --git a/src/USER-ATC/Install.sh b/src/USER-ATC/Install.sh index 113738901843421f6d5d3e9a6f4fef6372203f3a..f719fe220f7c60438c55e28ddd22458d20897b1a 100755 --- a/src/USER-ATC/Install.sh +++ b/src/USER-ATC/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-AWPMD/Install.sh b/src/USER-AWPMD/Install.sh index 7922c53395e986a62699b24a61a4f6b48faa59e3..094e10c157549e27405f539bb0824ea96516399a 100644 --- a/src/USER-AWPMD/Install.sh +++ b/src/USER-AWPMD/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-CGDNA/Install.sh b/src/USER-CGDNA/Install.sh index 0726158779e268a5a12b7222f971d3212abce3db..a0721d5bdea55ff354c046a85c46e0e06c05c3d4 100644 --- a/src/USER-CGDNA/Install.sh +++ b/src/USER-CGDNA/Install.sh @@ -29,19 +29,29 @@ action () { # list of files with dependcies action bond_oxdna_fene.cpp bond_fene.h +action bond_oxdna2_fene.cpp bond_fene.h action bond_oxdna_fene.h bond_fene.h +action bond_oxdna2_fene.h bond_fene.h action fix_nve_dotc_langevin.cpp atom_vec_ellipsoid.h action fix_nve_dotc_langevin.h atom_vec_ellipsoid.h action fix_nve_dot.cpp atom_vec_ellipsoid.h action fix_nve_dot.h atom_vec_ellipsoid.h action mf_oxdna.h atom_vec_ellipsoid.h action pair_oxdna_coaxstk.cpp atom_vec_ellipsoid.h +action pair_oxdna2_coaxstk.cpp atom_vec_ellipsoid.h action pair_oxdna_coaxstk.h atom_vec_ellipsoid.h +action pair_oxdna2_coaxstk.h atom_vec_ellipsoid.h action pair_oxdna_excv.cpp atom_vec_ellipsoid.h +action pair_oxdna2_excv.cpp atom_vec_ellipsoid.h action pair_oxdna_excv.h atom_vec_ellipsoid.h +action pair_oxdna2_excv.h atom_vec_ellipsoid.h action pair_oxdna_hbond.cpp atom_vec_ellipsoid.h action pair_oxdna_hbond.h atom_vec_ellipsoid.h action pair_oxdna_stk.cpp atom_vec_ellipsoid.h +action pair_oxdna2_stk.cpp atom_vec_ellipsoid.h action pair_oxdna_stk.h atom_vec_ellipsoid.h +action pair_oxdna2_stk.h atom_vec_ellipsoid.h action pair_oxdna_xstk.cpp atom_vec_ellipsoid.h action pair_oxdna_xstk.h atom_vec_ellipsoid.h +action pair_oxdna2_dh.cpp atom_vec_ellipsoid.h +action pair_oxdna2_dh.h atom_vec_ellipsoid.h diff --git a/src/USER-CGDNA/README b/src/USER-CGDNA/README index 8158b83ab80c0943c9ca58ab918fbb8122ca153b..516f18c36cc67c1dec308bf8cd5114a0a1e7e3d9 100644 --- a/src/USER-CGDNA/README +++ b/src/USER-CGDNA/README @@ -2,9 +2,9 @@ This package contains a LAMMPS implementation of coarse-grained models of DNA, which can be used to model sequence-specific DNA strands. -See the doc pages and [1,2] for the individual bond and pair styles. +See the doc pages and [1,2,3] for the individual bond and pair styles. The packages contains also a new Langevin-type rigid-body integrator, -which has also its own doc page and is explained in [3]. +which has also its own doc page and is explained in [4]. [1] T. Ouldridge, A. Louis, J. Doye, "Structural, mechanical, and thermodynamic properties of a coarse-grained DNA model", @@ -13,16 +13,20 @@ J. Chem. Phys. 134, 085101 (2011). [2] T.E. Ouldridge, Coarse-grained modelling of DNA and DNA self-assembly, DPhil. University of Oxford (2011). -[3] R. Davidchack, T. Ouldridge, M. Tretyakov, "New Langevin and +[3] B.E. Snodin, F. Randisi, M. Mosayebi, et al., Introducing +Improved Structural Properties and Salt Dependence into a Coarse-Grained +Model of DNA, J. Chem. Phys. 142, 234901 (2015). + +[4] R. Davidchack, T. Ouldridge, M. Tretyakov, "New Langevin and gradient thermostats for rigid body dynamics", J. Chem. Phys. 142, 144114 (2015). Example input and data files can be found in -/examples/USER/cgdna/examples/duplex1/ and /duplex2/. A simple python -setup tool which creates single straight or helical DNA strands as -well as DNA duplexes and arrays of duplexes can be found in -/examples/USER/cgdna/util/. A technical report with more information -on the model, the structure of the input and data file, the setup tool +/examples/USER/cgdna/examples/oxDNA/ and /oxDNA2/. Python setup +tools which create single straight or helical DNA strands as +well as DNA duplexes or arrays of duplexes can be found in +/examples/USER/cgdna/util/. A technical report with more information +on the models, the structure of the input and data file, the setup tool and the performance of the LAMMPS-implementation of oxDNA can be found in /doc/src/PDF/USER-CGDNA-overview.pdf. @@ -35,6 +39,7 @@ of the LAMMPS manual). The creator of this package is: Dr Oliver Henrich +University of Strathclyde, UK University of Edinburgh, UK ohenrich@ph.ed.ac.uk o.henrich@epcc.ed.ac.uk @@ -45,6 +50,8 @@ o.henrich@epcc.ed.ac.uk bond_oxdna_fene.cpp: backbone connectivity, a modified FENE potential +bond_oxdna2_fene.cpp: corresponding bond style in oxDNA2 (see [3]) + ** Pair styles provided by this package: pair_oxdna_excv.cpp: excluded volume interaction between the nucleotides @@ -59,6 +66,13 @@ pair_oxdna_xstk.cpp: cross-stacking interaction between nucleotides pair_oxdna_coaxstk.cpp: coaxial stacking interaction between nucleotides + +pair_oxdna2_excv.cpp, pair_oxdna2_stk.cpp, pair_oxdna2_coaxstk.cpp: + corresponding pair styles in oxDNA2 (see [3]) + +pair_oxdna2_dh.cpp: Debye-Hueckel electrostatic interaction between backbone + sites + ** Fixes provided by this package: fix_nve_dotc_langevin.cpp: fix for Langevin-type rigid body integrator "C" diff --git a/src/USER-COLVARS/Install.sh b/src/USER-COLVARS/Install.sh index c01719e76630a4a170c4a3f7b715cfbf3bb1dc08..d67883a41614fd9028453aac9a18f0ad79948d79 100755 --- a/src/USER-COLVARS/Install.sh +++ b/src/USER-COLVARS/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-H5MD/Install.sh b/src/USER-H5MD/Install.sh index bdda732807b033c6631a26ae74c124e9d98734d1..1070afaa9618eaed1debcab9bb528a648224fdf8 100644 --- a/src/USER-H5MD/Install.sh +++ b/src/USER-H5MD/Install.sh @@ -27,7 +27,7 @@ action () { } for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index 0d48e145e03b2ce4d60a8b1e5f449d43282a1167..4f6b62590d9b71e50d24728417ff225e5953a1d4 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -94,6 +94,7 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg, dof_flag = 1; nevery = 0; + next_output = 0; dtv = dtf = 0; tolerance = force->numeric( FLERR, arg[3] ); @@ -145,6 +146,11 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg, while( argi < narg ){ if( strcmp(arg[argi], "every") == 0 ){ nevery = force->inumeric(FLERR,arg[argi+1]); + next_output = update->ntimestep + nevery; + if( comm->me == 0 ){ + fprintf(screen,"Outputing every %d steps, next is %d\n", + nevery, next_output); + } argi += 2; }else if( error_on_unknown_keyword ){ char msg[2048]; @@ -220,6 +226,11 @@ void FixNVEManifoldRattle::print_stats( const char *header ) x_iters * inv_tdiff, v_iters * inv_tdiff, stats.dofs_removed); fprintf(screen,"\n"); } + + stats.x_iters_per_atom = 0; + stats.v_iters_per_atom = 0; + stats.x_iters = 0; + stats.v_iters = 0; } @@ -263,14 +274,6 @@ void FixNVEManifoldRattle::init() void FixNVEManifoldRattle::update_var_params() { - if( nevery > 0 ){ - stats.x_iters = 0; - stats.v_iters = 0; - stats.natoms = 0; - stats.x_iters_per_atom = 0.0; - stats.v_iters_per_atom = 0.0; - } - double *ptr_params = ptr_m->params; for( int i = 0; i < nvars; ++i ){ @@ -358,7 +361,12 @@ void FixNVEManifoldRattle::final_integrate() ---------------------------------------------------------------------------*/ void FixNVEManifoldRattle::end_of_step() { - print_stats( "nve/manifold/rattle" ); + if (nevery && (update->ntimestep == next_output)){ + if( comm->me == 0 ){ + print_stats( "nve/manifold/rattle" ); + next_output += nevery; + } + } } /* ----------------------------------------------------------------------------- diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h index 4bd17ab89902ab9fc015aa1858b430481c0bed0e..71aa1aed9a4a7b5a67cbe550de6991577fa360df 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h @@ -81,7 +81,7 @@ namespace LAMMPS_NS { protected: - int nevery; + int nevery, next_output; double dtv, dtf; double tolerance; diff --git a/src/USER-MISC/Install.sh b/src/USER-MISC/Install.sh index 203d9231641ee7fe7013e2b06c456c691808fa7b..2d42125ec3a79cdb00cc88cb31d12b8be3959f4d 100644 --- a/src/USER-MISC/Install.sh +++ b/src/USER-MISC/Install.sh @@ -35,6 +35,6 @@ for file in *.cpp *.h; do elif (test $file = "pair_cdeam.h") then action pair_cdeam.h pair_eam_alloy.cpp else - action $file + test -f ${file} && action $file fi done diff --git a/src/USER-MOLFILE/Install.sh b/src/USER-MOLFILE/Install.sh index 19fd3bd361fab307063d032ec346e0ea8224572d..85885f66b921a118b5a05b5a365556a2db9f5f77 100644 --- a/src/USER-MOLFILE/Install.sh +++ b/src/USER-MOLFILE/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-NC-DUMP/Install.sh b/src/USER-NC-DUMP/Install.sh index 37ebd0a0a5b5abda1dfe33545f899e5c46a5afaf..4d21f0f894b9cba4abd69549852f7c72ee3a7549 100644 --- a/src/USER-NC-DUMP/Install.sh +++ b/src/USER-NC-DUMP/Install.sh @@ -27,7 +27,7 @@ action () { } for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-QMMM/Install.sh b/src/USER-QMMM/Install.sh index 089b880a777f8c236f203866eccd5c1f820edb23..4bede66d80676acc18fbc9fd7f004eab2e79cb1c 100755 --- a/src/USER-QMMM/Install.sh +++ b/src/USER-QMMM/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-QUIP/Install.sh b/src/USER-QUIP/Install.sh index ee7faaf62aad7697b3f1f2e64eeb28d1522ea312..20174e664a4478a067f6a0014146b6966e641d76 100644 --- a/src/USER-QUIP/Install.sh +++ b/src/USER-QUIP/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-SMD/Install.sh b/src/USER-SMD/Install.sh index c0f48c54603b2ce0140e83d04cb65ac5f20443f2..cb9aa5452bc08d71135c82bb21381fcf840acca9 100644 --- a/src/USER-SMD/Install.sh +++ b/src/USER-SMD/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/USER-VTK/Install.sh b/src/USER-VTK/Install.sh index d02dc8777269b9bd37d9ef03b99acb836584b121..3749242fb2183eaa2d7bf75738f32e838c431d4a 100644 --- a/src/USER-VTK/Install.sh +++ b/src/USER-VTK/Install.sh @@ -27,7 +27,7 @@ action () { } for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/VORONOI/Install.sh b/src/VORONOI/Install.sh index f21e9404ebee3408d20b1880c29dd7129d334491..6373506b19cf21dfbf16830dfe38bf344f7171aa 100755 --- a/src/VORONOI/Install.sh +++ b/src/VORONOI/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info diff --git a/src/bond.cpp b/src/bond.cpp index 5a33f107cf44ade599dff8b5a9a9b81f00d04386..825ff1b199a48b854f5b7d716eac80c77228345e 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -292,3 +292,14 @@ double Bond::memory_usage() bytes += comm->nthreads*maxvatom*6 * sizeof(double); return bytes; } + +/* ----------------------------------------------------------------------- + Reset all type-based bond params via init. +-------------------------------------------------------------------------- */ +void Bond::reinit() +{ + if (!reinitflag) + error->all(FLERR,"Fix adapt interface to this bond style not supported"); + + init(); +} diff --git a/src/bond.h b/src/bond.h index 41604387a3f8e056a92e7b08a25007a062ca3021..29de7ad7d2e5c907632f63c987af15e3ec75328d 100644 --- a/src/bond.h +++ b/src/bond.h @@ -30,6 +30,8 @@ class Bond : protected Pointers { double virial[6]; // accumulated virial double *eatom,**vatom; // accumulated per-atom energy/virial + int reinitflag; // 1 if compatible with fix adapt and alike + // KOKKOS host/device flag and data masks ExecutionSpace execution_space; @@ -49,6 +51,8 @@ class Bond : protected Pointers { virtual void write_data(FILE *) {} virtual double single(int, double, int, int, double &) = 0; virtual double memory_usage(); + virtual void *extract(char *, int &) {return NULL;} + virtual void reinit(); void write_file(int, char**); diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index 50995dfa8405eff4ae937eb05b4441839b381948..febb9339b4888e9d74875ae4ccfd8e0e583f33d7 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -67,6 +67,11 @@ ComputeTempSphere::ComputeTempSphere(LAMMPS *lmp, int narg, char **arg) : } else error->all(FLERR,"Illegal compute temp/sphere command"); } + // when computing only the rotational temperature, + // do not remove DOFs for translation as set by default + + if (mode == ROTATE) extra_dof = 0; + vector = new double[6]; // error checks diff --git a/src/finish.cpp b/src/finish.cpp index b81b5e6785ff331c9ea4e7b3cfa46ef7023112ff..45e9226388d30c4a6cd33fc1f91d75500e323d99 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -130,7 +130,7 @@ void Finish::end(int flag) atom->natoms); if (logfile) fprintf(logfile,fmt1,time_loop,ntasks,update->nsteps, atom->natoms); - + // Gromacs/NAMD-style performance metric for suitable unit settings if ( timeflag && !minflag && !prdflag && !tadflag && @@ -144,7 +144,7 @@ void Finish::end(int flag) double one_fs = force->femtosecond; double t_step = ((double) time_loop) / ((double) update->nsteps); double step_t = 1.0/t_step; - + if (strcmp(update->unit_style,"lj") == 0) { double tau_day = 24.0*3600.0 / t_step * update->dt / one_fs; const char perf[] = "Performance: %.3f tau/day, %.3f timesteps/s\n"; @@ -161,26 +161,28 @@ void Finish::end(int flag) } // CPU use on MPI tasks and OpenMP threads - - if (lmp->kokkos) { - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs, - lmp->kokkos->num_threads); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs, - lmp->kokkos->num_threads); - } else { + + if (timeflag) { + if (lmp->kokkos) { + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs, + lmp->kokkos->num_threads); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs, + lmp->kokkos->num_threads); + } else { #if defined(_OPENMP) - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,nthreads); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,nthreads); + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x %d OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs,nthreads); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs,nthreads); #else - const char fmt2[] = - "%.1f%% CPU use with %d MPI tasks x no OpenMP threads\n"; - if (screen) fprintf(screen,fmt2,cpu_loop,nprocs); - if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs); + const char fmt2[] = + "%.1f%% CPU use with %d MPI tasks x no OpenMP threads\n"; + if (screen) fprintf(screen,fmt2,cpu_loop,nprocs); + if (logfile) fprintf(logfile,fmt2,cpu_loop,nprocs); #endif + } } } } diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 4c7eb5f218e4a7d0a1e83996ca10cbe6d74c8b07..bc7aa843ef0945541afd258a6a3cd77dc25e88de 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -16,6 +16,7 @@ #include <stdlib.h> #include "fix_adapt.h" #include "atom.h" +#include "bond.h" #include "update.h" #include "group.h" #include "modify.h" @@ -35,7 +36,7 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -enum{PAIR,KSPACE,ATOM}; +enum{PAIR,KSPACE,ATOM,BOND}; enum{DIAMETER,CHARGE}; /* ---------------------------------------------------------------------- */ @@ -68,6 +69,10 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) if (iarg+3 > narg) error->all(FLERR,"Illegal fix adapt command"); nadapt++; iarg += 3; + } else if (strcmp(arg[iarg],"bond") == 0 ){ + if (iarg+5 > narg) error->all(FLERR,"Illegal fix adapt command"); + nadapt++; + iarg += 5; } else break; } @@ -103,6 +108,25 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) } else error->all(FLERR,"Illegal fix adapt command"); nadapt++; iarg += 6; + } else if (strcmp(arg[iarg],"bond") == 0 ){ + if (iarg+5 > narg) error->all(FLERR, "Illegal fix adapt command"); + adapt[nadapt].which = BOND; + int n = strlen(arg[iarg+1]) + 1; + adapt[nadapt].bstyle = new char[n]; + strcpy(adapt[nadapt].bstyle,arg[iarg+1]); + n = strlen(arg[iarg+2]) + 1; + adapt[nadapt].bparam = new char[n]; + adapt[nadapt].bond = NULL; + strcpy(adapt[nadapt].bparam,arg[iarg+2]); + force->bounds(FLERR,arg[iarg+3],atom->ntypes, + adapt[nadapt].ilo,adapt[nadapt].ihi); + if (strstr(arg[iarg+4],"v_") == arg[iarg+4]) { + n = strlen(&arg[iarg+4][2]) + 1; + adapt[nadapt].var = new char[n]; + strcpy(adapt[nadapt].var,&arg[iarg+4][2]); + } else error->all(FLERR,"Illegal fix adapt command"); + nadapt++; + iarg += 5; } else if (strcmp(arg[iarg],"kspace") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal fix adapt command"); adapt[nadapt].which = KSPACE; @@ -160,6 +184,13 @@ nadapt(0), id_fix_diam(NULL), id_fix_chg(NULL), adapt(NULL) for (int m = 0; m < nadapt; m++) if (adapt[m].which == PAIR) memory->create(adapt[m].array_orig,n+1,n+1,"adapt:array_orig"); + + // allocate bond style arrays: + + n = atom->nbondtypes; + for (int m = 0; m < nadapt; ++m) + if (adapt[m].which == BOND) + memory->create(adapt[m].vector_orig,n+1,"adapt:vector_orig"); } /* ---------------------------------------------------------------------- */ @@ -172,6 +203,10 @@ FixAdapt::~FixAdapt() delete [] adapt[m].pstyle; delete [] adapt[m].pparam; memory->destroy(adapt[m].array_orig); + } else if (adapt[m].which == BOND) { + delete [] adapt[m].bstyle; + delete [] adapt[m].bparam; + memory->destroy(adapt[m].vector_orig); } } delete [] adapt; @@ -282,6 +317,7 @@ void FixAdapt::init() // setup and error checks anypair = 0; + anybond = 0; for (int m = 0; m < nadapt; m++) { Adapt *ad = &adapt[m]; @@ -350,7 +386,42 @@ void FixAdapt::init() } delete [] pstyle; + } else if (ad->which == BOND){ + ad->bond = NULL; + anybond = 1; + + int n = strlen(ad->bstyle) + 1; + char *bstyle = new char[n]; + strcpy(bstyle,ad->bstyle); + + if (lmp->suffix_enable) { + int len = 2 + strlen(bstyle) + strlen(lmp->suffix); + char *bsuffix = new char[len]; + strcpy(bsuffix,bstyle); + strcat(bsuffix,"/"); + strcat(bsuffix,lmp->suffix); + ad->bond = force->bond_match(bsuffix); + delete [] bsuffix; + } + if (ad->bond == NULL) ad->bond = force->bond_match(bstyle); + if (ad->bond == NULL ) + error->all(FLERR,"Fix adapt bond style does not exist"); + + void *ptr = ad->bond->extract(ad->bparam,ad->bdim); + + if (ptr == NULL) + error->all(FLERR,"Fix adapt bond style param not supported"); + + // for bond styles, use a vector + + if (ad->bdim == 1) ad->vector = (double *) ptr; + + if (strcmp(force->bond_style,"hybrid") == 0 || + strcmp(force->bond_style,"hybrid_overlay") == 0) + error->all(FLERR,"Fix adapt does not support bond_style hybrid"); + delete [] bstyle; + } else if (ad->which == KSPACE) { if (force->kspace == NULL) error->all(FLERR,"Fix adapt kspace style does not exist"); @@ -368,7 +439,7 @@ void FixAdapt::init() } } - // make copy of original pair array values + // make copy of original pair/bond array values for (int m = 0; m < nadapt; m++) { Adapt *ad = &adapt[m]; @@ -376,9 +447,14 @@ void FixAdapt::init() for (i = ad->ilo; i <= ad->ihi; i++) for (j = MAX(ad->jlo,i); j <= ad->jhi; j++) ad->array_orig[i][j] = ad->array[i][j]; - }else if (ad->which == PAIR && ad->pdim == 0){ + } else if (ad->which == PAIR && ad->pdim == 0){ ad->scalar_orig = *ad->scalar; + + } else if (ad->which == BOND && ad->bdim == 1){ + for (i = ad->ilo; i <= ad->ihi; ++i ) + ad->vector_orig[i] = ad->vector[i]; } + } // fixes that store initial per-atom values @@ -470,6 +546,18 @@ void FixAdapt::change_settings() ad->array[i][j] = value; } + // set bond type array values: + + } else if (ad->which == BOND) { + if (ad->bdim == 1){ + if (scaleflag) + for (i = ad->ilo; i <= ad->ihi; ++i ) + ad->vector[i] = value*ad->vector_orig[i]; + else + for (i = ad->ilo; i <= ad->ihi; ++i ) + ad->vector[i] = value; + } + // set kspace scale factor } else if (ad->which == KSPACE) { @@ -522,8 +610,10 @@ void FixAdapt::change_settings() modify->addstep_compute(update->ntimestep + nevery); // re-initialize pair styles if any PAIR settings were changed + // ditto for bond styles if any BOND setitings were changes // this resets other coeffs that may depend on changed values, - // and also offset and tail corrections + // and also offset and tail corrections + if (anypair) { for (int m = 0; m < nadapt; m++) { Adapt *ad = &adapt[m]; @@ -532,6 +622,14 @@ void FixAdapt::change_settings() } } } + if (anybond) { + for (int m = 0; m < nadapt; ++m ) { + Adapt *ad = &adapt[m]; + if (ad->which == BOND) { + ad->bond->reinit(); + } + } + } // reset KSpace charges if charges have changed @@ -554,6 +652,12 @@ void FixAdapt::restore_settings() ad->array[i][j] = ad->array_orig[i][j]; } + } else if (ad->which == BOND) { + if (ad->pdim == 1) { + for (int i = ad->ilo; i <= ad->ihi; i++) + ad->vector[i] = ad->vector_orig[i]; + } + } else if (ad->which == KSPACE) { *kspace_scale = 1.0; @@ -588,6 +692,7 @@ void FixAdapt::restore_settings() } if (anypair) force->pair->reinit(); + if (anybond) force->bond->reinit(); if (chgflag && force->kspace) force->kspace->qsum_qsq(); } diff --git a/src/fix_adapt.h b/src/fix_adapt.h index a6d45c78cc4dc5b1f2cca9dc24ccf9fad6a50cb7..6e49f4a284225cffaab614f9a7562eada287bd1c 100644 --- a/src/fix_adapt.h +++ b/src/fix_adapt.h @@ -43,7 +43,7 @@ class FixAdapt : public Fix { private: int nadapt,resetflag,scaleflag; - int anypair; + int anypair, anybond; int nlevels_respa; char *id_fix_diam,*id_fix_chg; class FixStore *fix_diam,*fix_chg; @@ -52,12 +52,15 @@ class FixAdapt : public Fix { int which,ivar; char *var; char *pstyle,*pparam; + char *bstyle,*bparam; int ilo,ihi,jlo,jhi; - int pdim; + int pdim,bdim; double *scalar,scalar_orig; + double *vector,*vector_orig; double **array,**array_orig; int aparam; class Pair *pair; + class Bond *bond; }; Adapt *adapt; diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index e0d010aacb4f8a33c0850400a8603da0e9c7579d..b4516a0fd29f6149370acede868c089c793f59ff 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -205,14 +205,18 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : for (int i = 0; i < nvalues; i++) { if (which[i] == X || which[i] == V || which[i] == F) kindflag = PERATOM; else if (which[i] == COMPUTE) { - Compute *compute = modify->compute[modify->find_compute(ids[i])]; + int c_id = modify->find_compute(ids[i]); + if (c_id < 0) error->all(FLERR,"Fix ave/histo input is invalid compute"); + Compute *compute = modify->compute[c_id]; if (compute->scalar_flag || compute->vector_flag || compute->array_flag) kindflag = GLOBAL; else if (compute->peratom_flag) kindflag = PERATOM; else if (compute->local_flag) kindflag = LOCAL; else error->all(FLERR,"Fix ave/histo input is invalid compute"); } else if (which[i] == FIX) { - Fix *fix = modify->fix[modify->find_fix(ids[i])]; + int f_id = modify->find_fix(ids[i]); + if (f_id < 0) error->all(FLERR,"Fix ave/histo input is invalid fix"); + Fix *fix = modify->fix[f_id]; if (fix->scalar_flag || fix->vector_flag || fix->array_flag) kindflag = GLOBAL; else if (fix->peratom_flag) kindflag = PERATOM; @@ -220,6 +224,7 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : else error->all(FLERR,"Fix ave/histo input is invalid fix"); } else if (which[i] == VARIABLE) { int ivariable = input->variable->find(ids[i]); + if (ivariable < 0) error->all(FLERR,"Fix ave/histo input is invalid variable"); if (input->variable->equalstyle(ivariable)) kindflag = GLOBAL; else if (input->variable->atomstyle(ivariable)) kindflag = PERATOM; else error->all(FLERR,"Fix ave/histo input is invalid variable"); diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp index 2a4af4dc66d42d9ac76a22163f6a1e66543834a8..bf6060779951b5244ac0b3ad0ebbb511e8a03ae8 100644 --- a/src/fix_halt.cpp +++ b/src/fix_halt.cpp @@ -254,10 +254,9 @@ double FixHalt::tlimit() bigint final = update->firststep + static_cast<bigint> (tratio*value/cpu * elapsed); nextstep = (final/nevery)*nevery + nevery; + if (nextstep == update->ntimestep) nextstep += nevery; tratio = 1.0; } - //printf("EVAL %ld %g %d\n",update->ntimestep,cpu,nevery); - return cpu; } diff --git a/src/integrate.h b/src/integrate.h index 19ed546a9b113318e2809f0fa8eac8e441251bf1..4ca3a788fa3d8f1754674a030cb0ce6d8b5d7c32 100644 --- a/src/integrate.h +++ b/src/integrate.h @@ -23,7 +23,7 @@ class Integrate : protected Pointers { Integrate(class LAMMPS *, int, char **); virtual ~Integrate(); virtual void init(); - virtual void setup() = 0; + virtual void setup(int flag=1) = 0; virtual void setup_minimal(int) = 0; virtual void run(int) = 0; virtual void cleanup() {} diff --git a/src/min.cpp b/src/min.cpp index 9207c6bdc2e7062e6234fb1c246274fae028e72e..79d7d6a8bdaff9b99d5858115a5f58485563695c 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -180,13 +180,15 @@ void Min::init() setup before run ------------------------------------------------------------------------- */ -void Min::setup() +void Min::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up %s style minimization ...\n", update->minimize_style); - fprintf(screen," Unit style : %s\n", update->unit_style); - timer->print_timeout(screen); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + timer->print_timeout(screen); + } } update->setupflag = 1; @@ -294,7 +296,7 @@ void Min::setup() requestor[m]->min_xf_get(m); modify->setup(vflag); - output->setup(); + output->setup(flag); update->setupflag = 0; // stats for initial thermo output diff --git a/src/min.h b/src/min.h index 639f87ed66f2aba9d546e440ead3fde35d4d3740..464018e825349fe3613007ae0153ed4794b608a8 100644 --- a/src/min.h +++ b/src/min.h @@ -31,7 +31,7 @@ class Min : protected Pointers { Min(class LAMMPS *); virtual ~Min(); virtual void init(); - void setup(); + void setup(int flag=1); void setup_minimal(int); void run(int); void cleanup(); diff --git a/src/output.cpp b/src/output.cpp index a2275b74bea6f9e88f7b3158477a132e65330b22..5e56ccfebcaf148471687a788976772c78eccc60 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -652,6 +652,21 @@ void Output::delete_dump(char *id) ndump--; } +/* ---------------------------------------------------------------------- + find a dump by ID + return index of dump or -1 if not found +------------------------------------------------------------------------- */ + +int Output::find_dump(const char *id) +{ + if (id == NULL) return -1; + int idump; + for (idump = 0; idump < ndump; idump++) + if (strcmp(id,dump[idump]->id) == 0) break; + if (idump == ndump) return -1; + return idump; +} + /* ---------------------------------------------------------------------- set thermo output frequency from input script ------------------------------------------------------------------------- */ diff --git a/src/output.h b/src/output.h index de5eaaa70b708fa61a3e95fd3f40cd86cad57009..535475934332d53e47b2d0435ce5b2c42a5312f5 100644 --- a/src/output.h +++ b/src/output.h @@ -76,6 +76,7 @@ class Output : protected Pointers { void add_dump(int, char **); // add a Dump to Dump list void modify_dump(int, char **); // modify a Dump void delete_dump(char *); // delete a Dump from Dump list + int find_dump(const char *); // find a Dump ID void set_thermo(int, char **); // set thermo output freqquency void create_thermo(int, char **); // create a thermo style diff --git a/src/respa.cpp b/src/respa.cpp index 7646115fa908bb99d97b8c86b4e83c2efadbdcbd..5d51ff64eef696215eea0498e94610b6eebf7eb5 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -398,24 +398,27 @@ void Respa::init() setup before run ------------------------------------------------------------------------- */ -void Respa::setup() +void Respa::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up r-RESPA run ...\n"); - fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(screen," Time steps :"); - for (int ilevel=0; ilevel < nlevels; ++ilevel) - fprintf(screen," %d:%g",ilevel+1, step[ilevel]); - fprintf(screen,"\n r-RESPA fixes :"); - for (int l=0; l < modify->n_post_force_respa; ++l) { - Fix *f = modify->fix[modify->list_post_force_respa[l]]; - if (f->respa_level >= 0) - fprintf(screen," %d:%s[%s]", - MIN(f->respa_level+1,nlevels),f->style,f->id); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); + fprintf(screen," Time steps :"); + for (int ilevel=0; ilevel < nlevels; ++ilevel) + fprintf(screen," %d:%g",ilevel+1, step[ilevel]); + fprintf(screen,"\n r-RESPA fixes :"); + for (int l=0; l < modify->n_post_force_respa; ++l) { + Fix *f = modify->fix[modify->list_post_force_respa[l]]; + if (f->respa_level >= 0) + fprintf(screen," %d:%s[%s]", + MIN(f->respa_level+1,nlevels),f->style,f->id); + } + fprintf(screen,"\n"); + timer->print_timeout(screen); } - fprintf(screen,"\n"); - timer->print_timeout(screen); } update->setupflag = 1; @@ -482,7 +485,7 @@ void Respa::setup() sum_flevel_f(); modify->setup(vflag); - output->setup(); + output->setup(flag); update->setupflag = 0; } diff --git a/src/respa.h b/src/respa.h index 3355cd2eb7a1fd10aefaca628160ed1822215246..0b08b12bd7088220ce63000c054b3278cba34fe2 100644 --- a/src/respa.h +++ b/src/respa.h @@ -48,7 +48,7 @@ class Respa : public Integrate { Respa(class LAMMPS *, int, char **); virtual ~Respa(); virtual void init(); - virtual void setup(); + virtual void setup(int flag=1); virtual void setup_minimal(int); virtual void run(int); virtual void cleanup(); diff --git a/src/verlet.cpp b/src/verlet.cpp index 915648040e54293a0e4e0e9199e9da5c3eb222f6..b242b00722477ff4e9a7a15c921ec50e6793c49b 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -85,14 +85,17 @@ void Verlet::init() setup before run ------------------------------------------------------------------------- */ -void Verlet::setup() +void Verlet::setup(int flag) { if (comm->me == 0 && screen) { fprintf(screen,"Setting up Verlet run ...\n"); - fprintf(screen," Unit style : %s\n", update->unit_style); - fprintf(screen," Current step : " BIGINT_FORMAT "\n", update->ntimestep); - fprintf(screen," Time step : %g\n", update->dt); - timer->print_timeout(screen); + if (flag) { + fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); + fprintf(screen," Time step : %g\n", update->dt); + timer->print_timeout(screen); + } } if (lmp->kokkos) @@ -148,7 +151,7 @@ void Verlet::setup() if (force->newton) comm->reverse_comm(); modify->setup(vflag); - output->setup(); + output->setup(flag); update->setupflag = 0; } diff --git a/src/verlet.h b/src/verlet.h index 0e2a333fabc76ad1b32e794db741af67e8dab566..29bd3f16b34424d16ea5abd0a0f48b7715ef6829 100644 --- a/src/verlet.h +++ b/src/verlet.h @@ -29,7 +29,7 @@ class Verlet : public Integrate { Verlet(class LAMMPS *, int, char **); virtual ~Verlet() {} virtual void init(); - virtual void setup(); + virtual void setup(int flag=1); virtual void setup_minimal(int); virtual void run(int); void cleanup(); diff --git a/src/version.h b/src/version.h index a88a6d5e140d929a0d11a2d539fb9667c4ce63b6..2068d6457391c7e0d8de459be561945e03c25894 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "24 Mar 2017" +#define LAMMPS_VERSION "13 Apr 2017" diff --git a/src/write_restart.cpp b/src/write_restart.cpp index f1ee4a4472b923dbba26fd7432fc6bfda4afe695..77e2cb05d951b11d81f9091a0c4b320163353f12 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -297,6 +297,9 @@ void WriteRestart::write(char *file) // communication buffer for my atom info // max_size = largest buffer needed by any proc + // NOTE: are assuming size_restart() returns 32-bit int + // for a huge one-proc problem, nlocal could be 32-bit + // but nlocal * doubles-peratom could oveflow int max_size; int send_size = atom->avec->size_restart();