how to prepare molecule file for lammps

Dear lammps users and developers,

I trying to use the command “molecule ID file1”. I am unable to prepare molecule file in the required format. I want to prepare molecule file for water. Is there any script or tool to directly prepare molecule file for lammps. Can someone suggest an sample molecule file (as an example)so that i can cross check with it.

Thanks & Regards,

K. Mohan

1 Like

There are some molecule files in the "Examples" directory (e.g., LAMMPSDIR/Examples/deposit). "Coords" and "Types" sections are sufficient for a correct molecule.

Thanks you sir for a reply. I have seen the example molecule.dimer I could run the gcmc calculation now.

Thanks & Regards,

K. Mohan

Dear lammps users and developers,
                                                          I trying to use
the command "molecule ID file1". I am unable to prepare molecule file
in the required format. I want to prepare molecule file for water. Is there
any script or tool to directly prepare molecule file for lammps.

The "molecule" command is a relatively new addition to LAMMPS. Until
then, "DATA" files were used to specify molecules in LAMMPS.
The format of the files in the molecule command is similar to the
format of LAMMPS data files. Since DATA files have been around for a
long time, there are several programs which can create them. If it
helps, here is a list of software you can use to prepare LAMMPS data
files:

"DATA" files are explained here:

After creating a DATA file with your molecule, you will have to split
the "Atoms" section of the newly created DATA file into columns in
order to extract the x,y,z coordinates, charges, and atom types,
because this information must be specified in separate sections of a
molecule template file (as read by the "molecule" command).

Can
someone suggest an sample molecule file (as an example)so that i can cross
check with it.

An .LT file (in "moltemplate" format) defining a water molecule is
available here:
http://www.moltemplate.org/examples/nanotube+water/spce.lt
The write("Data Atoms") {...} section of that file contains the
coordinates and charges. The Lennard-Jones parameters, bond-lengths,
bond-angles and shake-constraints for SPCE water are located in the
write_once("In Settings") section. (I'm sure you can find this
information elsewhere too.)

  There is a tool named "moltemplate", but currently, it is only able
to make LAMMPS "data" and input script files (but not yet "molecule
template" files readable by the "molecule" command). I realize this
is confusing. I could be persuaded to modify moltemplate to conform
to the syntax of the new molecule command if there is demand for it.
It should not be hard to do.

Andrew