hybrid

Hi dr.steve

my system includes polymer and H2O . for nonbonding ınterctıon I want to use class I forcefield for the H2O molecules and class II forcefield for polymers . I uesd these command

pair_style hybrid lj/class2/coul/long 22.0 lj/cut/coul/cut 22.0
pair_coeff 12 1 lj/cut/coul/cut 0.013 1.098
pair_coeff 12 2 lj/cut/coul/cut 0.013 1.098
.
.
pair_coeff 13 * lj/cut/coul/cut 0.0 0.0

my class II pair_coeff is in data file and class I pair_coeff is in input file. but I get error for my pair_coeff,

best
ramin

|

Ramin:

You don’t mention what the error message is. However, I’d suspect you’d be better off putting all of the pair coefficients in the script file rather than the data file if you’re using a hybrid force field. . . .

—AEI

Ahmed :
thanks for your response but as you know we can not put the Class II pair coeff in script file.

ERROR: Pair coeff for hybrid has invalid style (pair_hybrid.cpp:321)

ramin

Ramin:

The additional coefficients not corresponding to the standard LAMMPS potential types—such as the angle-bond type—need to be specified in the data file. However, that restriction should not apply to the pair_coeff specifications. (Even the LAMMPS manual says so!)

—AEI

Ramin:

The additional coefficients not corresponding to the standard LAMMPS potential types—such as the angle-bond type—need to be specified in the data file. However, that restriction should not apply to the pair_coeff specifications. (Even the LAMMPS manual says so!)

while ahmed is correct with respect to the pair coefficients, he is
not about the others.
in the current version of LAMMPS *all* class2 coefficients can be
provided via the input
script. check out:
http://lammps.sandia.gov/doc/angle_class2.html
http://lammps.sandia.gov/doc/dihedral_class2.html

the non-standard terms are prefixed by a short string.
that being said, just providing all pair coefficients in
the input should do. it is a necessity, since there
cannot be any mixing between atom types
when they are assigned to different hybrid pair styles.

cheers,
   axel.

This is no longer true. All class2 coeffs (pair, bond, angle, etc) can
be specified in either the data file or input script.

Steve

Sorry about the slip-up—it was true the last time I used the Class II force-field (which was admittedly many moons ago!).

Shows that it always pays to check the website for the latest details. . . .

—AEI

Ok thanks .But by this script file I got this ERROR on proc 1: All pair coeffs are not set (pair_hybrid.cpp:476).

My input file :

units real
boundary p p p
atom_style full

pair_style hybrid lj/cut/coul/cut 22.0 lj/class2/coul/long 22.0
kspace_style pppm 1.0e-5

special_bonds lj/coul 0.0 0.0 1.0
bond_style class2
angle_style class2
dihedral_style class2
improper_style none

neighbor 2.0 bin
neigh_modify every 1 delay 10 check yes one 5000 page 50000000

read_data PAAgCl44ge.lammps05

pair_coeff 12 12 lj/cut/coul/cut 0.1484 3.116
pair_coeff 13 13 lj/cut/coul/cut 0.0 0.0
pair_coeff 1 1 lj/class2/coul/long 0.1060000000 3.6000000000
pair_coeff 2 2 lj/class2/coul/long 0.0130000000 1.6500000000
pair_coeff 3 3 lj/class2/coul/long 0.0640000000 4.0100000000
pair_coeff 4 4 lj/class2/coul/long 0.0200000000 2.9950000000
pair_coeff 5 5 lj/class2/coul/long 0.1200000000 3.8100000000
pair_coeff 6 6 lj/class2/coul/long 0.1200000000 3.3080000000
pair_coeff 7 7 lj/class2/coul/long 0.2670000000 3.3000000000
pair_coeff 8 8 lj/class2/coul/long 0.2400000000 3.4200000000
pair_coeff 9 9 lj/class2/coul/long 0.0130000000 1.1100000000
pair_coeff 10 10 lj/class2/coul/long 0.0130000000 1.0980000000
pair_coeff 11 11 lj/class2/coul/long 0.0650000000 4.0700000000
pair_coeff 14 14 lj/class2/coul/long 0.2058 1.834
pair_coeff 15 15 lj/class2/coul/long 0.1001 4.4

.
.
.

best
ramin

Ok thanks .But by this script file I got this ERROR on proc 1: All pair coeffs are not set (pair_hybrid.cpp:476).

yes, and correctly so.
you only specify the "A A" terms,
but not the mixed "A B" terms.
with hybrid there is no automatic mixing,
so you have to do it manually.

which also leads to the question of whether
mixing and matching two different force fields
with different functional forms in this way is a
smart move in the first place. i contend that
it is not, since you have no rule for how to build
the terms consistently and unless you spend
an enormous amount of time of validating/optimizing
them independently, your results will be pretty
much useless.

using hybrid pair styles combining different functional
forms make the most sense, when you have different
segments with a simple and well defined interface, so
that you can use specific potential or interaction model
for the interactions between these two groups of atoms.

some food for thought, i hope...

cheers,
   axel.

Hi everyone,

I apologize since this is more of a VMD question:

Does anyone know of a way to automatically calculate the minimum simulation box size used to enclose a solid so that periodic boundaries form perfect periodic images, and the solid is “infinite” in all directions? If the box size is larger than the solid, a free surface will exist between the solid and the box. If the box is smaller than the solid, the periodic images will be wrapped back in the structure and atoms could overlap.

Specific question: Is there an automated feature that calculates the required box size for this scenario? Maybe a tcl script for VMD?

Thanks for your time,

Mike Bifano
Ph.D. Candidate
Case Western Reserve University
Office (216) 368-6444
Cell (717) 926-8950

There's not such thing as an "infinite" solid in a simulation ....Does it ?

Oscar G.

Starting with a simple cubic crystal with lattice constant a, if a simulation box (with periodic boundaries) was a/2 away from all of the sides, the material would not know that it had boundaries. At least that is what I was thinking.

I should preface this statement/question with the material is composed of pairwise potentials.

Mike Bifano
Ph.D. Candidate
Case Western Reserve University
Office (216) 368-6444
Cell (717) 926-8950

mike,

first off, please delete any content that has
nothing to do with your question before posting.

thanks.

Hi everyone,

I apologize since this is more of a VMD question:

Does anyone know of a way to automatically calculate the minimum simulation
box size used to enclose a solid so that periodic boundaries form perfect
periodic images, and the solid is "infinite" in all directions? If the box

that is (almost) impossible without a priori knowledge of the lattice,
or the space group for more complicated systems.

size is larger than the solid, a free surface will exist between the solid
and the box. If the box is smaller than the solid, the periodic images will
be wrapped back in the structure and atoms could overlap.

having a system that is a little bit too large should not be too bad.
you might be able to relax the box without moving the atoms.
search the documentation for dilate partial and set all atomic
velocities and forces to zero...

Specific question: Is there an automated feature that calculates the
required box size for this scenario? Maybe a tcl script for VMD?

the easiest way to get close enough might be to use
VMD to adjust the box dimensions empirically through
visualizing periodic boxes and adjusting the a/b/c lengths
e.g. via "molinfo" until it "looks perfect".

for anything "more perfect" you need to know the lattics,
so that you can try to infer the lattice constant from the
distances (provided you have more than one primitive
cell in your system) and then compute the box dimension
by making periodic images overlap with a continuation
of the repeat units of the lattice. this is quite complicated
without knowledge of the lattice (or space group for
more complex systems).

axel.

Axel,

Sorry about that attached email.

Thank you for the response. I’ve been “eyeing it up” using molinfo with VMD. The lattice is currently multilayer graphene, but I’ll be adding other atoms in later. I would like to not have to calculate my box dimensions each time

If I were to first use s s s boundaries and write a restart file, then use the restart2data tool and reload my simulation except with p p p boundaries would that do the trick?

Thanks,

Mike

Axel,

Sorry about that attached email.

Thank you for the response. I've been "eyeing it up" using molinfo with
VMD. The lattice is currently multilayer graphene, but I'll be adding other
atoms in later. I would like to not have to calculate my box dimensions
each time

but in that case the graphene lattice would determine
your (initial) box dimensions in any case.

If I were to first use s s s boundaries and write a restart file, then use
the restart2data tool and reload my simulation except with p p p boundaries
would that do the trick?

no. shrinkwrap boundaries is using the same "algorithm"
as vmd's "measure minmax" command and thus equally
useless to get a "perfect" match. as i wrote before, it can
be computed, if you know something about your system,
but there is not generic automated tool, since this is
impossible for the reasons i outlined previously.

axel.

you only specify the "A A" terms,
but not the mixed "A B" terms.
with hybrid there is no automatic mixing,
so you have to do it manually.

I don't think this is completely true? If you
have a system with 3 types, and assign
types 1 and 2 to a sub-style potential (e.g. lj/cut)
that supports mixing, then I believe if you
specify 1-1 and 2-2 coeffs, that 1-2 will be
auto-mixed, just as they would be if using
lj/cut by itself. However, no mixing is done
for 1-3 and 2-3 if they involve 2 potentials.

Steve

you only specify the "A A" terms,
but not the mixed "A B" terms.
with hybrid there is no automatic mixing,
so you have to do it manually.

I don't think this is completely true? If you
have a system with 3 types, and assign
types 1 and 2 to a sub-style potential (e.g. lj/cut)
that supports mixing, then I believe if you
specify 1-1 and 2-2 coeffs, that 1-2 will be
auto-mixed, just as they would be if using
lj/cut by itself. However, no mixing is done
for 1-3 and 2-3 if they involve 2 potentials.

you are correct, however in the original post
it was asked to add a standard water potential
to a system described by a class2 forcefield,
so that all the mixed terms between the non-class2
water and the class2 atom types would be needed.

i didn't want to mention the special case
of the partial mixing for same style force fields,
since this didn't apply here and could be more
confusing than helping.

cheers,
   axel.

thanks a lot Dr. steve and Dr. axel of your attention :

But I have a general question .

I want to hybrid class II LJ pair style by class I pair style . ( water class 1 and polymer class 2 as İ told you . like this

pair_style hybrid lj/cut/coul/cut 22.0 lj/class2/coul/long 22.0

is this possible ?? if it is possible I want to write its pair coeff like this
( 1 - 2 interaction )
1 = oxygen of water ( class 1 )
2 = carbon of polymer (class 2 )

pair_coeff 1 2 lj/class2/coul/long 0.106 3.6 22 this one ???

pair_coeff 1 2 lj/cut/coul/cut 0.106 3.6 22 or this one ???

I have a main problem here for this coeff which of the them should I write ?? the pair coeff by lj/class2/coul/long or the pair coeff by lj/cut/coul/cut for 1 - 2 interaction .??

Is ıt possıble to mix two different class 1 and 2 parameters for pair style ?? or I can not do such a thing ?? and How can I mix two different class 1 and 2 pair style?and as you told in hybrid pair style there is no any automatic mix .

cheers
ramin


— On Tue, 1/10/12, Steve Plimpton [email protected] wrote:


> From: Steve Plimpton [email protected]
> Subject: Re: [lammps-users] hybrid
> To: “Axel Kohlmeyer” <akohlmey@…1125…>
> Cc: “Ramin Ekhteiari” <ramin_ekh@…16…>, lammps-users@…452…sts.sourceforge.net
> Date: Tuesday, January 10, 2012, 3:36 PM
>
> > you only specify the “A A” terms,
> > but not the mixed “A B” terms.
> > with hybrid there is no automatic mixing,
> > so you have to do it manually.
>
> I don’t think this is completely true? If you
> have a system with 3 types, and assign
> types 1 and 2 to a sub-style potential (e.g. lj/cut)
> that supports mixing, then I believe if you
> specify 1-1 and 2-2 coeffs, that 1-2 will be
> auto-mixed, just as they would be if using
> lj/cut by itself. However, no mixing is done
> for 1-3 and 2-3 if they involve 2 potentials.
>
> Steve
>
> On Mon, Jan 9, 2012 at 11:24 AM, Axel Kohlmeyer [email protected] wrote:
> > On Mon, Jan 9, 2012 at 1:16 PM, Ramin Ekhteiari <ramin_ekh@…16…> wrote:
> >>
> >>
> >> Ok thanks .But by this script file I got this ERROR on proc 1: All pair coeffs are not set (pair_hybrid.cpp:476).
> >
> > yes, and correctly so.
> > you only specify the “A A” terms,
> > but not the mixed “A B” terms.
> > with hybrid there is no automatic mixing,
> > so you have to do it manually.
> >
> > which also leads to the question of whether
> > mixing and matching two different force fields
> > with different functional forms in this way is a
> > smart move in the first place. i contend that
> > it is not, since you have no rule for how to build
> > the terms consistently and unless you spend
> > an enormous amount of time of validating/optimizing
> > them independently, your results will be pretty
> > much useless.
> >
> > using hybrid pair styles combining different functional
> > forms make the most sense, when you have different
> > segments with a simple and well defined interface, so
> > that you can use specific potential or interaction model
> > for the interactions between these two groups of atoms.
> >
> > some food for thought, i hope…
> >
> > cheers,
> > axel.
> >
> >>
> >> My input file :
> >>
> >> units real
> >> boundary p p p
> >> atom_style full
> >>
> >> pair_style hybrid lj/cut/coul/cut 22.0 lj/class2/coul/long 22.0
> >> kspace_style pppm 1.0e-5
> >>
> >> special_bonds lj/coul 0.0 0.0 1.0
> >> bond_style class2
> >> angle_style class2
> >> dihedral_style class2
> >> improper_style none
> >>
> >> neighbor 2.0 bin
> >> neigh_modify every 1 delay 10 check yes one 5000 page 50000000
> >>
> >> read_data PAAgCl44ge.lammps05
> >>
> >> pair_coeff 12 12 lj/cut/coul/cut 0.1484 3.116
> >> pair_coeff 13 13 lj/cut/coul/cut 0.0 0.0
> >> pair_coeff 1 1 lj/class2/coul/long 0.1060000000 3.6000000000
> >> pair_coeff 2 2 lj/class2/coul/long 0.0130000000 1.6500000000
> >> pair_coeff 3 3 lj/class2/coul/long 0.0640000000 4.0100000000
> >> pair_coeff 4 4 lj/class2/coul/long 0.0200000000 2.9950000000
> >> pair_coeff 5 5 lj/class2/coul/long 0.1200000000 3.8100000000
> >> pair_coeff 6 6 lj/class2/coul/long 0.1200000000 3.3080000000
> >> pair_coeff 7 7 lj/class2/coul/long 0.2670000000 3.3000000000
> >> pair_coeff 8 8 lj/class2/coul/long 0.2400000000 3.4200000000
> >> pair_coeff 9 9 lj/class2/coul/long 0.0130000000 1.1100000000
> >> pair_coeff 10 10 lj/class2/coul/long 0.0130000000 1.0980000000
> >> pair_coeff 11 11 lj/class2/coul/long 0.0650000000 4.0700000000
> >> pair_coeff 14 14 lj/class2/coul/long 0.2058 1.834
> >> pair_coeff 15 15 lj/class2/coul/long 0.1001 4.4
> >>
> >> .
> >> .
> >> .
> >>
> >> best
> >> ramin
> >>
> >>
> >> — On Mon, 1/9/12, Steve Plimpton [email protected] wrote:
> >>
> >>
> >> From: Steve Plimpton [email protected]
> >> Subject: Re: [lammps-users] hybrid
> >> To: aei@…495…
> >> Cc: “Ramin Ekhteiari” <ramin_ekh@…16…>, “[email protected][email protected]
> >> Date: Monday, January 9, 2012, 3:49 PM
> >>
> >>
> >> This is no longer true. All class2 coeffs (pair, bond, angle, etc) can
> >> be specified in either the data file or input script.
> >>
> >> Steve
> >>
> >> On Mon, Jan 9, 2012 at 8:42 AM, Ahmed E. Ismail <aeismail@…24…> wrote:
> >>
> >> Ramin:
> >>
> >> The additional coefficients not corresponding to the standard LAMMPS potential types—such as the angle-bond type—need to be specified in the data file. However, that restriction should not apply to the pair_coeff specifications. (Even the LAMMPS manual says so!)
> >>
> >> —AEI
> >>
> >> Sent from my iPhone
> >>
> >> On 09.01.2012, at 11:25, Ramin Ekhteiari <ramin_ekh@…16…> wrote:
> >>
> >>
> >> Ahmed :
> >> thanks for your response but as you know we can not put the Class II pair coeff in script file.
> >>
> >> ERROR: Pair coeff for hybrid has invalid style (pair_hybrid.cpp:321)
> >>
> >> ramin
> >>
> >> — On Mon, 1/9/12, Ahmed E. Ismail <aeismail@…24…> wrote:
> >>
> >>
> >> From: Ahmed E. Ismail <aeismail@…24…>
> >> Subject: Re: [lammps-users] hybrid
> >> To: “Ramin Ekhteiari” <ramin_ekh@…16…>
> >> Cc: [email protected]
> >> Date: Monday, January 9, 2012, 10:05 AM
> >>
> >> Ramin:
> >>
> >> You don’t mention what the error message is. However, I’d suspect you’d be better off putting all of the pair coefficients in the script file rather than the data file if you’re using a hybrid force field. . . .
> >>
> >> —AEI
> >>
> >> On 9 January 2012 10:38, Ramin Ekhteiari <ramin_ekh@…16…> wrote:
> >>
> >> Hi dr.steve
> >>
> >> my system includes polymer and H2O . for nonbonding ınterctıon I want to use class I forcefield for the H2O molecules and class II forcefield for polymers . I uesd these command
> >>
> >> pair_style hybrid lj/class2/coul/long 22.0 lj/cut/coul/cut 22.0
> >> pair_coeff 12 1 lj/cut/coul/cut 0.013 1.098
> >> pair_coeff 12 2 lj/cut/coul/cut 0.013 1.098
> >> .
> >> .
> >> pair_coeff 13 * lj/cut/coul/cut 0.0 0.0
> >>
> >> my class II pair_coeff is in data file and class I pair_coeff is in input file. but I get error for my pair_coeff,
> >>
> >> best
> >> ramin
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don’t need a complex
> >> infrastructure or vast IT resources to deliver seamless, secure access to
> >> virtual desktops. With this all-in-one solution, easily deploy virtual
> >> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> >> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> >> _______________________________________________
> >> lammps-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/lammps-users
> >>
> >>
> >>
> >>
> >> –
> >> =========================
> >> Ahmed E. Ismail
> >> aei@…495…
> >> aei@…496…
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don’t need a complex
> >> infrastructure or vast IT resources to deliver seamless, secure access to
> >> virtual desktops. With this all-in-one solution, easily deploy virtual
> >> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> >> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> >> _______________________________________________
> >> lammps-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/lammps-users
> >>
> >>
> >>
> >> ------------------------------------------------------------------------------
> >> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don’t need a complex
> >> infrastructure or vast IT resources to deliver seamless, secure access to
> >> virtual desktops. With this all-in-one solution, easily deploy virtual
> >> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> >> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> >> _______________________________________________
> >> lammps-users mailing list
> >> lammps-users@…42…e.net
> >> https://lists.sourceforge.net/lists/listinfo/lammps-users
> >>
> >
> >
> >
> > –
> > Dr. Axel Kohlmeyer
> > [email protected] http://goo.gl/1wk0
> >
> > College of Science and Technology
> > Temple University, Philadelphia PA, USA.
> >
> > ------------------------------------------------------------------------------
> > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don’t need a complex
> > infrastructure or vast IT resources to deliver seamless, secure access to
> > virtual desktops. With this all-in-one solution, easily deploy virtual
> > desktops for less than the cost of PCs and save 60% on VDI infrastructure
> > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> > _______________________________________________
> > lammps-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/lammps-users

|

thanks a lot Dr. steve and Dr. axel of your attention :

But I have a general question .

what you are asking about indicates that you have
no clue what you are doing. this is a bad thing,
particularly, since you are trying to do something
that should only be done by people who know very
well what and why they are doing it. practically all
that you ask about is wrong and unless you clue
yourself properly in, there is no way this is going to work.

in short, you cannot do it.

axel.