Molecule file - error in fix gcmc

Dear lammps users and experts,

I have doubt regarding the preparation of molecule file and got clarified in my previous mail. I am preparing the molecule file as described in manual and examples. Here is molecule file for water,

3 atoms
2 bonds
1 angles

Coords

1 -1.958940 -0.032063 0.725554
2 -0.607485 0.010955 0.056172
3 -1.538963 0.004548 -0.117331

Types
1 2
2 3
3 3

Charges
1 -0.8
2 0.4
3 0.4

Diameters
1 2
2 1
3 1

Masses

1 16
2 1
3 1

Bonds

1 1 1 3
2 2 2 3

Angles

1 1 1 3 2

My question is as follows, I want to insert this water molecules using fixgcmc in to surface. I have taken the atom type in fixgcmc as zero [ since this is molecule]. I use the following gcmc commands and got the following error,

molecule monomer water.monomer
fix 1 all gcmc 10 100 100 0 29494 298.0 -0.5 0.01 mol monomer

ERROR: Invalid atom type in fix gcmc mol command. Please help me to rectify this error.

Note: The surface that i am using has 11 atom types.

Thanks & regards,

K. Mohan

How many atom types did you define in your input script?
If it’s less than 3 you will get an error. E.g. via
the read_data or create_box commands.

Steve

Hello Sir,

I have defined only two types of atoms, since it is water molecule only oxygen and hydrogen.

Thanks & Regards,

Mohan

well, your molecule file defines the types of the 3 atoms
as 2 and 3, so LAMMPS requires that you have defined
a system that allows for 3 or more types. If you had set
the types to be 99 and 100, LAMMPS would require
that you have a system allowing for 100 types. LAMMPS
isn’t going to change your types = 2,3 into types 1

and 2.

Steve

Hello Steve Sir,

Thanks for a quick reply. Even if i change the types to 1 and 2, i still get the same error(Invalid atom type in fix gcmc mol command). How can i define a molecule file which has only two atom types (ex: water). Please suggest me a way.

Thanking you,

Mohan

Hello Steve Sir,
                Thanks for a quick reply. Even if i change the types to 1
and 2, i still get the same error(Invalid atom type in fix gcmc mol
command). How can i define a molecule file which has only two atom types
(ex: water). Please suggest me a way.

this is leading nowhere. the way how to do things is documented in the
manual. it *works*. read it, read it again, and again and follow
exactly what is given there. if it doesn't work, please provide a
_simple_ example input deck that demonstrates, where LAMMPS doesn't do
what it says in the documentation.

it is next to impossible to give advice on "this doesn't work", if you
only provide a small piece of information.

also, please always state, which version of LAMMPS you are using and
if you confirm a deviation from the documented behavior, please update
to the latest version and check again, before reporting any issues.

in general, please understand that it is *your* job to figure out how
you map your problem to the features that LAMMPS provides and not
ours.

thanks for your understanding,
      axel.

Ok sir,

I will read it again and then try to fix. I am currently using lammps28JUN14 version.

Thanks & regards,

Mohan

Sorry sir for not stating my question clearly. My apologies. My question is as follows,

  1. I want to insert water molecules in to a porus substrate using fix gcmc. I have fixed the substrate and defined water molecules using molecule command. Please check below the molecule file defined for water, It contains 2 atom types, 2 bonds and 1 angle. Here 3 is oxygen.
    3 atoms
    2 bonds
    1 angles

Coords

1 -1.958940 -0.032063 0.725554
2 -0.607485 0.010955 0.056172
3 -1.538963 0.004548 -0.117331

Types
1 1
2 1
3 2

Charges
1 0.4
2 0.4
3 -0.8

Diameters
1 1
2 1
3 2

Masses

1 1
2 1
3 16

Bonds

1 1 1 3
2 2 2 3

Angles

1 1 1 3 2

The substrate file has the following atom types,
Created by charmm2lammps v1.8.1 on Wed Oct 8 11:25:11 IST 2014

5216 atoms
512 bonds
0 angles
0 dihedrals
0 impropers

11 atom types
2 bond types
0 angle types
0 dihedral types
0 improper types

0.006 41.304 xlo xhi
0.011 71.711 ylo yhi
0.272 27.195 zlo zhi

Masses

1 15.999
2 15.999
3 15.999
4 15.999
5 15.999
6 24.305
7 22.9
8 28.086
9 26.982
10 26.982
11 1.008

I am not writing entire file as it is lengthy. Now i minimize the system and use the following command in input file i.e,

molecule monomer water.monomer
fix 1 all gcmc 10 100 100 0 29494 298.0 -0.5 0.01 mol monomer

Here i mentioned type as zero. I do not know whether the molecule file i prepared is wrong or the type that I used in fix gcmc command is wrong. I am trying to understand the type in fixgcmc. Please help me to understand this error. I am using recent version i.e, lammps_28jun14.

Thanks for your reply in advance.

Thanks,

Mohan

[...]

I am not writing entire file as it is lengthy. Now i minimize the system and

then create *another* input deck that is short and uses then same gcmc
command and post that one. not only does it make debugging any
problems easier, it also is a very good strategy to learn a new method
and narrow down problems.

use the following command in input file i.e,

molecule monomer water.monomer
fix 1 all gcmc 10 100 100 0 29494 298.0 -0.5 0.01 mol monomer

Here i mentioned type as zero. I do not know whether the molecule file i
prepared is wrong or the type that I used in fix gcmc command is wrong. I
am trying to understand the type in fixgcmc. Please help me to understand
this error. I am using recent version i.e, lammps_28jun14.

recent is not the latest. nobody will look seriously into what your
problem is unless you confirm that the same issue still exists with
the very latest patch level version. the facility you are using is
fairly new and we just had additional bugfixes to the molecule command
included in the 8 oct 2014 patch.

axel.

Hello Sir,

I have used only two atoms in the molecule file and same substrate and ran gcmc with following commands,

molecule 10 co.txt
group co2 molecule 10

fix 3 co2 gcmc 1 10 10 0 123456 298.0 -0.5 0.1 mol 10. This is running and i could see some molecules inside substrate. The input co.txt molecule is as follows,

#co2 file taken from the question
2 atoms
1 bonds

Coords

1 0.0 0.0 0.0
2 -1.163 0.0 0.0

Types

1 12
2 13

Charges

1 0.6645
2 -0.33275

Bonds

1 1 1 2

Special Bond Counts

1 1 0 0
2 1 0 0

Special Bonds

1 2
2 1

i cannot give advice to people that don't follow what they get told.

have a nice day,
     axel.

Hello Sir,

I have taken small system consisting of two atoms in molecule file [ substrate is same] and i reduced it from earlier 3 atoms. I figured out that type 0 should be mentioned in fixgcmc command and include atoms in molecule file in read.data file. It works fine [used same fixgcmc command], so i moved to 3 atom case. I will work out with new patch [require some time to compile] and will report asap.

Thanks & Regards,

Mohan

ERROR: Molecule topology type exceeds system topology type. My substrate molecule does not have angle. Is this >cause for the error? Please help me to understand this error and solve it.

This error occurs because you are defining bond & angle types in your molecule file
when you have not defined (enough) of those types in your main LAMMPS script.

E.g. you can’t have an input script with no angle types, then insert molecules

that have angles.

See the read_data and create_box commands - they have options to define
angle (or other) topology types, even if your initial system has no molecules.

Steve