fix rigid for CO2 epm2

Dear lammps users and developers,

I am trying to simulate linear (angle=180 rigid) CO2 molecules and I tried both the fix shake command and the fix rigid molecule but nothing worked.
When I try
Fix 1 co2 shake 1.0e-04 1000 0 b 1 a 1
Lammps crashes with an error: shake determinant =0.0 (../fix_shake.cpp:1921) ...
I read about the difficulty of constaining the angle to 180 degrees and I moved to fix rigid but when I try the
Fix 1 co2 rigid molecule
Lammps crashes with : invalid fix style ...

I tried to run the first example shown below but it crashes too with the invalid "fix style ..." error

Did anybody face that kind of problem before?

Thanks in advance,

Otto

Invalid fix style means that you didn't install the rigid package while compiling lammps.

You cannot use fix shake because of the degenerate forces for 180 degree angles. The solution for this would be a custom fix that treats linear molecules as dimers with masses chosen so they have the same moments of inertia as the original molecule.

Axel

Axel,

Thanks for the quick answer. I do lmp_etc -h and it shows that tha fix rigid (all of them) is compiled. What do you think?

Thanks again,
Otto

Axel,

Thanks for the quick answer. I do lmp_etc -h and it shows that tha fix rigid (all of them) is compiled. What do you think?

if it doesn't work, you must be doing something wrong. what it is
exactly, i cannot tell, since i don't own a crystal ball or have mind
reading abilities and you don't provide complete information to
reproduce it. the inputs in the URL you quoted all work for me.

axel.