Molecule Command Yields Extra Atom Types

Hello everyone,

I’m currently using LAMMPS version 11Aug17 and have run into some strange issues which I believe trace back to the fact that my molecule command is behaving different than I expect it to. I could not find an explanation for this in the documentation.

The minimal version of the relevant bit of my input file is as follows:

atom_style hybrid sphere molecular
atom_modify map array sort 10000 2.0
boundary f f p
newton off
comm_modify mode single vel yes
dimension 3

Define regions

region 1 block -24 24 -0.6 0.6 0 460 side in
region 2 block -23.8 -6 -0.4 0.4 0.9999 1 side in
region 3 block 6 23.8 -0.4 0.4 0.9999 1 side in
region 4 union 2 2 3 side in

region f intersect 2 1 3 side out

Create box and atoms at the bottom

create_box 2 1
create_atoms 1 random 2850 89755 4

Set masses and sizes

set type 1 mass 1.0
set type 2 mass 1.0
set type 1 diameter 1.0
set type 2 diameter 1.0

Define molecule for doubles

molecule doubles doubles.txt

And my molecule file is very simple:

Molecule file for doubles

2 atoms

Coords
1 0.0 0.0 0.0
2 1.0 0.0 0.0

Types
1 2
2 2

When I execute my script, I notice the following in my log.lammps output when the molecule line of code is executed:

Define molecule for doubles

molecule doubles doubles.txt
Read molecule doubles:
2 atoms with 60 types
0 bonds with 0 types
0 angles with 0 types
0 dihedrals with 0 types
0 impropers with 0 types

This is strange as I expected to find only 2 atom types resulting from this. Is this behavior expected or is there something going wrong here?

Thank you for your time,
Justin

Hello everyone,

I'm currently using LAMMPS version 11Aug17 and have run into some strange
issues which I believe trace back to the fact that my molecule command is
behaving different than I expect it to. I could not find an explanation for
this in the documentation.

​please consider updating your LAMMPS version. there have been updates and
bugfixes to the molecule ​command and file reader.

The minimal version of the relevant bit of my input file is as follows:

atom_style hybrid sphere molecular
atom_modify map array sort 10000 2.0
boundary f f p
newton off
comm_modify mode single vel yes
dimension 3

# Define regions
region 1 block -24 24 -0.6 0.6 0 460 side in
region 2 block -23.8 -6 -0.4 0.4 0.9999 1 side in
region 3 block 6 23.8 -0.4 0.4 0.9999 1 side in
region 4 union 2 2 3 side in
region f intersect 2 1 3 side out

# Create box and atoms at the bottom
create_box 2 1
create_atoms 1 random 2850 89755 4

# Set masses and sizes
set type 1 mass 1.0
set type 2 mass 1.0
set type 1 diameter 1.0
set type 2 diameter 1.0

# Define molecule for doubles
molecule doubles doubles.txt

...

And my molecule file is very simple:

# Molecule file for doubles

2 atoms

Coords
1 0.0 0.0 0.0
2 1.0 0.0 0.0

Types
1 2
2 2

When I execute my script, I notice the following in my log.lammps output
when the molecule line of code is executed:

...
# Define molecule for doubles
molecule doubles doubles.txt
Read molecule doubles:
  2 atoms with 60 types
  0 bonds with 0 types
  0 angles with 0 types
  0 dihedrals with 0 types
  0 impropers with 0 types
...

This is strange as I expected to find only 2 atom types resulting from
this. Is this behavior expected or is there something going wrong here?

​most likely your molecule file is incorrectly formatted.
due to the flexible file format, there are only limited opportunities for
sanity checks, and thus reading incorrectly formatted molecule files can
result in all kinds of funny and unexpected behavior.

axel.​