hybrid system --- Angle coeff for hybrid has invalid style

I want to simulate a polymer-water system using pcff FF for the polymer and tip3p model for water. I used msi2lmp tool to make the initial data file. For this system I should use a hybrid pair style, hybrid bond_style and hybrid angle_style.

I added the pair_coeff, bond_coeff and angle_coeff for water molecules to the data file. That is, I substituted the initial coeffs of water molecules by the tip3p coeffs.

For the pair coeffs, and bond_coeffs, it seems to be Okey, but I get the following error for the angle_coeffs:

Angle coeff for hybrid has invalid style

I don’t understand what the problem is, as I follow the same rules.

Please take a look at the input and data files attached.

Thank you in advance.

PP-Water.data (4.27 KB)

PP-waterTIP3P.in (643 Bytes)

I don’t get an error when I read your data file. Are you
running the current version of LAMMPS?

Steve

I’m also confused, since I follow the same style as pair and bond coeffs!

I ran it on different versions and got that error;

LAMMPS (20 Mar 2014-ICMS) in windows
LAMMPS (31 Mar 2014) in Mac

LAMMPS (13 May 2014) in Linux

I'm also confused, since I follow the same style as pair and bond coeffs!

​i don't understand how somebody should be able to test this, because the
data file is truncated at the DihedralCoeffs section:

[[email protected]... Downloads]$ tail PP-Water.data
Dihedral Coeffs # class2

   1 -0.0228 0.0000 0.0280 0.0000 -0.1863 0.0000#
hc-c3-c1-c_1
   2 -0.1432 0.0000 0.0617 0.0000 -0.1083 0.0000#
hc-c3-c1-hc
   3 0.0000 0.0000 0.0316 0.0000 -0.1681 0.0000#
hc-c3-c1-c2
   4 0.0442 0.0000 0.0292 0.0000 0.0562 0.0000#
c3-c1-c_1-o_1
   5 0.1693 0.0000 -0.0090 0.0000 -0.0687 0.0000#
c3-c1-c_1-n_2
…
…
…

My successful test was to delete the dihedrals and just
get past the angles, which worked. But a better
test would be the whole file, so yes, please post that.

Steve

Input and data files together with a log file I get are attached.

Thank you for your help :slight_smile:

PP-Water.data (890 KB)

PP-waterTIP3P.in (1.09 KB)

log.lammps (548 Bytes)

​ok, here is the deal: the data file is incorrect
​
it is not due to the Angle Coeffs section, but due to the BondBond Coeffs
and BondAngle Coeffs section.​

​those are also treated as hybrid and thus need to be prefixed with
"class2" for the class2 styles, and "skip" for the non-class2 styles.
please see the hybrid angle style documentation, where this is explained.

http://lammps.sandia.gov/doc/angle_hybrid.html​

​what is don't quite understand is how those section currently have 28
entries in the provided data file​, if there are only 27 class2 style
angles in the system and an entry "28 skip" would have to be added to
accommodate the harmonic angle substyle

axel.

and here is a small patch that produces an easier to debug error message.

[akohlmey@…1220… src]$ git diff angle_hybrid.cpp
diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp
index 784f212…6f1cceb 100644
— a/src/angle_hybrid.cpp
+++ b/src/angle_hybrid.cpp
@@ -256,6 +256,10 @@ void AngleHybrid::coeff(int narg, char **arg)
if (m == nstyles) {
if (strcmp(arg[1],“none”) == 0) none = 1;
else if (strcmp(arg[1],“skip”) == 0) none = skip = 1;

  • else if (strcmp(arg[1],“ba”) == 0)
  • error->all(FLERR,“BondAngle coeff for hybrid angle has invalid format”);
  • else if (strcmp(arg[1],“bb”) == 0)
  • error->all(FLERR,“BondBond coeff for hybrid angle has invalid format”);
    else error->all(FLERR,“Angle coeff for hybrid has invalid style”);
    }

After correcting the data file, I got this error:

Coulomb cutoffs of pair hybrid sub-styles do not match

so, I changed the cutoffs to become similar. Then I got this error:

All pair coeffs are not set

What other coeffs should I define? Doesn’t “pair_modify shift yes mix geometric” help for any undefined coeff?

New data file and input file are attached.

PP-Water.data (891 KB)

PP-waterTIP3P.in (1.09 KB)

After correcting the data file, I got this error:

Coulomb cutoffs of pair hybrid sub-styles do not match

so, I changed the cutoffs to become similar. Then I got this error:

All pair coeffs are not set

What other coeffs should I define? Doesn’t “pair_modify shift yes mix geometric” help for any undefined coeff?

Only for those of the same pair style.

There is no way to derive mixed parameters from different functional forms.

It is not that good an idea to mix and match different force fields. Particularly exchanging the solvent can cause large inconsistencies, since all other parameters were determined with that solvent in mind.

After correcting the data file, I got this error:

Coulomb cutoffs of pair hybrid sub-styles do not match

so, I changed the cutoffs to become similar. Then I got this error:

All pair coeffs are not set

What other coeffs should I define? Doesn’t “pair_modify shift yes mix geometric” help for any undefined coeff?

New data file and input file are attached.

​ok, here is the deal: the data file is incorrect
​
it is not due to the Angle Coeffs section, but due to the BondBond Coeffs and BondAngle Coeffs section.​

​those are also treated as hybrid and thus need to be prefixed with “class2” for the class2 styles, and “skip” for the non-class2 styles.
please see the hybrid angle style documentation, where this is explained.

http://lammps.sandia.gov/doc/angle_hybrid.html​

Thank you very much.
Could you please help me how I can figure out which bond-bond and bond-angle types are related to water molecules (which I want to use a non-class2 angle type)? Unlike the previous sections, there is no #comment info for coeffs in these two sections. I guess only the 28s should be those related to water molecules.

This is not a very smart question. Of course all angle coeffs are in the same order in each section. No comments needed.

​what is don’t quite understand is how those section currently have 28 entries in the provided data file​, if there are only 27 class2 style angles in the system and an entry “28 skip” would have to be added to accommodate the harmonic angle substyle

This is because I made the entire structure in Mat Studio and made the data file under pcff force field for the entire system (both water molecules and the polymer). Now, I’m changing the coefficients that are related to water molecules, in such a way to use TIP3P model for them instead of the already used pcff.
It is greatly appreciated if you tell me your alternative methods for building such structure which uses a class2 FF for the polymer and TIP3P for the water molecules.

As I mentioned in my previous mail, i consider this a bad idea (and so will most people with experience in classical force field paramerization) and thus I have no interest to waste any more thoughts on this. If you think differently, you have to sort it out by yourself.

>
> After correcting the data file, I got this error:
>
> Coulomb cutoffs of pair hybrid sub-styles do not match
>
> so, I changed the cutoffs to become similar. Then I got this error:
>
> All pair coeffs are not set
>
> What other coeffs should I define? Doesn't "pair_modify shift
yes mix geometric" help for any undefined coeff?
>
> New data file and input file are attached.
>
>
>>
>>
>> ​ok, here is the deal: the data file is incorrect
>> ​
>> it is not due to the Angle Coeffs section, but due to the BondBond
Coeffs and BondAngle Coeffs section.​
>>
>> ​those are also treated as hybrid and thus need to be prefixed with
"class2" for the class2 styles, and "skip" for the non-class2 styles.
>> please see the hybrid angle style documentation, where this is
explained.
>>
>> http://lammps.sandia.gov/doc/angle_hybrid.html​
>>
>
> Thank you very much.
> Could you please help me how I can figure out which bond-bond and
bond-angle types are related to water molecules (which I want to use a
non-class2 angle type)? Unlike the previous sections, there is no #comment
info for coeffs in these two sections. I guess only the 28s should be those
related to water molecules.

This is not a very smart question. Of course all angle coeffs are in the
same order in each section. No comments needed.

>
>
>>
>> ​what is don't quite understand is how those section currently have 28
entries in the provided data file​, if there are only 27 class2 style
angles in the system and an entry "28 skip" would have to be added to
accommodate the harmonic angle substyle
>
>
> This is because I made the entire structure in Mat Studio and made the
data file under pcff force field for the entire system (both water
molecules and the polymer). Now, I'm changing the coefficients that are
related to water molecules, in such a way to use TIP3P model for them
instead of the already used pcff.
> It is greatly appreciated if you tell me your alternative methods for
building such structure which uses a class2 FF for the polymer and TIP3P
for the water molecules.

As I mentioned in my previous mail, i consider this a bad idea (and so
will most people with experience in classical force field paramerization)
and thus I have no interest to waste any more thoughts on this. If you
think differently, you have to sort it out by yourself.

*If an experienced person like you says it is a bad idea, so it is....*
*I am a new lammps user. please help me for other methods of building and
using such structures... I appreciate it*

As I mentioned in my previous mail, i consider this a bad idea (and so will

most people with experience in classical force field paramerization) and
thus I have no interest to waste any more thoughts on this. If you think
differently, you have to sort it out by yourself.

*If an experienced person like you says it is a bad idea, so it is....*

​never *ever* take the opinion of a single person as the "one true gospel".
you have to figure out *why* and *understand* the reason. only then can you
make a qualified judgement. maybe my concerns do not apply in your specific
case. you must have had a reason why you started things the way you did.
you have​ to re-evaluate those.

*I am a new lammps user. please help me for other methods of building and
using such structures... I appreciate it*

​emphatically no. i am not your adviser and very likely i am not interested
in the kind of research that you are trying to do (your descriptions have
been quite vague). so why should i care? furthermore, you are mixing up two
very different things: building an initial starting configuration for a
simulation, and choosing a force field and parameters for that simulation.
those are quite different and the more important question is the latter
choice. unless you have informed yourself which would be a good
combinations of parameters, that is providing you with the kind of
information that you are looking for in the simulations, there is not much
benefit in building complex inputs. on top of that, the question is a very
fundamental MD question and thus has little to do with LAMMPS and how you
use it and thus also very little with this mailing list (which is about
using LAMMPS, and not how to teach people doing meaningful MD; although
sometimes those two topics have significant overlap).

so, please discuss with your adviser, discuss with your colleagues, read
text books, read papers on similar simulations and how people justify their
choice of parameters, set up model systems to find out which of those
options are true and applicable to your field of study (and which are
garbage, or obsolete, or impossible to reproduce). building an initial
structure is one of the lesser problems in running MD.

axel.

1 Like

Thank you very much. Your helps and comments have always been useful for me… Thank you axel :slight_smile:

1 Like