[lammps-users] dihedral_style class2 data for read_data

Hello,

I am having problems getting dihedral_style class2 data read from a data
file. Is this the correct format?

Hello,

I am having problems getting dihedral_style class2 data read from a data
file. Is this the correct format?

valmor,

without checking this in detail, i have one general recommendation:

you should first check whether certain numbers
are supposed to be integer. if you enter those
as floating point, lammps may refuse to accept them.
quite often this applies to the "degree" value, too.

cheers,
   axel.

[snip]

valmor,

without checking this in detail, i have one general recommendation:

you should first check whether certain numbers
are supposed to be integer. if you enter those
as floating point, lammps may refuse to accept them.
quite often this applies to the "degree" value, too.

Axel,

I know the floating point are correct because I can run the code with
either dihedral_style harmonic or class2 but not with their hybrid. I
think my problem is that I am using the hybrid dihedral_style with
class2 and harmonic styles. I don't seem to get the format correct in
this case.

Thanks for the recommendation.

valmor,

what you describe could be just created by a mistake
in the header section of the data file. it is very difficult
to make recommendations without having a full data
set to debug.

can you post a minimal complete example that fails?

axel.

valmor,

what you describe could be just created by a mistake
in the header section of the data file. it is very difficult
to make recommendations without having a full data
set to debug.

can you post a minimal complete example that fails?

axel.

This may take a while. In the meantime I would appreciate if you could
take a look at the script input up to the point where it fails and the
corresponding data file.

Here is the script input:

#*****Initialization*****************************************

units real
atom_style full

pair_style lj/cut/coul/long 15.0 15.0
kspace_style pppm 1.0e-4

bond_style harmonic
angle_style harmonic
dihedral_style hybrid class2 harmonic
improper_style none

#*****Atom definition****************************************

read_data data.file

#*****Settings***********************************************

print ">>> Start Settings Section "

This may take a while. In the meantime I would appreciate if you could
take a look at the script input up to the point where it fails and the
corresponding data file.

ok.

[...]

Dihedral Coeffs

1 class2 0.0 0.0 1.2 180.0 0.25 180.0
2 class2 0.0 0.0 1.2 180.0 1.15 180.0
3 harmonic 1.40000 1 3
4 harmonic 1.40000 1 3
5 harmonic 1.40000 1 3
6 harmonic 1.40000 1 3
7 harmonic 1.40000 1 3
8 harmonic 1.40000 1 3
9 harmonic 1.40000 1 3

MiddleBondTorsion Coeffs

1 class2 0.0 0.0 0.0 0.0
2 class2 0.0 0.0 0.0 0.0

why don't you have 9 entries here?

EndBondTorsion Coeffs

1 class2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 class2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

...and here? and so on.

the read data routine will brutally read
as many lines as you have defined
as dihedral types. this is why it chokes
on the line somewhere later.
of course the harmonic ones would all
have to be set to zero.

axel.

[snip]

Dihedral Coeffs

1 class2 0.0 0.0 1.2 180.0 0.25 180.0
2 class2 0.0 0.0 1.2 180.0 1.15 180.0
3 harmonic 1.40000 1 3
4 harmonic 1.40000 1 3
5 harmonic 1.40000 1 3
6 harmonic 1.40000 1 3
7 harmonic 1.40000 1 3
8 harmonic 1.40000 1 3
9 harmonic 1.40000 1 3

MiddleBondTorsion Coeffs

1 class2 0.0 0.0 0.0 0.0
2 class2 0.0 0.0 0.0 0.0

why don't you have 9 entries here?

That was the problem. I misunderstood the manual; thought
MiddleBondTorsion would just apply to class2 and harmonic would have
class2 parameters automatically set to zero.

Thanks,