Molecule file unknown section

Hello,

So I need some help inserting a molecule into a MOF system (loaded through the read_data command). When I try to do this I get this error message:

"ERROR on proc 0: Unknown section in molecule file (…/molecule.cpp:579)

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1

:

system msg for write_line failure : Bad file descriptor

srun: error: smp-n0: task 0: Exited with exit code 1"

I am confused as to what exactly is missing in the molecule file, however, as I am positive it is in the same format as any other data file. The data file goes as followed:

#dmmp molecule file for insertions via insert, etc

7 atoms

6 bonds

8 angles

6 dihedrals

0 impropers

7 atom types

4 bond types

5 angle types

3 dihedral types

0 improper types

0.000000 4.000000 xlo xhi

0.000000 3.000000 ylo yhi

0.000000 4.000000 zlo zhi

Pair Coeffs

Hello,

So I need some help inserting a molecule into a MOF system (loaded through the read_data command). When I try to do this I get this error message:

"ERROR on proc 0: Unknown section in molecule file (../molecule.cpp:579)

application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1

:

system msg for write_line failure : Bad file descriptor

srun: error: smp-n0: task 0: Exited with exit code 1"

I am confused as to what exactly is missing in the molecule file, however, as I am positive it is in the same format as any other data file. The data file goes as followed:

the format for molecule files is *similar* to data files, but it is *different*.
for example, you have box information in the header section, which is
not supported by molecule files.
please have a closer look at the documentation for the molecule
command, which has a detailed description of the format.

axel.

I changed the formatting, but still getting the same exact message, the there is an “unknown section”. Seems like it has the necessary sections though.

Here is the file script in question:

#dmmp molecule file for insertions via insert, etc

7 atoms
6 bonds
8 angles
6 dihedrals
0 impropers

Coords
#id x y z
1 0.202080 0.835975 0.000000 # C2 x y z
2 0.782122 1.408292 1.605227 # P x y z
3 0.870064 0.000000 2.402085 # O1 x y z
4 2.321516 1.879435 1.416531 # O1 x y z
5 0.000000 2.474808 2.255437 # O2 x y z
6 1.072747 0.070400 3.842078 # C1 x y z
7 3.320902 0.960021 0.912956 # C1 x y z

Types
#id type
1 1 #c2
2 2 #p
3 3 #o1
4 4 #o1
5 5 #o2
6 6 #c1
7 7 #c1

Charges
#id charge
1 -0.021000 #c2
2 1.170000 #p
3 -0.360000 #o1
4 -0.360000 #o1
5 -0.691000 #o2
6 0.135000 #c1
7 0.135000 #c1

Masses
#id mass
1 15.034500 #c2
2 30.976999 #p
3 15.999400 #o1
4 15.999400 #o1
5 15.999400 #o2
6 15.034500 #c1
7 15.034500 #c1

Bonds
#id type atom1 atom2
1 1 1 2 #c2 p
2 2 2 3 #p o1
3 2 2 4 #p o1
4 3 2 5 #p o2
5 4 3 6 #o1 c1
6 4 4 7 #o1 c1

Angles
#id type atom1 atom2 atom3
1 1 2 3 6 #p o1 c1
2 1 2 4 7 #p o1 c1
3 2 3 2 1 #o1 p c2
4 2 4 2 1 #o1 p c2
5 3 3 2 5 #o1 p o2
6 3 4 2 5 #o1 p o2
7 4 3 2 4 #o1 p o1
8 5 1 2 5 #c2 p o2

Dihedrals
#id type atom1 atom2 atom3 atom4
1 1 6 3 2 4 #c1 o1 p o1
2 1 7 4 2 3 #c1 o1 p o1
3 2 6 3 2 1 #c1 o1 p c2
4 2 7 4 2 1 #c1 o1 p c2
5 3 6 3 2 5 #c1 o1 p o2
6 3 7 4 2 5 #c1 o1 p o2

Best,
Dorian Thompson
University of Pittsburgh
Department of Chemical & Petroleum Engineering
Class of 2019

as far as i can tell, this input is correctly formatted and LAMMPS
seems to be working fine reading it, there must be something wrong on
your side, or you are using an outdated/buggy LAMMPS version. please
find details and proof below.

I changed the formatting, but still getting the same exact message, the there is an “unknown section”. Seems like it has the necessary sections though.

are you sure, you are reading the corrected file? it is difficult to
judge whether you are doing everything correctly without seeing the
full output and having a complete (minimal) input deck for testing
(and it is needlessly time consuming to figure out which settings are
required to build such an input file for testing and confirming, that
there is an issue or not).

also, are you using a reasonably recent LAMMPS version? when reporting
problems with running LAMMPS, you should *always* report the LAMMPS
version you are using (it is printed at the beginning of the output),
and - if at all possible - make a test with the very latest version of
LAMMPS (currently 12 December 2018).

your molecule file looks like it is supposed to be used with atom
style full and real units. if i use it with the following (made up)
minimal input file, there is no problem reading and parsing the
molecule file as well as creating a molecule and writing it out in a
data file using the current LAMMPS release. here is my input:

units real
region box block 0 10 0 10 0 10
atom_style full
create_box 7 box bond/types 4 extra/bond/per/atom 3 angle/types 5
extra/angle/per/atom 6 dihedral/types 3 extra/dihedral/per/atom 3
extra/special/per/atom 6
molecule dmmp dmmp.mol

create_atoms 0 single 5 5 5 mol dmmp 624526 units box

mass 1 15.0345
mass 2 30.9770
mass 3 15.9994
mass 4 15.9994
mass 5 15.9994
mass 6 15.0345
mass 7 15.0345

write_data dmmp_single.data

and the corresponding output:

[build]$ ./lmp -in in.mol
LAMMPS (12 Dec 2018)
  using 1 OpenMP thread(s) per MPI task
Created orthogonal box = (0 0 0) to (10 10 10)
  1 by 1 by 1 MPI processor grid
Read molecule dmmp:
  7 atoms with max type 7
  6 bonds with max type 4
  8 angles with max type 5
  6 dihedrals with max type 3
  0 impropers with max type 0
WARNING: Molecule attributes do not match system attributes
(src/molecule.cpp:1386)
Created 7 atoms
  Time spent = 0.00132084 secs
System init for write_data ...
Total wall time: 0:00:00

The warning message is due to the "Masses" section, that is not
consistent with atom style full (masses for this atom style are tied
to the atom type and thus need not be specified in a corresponding
molecule file. that section should be ignored and the masses must be
set via the "mass" command).
from the comments, it also looks to me, that your molecule has only 5
atom types and thus the file should be correspondingly updated (and
the LAMMPS input script to match those changes).

axel.

The edition of LAMMPS I am using is from March 31st, 2017. Yeah I am pretty stuck about how to go about this, as I am still getting the message of missing a section in the molecule file. I do not know if you would like to see all of what I have, but I am trying to upload a data file (the MOF) and then load the molecule file, then simulate the molecule going through the MOF. If it helps, the error appears while it is finding the 1-2 1-3 1-4 neighbors. If you can’t help anymore that’s fine, I still appreciate the help.

Best,
Dorian Thompson
University of Pittsburgh
Department of Chemical & Petroleum Engineering
Class of 2019

The edition of LAMMPS I am using is from March 31st, 2017. Yeah I am pretty stuck about how to go about this, as I am still getting the message of missing a section in the molecule file.

what do you mean by "missing a section"? the error you quoted was
about an "unknown section". those two are very different entities!
the first thing you should try, is to update to the latest LAMMPS version.

I do not know if you would like to see all of what I have, but I am trying to upload a data file (the MOF) and then load the molecule file, then simulate the molecule going through the MOF. If it helps, the error appears while it is finding the 1-2 1-3 1-4 neighbors.

this last statement makes no sense at all. you must be misreading things.

what you should do, if you still have errors after upgrading LAMMPS is
to start over and build a minimal input deck, that has a few atoms as
possible and as few commands as possible, yet still produces the
errors, that are troubling you. by doing this step by step and line by
line, you can narrow down where issues are and be removing lines of
input that do not affect the error and reducing the number of atoms,
you'll make it easier to debug this (and you don't have to post
complex/massive files).

If you can’t help anymore that’s fine, I still appreciate the help.

i can help more, but i need more and reliable (and not contradicting)
information. but most importantly, we have to make certain, that you
are not stuck with a bug that has already been fixed.

axel.