diff --git a/doc/src/Section_errors.txt b/doc/src/Section_errors.txt index 832c5718ab..5e0574b390 100644 --- a/doc/src/Section_errors.txt +++ b/doc/src/Section_errors.txt @@ -11171,6 +11171,12 @@ Self-explanatory. :dd If the fix changes the timestep, the dump dcd file will not reflect the change. :dd +{Energy due to X extra global DOFs will be included in minimizer energies} :dt + +When using fixes like box/relax, the potential energy used by the minimizer +is augmented by an additional energy provided by the fix. Thus the printed +converged energy may be different from the total potential energy. :dd + {Energy tally does not account for 'zero yes'} :dt The energy removed by using the 'zero yes' flag is not accounted diff --git a/doc/src/Section_tools.txt b/doc/src/Section_tools.txt index 03611c7cdb..d95c4f0cd4 100644 --- a/doc/src/Section_tools.txt +++ b/doc/src/Section_tools.txt @@ -369,15 +369,18 @@ supports it. It has its own WWW page at msi2lmp tool :h4,link(msi) -The msi2lmp sub-directory contains a tool for creating LAMMPS input -data files from BIOVIA's Materias Studio files (formerly Accelrys' +The msi2lmp sub-directory contains a tool for creating LAMMPS template +input and data files from BIOVIA's Materias Studio files (formerly Accelrys' Insight MD code, formerly MSI/Biosym and its Discover MD code). This tool was written by John Carpenter (Cray), Michael Peachey (Cray), and Steve Lustig (Dupont). Several people contributed changes to remove bugs and adapt its output to changes in LAMMPS. -See the README file for more information. +This tool has several known limitations and is no longer under active +development, so there are no changes except for the occasional bugfix. + +See the README file in the tools/msi2lmp folder for more information. :line diff --git a/doc/src/bonds.txt b/doc/src/bonds.txt index 3b50f6482f..169d56ecbe 100644 --- a/doc/src/bonds.txt +++ b/doc/src/bonds.txt @@ -16,7 +16,6 @@ Bond Styles :h1 bond_none bond_nonlinear bond_oxdna - bond_oxdna2 bond_quartic bond_table bond_zero diff --git a/doc/src/fix_gle.txt b/doc/src/fix_gle.txt index ca7625e2d0..b8d3cc9b34 100644 --- a/doc/src/fix_gle.txt +++ b/doc/src/fix_gle.txt @@ -67,9 +67,10 @@ target value as the {Tstart} and {Tstop} arguments, so that the diffusion matrix that gives canonical sampling for a given A is computed automatically. However, the GLE framework also allow for non-equilibrium sampling, that can be used for instance to model inexpensively zero-point energy -effects "(Ceriotti2)"_#Ceriotti2. This is achieved specifying the -{noneq} keyword followed by the name of the file that contains the -static covariance matrix for the non-equilibrium dynamics. +effects "(Ceriotti2)"_#Ceriotti2. This is achieved specifying the {noneq} + keyword followed by the name of the file that contains the static covariance +matrix for the non-equilibrium dynamics. Please note, that the covariance +matrix is expected to be given in [temperature units]. Since integrating GLE dynamics can be costly when used together with simple potentials, one can use the {every} optional keyword to @@ -148,7 +149,7 @@ dpd/tstat"_pair_dpd.html, "fix gld"_fix_gld.html 1170-80 (2010) :link(GLE4MD) -[(GLE4MD)] "http://epfl-cosmo.github.io/gle4md/"_http://epfl-cosmo.github.io/gle4md/ +[(GLE4MD)] "http://gle4md.org/"_http://gle4md.org/ :link(Ceriotti2) [(Ceriotti2)] Ceriotti, Bussi and Parrinello, Phys Rev Lett 103, diff --git a/doc/src/improper_cossq.txt b/doc/src/improper_cossq.txt index 513f0b3151..e238063a8f 100644 --- a/doc/src/improper_cossq.txt +++ b/doc/src/improper_cossq.txt @@ -45,12 +45,9 @@ above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: -K (energy/radian^2) +K (energy) X0 (degrees) :ul -X0 is specified in degrees, but LAMMPS converts it to radians -internally; hence the units of K are in energy/radian^2. - :line Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are diff --git a/doc/src/improper_ring.txt b/doc/src/improper_ring.txt index 705b1cf742..cba59399e7 100644 --- a/doc/src/improper_ring.txt +++ b/doc/src/improper_ring.txt @@ -49,12 +49,9 @@ above, or in the data file or restart files read by the "read_data"_read_data.html or "read_restart"_read_restart.html commands: -K (energy/radian^2) +K (energy) theta0 (degrees) :ul -theta0 is specified in degrees, but LAMMPS converts it to radians -internally; hence the units of K are in energy/radian^2. - :line Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are diff --git a/doc/src/pair_hybrid.txt b/doc/src/pair_hybrid.txt index afef0c4c5f..5166fe1f84 100644 --- a/doc/src/pair_hybrid.txt +++ b/doc/src/pair_hybrid.txt @@ -225,6 +225,12 @@ special_bonds lj/coul 1e-20 1e-20 0.5 pair_hybrid tersoff lj/cut/coul/long 12.0 pair_modify pair tersoff special lj/coul 1.0 1.0 1.0 :pre +For use with the various "compute */tally"_compute_tally.html +computes, the "pair_modify compute/tally"_pair_modify.html +command can be used to selectively turn off processing of +the compute tally styles, for example, if those pair styles +(e.g. manybody styles) do not support this feature. + See the "pair_modify"_pair_modify.html doc page for details on the specific syntax, requirements and restrictions. diff --git a/doc/src/pair_modify.txt b/doc/src/pair_modify.txt index 03fb80ae5e..34dbb5bc3d 100644 --- a/doc/src/pair_modify.txt +++ b/doc/src/pair_modify.txt @@ -15,11 +15,13 @@ pair_modify keyword values ... :pre one or more keyword/value pairs may be listed :ulb,l keyword = {pair} or {shift} or {mix} or {table} or {table/disp} or {tabinner} or {tabinner/disp} or {tail} or {compute} :l {pair} values = sub-style N {special} which wt1 wt2 wt3 + or sub-style N {compute/tally} flag sub-style = sub-style of "pair hybrid"_pair_hybrid.html N = which instance of sub-style (only if sub-style is used multiple times) - {special} which wt1 wt2 wt3 = override {special_bonds} settings (optional) - which = {lj/coul} or {lj} or {coul} - w1,w2,w3 = 1-2, 1-3, and 1-4 weights from 0.0 to 1.0 inclusive + {special} which wt1 wt2 wt3 = override {special_bonds} settings (optional) + which = {lj/coul} or {lj} or {coul} + w1,w2,w3 = 1-2, 1-3, and 1-4 weights from 0.0 to 1.0 inclusive + {compute/tally} flag = {yes} or {no} {mix} value = {geometric} or {arithmetic} or {sixthpower} {shift} value = {yes} or {no} {table} value = N @@ -40,6 +42,7 @@ pair_modify shift yes mix geometric pair_modify tail yes pair_modify table 12 pair_modify pair lj/cut compute no +pair_modify pair tersoff compute/tally no pair_modify pair lj/cut/coul/long 1 special lj/coul 0.0 0.0 0.0 :pre [Description:] @@ -60,9 +63,12 @@ keywords will be applied to. Note that if the {pair} keyword is not used, and the pair style is {hybrid} or {hybrid/overlay}, then all the specified keywords will be applied to all sub-styles. -The {special} keyword can only be used in conjunction with the {pair} -keyword and must directly follow it. It allows to override the +The {special} and {compute/tally} keywords can [only] be used in +conjunction with the {pair} keyword and must directly follow it. +{special} allows to override the "special_bonds"_special_bonds.html settings for the specified sub-style. +{compute/tally} allows to disable or enable registering +"compute */tally"_compute_tally.html computes for a given sub-style. More details are given below. The {mix} keyword affects pair coefficients for interactions between @@ -231,6 +237,14 @@ setting. Substituting 1.0e-10 for 0.0 and 0.9999999999 for 1.0 is usually a sufficient workaround in this case without causing a significant error. +The {compute/tally} keyword takes exactly 1 argument ({no} or {yes}), +and allows to selectively disable or enable processing of the various +"compute */tally"_compute_tally.html styles for a given +"pair hybrid or hybrid/overlay"_pair_hybrid.html sub-style. + +NOTE: Any "pair_modify pair compute/tally" command must be issued +[before] the corresponding compute style is defined. + :line [Restrictions:] none @@ -240,8 +254,9 @@ conflicting options. You cannot use {tail} yes with 2d simulations. [Related commands:] -"pair_style"_pair_style.html, "pair_coeff"_pair_coeff.html, -"thermo_style"_thermo_style.html +"pair_style"_pair_style.html, "pair_style hybrid"_pair_hybrid.html, +pair_coeff"_pair_coeff.html, "thermo_style"_thermo_style.html, +"compute */tally"_compute_tally.html [Default:] diff --git a/doc/src/pair_srp.txt b/doc/src/pair_srp.txt index 3f54445ba8..e7f1e00d10 100644 --- a/doc/src/pair_srp.txt +++ b/doc/src/pair_srp.txt @@ -150,6 +150,8 @@ hybrid"_pair_hybrid.html. This pair style requires the "newton"_newton.html command to be {on} for non-bonded interactions. +This pair style is not compatible with "rigid body integrators"_fix_rigid.html + [Related commands:] "pair_style hybrid"_pair_hybrid.html, "pair_coeff"_pair_coeff.html, diff --git a/doc/src/python.txt b/doc/src/python.txt index be6d1b215f..69025d791c 100644 --- a/doc/src/python.txt +++ b/doc/src/python.txt @@ -310,7 +310,7 @@ which corresponds to SELF in the python command. The first line of the function imports the Python module lammps.py in the python dir of the distribution. The second line creates a Python object "lmp" which wraps the instance of LAMMPS that called the function. The -"ptr=lmpptr" argument is what makes that happen. The thrid line +"ptr=lmpptr" argument is what makes that happen. The third line invokes the command() function in the LAMMPS library interface. It takes a single string argument which is a LAMMPS input script command for LAMMPS to execute, the same as if it appeared in your input diff --git a/lib/molfile/Makefile.lammps b/lib/molfile/Makefile.lammps index 08118991a0..a181f48aec 100644 --- a/lib/molfile/Makefile.lammps +++ b/lib/molfile/Makefile.lammps @@ -6,6 +6,9 @@ # When you build LAMMPS with the USER-MOLFILE package installed, it will # use the 3 settings in this file. They should be set as follows. # +# The molfile_SYSINC setting is to point to the folder with the VMD +# plugin headers. By default it points to bundled headers in this folder +# # The molfile_SYSLIB setting is for a system dynamic loading library # that will be used to load the molfile plugins. It contains functions # like dlopen(), dlsym() and so on for dynamic linking of executable @@ -24,7 +27,10 @@ # Settings that the LAMMPS build will import when this package is installed -molfile_SYSINC = +# change this to -I/path/to/your/lib/vmd/plugins/include if the bundled +# header files are incompatible with your VMD plugsins +molfile_SYSINC =-I../../lib/molfile +# ifneq ($(LIBOBJDIR),/Obj_mingw32) ifneq ($(LIBOBJDIR),/Obj_mingw64) ifneq ($(LIBOBJDIR),/Obj_mingw32-mpi) diff --git a/lib/molfile/README b/lib/molfile/README index 09ea3cc5c6..9e8260c202 100644 --- a/lib/molfile/README +++ b/lib/molfile/README @@ -6,17 +6,30 @@ and write_dump commands in a LAMMPS input script. More information about the VMD molfile plugins can be found at http://www.ks.uiuc.edu/Research/vmd/plugins/molfile. -More specifically, to be able to dynamically load and execute the -plugins from inside LAMMPS, you need to link with a system library -containing functions like dlopen(), dlsym() and so on for dynamic -linking of executable code into an executable. This library is -defined by setting the molfile_SYSLIB variable in the Makefile.lammps -file in this dir. +NOTE: while the programming interface (API) of the VMD molfile plugins +is backward compatible (i.e. you can expect to be able to compile this +package for plugins from newer VMD packages), the binary interface +(ABI) is not. So it is necessary to compile this package with the +VMD molfile plugin header files (vmdplugin.h and molfile_plugin.h) +matching VMD installation that the (binary) plugin files are taken from. +These header files can be found inside the VMD installation tree under +"plugins/include". For convenience, this package includes a set of +header files that is compatible with VMD 1.9.3 (the current version +in April 2017). You need to adjust the molfile_SYSINC variable in the +Makefile.lammps file in this directory, in case you want to use VMD +molfile plugins from a different version. The interface is compatible +with plugins starting from VMD version 1.8.4. + +In order to be able to dynamically load and execute the plugins from +inside LAMMPS, you need to link with a system library containing functions +like dlopen(), dlsym() and so on for dynamic linking of executable code +into an executable. This library is defined by setting the molfile_SYSLIB +variable in the Makefile.lammps file in this dir. For Linux and most current unix-like operating systems, this can be kept at the default setting of "-ldl" (on some platforms this library is called "-ldld"). For compilation on Windows, a slightly different mechanism is used that is part of the Windows programming environment -and this library is not needed. +and this kind of library is not needed. See the header of Makefile.lammps for more info. diff --git a/src/USER-MOLFILE/molfile_plugin.h b/lib/molfile/molfile_plugin.h similarity index 92% rename from src/USER-MOLFILE/molfile_plugin.h rename to lib/molfile/molfile_plugin.h index 7a2d7ca42e..c79e7a5abf 100644 --- a/src/USER-MOLFILE/molfile_plugin.h +++ b/lib/molfile/molfile_plugin.h @@ -11,7 +11,7 @@ * * $RCSfile: molfile_plugin.h,v $ * $Author: johns $ $Locker: $ $State: Exp $ - * $Revision: 1.103 $ $Date: 2011/03/05 03:56:11 $ + * $Revision: 1.108 $ $Date: 2016/02/26 03:17:01 $ * ***************************************************************************/ @@ -60,6 +60,21 @@ typedef ssize_t molfile_ssize_t; /**< for frame counts */ #define MOLFILE_MAXWAVEPERTS 25 /**< maximum number of wavefunctions * per timestep */ +/** + * Hard-coded direct-I/O page size constants for use by both VMD + * and the plugins that want to use direct, unbuffered I/O for high + * performance with SSDs etc. We use two constants to define the + * range of hardware page sizes that we can support, so that we can + * add support for larger 8KB or 16KB page sizes in the future + * as they become more prevalent in high-end storage systems. + * + * At present, VMD uses a hard-coded 4KB page size to reduce memory + * fragmentation, but these constants will make it easier to enable the + * use of larger page sizes in the future if it becomes necessary. + */ +#define MOLFILE_DIRECTIO_MIN_BLOCK_SIZE 4096 +#define MOLFILE_DIRECTIO_MAX_BLOCK_SIZE 4096 + /** * File level comments, origin information, and annotations. @@ -96,8 +111,17 @@ typedef struct { char resname[8]; /**< required residue name string */ int resid; /**< required integer residue ID */ char segid[8]; /**< required segment name string, or "" */ +#if 0 && vmdplugin_ABIVERSION > 17 + /* The new PDB file formats allows for much larger structures, */ + /* which can therefore require longer chain ID strings. The */ + /* new PDBx/mmCIF file formats do not have length limits on */ + /* fields, so PDB chains could be arbitrarily long strings */ + /* in such files. At present, we know we need at least 3-char */ + /* chains for existing PDBx/mmCIF files. */ + char chain[4]; /**< required chain name, or "" */ +#else char chain[2]; /**< required chain name, or "" */ - +#endif /* rest are optional; use optflags to specify what's present */ char altloc[2]; /**< optional PDB alternate location code */ char insertion[2]; /**< optional PDB insertion code */ @@ -107,6 +131,23 @@ typedef struct { float charge; /**< optional charge value */ float radius; /**< optional radius value */ int atomicnumber; /**< optional element atomic number */ + +#if 0 + char complex[16]; + char assembly[16]; + int qmregion; + int qmregionlink; + int qmlayer; + int qmlayerlink; + int qmfrag; + int qmfraglink; + string qmecp; + int qmadapt; + int qmect; /**< boolean */ + int qmparam; + int autoparam; +#endif + #if defined(DESRES_CTNUMBER) int ctnumber; /**< mae ct block, 0-based, including meta */ #endif @@ -140,23 +181,19 @@ typedef struct { #define MOLFILE_QMTS_SCFITER 0x0002 /*@}*/ -#if vmdplugin_ABIVERSION > 10 typedef struct molfile_timestep_metadata { unsigned int count; /**< total # timesteps; -1 if unknown */ unsigned int avg_bytes_per_timestep; /** bytes per timestep */ int has_velocities; /**< if timesteps have velocities */ } molfile_timestep_metadata_t; -#endif /* * Per-timestep atom coordinates and periodic cell information */ typedef struct { float *coords; /**< coordinates of all atoms, arranged xyzxyzxyz */ -#if vmdplugin_ABIVERSION > 10 float *velocities; /**< space for velocities of all atoms; same layout */ /**< NULL unless has_velocities is set */ -#endif /*@{*/ /** @@ -169,9 +206,7 @@ typedef struct { float A, B, C, alpha, beta, gamma; /*@}*/ -#if vmdplugin_ABIVERSION > 10 double physical_time; /**< physical time point associated with this frame */ -#endif #if defined(DESRES_READ_TIMESTEP2) /* HACK to support generic trajectory information */ @@ -213,14 +248,33 @@ typedef struct { * physical size of the box, this is the number of voxels in each * direction, independent of the shape of the volume set. */ - int xsize; /**< number of grid cells along the X axis */ - int ysize; /**< number of grid cells along the Y axis */ - int zsize; /**< number of grid cells along the Z axis */ + int xsize; /**< number of grid cells along the X axis */ + int ysize; /**< number of grid cells along the Y axis */ + int zsize; /**< number of grid cells along the Z axis */ - int has_color; /**< flag indicating presence of voxel color data */ +#if vmdplugin_ABIVERSION > 16 + int has_scalar; /**< flag indicating presence of scalar volume */ + int has_gradient; /**< flag indicating presence of vector volume */ + int has_variance; /**< flag indicating presence of variance map */ +#endif + int has_color; /**< flag indicating presence of voxel color data */ } molfile_volumetric_t; +#if vmdplugin_ABIVERSION > 16 +/** + * Volumetric dataset read/write structure with both flag/parameter sets + * and VMD-allocated pointers for fields to be used by the plugin. + */ +typedef struct { + int setidx; /**< volumetric dataset index to load/save */ + float *scalar; /**< scalar density/potential field data */ + float *gradient; /**< gradient vector field */ + float *variance; /**< variance map indicating signal/noise */ + float *rgb3f; /**< RGB floating point color texture map */ + unsigned char *rgb3u; /**< RGB unsigned byte color texture map */ +} molfile_volumetric_readwrite_t; +#endif /************************************************************** @@ -231,9 +285,6 @@ typedef struct { ************************************************************** **************************************************************/ -#if vmdplugin_ABIVERSION > 9 - - /* macros for the convergence status of a QM calculation. */ #define MOLFILE_QMSTATUS_UNKNOWN -1 /* don't know yet */ #define MOLFILE_QMSTATUS_OPT_CONV 0 /* optimization converged */ @@ -485,8 +536,6 @@ typedef struct { } molfile_qm_timestep_t; -#endif - /************************************************************** **************************************************************/ @@ -609,12 +658,8 @@ typedef struct { * This function can be called only after read_structure(). * Return MOLFILE_SUCCESS if no errors occur. */ -#if vmdplugin_ABIVERSION > 14 int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder, int **bondtype, int *nbondtypes, char ***bondtypename); -#else - int (*read_bonds)(void *, int *nbonds, int **from, int **to, float **bondorder); -#endif /** * XXX this function will be augmented and possibly superceded by a @@ -684,6 +729,9 @@ typedef struct { */ int (* read_volumetric_data)(void *, int set, float *datablock, float *colorblock); +#if vmdplugin_ABIVERSION > 16 + int (* read_volumetric_data_ex)(void *, molfile_volumetric_readwrite_t *v); +#endif /** * Read raw graphics data stored in this file. Return the number of data @@ -723,14 +771,9 @@ typedef struct { * bondtypenames can only be used of bondtypes is also given. * Return MOLFILE_SUCCESS if no errors occur. */ -#if vmdplugin_ABIVERSION > 14 int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder, int *bondtype, int nbondtypes, char **bondtypename); -#else - int (* write_bonds)(void *, int nbonds, int *from, int *to, float *bondorder); -#endif -#if vmdplugin_ABIVERSION > 9 /** * Write the specified volumetric data set into the space pointed to by * datablock. The * allocated for the datablock must be equal to @@ -740,8 +783,11 @@ typedef struct { */ int (* write_volumetric_data)(void *, molfile_volumetric_t *metadata, float *datablock, float *colorblock); +#if vmdplugin_ABIVERSION > 16 + int (* write_volumetric_data_ex)(void *, molfile_volumetric_t *metadata, + molfile_volumetric_readwrite_t *v); +#endif -#if vmdplugin_ABIVERSION > 15 /** * Read in Angles, Dihedrals, Impropers, and Cross Terms and optionally types. * (Cross terms pertain to the CHARMM/NAMD CMAP feature) @@ -764,33 +810,6 @@ typedef struct { const int *impropers, const int *impropertypes, int numimpropertypes, const char **impropertypenames, int numcterms, const int *cterms, int ctermcols, int ctermrows); -#else - /** - * Read in Angles, Dihedrals, Impropers, and Cross Terms - * Forces are in Kcal/mol - * (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given - * as a 2-D matrix) - */ - int (* read_angles)(void *, - int *numangles, int **angles, double **angleforces, - int *numdihedrals, int **dihedrals, double **dihedralforces, - int *numimpropers, int **impropers, double **improperforces, - int *numcterms, int **cterms, - int *ctermcols, int *ctermrows, double **ctermforces); - - /** - * Write out Angles, Dihedrals, Impropers, and Cross Terms - * Forces are in Kcal/mol - * (Cross terms pertain to the CHARMM/NAMD CMAP feature, forces are given - * as a 2-D matrix) - */ - int (* write_angles)(void *, - int numangles, const int *angles, const double *angleforces, - int numdihedrals, const int *dihedrals, const double *dihedralforces, - int numimpropers, const int *impropers, const double *improperforces, - int numcterms, const int *cterms, - int ctermcols, int ctermrows, const double *ctermforces); -#endif /** @@ -839,14 +858,9 @@ typedef struct { */ int (* read_timestep)(void *, int natoms, molfile_timestep_t *, molfile_qm_metadata_t *, molfile_qm_timestep_t *); -#endif -#if vmdplugin_ABIVERSION > 10 int (* read_timestep_metadata)(void *, molfile_timestep_metadata_t *); -#endif -#if vmdplugin_ABIVERSION > 11 int (* read_qm_timestep_metadata)(void *, molfile_qm_timestep_metadata_t *); -#endif #if defined(DESRES_READ_TIMESTEP2) /** @@ -864,7 +878,6 @@ typedef struct { double * times ); #endif -#if vmdplugin_ABIVERSION > 13 /** * Console output, READ-ONLY function pointer. * Function pointer that plugins can use for printing to the host @@ -883,8 +896,8 @@ typedef struct { * application-provided services */ int (* cons_fputs)(const int, const char*); -#endif } molfile_plugin_t; #endif + diff --git a/src/USER-MOLFILE/vmdplugin.h b/lib/molfile/vmdplugin.h similarity index 98% rename from src/USER-MOLFILE/vmdplugin.h rename to lib/molfile/vmdplugin.h index 37299408fe..842d1e431c 100644 --- a/src/USER-MOLFILE/vmdplugin.h +++ b/lib/molfile/vmdplugin.h @@ -11,7 +11,7 @@ * * $RCSfile: vmdplugin.h,v $ * $Author: johns $ $Locker: $ $State: Exp $ - * $Revision: 1.32 $ $Date: 2009/02/24 05:12:35 $ + * $Revision: 1.33 $ $Date: 2015/10/29 05:10:54 $ * ***************************************************************************/ @@ -144,7 +144,7 @@ typedef struct { /** * Use this macro to initialize the abiversion member of each plugin */ -#define vmdplugin_ABIVERSION 16 +#define vmdplugin_ABIVERSION 17 /*@{*/ /** Use this macro to indicate a plugin's thread-safety at registration time */ diff --git a/src/.gitignore b/src/.gitignore index 97bc2276b0..4fd0431208 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -47,8 +47,6 @@ /dump_molfile.h /molfile_interface.cpp /molfile_interface.h -/molfile_plugin.h -/vmdplugin.h /type_detector.h /intel_buffers.cpp @@ -76,8 +74,8 @@ /pair_awpmd_cut.cpp /pair_awpmd_cut.h -/dihedral_charmmfsh.cpp -/dihedral_charmmfsh.h +/dihedral_charmmfsw.cpp +/dihedral_charmmfsw.h /pair_lj_charmmfsw_coul_charmmfsh.cpp /pair_lj_charmmfsw_coul_charmmfsh.h /pair_lj_charmmfsw_coul_long.cpp @@ -163,6 +161,8 @@ /bond_nonlinear.h /bond_oxdna_fene.cpp /bond_oxdna_fene.h +/bond_oxdna2_fene.cpp +/bond_oxdna2_fene.h /bond_quartic.cpp /bond_quartic.h /bond_table.cpp @@ -770,6 +770,8 @@ /pair_nm_cut_coul_long.h /pair_oxdna_*.cpp /pair_oxdna_*.h +/pair_oxdna2_*.cpp +/pair_oxdna2_*.h /mf_oxdna.h /pair_peri_eps.cpp /pair_peri_eps.h @@ -848,6 +850,8 @@ /prd.h /python.cpp /python.h +/python_impl.cpp +/python_impl.h /reader_molfile.cpp /reader_molfile.h /reaxc_allocate.cpp diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 467a748d08..85e3da921b 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -138,13 +138,14 @@ void EwaldDisp::init() nsums += n[k]; } - if (!gewaldflag) g_ewald = 0.0; + if (!gewaldflag) g_ewald = g_ewald_6 = 1.0; pair->init(); // so B is defined init_coeffs(); init_coeff_sums(); if (function[0]) qsum_qsq(); else qsqsum = qsum = 0.0; natoms_original = atom->natoms; + if (!gewaldflag) g_ewald = g_ewald_6 = 0.0; // turn off coulombic if no charge @@ -218,8 +219,8 @@ void EwaldDisp::init() } if (!comm->me) { - if (screen) fprintf(screen, " G vector = %g\n", g_ewald); - if (logfile) fprintf(logfile, " G vector = %g\n", g_ewald); + if (screen) fprintf(screen, " G vector = %g, accuracy = %g\n", g_ewald,accuracy); + if (logfile) fprintf(logfile, " G vector = %g accuracy = %g\n", g_ewald,accuracy); } g_ewald_6 = g_ewald; diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 5d6c2042be..b31d42a815 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -380,6 +380,12 @@ void PPPMDisp::init() alpha = qdist / (cos(0.5*theta) * blen); } + //if g_ewald and g_ewald_6 have not been specified, set some initial value + // to avoid problems when calculating the energies! + + if (!gewaldflag) g_ewald = 1; + if (!gewaldflag_6) g_ewald_6 = 1; + // initialize the pair style to get the coefficients neighrequest_flag = 0; @@ -387,12 +393,6 @@ void PPPMDisp::init() neighrequest_flag = 1; init_coeffs(); - //if g_ewald and g_ewald_6 have not been specified, set some initial value - // to avoid problems when calculating the energies! - - if (!gewaldflag) g_ewald = 1; - if (!gewaldflag_6) g_ewald_6 = 1; - // set accuracy (force units) from accuracy_relative or accuracy_absolute if (accuracy_absolute >= 0.0) accuracy = accuracy_absolute; diff --git a/src/Purge.list b/src/Purge.list index 554c5df824..9b09dd5382 100644 --- a/src/Purge.list +++ b/src/Purge.list @@ -16,6 +16,12 @@ style_region.h style_neigh_bin.h style_neigh_pair.h style_neigh_stencil.h +# deleted on 19 April 2017 +vmdplugin.h +molfile_plugin.h +# deleted on 13 April 2017 +dihedral_charmmfsh.cpp +dihedral_charmmfsh.h # deleted on ## XXX 2016 accelerator_intel.h neigh_bond.cpp diff --git a/src/QEQ/fix_qeq_point.cpp b/src/QEQ/fix_qeq_point.cpp index 9af70a445a..63d20ad911 100644 --- a/src/QEQ/fix_qeq_point.cpp +++ b/src/QEQ/fix_qeq_point.cpp @@ -58,7 +58,7 @@ void FixQEqPoint::init() neighbor->requests[irequest]->full = 1; int ntypes = atom->ntypes; - memory->create(shld,ntypes+1,ntypes+1,"qeq:shileding"); + memory->create(shld,ntypes+1,ntypes+1,"qeq:shielding"); if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index fbd8473cb0..f3dec42a83 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -101,6 +101,13 @@ void FixSRP::init() if (force->pair_match("hybrid",1) == NULL) error->all(FLERR,"Cannot use pair srp without pair_style hybrid"); + int has_rigid = 0; + for (int i = 0; i < modify->nfix; i++) + if (strncmp(modify->fix[i]->style,"rigid",5) == 0) ++has_rigid; + + if (has_rigid > 0) + error->all(FLERR,"Pair srp is not compatible with rigid fixes."); + if ((bptype < 1) || (bptype > atom->ntypes)) error->all(FLERR,"Illegal bond particle type"); diff --git a/src/USER-MISC/improper_ring.cpp b/src/USER-MISC/improper_ring.cpp index 5a7937e4ee..adf17ed1d5 100644 --- a/src/USER-MISC/improper_ring.cpp +++ b/src/USER-MISC/improper_ring.cpp @@ -204,7 +204,7 @@ void ImproperRing::compute(int eflag, int vflag) cfact2 = ckjji / ckjkj; cfact3 = ckjji / cjiji; - /* Calculate the force acted on the thrid atom of the angle. */ + /* Calculate the force acted on the third atom of the angle. */ fkx = cfact2 * bvec2x[icomb] - bvec1x[icomb]; fky = cfact2 * bvec2y[icomb] - bvec1y[icomb]; fkz = cfact2 * bvec2z[icomb] - bvec1z[icomb]; diff --git a/src/USER-MOLFILE/README b/src/USER-MOLFILE/README index f6defed6ae..4437b587e4 100644 --- a/src/USER-MOLFILE/README +++ b/src/USER-MOLFILE/README @@ -2,8 +2,8 @@ This package provides a C++ interface class to the VMD molfile plugins, http://www.ks.uiuc.edu/Research/vmd/plugins/molfile, and a set of LAMMPS classes that use this interface. -Molfile plugins provide a consistent programming interface to read and -write file formats commonly used in molecular simulations. This +Molfile plugins provide a consistent programming interface to read +and write file formats commonly used in molecular simulations. This package only provides the interface code, not the plugins; these can be taken as precompiled binaries directly from a VMD installation that matches the platform of your LAMMPS executable. Using the plugin @@ -18,18 +18,5 @@ LAMMPS, you need to link with an appropriate system library, which is done using the settings in lib/molfile/Makefile.lammps. See that file and the lib/molfile/README file for more details. -NOTE: while the programming interface (API) to the molfile plugins is -backward compatible (i.e. you can expect to be able to compile this -package for plugins from newer VMD packages), the binary interface -(ABI) is not. So it is necessary to compile this package with the -molfile plugin header files (vmdplugin.h and molfile_plugin.h) taken -from the _same_ VMD installation that the (binary) plugin files are -taken from. These header files can be found inside the VMD -installation tree under: "plugins/include". - -For convenience, this package includes a set of header files that is -compatible with VMD 1.9 and 1.9.1 (the current version in June 2012) -and should be compilable with VMD versions back to about version 1.8.4 - The person who created this package is Axel Kohlmeyer at Temple U (akohlmey at gmail.com). Contact him directly if you have questions. diff --git a/src/USER-OMP/improper_ring_omp.cpp b/src/USER-OMP/improper_ring_omp.cpp index bd7593c51a..4eadc83183 100644 --- a/src/USER-OMP/improper_ring_omp.cpp +++ b/src/USER-OMP/improper_ring_omp.cpp @@ -206,7 +206,7 @@ void ImproperRingOMP::eval(int nfrom, int nto, ThrData * const thr) cfact2 = ckjji / ckjkj; cfact3 = ckjji / cjiji; - /* Calculate the force acted on the thrid atom of the angle. */ + /* Calculate the force acted on the third atom of the angle. */ fkx = cfact2 * bvec2x[icomb] - bvec1x[icomb]; fky = cfact2 * bvec2y[icomb] - bvec1y[icomb]; fkz = cfact2 * bvec2z[icomb] - bvec1z[icomb]; diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index ed057dfe7a..01ecd9d399 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -375,7 +375,7 @@ void FixQEqReax::init_shielding() ntypes = atom->ntypes; if (shld == NULL) - memory->create(shld,ntypes+1,ntypes+1,"qeq:shileding"); + memory->create(shld,ntypes+1,ntypes+1,"qeq:shielding"); for( i = 1; i <= ntypes; ++i ) for( j = 1; j <= ntypes; ++j ) diff --git a/src/USER-TALLY/compute_force_tally.cpp b/src/USER-TALLY/compute_force_tally.cpp index e9ecedd5ab..e97a1c751c 100644 --- a/src/USER-TALLY/compute_force_tally.cpp +++ b/src/USER-TALLY/compute_force_tally.cpp @@ -65,12 +65,12 @@ ComputeForceTally::~ComputeForceTally() void ComputeForceTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute force/tally with no pair style"); + error->all(FLERR,"Trying to use compute force/tally without pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute force/tally used with incompatible pair style."); + error->warning(FLERR,"Compute force/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index 214311cb3d..48cad538d5 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -64,12 +64,12 @@ ComputeHeatFluxTally::~ComputeHeatFluxTally() void ComputeHeatFluxTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute heat/flux/tally with no pair style"); + error->all(FLERR,"Trying to use compute heat/flux/tally without pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute heat/flux/tally used with incompatible pair style."); + error->warning(FLERR,"Compute heat/flux/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_pe_mol_tally.cpp b/src/USER-TALLY/compute_pe_mol_tally.cpp index 09ee04d57a..a30f2d6b9a 100644 --- a/src/USER-TALLY/compute_pe_mol_tally.cpp +++ b/src/USER-TALLY/compute_pe_mol_tally.cpp @@ -59,15 +59,15 @@ ComputePEMolTally::~ComputePEMolTally() void ComputePEMolTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute pe/mol/tally with no pair style"); + error->all(FLERR,"Trying to use compute pe/mol/tally without pair style"); else force->pair->add_tally_callback(this); if (atom->molecule_flag == 0) - error->all(FLERR,"Compute pe/mol/tally requires molecule IDs."); + error->all(FLERR,"Compute pe/mol/tally requires molecule IDs"); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute pe/mol/tally used with incompatible pair style."); + error->warning(FLERR,"Compute pe/mol/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_pe_tally.cpp b/src/USER-TALLY/compute_pe_tally.cpp index 68c00b6d2e..2117f2cb15 100644 --- a/src/USER-TALLY/compute_pe_tally.cpp +++ b/src/USER-TALLY/compute_pe_tally.cpp @@ -64,12 +64,12 @@ ComputePETally::~ComputePETally() void ComputePETally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute pe/tally with no pair style"); + error->all(FLERR,"Trying to use compute pe/tally without a pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute pe/tally used with incompatible pair style."); + error->warning(FLERR,"Compute pe/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/USER-TALLY/compute_stress_tally.cpp b/src/USER-TALLY/compute_stress_tally.cpp index 2575bd372a..66df9f6e4f 100644 --- a/src/USER-TALLY/compute_stress_tally.cpp +++ b/src/USER-TALLY/compute_stress_tally.cpp @@ -65,12 +65,12 @@ ComputeStressTally::~ComputeStressTally() void ComputeStressTally::init() { if (force->pair == NULL) - error->all(FLERR,"Trying to use compute stress/tally with no pair style"); + error->all(FLERR,"Trying to use compute stress/tally without pair style"); else force->pair->add_tally_callback(this); if (force->pair->single_enable == 0 || force->pair->manybody_flag) - error->all(FLERR,"Compute stress/tally used with incompatible pair style."); + error->warning(FLERR,"Compute stress/tally used with incompatible pair style"); if ((comm->me == 0) && (force->bond || force->angle || force->dihedral || force->improper || force->kspace)) diff --git a/src/min.cpp b/src/min.cpp index 79d7d6a8bd..d308efb848 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -187,6 +187,8 @@ void Min::setup(int flag) update->minimize_style); if (flag) { fprintf(screen," Unit style : %s\n", update->unit_style); + fprintf(screen," Current step : " BIGINT_FORMAT "\n", + update->ntimestep); timer->print_timeout(screen); } } @@ -196,7 +198,12 @@ void Min::setup(int flag) // cannot be done in init() b/c update init() is before modify init() nextra_global = modify->min_dof(); - if (nextra_global) fextra = new double[nextra_global]; + if (nextra_global) { + fextra = new double[nextra_global]; + if (comm->me == 0 && screen) + fprintf(screen,"WARNING: Energy due to %d extra global DOFs will" + " be included in minimizer energies\n",nextra_global); + } // compute for potential energy diff --git a/src/min.h b/src/min.h index 464018e825..021198bc09 100644 --- a/src/min.h +++ b/src/min.h @@ -123,6 +123,12 @@ Minimization requires that neigh_modify settings be delay = 0, every = changed them and will restore them to their original values after the minimization. +W: Energy due to X extra global DOFs will be included in minimizer energies + +When using fixes like box/relax, the potential energy used by the minimizer +is augmented by an additional energy provided by the fix. Thus the printed +converged energy may be different from the total potential energy. + E: Minimization could not find thermo_pe compute This compute is created by the thermo command. It must have been diff --git a/src/pair.h b/src/pair.h index 3f66c6095a..dd859e5f2a 100644 --- a/src/pair.h +++ b/src/pair.h @@ -194,8 +194,8 @@ class Pair : protected Pointers { int num_tally_compute; class Compute **list_tally_compute; public: - void add_tally_callback(class Compute *); - void del_tally_callback(class Compute *); + virtual void add_tally_callback(class Compute *); + virtual void del_tally_callback(class Compute *); protected: int instance_me; // which Pair class instantiation I am diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 03e55006fc..fa79f1cf97 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -33,7 +33,7 @@ using namespace LAMMPS_NS; PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp), styles(NULL), keywords(NULL), multiple(NULL), nmap(NULL), - map(NULL), special_lj(NULL), special_coul(NULL) + map(NULL), special_lj(NULL), special_coul(NULL), compute_tally(NULL) { nstyles = 0; @@ -62,6 +62,7 @@ PairHybrid::~PairHybrid() delete [] special_lj; delete [] special_coul; + delete [] compute_tally; delete [] svector; @@ -169,6 +170,23 @@ void PairHybrid::compute(int eflag, int vflag) if (vflag_fdotr) virial_fdotr_compute(); } + +/* ---------------------------------------------------------------------- */ + +void PairHybrid::add_tally_callback(Compute *ptr) +{ + for (int m = 0; m < nstyles; m++) + if (compute_tally[m]) styles[m]->add_tally_callback(ptr); +} + +/* ---------------------------------------------------------------------- */ + +void PairHybrid::del_tally_callback(Compute *ptr) +{ + for (int m = 0; m < nstyles; m++) + if (compute_tally[m]) styles[m]->del_tally_callback(ptr); +} + /* ---------------------------------------------------------------------- */ void PairHybrid::compute_inner() @@ -253,6 +271,8 @@ void PairHybrid::settings(int narg, char **arg) special_lj = new double*[narg]; special_coul = new double*[narg]; + compute_tally = new int[narg]; + // allocate each sub-style // allocate uses suffix, but don't store suffix version in keywords, // else syntax in coeff() will not match @@ -272,6 +292,7 @@ void PairHybrid::settings(int narg, char **arg) styles[nstyles] = force->new_pair(arg[iarg],1,dummy); force->store_style(keywords[nstyles],arg[iarg],0); special_lj[nstyles] = special_coul[nstyles] = NULL; + compute_tally[nstyles] = 1; jarg = iarg + 1; while (jarg < narg && !force->pair_map->count(arg[jarg])) jarg++; @@ -782,6 +803,20 @@ void PairHybrid::modify_params(int narg, char **arg) iarg += 5; } + // if 2nd keyword (after pair) is compute/tally: + // set flag to register USER-TALLY computes accordingly + + if (iarg < narg && strcmp(arg[iarg],"compute/tally") == 0) { + if (narg < iarg+2) + error->all(FLERR,"Illegal pair_modify compute/tally command"); + if (strcmp(arg[iarg+1],"yes") == 0) { + compute_tally[m] = 1; + } else if (strcmp(arg[iarg+1],"no") == 0) { + compute_tally[m] = 0; + } else error->all(FLERR,"Illegal pair_modify compute/tally command"); + iarg += 2; + } + // apply the remaining keywords to the base pair style itself and the // sub-style except for "pair" and "special". // the former is important for some keywords like "tail" or "compute" diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index e3de3b022a..b8b9af5f40 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -55,6 +55,9 @@ class PairHybrid : public Pair { int check_ijtype(int, int, char *); + virtual void add_tally_callback(class Compute *); + virtual void del_tally_callback(class Compute *); + protected: int nstyles; // # of sub-styles Pair **styles; // list of Pair style classes @@ -69,6 +72,7 @@ class PairHybrid : public Pair { int ***map; // list of sub-styles itype,jtype points to double **special_lj; // list of per style LJ exclusion factors double **special_coul; // list of per style Coulomb exclusion factors + int *compute_tally; // list of on/off flags for tally computes void allocate(); void flags(); diff --git a/tools/msi2lmp/README b/tools/msi2lmp/README index a20f6e893f..db9b1aca5e 100644 --- a/tools/msi2lmp/README +++ b/tools/msi2lmp/README @@ -1,98 +1,50 @@ -Axel Kohlmeyer is the current maintainer of the msi2lmp tool. -Please send any inquiries about msi2lmp to the lammps-users mailing list. -06 Oct 2016 Axel Kohlmeyer + msi2lmp.exe -Improved whitespace handling in parsing topology and force field -files to avoid bogus warnings about type name truncation. +This code has several known limitations listed below under "LIMITATIONS" +(and possibly some unknown ones, too) and is no longer under active +development. Only the occasional bugfix is applied. -24 Oct 2015 Axel Kohlmeyer +Please send any inquiries about msi2lmp to the lammps-users +mailing list and not to individual people. -Added check to make certain that force field files -are consistent with the notation of non-bonded parameters -that the msi2lmp code expects. For Class 1 and OPLS-AA -the A-B notation with geometric mixing is expected and for -Class 2 the r-eps notation with sixthpower mixing. +------------------------------------------------------------------------ -11 Sep 2014 Axel Kohlmeyer +OVERVIEW -Refactored ReadMdfFile.c so it more consistently honors -the MAX_NAME and MAX_STRING string length defines and -potentially handles inputs with long names better. +This is the third version of a program that generates a LAMMPS data file +based on the information in MSI .car (atom coordinates), .mdf (molecular +topology) and .frc (forcefield) files. The .car and .mdf files are +specific to a molecular system while the .frc file is specific to a +forcefield version. The only coherency needed between .frc and +.car/.mdf files are the atom types. -27 May 2014 Axel Kohlmeyer +The first version was written by Steve Lustig at Dupont, but required +using Discover to derive internal coordinates and forcefield parameters -Added TopoTools style type hints as comments to all Mass, PairCoeff, -BondCoeff, AngleCoeff, DihedralCoeff, ImproperCoeff entries. -This should make it easier to identify force field entries with -the structure and force field map in the data file later. +The second version was written by Michael Peachey while an intern in the +Cray Chemistry Applications Group managed by John Carpenter. This +version derived internal coordinates from the mdf file and looked up +parameters in the frc file thus eliminating the need for Discover. -06 Mar 2014 Axel Kohlmeyer +The third version was written by John Carpenter to optimize the +performance of the program for large molecular systems (the original +code for deriving atom numbers was quadratic in time) and to make the +program fully dynamic. The second version used fixed dimension arrays +for the internal coordinates. -Fixed a bug in handling of triclinic cells, where the matrices to -convert to and from fractional coordinates were incorrectly built. +The third version was revised in Fall 2011 by Stephanie Teich-McGoldrick +to add support non-orthogonal cells. -26 Oct 2013 Axel Kohlmeyer +The next revision was started in Summer/Fall 2013 by Axel Kohlmeyer to +improve portability to Windows compilers, clean up command line parsing +and improve compatibility with the then current LAMMPS versions. This +revision removes compatibility with the obsolete LAMMPS version written +in Fortran 90. -Implemented writing out force field style hints in generated data -files for improved consistency checking when reading those files. -Also added writing out CGCMM style comments to identify atom types. +INSTALLATION & USAGE -08 Oct 2013 Axel Kohlmeyer - -Fixed a memory access violation with Class 2 force fields. -Free all allocated memory to better detection of memory errors. -Print out version number and data with all print levels > 0. -Added valgrind checks to the regression tests - -08 Oct 2013 Axel Kohlmeyer - -Fixed a memory access violation with Class 2 force fields. -Free all allocated memory to better detection of memory errors. -Print out version number and data with all print levels > 0. -Added valgrind checks to the regression tests - -02 Aug 2013 Axel Kohlmeyer - -Added rudimentary support for OPLS-AA based on -input provided by jeff greathouse. - -18 Jul 2013 Axel Kohlmeyer - -Added support for writing out image flags -Improved accuracy of atom masses -Added flag for shifting the entire system -Fixed some minor logic bugs and prepared -for supporting other force fields and morse style bonds. - -12 Jul 2013 Axel Kohlmeyer - -Fixed the bug that caused improper coefficients to be wrong -Cleaned up the handling of box parameters and center the box -by default around the system/molecule. Added a flag to make -this step optional and center the box around the origin instead. -Added a regression test script with examples. - -1 Jul 2013 Axel Kohlmeyer - -Cleanup and improved port to windows. -Removed some more static string limits. -Added print level 3 for additional output. -Make code stop at missing force field parameters -and added -i flag to override this. -Safer argument checking. -Provide short versions for all flags. - -23 Sep 2011 - -added support for triclinic boxes -see msi2lmp/TriclinicModification.pdf doc for details - ------------------------------ - - msi2lmp V3.6 4/10/2005 - - This program uses the .car and .mdf files from MSI/Biosyms's INSIGHT +This program uses the .car and .mdf files from MSI/Biosyms's INSIGHT program to produce a LAMMPS data file. 1. Building msi2lmp @@ -178,50 +130,111 @@ see msi2lmp/TriclinicModification.pdf doc for details -- the LAMMPS data file is written to .data protocol and error information is written to the screen. -**************************************************************** -* -* msi2lmp -* -* This is the third version of a program that generates a LAMMPS -* data file based on the information in MSI .car (atom -* coordinates), .mdf (molecular topology) and .frc (forcefield) -* files. The .car and .mdf files are specific to a molecular -* system while the .frc file is specific to a forcefield version. -* The only coherency needed between .frc and .car/.mdf files are -* the atom types. -* -* The first version was written by Steve Lustig at Dupont, but -* required using Discover to derive internal coordinates and -* forcefield parameters -* -* The second version was written by Michael Peachey while an -* intern in the Cray Chemistry Applications Group managed -* by John Carpenter. This version derived internal coordinates -* from the mdf file and looked up parameters in the frc file -* thus eliminating the need for Discover. -* -* The third version was written by John Carpenter to optimize -* the performance of the program for large molecular systems -* (the original code for deriving atom numbers was quadratic in time) -* and to make the program fully dynamic. The second version used -* fixed dimension arrays for the internal coordinates. -* -* The current maintainer is only reluctantly doing so because John Mayo no longer -* needs this code. -* -* V3.2 corresponds to adding code to MakeLists.c to gracefully deal with -* systems that may only be molecules of 1 to 3 atoms. In V3.1, the values -* for number_of_dihedrals, etc. could be unpredictable in these systems. -* -* V3.3 was generated in response to a strange error reading a MDF file generated by -* Accelys' Materials Studio GUI. Simply rewriting the input part of ReadMdfFile.c -* seems to have fixed the problem. -* -* V3.4 and V3.5 are minor upgrades to fix bugs associated mostly with .car and .mdf files -* written by Accelys' Materials Studio GUI. -* -* V3.6 outputs to LAMMPS 2005 (C++ version). -* -* Contact: Kelly L. Anderson, kelly.anderson@cantab.net -* -* April 2005 +------------------------------------------------------------------------ + +LIMITATIONS + +msi2lmp has the following known limitations: + +- there is no support to select morse bonds over harmonic bonds +- there is no support for auto-equivalences to supplement fully + parameterized interactions with heuristic ones +- there is no support for bond increments + +------------------------------------------------------------------------ + +CHANGELOG + +06 Oct 2016 Axel Kohlmeyer + +Improved whitespace handling in parsing topology and force field +files to avoid bogus warnings about type name truncation. + +24 Oct 2015 Axel Kohlmeyer + +Added check to make certain that force field files are consistent with +the notation of non-bonded parameters that the msi2lmp code expects. +For Class 1 and OPLS-AA the A-B notation with geometric mixing is +expected and for Class 2 the r-eps notation with sixthpower mixing. + +11 Sep 2014 Axel Kohlmeyer + +Refactored ReadMdfFile.c so it more consistently honors the MAX_NAME +and MAX_STRING string length defines and potentially handles inputs +with long names better. + +27 May 2014 Axel Kohlmeyer + +Added TopoTools style type hints as comments to all Mass, PairCoeff, +BondCoeff, AngleCoeff, DihedralCoeff, ImproperCoeff entries. +This should make it easier to identify force field entries with +the structure and force field map in the data file later. + +06 Mar 2014 Axel Kohlmeyer + +Fixed a bug in handling of triclinic cells, where the matrices to +convert to and from fractional coordinates were incorrectly built. + +26 Oct 2013 Axel Kohlmeyer + +Implemented writing out force field style hints in generated data +files for improved consistency checking when reading those files. +Also added writing out CGCMM style comments to identify atom types. + +08 Oct 2013 Axel Kohlmeyer + +Fixed a memory access violation with Class 2 force fields. Free all +allocated memory to better detection of memory errors. Print out +version number and data with all print levels > 0. Added valgrind +checks to the regression tests. + +02 Aug 2013 Axel Kohlmeyer + +Added rudimentary support for OPLS-AA based on input provided +by jeff greathouse. + +18 Jul 2013 Axel Kohlmeyer + +Added support for writing out image flags. Improved accuracy of atom +masses. Added flag for shifting the entire system. Fixed some minor +logic bugs and prepared for supporting other force fields and morse +style bonds. + +12 Jul 2013 Axel Kohlmeyer + +Fixed the bug that caused improper coefficients to be wrong. Cleaned up +the handling of box parameters and center the box by default around the +system/molecule. Added a flag to make this step optional and center the +box around the origin instead. Added a regression test script with +examples. + +1 Jul 2013 Axel Kohlmeyer + +Cleanup and improved port to windows. Removed some more static string +limits. Added print level 3 for additional output. Make code stop at +missing force field parameters and added -i flag to override this. +Safer argument checking. Provide short versions for all flags. + +23 Sep 2011 + +added support for triclinic boxes + +V3.6 outputs to LAMMPS 2005 (C++ version). + +Contact: Kelly L. Anderson, kelly.anderson@cantab.net + +V3.4 and V3.5 are minor upgrades to fix bugs associated mostly with .car + and .mdf files written by Accelys' Materials Studio GUI. April 2005 + +V3.3 was generated in response to a strange error reading a MDF file +generated by Accelys' Materials Studio GUI. Simply rewriting the input +part of ReadMdfFile.c seems to have fixed the problem. + +V3.2 corresponds to adding code to MakeLists.c to gracefully deal with +systems that may only be molecules of 1 to 3 atoms. In V3.1, the values +for number_of_dihedrals, etc. could be unpredictable in these systems. + +----------------------------- + + msi2lmp v3.9.8 6/10/2016 + diff --git a/tools/msi2lmp/src/GetParameters.c b/tools/msi2lmp/src/GetParameters.c index e183c529e0..192b4d296c 100644 --- a/tools/msi2lmp/src/GetParameters.c +++ b/tools/msi2lmp/src/GetParameters.c @@ -136,7 +136,7 @@ void GetParameters() if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) { bondtypes[i].params[0] = ff_bond.data[k].ff_param[1]; bondtypes[i].params[1] = ff_bond.data[k].ff_param[0]; - } + } if (forcefield & FF_TYPE_CLASS2) { for (j=0; j < 4; j++) diff --git a/tools/msi2lmp/src/InitializeItems.c b/tools/msi2lmp/src/InitializeItems.c index 4df9fd0f10..1e33636913 100644 --- a/tools/msi2lmp/src/InitializeItems.c +++ b/tools/msi2lmp/src/InitializeItems.c @@ -68,7 +68,7 @@ void InitializeItems(void) if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) { strcpy(ff_tor.keyword,"#torsion_1"); ff_tor.number_of_parameters = 3; - } + } if (forcefield & FF_TYPE_CLASS2) { strcpy(ff_tor.keyword,"#torsion_3"); diff --git a/tools/msi2lmp/src/WriteDataFile.c b/tools/msi2lmp/src/WriteDataFile.c index 498978406f..c03eba71c5 100644 --- a/tools/msi2lmp/src/WriteDataFile.c +++ b/tools/msi2lmp/src/WriteDataFile.c @@ -144,7 +144,7 @@ void WriteDataFile(char *nameroot) else if (forcefield & FF_TYPE_CLASS2) fputs(" # class2\n\n",DatF); } else fputs("\n\n",DatF); - + for (i=0; i < no_angle_types; i++) { fprintf(DatF, " %3i", i+1); for ( j = 0; j < m; j++) diff --git a/tools/msi2lmp/src/msi2lmp.c b/tools/msi2lmp/src/msi2lmp.c index c94d4b4d73..15cfddd258 100644 --- a/tools/msi2lmp/src/msi2lmp.c +++ b/tools/msi2lmp/src/msi2lmp.c @@ -142,9 +142,6 @@ * and to make the program fully dynamic. The second version used * fixed dimension arrays for the internal coordinates. * -* John Carpenter can be contacted by sending email to -* jec374@earthlink.net -* * November 2000 */ @@ -356,7 +353,7 @@ int main (int argc, char *argv[]) if (centerflag) puts(" Output is recentered around geometrical center"); if (hintflag) puts(" Output contains style flag hints"); else puts(" Style flag hints disabled"); - printf(" System translated by: %g %g %g\n",shift[0],shift[1],shift[2]); + printf(" System translated by: %g %g %g\n",shift[0],shift[1],shift[2]); } n = 0; @@ -374,7 +371,7 @@ int main (int argc, char *argv[]) if (n == 0) { if (iflag > 0) fputs(" WARNING",stderr); else fputs(" Error ",stderr); - + fputs("- forcefield name and class appear to be inconsistent\n\n",stderr); if (iflag == 0) return 7; } diff --git a/tools/msi2lmp/src/msi2lmp.h b/tools/msi2lmp/src/msi2lmp.h index 377ab1a6c3..4716f719d6 100644 --- a/tools/msi2lmp/src/msi2lmp.h +++ b/tools/msi2lmp/src/msi2lmp.h @@ -24,13 +24,13 @@ * and to make the program fully dynamic. The second version used * fixed dimension arrays for the internal coordinates. * -* The thrid version was revised in Fall 2011 by +* The third version was revised in Fall 2011 by * Stephanie Teich-McGoldrick to add support non-orthogonal cells. * * The next revision was started in Summer/Fall 2013 by * Axel Kohlmeyer to improve portability to Windows compilers, * clean up command line parsing and improve compatibility with -* the then current LAMMPS versions. This revision removes +* the then current LAMMPS versions. This revision removes * compatibility with the obsolete LAMMPS version written in Fortran 90. */