equilibrium of co2

Hello everyone,

I want to have 2014 co2 equilibrite at 10 bar. The system was equilibrated with 12.5 ns but the total energy was still increasing.

1)There seems to be something wrong for co2 to reach equilibration with such long simulation time. Can anybody give me some suggestions to have the system equilibrate much faster?

2)Alex have mentioned that it is not correct to simulate co2 with bond and angle being fixed with shake algorithm in lammps. What I can do if I want to use rigid model?

Input files attached.

Thanks very much,

Hang

inputfiles.tar.gz (92.9 KB)

For rigid, you can use fix rigid. I don't know why
it isn't equilibrating. Could be many reasons.

Steve

Thanks very much,Steve.

I tried ‘fix co2 rigid/nvt molecule temp 300.0 300.0 100.0’ and got some strange problems:

  1. When I finish the equilibrium for 1 ns. The new calculation can only start from the restart file. When I tried to have the calculation start from the data file (which is generated by dump command) after the equilibrium of 1 ns. I always got the error: ‘Fix rigid: Bad principal moments’. I use the fix rigid/nvt for the calculation, the bond and angle for those co2 molecules should not change during the simulation? Why I still have the error which seems like the angles are not exactly 180 degree?

2)I want to simulate the transportation of co2 in carbon nanotube. I have the same problem as mentioned above. I am not sure if I miss something important?

3)In the calculation, I found the bond energy and angle energy are not exactly zero, but very small, say 0.002 kcal/mol. As I think, if I use rigid model, the bond/angle energy should be exactly zero, right?If I use the fix rigid/nvt command for the calculation, do I need to specify the bond and angle parameters in the input files? For example: Bonds, angles, bond length and force constant.

Many many thanks in advance,

Hang

2012/1/6 Steve Plimpton <[email protected]>

2012/1/13 陈航燕 <[email protected]...>:

Thanks very much,Steve.

I tried 'fix co2 rigid/nvt molecule temp 300.0 300.0 100.0' and got some
strange problems:

1) When I finish the equilibrium for 1 ns. The new calculation can only
start from the restart file. When I tried to have the calculation start from
the data file (which is generated by dump command) after the equilibrium of
1 ns. I always got the error: 'Fix rigid: Bad principal moments'. I use the
fix rigid/nvt for the calculation, the bond and angle for those co2
molecules should not change during the simulation? Why I still have the
error which seems like the angles are not exactly 180 degree?

this is difficult to say without seeing your input.

could be that you are missing the image flags
or are not dumping unwrapped coordinates.
once a molecule straddles the periodic boundary,
you get an unphysical geometry, unless you use
unwrapped coordinates or image flags.

2)I want to simulate the transportation of co2 in carbon nanotube. I have
the same problem as mentioned above. I am not sure if I miss something
important?

the "garbage in, garbage out" principle holds
for any system. if you cannot get the pure system
to work correctly, why should it be different
for a compound system.

3)In the calculation, I found the bond energy and angle energy are not
exactly zero, but very small, say 0.002 kcal/mol. As I think, if I use rigid
model, the bond/angle energy should be exactly zero, right?If I use the fix

no. LAMMPS does what you tell it to do. bond/angle forces and energies
are always computed and added to the total force if you have a bond and/or
angle style defined. the rigid integrator takes the total forces on each atom,
and then separates them into a translational and rotational component,
and then integrates the positions of the atoms accordingly (based on
center of mass and the moments of inertia). if you don't want bond and
angle terms to be computed, you have to turn them off, e.g. by using
the "none" style.

rigid/nvt command for the calculation, do I need to specify the bond and
angle parameters in the input files? For example: Bonds, angles, bond length
and force constant.

no. the rigid integrator only looks for rigid bodies according to the specs;
for molecules, it is the molecule id.

axel.

Thanks very much,Steve.

Thanks very much, Axel.

I tried ‘fix co2 rigid/nvt molecule temp 300.0 300.0 100.0’ and got some
strange problems:

  1. When I finish the equilibrium for 1 ns. The new calculation can only
    start from the restart file. When I tried to have the calculation start from
    the data file (which is generated by dump command) after the equilibrium of
    1 ns. I always got the error: ‘Fix rigid: Bad principal moments’. I use the
    fix rigid/nvt for the calculation, the bond and angle for those co2
    molecules should not change during the simulation? Why I still have the
    error which seems like the angles are not exactly 180 degree?

this is difficult to say without seeing your input.

could be that you are missing the image flags
or are not dumping unwrapped coordinates.
once a molecule straddles the periodic boundary,
you get an unphysical geometry, unless you use
unwrapped coordinates or image flags.

I tried the thing you mentioned above, but still have the same error(ERROR: Fix rigid: Bad principal moments) when the new calculation started from the data file no matter if I use the unwrapped coordinates or image flags in the input file. However, when it is started from the restart file, everything looks good.

Besides, there is one thing that I am not very sure. For the input data file with image flags, which coordinate I should use? The unwrapped coordinates(xu,yu,zu) or unscaled atom coordinates(x,y,z)? I read the manual, but it seems that I didn’t find the information that I want to know. I’d like to apologize if I miss anything.

Here, I posted my input file for the calculation.

units real
atom_style full
bond_style none
angle_style none
pair_style lj/cut/coul/long 12.0
kspace_style pppm 0.0001
pair_modify shift yes mix arithmetic
special_bonds lj/coul 0.0 0.0 0
neighbor 2.0 bin
neigh_modify every 1 delay 10 check yes
boundary p p p
read_data 00.data.lammps
#read_restart X.restart/X.restart.20000
timestep 1.0
thermo_style custom step temp etotal
group co2 type 1 2
neigh_modify exclude molecule co2
min_style cg
min_modify dmax 1.0
minimize 0.01 0.001 1000 1000000
variable density_co2 equal mass(all)10/(6.0221417930vol)
thermo_style custom step temp epair etotal press
thermo 100
restart 20000 X.restart/X.restart
dump 1.1 all custom 20000 04.traj/all.every-xu.20000.lammpstrj id mol type q xu yu zu ix iy iz
dump 1.2 all custom 20000 04.traj/all.every.20000.lammpstrj id mol type q x y z ix iy iz
dump 1.3 all custom 20000 04.traj/image id ix iy iz

datafile.tar (50 KB)

I tried the thing you mentioned above, but still have the same error(ERROR:
Fix rigid: Bad principal moments) when the new calculation started from the
data file no matter if I use the unwrapped coordinates or image flags in the
input file. However, when it is started from the restart file, everything
looks good.

well, first of all, continuing a calculation from a restart file
is the better option to continue a calculation. whenever text
mode files are involved, there is are likely truncation errors
due to the limited accuracy of the text representation of
floating point numbers.

other than that, using the unwrapped coordinates to generate
a new data file worked for me, after i fixed a bug in the VMD
topotools plugin, that i use for this purpose. in this case it
doesn't matter which trajectory file to use, since VMD will
unwrap regular coordinates automatically, if the image flags
are provided as well. so the resulting script code is the following.

package require topotools 1.2
topo readlammpsdata 00.data.lammps full
mol addfile all.every.20000.lammpstrj
topo writelammpsdata 01.data.lammps full

since VMD doesn't store potential parameters, i manually
copied those over.

Besides, there is one thing that I am not very sure. For the input data file
with image flags, which coordinate I should use? The unwrapped
coordinates(xu,yu,zu) or unscaled atom coordinates(x,y,z)? I read the
manual, but it seems that I didn't find the information that I want to know.
I'd like to apologize if I miss anything.

the regular unscaled coordinates.

[...]

As I think before, one should difinately define the bond/angle for the
molecules.

no. not for the rigid integrator. your data file has no bonds defined,
either and works just fine.

axel.

Hello Axel,

Thanks very much! !

I tried the thing you mentioned above, but still have the same error(ERROR:
Fix rigid: Bad principal moments) when the new calculation started from the
data file no matter if I use the unwrapped coordinates or image flags in the
input file. However, when it is started from the restart file, everything
looks good.

well, first of all, continuing a calculation from a restart file
is the better option to continue a calculation.

whenever text mode files are involved, there is are likely truncation errors
due to the limited accuracy of the text representation of
floating point numbers.

Yes, you are exactly right!
It is resulted from the ‘limited accuracy of the text’. After the simulation of 1ns,I checked
the dump file by VMD and I found that the angle O-C-O was not exactly 180 degree.
Therefore, I modified the format of coordinates by using command ‘dump_modify’ to get a better
accuracy of coordinates and the new calculation could be continued from the data file.

But anyway, I will try to continue a new calculation from the restart file.

other than that, using the unwrapped coordinates to generate
a new data file worked for me, after i fixed a bug in the VMD
topotools plugin, that i use for this purpose. in this case it
doesn’t matter which trajectory file to use, since VMD will
unwrap regular coordinates automatically, if the image flags
are provided as well. so the resulting script code is the following.

package require topotools 1.2
topo readlammpsdata 00.data.lammps full
mol addfile all.every.20000.lammpstrj
topo writelammpsdata 01.data.lammps full

since VMD doesn’t store potential parameters, i manually
copied those over.

Thanks for the cool script, it’s a better(much better than what I have) tool to generate a new data file for LAMMPS.