[lammps-users] Using molecule command for fix_gcmc implementation

Hello All,

I have the following molecule template which I am trying to get read by LAMMPS but I’m encountering the repeated error saying “Unknown section in molecule file”. I cannot seem to find out how my template is differing from the documentation page for molecule command. Can anyone help me out with this? I am using the LAMMPS version of 7th Aug 2019.

LAMMPS molecule file for fix_gcmc command, version 17 Aug 2019

8 atoms
7 bonds
6 angles
5 dihedrals

Coords # line syntax: ID x y z

1 8.655806000694584e-11 3.655472633943652e-10 2.143935356832895e-10
2 9.516117669300782e-10 3.026898792026158e-10 2.255953865385892e-10
3 8.712101384263634e-10 3.423087047366610e-10 9.379577047640335e-11
4 7.286655201220055e-10 2.869197257653652e-10 7.799415167125139e-11
5 6.510311466739685e-10 4.064966101378155e-10 2.004598109885467e-11
6 5.524494431412364e-10 4.761089070836695e-10 1.174327190113998e-10
7 6.157971329664747e-10 5.579013892259024e-10 2.214699296145166e-10
8 7.649805934777869e-10 5.919104211085404e-10 2.410021638431197e-10

Types # line syntax: ID type

1 1
2 2
3 2
4 2
5 2
6 2
7 2
8 1

Molecules # line syntax: ID molecule-ID

1 91
2 91
3 91
4 91
5 91
6 91
7 91
8 91

Charges # line syntax: ID q

1 0.000000000000000e+00
2 0.000000000000000e+00
3 0.000000000000000e+00
4 0.000000000000000e+00
5 0.000000000000000e+00
6 0.000000000000000e+00
7 0.000000000000000e+00
8 0.000000000000000e+00

Bonds # line syntax: ID type atom1 atom2

1 91 1 2
2 91 2 3
3 91 3 4
4 91 4 5
5 91 5 6
6 91 6 7
7 91 7 8

Angles # line syntax: ID type atom1 atom2 atom3

1 91 1 2 3
2 91 2 3 4
3 91 3 4 5
4 91 4 5 6
5 91 5 6 7
6 91 6 7 8

Dihedrals # line syntax: ID type atom1 atom2 atom3 atom4

1 91 1 2 3 4
2 91 2 3 4 5
3 91 3 4 5 6
4 91 4 5 6 7
5 91 5 6 7 8

Molecule files may not have comments in the section headers.

axel.

Hello All,

Thanks for the clarification. Yes, I have tried removing the comments and keeping just the section headers but it still won’t work. The job script fails with the same error message.

that is because you are using an old version of LAMMPS but were looking at the documentation for a more recent version.
support for the “Molecules” section was added in 2020.
so your molecule file does not conform to the documentation (for your version).

axel.

FWIW, support for comments in the section headers will be added to LAMMPS soon.