[lammps-users] Unknown section in molecule file

Dear All,

  1. I want to add a CO2 molecule to my simulation which I’m doing it using the molecule command. I prepared the .txt file based on the documentation (attached below). I get the error ‘Unknown section in molecule file’. Could you please help me resolve this?

  2. In addition (another minor point), I’ve updated the bonded and non-bonded forcefield parameters in the data file even for CO2. Considering both data and molecule file has charges specified, charges from what file will be considered?

LAMMPS data file. CGCMM style. atom_style full generated by VMD/TopoTools v1.7 on Mon Mar 08 22:26:25 +0100 2021
6 atoms
4 bonds
2 angles
0 dihedrals
0 impropers
2 atom types
1 bond types
1 angle types
0 dihedral types
0 improper types

Masses

1 12.010700 # CG
2 15.999400 # OG

Coords

1 7.824000 20.139000 36.959999 # CG UNL
2 8.141000 21.254000 36.921001 # OG UNL
3 7.506000 19.024000 36.999001 # OG UNL
4 3.923000 28.051001 35.743000 # CG UNL
5 3.137000 27.858999 34.910999 # OG UNL
6 4.709000 28.243999 36.574001 # OG UNL

Types

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

Bonds

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

Angles

1 1 2 1 3
2 1 5 4 6

Thank you very much.

Regards,
Kunal Mavani

Dear All,

  1. I want to add a CO2 molecule to my simulation which I’m doing it using the molecule command. I prepared the .txt file based on the documentation (attached below). I get the error ‘Unknown section in molecule file’. Could you please help me resolve this?

you molecule file is not according to the documentation. it is a hybrid between the data file format and the molecule file format. molecule files also don’t support comments, yet.
the error message confirms that. it will happen when a section is too short or has too many entries.

  1. In addition (another minor point), I’ve updated the bonded and non-bonded forcefield parameters in the data file even for CO2. Considering both data and molecule file has charges specified, charges from what file will be considered?

charges are assigned to the individual atoms, so any charges in the data file will be for the atoms in that file but irrelevant to the charges of added atoms. for those the charges listed in the molecule apply, if the molecule file is used to create additional atoms.

axel.