forked from lijiext/lammps
Merge pull request #289 from akohlmey/collected-updates-and-bugfixes
Collected updates and bugfixes
This commit is contained in:
commit
d14814ae2e
|
@ -632,11 +632,11 @@ USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
|
|||
"rigid/npt (o)"_fix_rigid.html,
|
||||
"rigid/nve (o)"_fix_rigid.html,
|
||||
"rigid/nvt (o)"_fix_rigid.html,
|
||||
<"rigid/small (o)"_fix_rigid.html,
|
||||
"rigid/small/nph"_fix_rigid.html,
|
||||
"rigid/small/npt"_fix_rigid.html,
|
||||
"rigid/small/nve"_fix_rigid.html,
|
||||
"rigid/small/nvt"_fix_rigid.html,
|
||||
"rigid/small (o)"_fix_rigid.html,
|
||||
"rigid/small/nph (o)"_fix_rigid.html,
|
||||
"rigid/small/npt (o)"_fix_rigid.html,
|
||||
"rigid/small/nve (o)"_fix_rigid.html,
|
||||
"rigid/small/nvt (o)"_fix_rigid.html,
|
||||
"setforce (k)"_fix_setforce.html,
|
||||
"shake"_fix_shake.html,
|
||||
"spring"_fix_spring.html,
|
||||
|
|
|
@ -37,7 +37,7 @@ The neighbor list needed to compute this quantity is constructed each
|
|||
time the calculation is performed (i.e. each time a snapshot of atoms
|
||||
is dumped). Thus it can be inefficient to compute/dump this quantity
|
||||
too frequently or to have multiple compute/dump commands, each of a
|
||||
{clsuter/atom} style.
|
||||
{cluster/atom} style.
|
||||
|
||||
NOTE: If you have a bonded system, then the settings of
|
||||
"special_bonds"_special_bonds.html command can remove pairwise
|
||||
|
|
|
@ -27,7 +27,7 @@ contact radius is used only to prevent particles belonging to
|
|||
different physical bodies from penetrating each other. It is used by
|
||||
the contact pair styles, e.g., smd/hertz and smd/tri_surface.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
The value of the contact radius will be 0.0 for particles not in the
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/damage :pre
|
|||
Define a computation that calculates the damage status of SPH particles
|
||||
according to the damage model which is defined via the SMD SPH pair styles, e.g., the maximum plastic strain failure criterion.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth Mach Dynamics in LAMMPS.
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output Info:]
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ configuration. This compute is only really useful for debugging the
|
|||
hourglass control mechanim which is part of the Total-Lagrangian SPH
|
||||
pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output Info:]
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/internal/energy :pre
|
|||
Define a computation which outputs the per-particle enthalpy, i.e.,
|
||||
the sum of potential energy and heat.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output Info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that outputs the equivalent plastic strain per
|
|||
particle. This command is only meaningful if a material model with
|
||||
plasticity is defined.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output Info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that outputs the time rate of the equivalent
|
|||
plastic strain. This command is only meaningful if a material model
|
||||
with plasticity is defined.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output Info:]
|
||||
|
|
|
@ -26,7 +26,7 @@ The mass density is the mass of a particle which is constant during
|
|||
the course of a simulation, divided by its volume, which can change
|
||||
due to mechanical deformation.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that calculates the deformation gradient. It is
|
|||
only meaningful for particles which interact according to the
|
||||
Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -30,7 +30,7 @@ time step. This calculation is performed automatically in the
|
|||
relevant SPH pair styles and this compute only serves to make the
|
||||
stable time increment accessible for output purposes.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that calculates the number of particles inside of
|
|||
the smoothing kernel radius for particles interacting via the
|
||||
Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -26,7 +26,7 @@ associated with a particle as a rotated ellipsoid. It is only
|
|||
meaningful for particles which interact according to the
|
||||
Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/tlsph/strain :pre
|
|||
Define a computation that calculates the Green-Lagrange strain tensor
|
||||
for particles interacting via the Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/tlsph/strain/rate :pre
|
|||
Define a computation that calculates the rate of the strain tensor for
|
||||
particles interacting via the Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/tlsph/stress :pre
|
|||
Define a computation that outputs the Cauchy stress tensor for
|
||||
particles interacting via the Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that returns the coordinates of the vertices
|
|||
corresponding to the triangle-elements of a mesh created by the "fix
|
||||
smd/wall_surface"_fix_smd_wall_surface.html.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that returns the number of neighbor particles
|
|||
inside of the smoothing kernel radius for particles interacting via
|
||||
the updated Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/ulsph/strain :pre
|
|||
Define a computation that outputs the logarithmic strain tensor. for
|
||||
particles interacting via the updated Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -25,7 +25,7 @@ Define a computation that outputs the rate of the logarithmic strain
|
|||
tensor for particles interacting via the updated Lagrangian SPH pair
|
||||
style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -23,7 +23,7 @@ compute 1 all smd/ulsph/stress :pre
|
|||
|
||||
Define a computation that outputs the Cauchy stress tensor.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -24,7 +24,7 @@ compute 1 all smd/vol :pre
|
|||
Define a computation that provides the per-particle volume and the sum
|
||||
of the per-particle volumes of the group for which the fix is defined.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth
|
||||
Mach Dynamics in LAMMPS.
|
||||
|
||||
[Output info:]
|
||||
|
|
|
@ -36,7 +36,7 @@ stable maximum time step.
|
|||
This fix inquires the minimum stable time increment across all particles contained in the group for which this
|
||||
fix is defined. An additional safety factor {s_fact} is applied to the time increment.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth Mach Dynamics in LAMMPS.
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth Mach Dynamics in LAMMPS.
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ fix 1 all smd/integrate_tlsph limit_velocity 1000 :pre
|
|||
|
||||
The fix performs explicit time integration for particles which interact according with the Total-Lagrangian SPH pair style.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth Mach Dynamics in LAMMPS.
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth Mach Dynamics in LAMMPS.
|
||||
|
||||
The {limit_velocity} keyword will control the velocity, scaling the norm of
|
||||
the velocity vector to max_vel in case it exceeds this velocity limit.
|
||||
|
|
|
@ -34,7 +34,7 @@ fix 1 all smd/integrate_ulsph limit_velocity 1000 :pre
|
|||
[Description:]
|
||||
|
||||
The fix performs explicit time integration for particles which interact with the updated Lagrangian SPH pair style.
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth Mach Dynamics in LAMMPS.
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth Mach Dynamics in LAMMPS.
|
||||
|
||||
The {adjust_radius} keyword activates dynamic adjustment of the per-particle SPH smoothing kernel radius such that the number of neighbors per particles remains
|
||||
within the interval {min_nn} to {max_nn}. The parameter {adjust_radius_factor} determines the amount of adjustment per timestep. Typical values are
|
||||
|
|
|
@ -55,7 +55,7 @@ specified. This style also sets the velocity of each particle to (omega cross
|
|||
Rperp) where omega is its angular velocity around the rotation axis and
|
||||
Rperp is a perpendicular vector from the rotation axis to the particle.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to using Smooth Mach Dynamics in LAMMPS.
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to using Smooth Mach Dynamics in LAMMPS.
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ It is possible to move the triangulated surface via the "smd/move_tri_surf"_fix_
|
|||
Immediately after a .STL file has been read, the simulation needs to be run for 0 timesteps in order to properly register the new particles
|
||||
in the system. See the "funnel_flow" example in the USER-SMD examples directory.
|
||||
|
||||
See "this PDF guide"_USER/smd/SMD_LAMMPS_userguide.pdf to use Smooth Mach Dynamics in LAMMPS.
|
||||
See "this PDF guide"_PDF/SMD_LAMMPS_userguide.pdf to use Smooth Mach Dynamics in LAMMPS.
|
||||
|
||||
[Restart, fix_modify, output, run start/stop, minimize info:]
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ invocation of the {tlsph} for a solid body would consist of an equation of state
|
|||
the pressure (the diagonal components of the stress tensor), and a material model to compute shear
|
||||
stresses (the off-diagonal components of the stress tensor). Damage and failure models can also be added.
|
||||
|
||||
Please see the "SMD user guide"_USER/smd/SMD_LAMMPS_userguide.pdf for a complete listing of the possible keywords and material models.
|
||||
Please see the "SMD user guide"_PDF/SMD_LAMMPS_userguide.pdf for a complete listing of the possible keywords and material models.
|
||||
|
||||
:line
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ stresses (the off-diagonal components of the stress tensor).
|
|||
|
||||
Note that the use of *GRADIENT_CORRECTION can lead to severe numerical instabilities. For a general fluid simulation, *NO_GRADIENT_CORRECTION is recommended.
|
||||
|
||||
Please see the "SMD user guide"_USER/smd/SMD_LAMMPS_userguide.pdf for a complete listing of the possible keywords and material models.
|
||||
Please see the "SMD user guide"_PDF/SMD_LAMMPS_userguide.pdf for a complete listing of the possible keywords and material models.
|
||||
|
||||
:line
|
||||
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
Generalized Replica Exchange Method (gREM) examples
|
||||
===================================================
|
||||
|
||||
Examples:
|
||||
---------------------------------------------------
|
||||
|
||||
lj-single:
|
||||
This example is the simplest case scenario utilizing the generalized
|
||||
ensemble defined by fix_grem. It utilizes only 1 replica and requires
|
||||
the LAMMPS executable to be run as usual:
|
||||
|
||||
mpirun -np 4 lmp_mpi -in in.gREM-npt
|
||||
./lmp_serial -in in.gREM-nvt
|
||||
|
||||
While this does not obtain any information about Ts(H), it is most similar to
|
||||
a microcanonical simulation and "single-replica gREM" can be useful for
|
||||
studying non-equilibrium processes as well.
|
||||
|
||||
lj-6rep:
|
||||
This example utilizes an external python script to handle swaps between
|
||||
replicas. Included is run.sh, which requires the path to your LAMMPS
|
||||
executable. The python script is fragile as it relies on parsing output files
|
||||
from the LAMMPS run and moving LAMMPS data files between directories. Use
|
||||
caution if modifying this example further. If complied with mpi, multiple
|
||||
processors can be used as:
|
||||
|
||||
./run.sh $NUM_PROCS
|
||||
|
||||
a serial run is completed simply as
|
||||
|
||||
./run.sh 1
|
||||
|
||||
where the executable provided must be serial if "1" is provided as the number
|
||||
of procs. While this external replica exchange module is quite slow and
|
||||
inefficient, it allows for many replicas to be used on a single processor.
|
||||
While here there are only 6 replicas, this example could be extended to >100
|
||||
replicas while still using a serial compilation. This is also beneficial for
|
||||
running on high performance nodes with few cores to complete a full-scale gREM
|
||||
simulation with a large number of replicas.
|
||||
|
||||
A quick note on efficiency: frequent exchanges slow down this script
|
||||
substantially because LAMMPS is restarted every exchange attempt. The script
|
||||
works best for large systems with infrequent exchanges.
|
||||
|
||||
lj-temper:
|
||||
This is an example using the internal replica exchange module. While fast
|
||||
in comparison to the python version, it requires substantial resources
|
||||
(at least 1 proc per replica). Instead of stopping LAMMPS every exchange
|
||||
attempt, all replicas are run concurrently, and exchanges take place
|
||||
internally. This requires use of LAMMPS partition mode, via the command
|
||||
line using the -p flag. Input files require world type variables defining
|
||||
the parameters of each replica. The included example with 4 replicas must
|
||||
run on at least 4 procs, in that case LAMMPS could be initiated as:
|
||||
|
||||
mpirun -np 4 lmp_mpi -p 4x1 -in in.gREM-temper
|
||||
|
||||
spawning 4 partitions with 1 replica each. Multiple procs per replica could
|
||||
be used. In the case of a 16 system with 4 replicas, the
|
||||
following logic could be used:
|
||||
|
||||
mpirun -np 16 lmp_mpi -p 4x4 -in in.gREM-temper
|
||||
|
||||
Once started, a universe log file will be created as well as log files for
|
||||
each replica. The universe (log.lammps) contains exchange information, while
|
||||
the replicas (*/log.lammps.*) contains the thermo_output as usual. In this
|
||||
example, in.gREM-temper moves the log files to their respective folders.
|
||||
|
||||
|
||||
Closing Notes:
|
||||
---------------------------------------------------
|
||||
|
||||
Of significant difference between lj-6rep and lj-temper is the format of data.
|
||||
In lj-6rep, data is stored as 'replicas' meaning discontinuous trajectories, as
|
||||
files are moved between directories labeled by the 'lambda' of the replica. In
|
||||
lj-temper, data is stored as 'walkers' with continuous trajectories, but
|
||||
discontinuous parameters. The later is significantly more efficient, but
|
||||
requires post-processing to obtain per-replica information.
|
||||
|
||||
|
||||
Any problems/questions should be directed to <dstelter@bu.edu>.
|
||||
|
|
@ -51,7 +51,7 @@ for exchange in arange(starting_ex,max_exchange):
|
|||
os.chdir(path+"/%s" % lambdas[l])
|
||||
#os.system("cp restart_file restart_file%d" % exchange)
|
||||
if (nproc > 1):
|
||||
os.system("mpirun -np %d " + lmp + " -in ../" + inp + " -var lambda %g -var eta %g -var enthalpy %g > output" % (nproc, lambdas[l], eta, H))
|
||||
os.system("mpirun -np %d " % (nproc) + lmp + " -in ../" + inp + " -var lambda %g -var eta %g -var enthalpy %g > output" % (lambdas[l], eta, H))
|
||||
if (nproc == 1):
|
||||
os.system(lmp + " -in ../" + inp + " -var lambda %g -var eta %g -var enthalpy %g > output" % (lambdas[l], eta, H))
|
||||
os.system("grep -v '[a-zA-Z]' output | awk '{if(NF==6 && NR>19)print $0}' | awk '{print $3}' >ent")
|
||||
|
@ -60,7 +60,6 @@ for exchange in arange(starting_ex,max_exchange):
|
|||
aver_enthalpy[l] = mean(ee[-1])
|
||||
# os.system("mv dump.dcd dump%d.dcd" % exchange)
|
||||
os.system("mv log.lammps log%d.lammps" % exchange)
|
||||
# os.system("rm output")
|
||||
os.system("mv final_restart_file final_restart_file%d" % exchange)
|
||||
os.system("mv ent ent%d" % exchange)
|
||||
os.system("bzip2 log%d.lammps ent%d" % (exchange,exchange))
|
||||
|
|
|
@ -84,6 +84,8 @@ void Temper::command(int narg, char **arg)
|
|||
|
||||
my_set_temp = universe->iworld;
|
||||
if (narg == 7) my_set_temp = force->inumeric(FLERR,arg[6]);
|
||||
if ((my_set_temp < 0) || (my_set_temp >= universe->nworlds))
|
||||
error->universe_one(FLERR,"Illegal temperature index");
|
||||
|
||||
// swap frequency must evenly divide total # of timesteps
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ bond_style harmonic/shift/cut, Carsten Svaneborg, science at zqex.dk, 8 Aug 11
|
|||
compute ackland/atom, Gerolf Ziegenhain, gerolf at ziegenhain.com, 4 Oct 2007
|
||||
compute basal/atom, Christopher Barrett, cdb333 at cavs.msstate.edu, 3 Mar 2013
|
||||
compute temp/rotate, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11
|
||||
compute pressure/grem, David Stelter, dstelter@bu.edu, 22 Nov 16
|
||||
compute PRESSURE/GREM, David Stelter, dstelter@bu.edu, 22 Nov 16
|
||||
dihedral_style cosine/shift/exp, Carsten Svaneborg, science at zqex.dk, 8 Aug 11
|
||||
dihedral_style fourier, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12
|
||||
dihedral_style nharmonic, Loukas Peristeras, loukas.peristeras at scienomics.com, 27 Oct 12
|
||||
|
|
|
@ -54,7 +54,7 @@ void ComputePressureGrem::init()
|
|||
// Initialize hook to gREM fix
|
||||
int ifix = modify->find_fix(fix_grem);
|
||||
if (ifix < 0)
|
||||
error->all(FLERR,"Fix grem ID for compute pressure/grem does not exist");
|
||||
error->all(FLERR,"Fix grem ID for compute PRESSURE/GREM does not exist");
|
||||
|
||||
int dim;
|
||||
scale_grem = (double *)modify->fix[ifix]->extract("scale_grem",dim);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#ifdef COMPUTE_CLASS
|
||||
|
||||
ComputeStyle(pressure/grem,ComputePressureGrem)
|
||||
ComputeStyle(PRESSURE/GREM,ComputePressureGrem)
|
||||
|
||||
#else
|
||||
|
||||
|
@ -80,12 +80,12 @@ E: Must use 'kspace_modify pressure/scalar no' for tensor components with kspace
|
|||
Otherwise MSM will compute only a scalar pressure. See the kspace_modify
|
||||
command for details on this setting.
|
||||
|
||||
E: Fix grem ID for compute pressure/grem does not exist
|
||||
E: Fix grem ID for compute PRESSURE/GREM does not exist
|
||||
|
||||
Compute pressure/grem was passed an invalid fix id
|
||||
Compute PRESSURE/GREM was passed an invalid fix id
|
||||
|
||||
E: Cannot extract gREM scale factor from fix grem
|
||||
|
||||
The fix id passed to compute pressure/grem refers to an incompatible fix
|
||||
The fix id passed to compute PRESSURE/GREM refers to an incompatible fix
|
||||
|
||||
*/
|
||||
|
|
|
@ -35,7 +35,9 @@ using namespace LAMMPS_NS;
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
DihedralNHarmonic::DihedralNHarmonic(LAMMPS *lmp) : Dihedral(lmp) {}
|
||||
DihedralNHarmonic::DihedralNHarmonic(LAMMPS *lmp) : Dihedral(lmp) {
|
||||
writedata = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
@ -334,3 +336,18 @@ void DihedralNHarmonic::read_restart(FILE *fp)
|
|||
for (int i = 1; i <= atom->ndihedraltypes; i++) setflag[i] = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
proc 0 writes to data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void DihedralNHarmonic::write_data(FILE *fp)
|
||||
{
|
||||
for (int i = 1; i <= atom->ndihedraltypes; i++) {
|
||||
fprintf(fp, "%d %d", i, nterms[i]);
|
||||
for (int j = 0; j < nterms[i]; j++ )
|
||||
fprintf(fp, " %g", a[i][j]);
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ class DihedralNHarmonic : public Dihedral {
|
|||
void coeff(int, char **);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
|
||||
protected:
|
||||
int *nterms;
|
||||
|
|
|
@ -97,7 +97,7 @@ FixGrem::FixGrem(LAMMPS *lmp, int narg, char **arg) :
|
|||
newarg = new char*[5];
|
||||
newarg[0] = id_press;
|
||||
newarg[1] = (char *) "all";
|
||||
newarg[2] = (char *) "pressure/grem";
|
||||
newarg[2] = (char *) "PRESSURE/GREM";
|
||||
newarg[3] = id_temp;
|
||||
newarg[4] = id;
|
||||
modify->add_compute(5,newarg);
|
||||
|
|
|
@ -85,6 +85,7 @@ PairAGNI::PairAGNI(LAMMPS *lmp) : Pair(lmp)
|
|||
nparams = 0;
|
||||
params = NULL;
|
||||
map = NULL;
|
||||
cutmax = 0.0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -113,6 +113,8 @@ void TemperGrem::command(int narg, char **arg)
|
|||
|
||||
my_set_lambda = universe->iworld;
|
||||
if (narg == 8) my_set_lambda = force->inumeric(FLERR,arg[7]);
|
||||
if ((my_set_lambda < 0) || (my_set_lambda >= universe->nworlds))
|
||||
error->universe_one(FLERR,"Illegal temperature index");
|
||||
|
||||
// swap frequency must evenly divide total # of timesteps
|
||||
|
||||
|
@ -271,12 +273,6 @@ void TemperGrem::command(int narg, char **arg)
|
|||
partner = world2root[partner_world];
|
||||
}
|
||||
|
||||
// compute weights
|
||||
volume = domain->xprd * domain->yprd * domain->zprd;
|
||||
enth = pe + (pressref * volume);
|
||||
weight = log(set_lambda[my_set_lambda] + (eta*(enth + h0)));
|
||||
weight_cross = log(set_lambda[partner_set_lambda] + (eta*(enth + h0)));
|
||||
|
||||
// swap with a partner, only root procs in each world participate
|
||||
// hi proc sends PE to low proc
|
||||
// lo proc make Boltzmann decision on whether to swap
|
||||
|
@ -284,6 +280,12 @@ void TemperGrem::command(int narg, char **arg)
|
|||
|
||||
swap = 0;
|
||||
if (partner != -1) {
|
||||
// compute weights
|
||||
volume = domain->xprd * domain->yprd * domain->zprd;
|
||||
enth = pe + (pressref * volume);
|
||||
weight = log(set_lambda[my_set_lambda] + (eta*(enth + h0)));
|
||||
weight_cross = log(set_lambda[partner_set_lambda] + (eta*(enth + h0)));
|
||||
|
||||
if (me_universe > partner) {
|
||||
MPI_Send(&weight,1,MPI_DOUBLE,partner,0,universe->uworld);
|
||||
MPI_Send(&weight_cross,1,MPI_DOUBLE,partner,0,universe->uworld);
|
||||
|
|
|
@ -46,6 +46,7 @@ ComputeRDF::ComputeRDF(LAMMPS *lmp, int narg, char **arg) :
|
|||
|
||||
array_flag = 1;
|
||||
extarray = 0;
|
||||
dynamic_group_allow = 0;
|
||||
|
||||
nbin = force->inumeric(FLERR,arg[3]);
|
||||
if (nbin < 1) error->all(FLERR,"Illegal compute rdf command");
|
||||
|
|
|
@ -5,6 +5,6 @@ for use with msi2lmp.
|
|||
Note that LAMMPS does not distribute Accelrys (or old BioSym)
|
||||
force field files, since they are proprietary. All the
|
||||
files in this directory that are part of the LAMMPS distribution
|
||||
are are openly available files that are in the public domain.
|
||||
are openly available files that are in the public domain.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue