Creating molecule file for lammps to simulate molecule deposition via deposit command

Can any one pls guide me through creating a molecule file for lammps deposition. I a constantly facing error stating “invalid header keyword -atoms”

The file format is described in detail in the molecule command documentation. You just have to follow it exactly. Also, there are example files to compare to in the examples tree of the LAMMPS source code.

5 atoms
4 bonds
3 angles
0 dihedrals
0 impropers
3 atom types
1 bond types
2 angle types
0 dihedral types
0 improper types
-100.500000 100.500000 xlo xhi
-100.500000 100.500000 ylo yhi
-100.500000 100.500000 zlo zhi

#Pair Coeffs

#1 H
#2 O
#3 Zn

#Bond Coeffs

#1

#Angle Coeffs

#1 H-O-Zn
#2 O-Zn-O

Masses

1 1.007940 # H
2 15.999400 # O
3 65.408997 # Zn

Atoms

1 1 3 0.000000 -3.252650 1.833520 0.026960 # Zn
2 1 2 0.000000 -4.156230 1.216530 0.136940 # O
3 1 1 0.000000 -4.929850 1.762140 0.055230 # H
4 1 2 0.000000 -2.261190 1.362650 0.094320 # O
5 1 1 0.000000 -1.584740 2.020060 -0.020070 # H

#Types

#1 1 # Zn
#2 2 # O
#3 3 # H
#4 2 # O
#5 3 # H

Bonds

1 1 1 2
2 1 1 4
3 1 2 3
4 1 4 5

Angles

1 2 2 1 4
2 1 1 2 3
3 1 1 4 5

This is the moelcule file that have generated using VMD.
I have rechecked it, still not able to figure out my mistake.
will upload the file and error mssg

Can u pls help me in figuring out the mistake

This is a data file and not a molecule file.
It very obviously contradicts the requirements for molecule files as documented in the LAMMPS manual. If you compare the file to the molecule files included in some of the examples, the difference should become evident quickly.

VMD currently does not have the ability to create molecule files neither does it say anywhere in the LAMMPS or VMD TopoTools documentation that it has.

As already recommended, you must read the documentation carefully and apply it correctly.

Is anyone aware of a software capable of directly creating LAMMPS molecule file? Or at least converting data file to molecule file?

I suppose that such automated task would not be so trivial to write, given the numerous sections of a molecule file, such as Special Bond Counts or Shake Flags

Simon

Exactly. The problem is that several flags would be required to indicate the settings and sections required. Already output to data files is limited to a small selection of atom styles in both OVITO and VMD.

Since the “molecules” are usually small, it is just as well to write those files manually taking coordinates from a .xyz file or similar.

2 Likes

I have a modified version of topotools that read/writes molecule templates, as provided on the topotools Github. It currently needs to be synced and updated to include a couple of the newer sections added to molecule templates.

2 Likes

I have created a molecule file following LAMMPS documentation, but ones it is deposited, it is seen to detach from the central atom. Can any one help me in figuring out this issue