speed of molecule center of mass

Dear all users,

In order to generate a list of CH3 thermal initial conditions for subsequent use in MD calculation of CH3 interaction with a surface,
I run a calculation of 1000 CH3 radicals using a nvt fix in a periodic box. The CH3 are flexible with atoms (C and H) interacting with the REBO potential.
Consequently, the CH3 molecules are rotating and the C-H bond vibrating in addition to the whole translation.
Once the system equilibrated, the data (x,y,z,vx,vy,vz) of all atoms are stored in a dump file at some frequency.
Then, a post processing program sorts the atoms and makes the list of thermal CH3 configurations (4 successive lines for each configuration, 1 line for C and 3 lines for the 3 H).
1) To check the effective thermalization of the molecules, i need to check if their speed follow a Maxwell distribution.
2) In the subsequent calculation of interaction of a CH3 with a surface, I want to select within the list a CH3 configuration with respect to its translational kinetic energy (the speed of its CoM).
In both case I need to calculate the speed of the CH3.
First I tried to find a command in LAMMPS to calculate the CoM speed
Unsuccessful, I realized that probably it is impossible to calculate the CoM velocity of a vibrating and rotating molecule from velocities of its atoms due to the impossibility to dissociate
the translational part of the kinetic energy from the rotational and vibrational parts.
Am I right or not ?
I face a problem and for that reason I would need help.

Best regards.

Laurent.

Dear all users,

In order to generate a list of CH3 thermal initial conditions for
subsequent use in MD calculation of CH3 interaction with a surface,
I run a calculation of 1000 CH3 radicals using a nvt fix in a periodic
box. The CH3 are flexible with atoms (C and H) interacting with the REBO
potential.
Consequently, the CH3 molecules are rotating and the C-H bond vibrating
in addition to the whole translation.
Once the system equilibrated, the data (x,y,z,vx,vy,vz) of all atoms are
stored in a dump file at some frequency.
Then, a post processing program sorts the atoms and makes the list of
thermal CH3 configurations (4 successive lines for each configuration, 1
line for C and 3 lines for the 3 H).
1) To check the effective thermalization of the molecules, i need to
check if their speed follow a Maxwell distribution.
2) In the subsequent calculation of interaction of a CH3 with a surface,
I want to select within the list a CH3 configuration with respect to its
translational kinetic energy (the speed of its CoM).
In both case I need to calculate the speed of the CH3.
First I tried to find a command in LAMMPS to calculate the CoM speed
Unsuccessful, I realized that probably it is impossible to calculate the
CoM velocity of a vibrating and rotating molecule from velocities of its
atoms due to the impossibility to dissociate
the translational part of the kinetic energy from the rotational and
vibrational parts.
Am I right or not ?

not. COM velocity of a molecule is a well defined property.

axel.

Dear community,

I am trying to compile lammps on the linux cluster
and i end up with the following error.

Based on

  1. Voronoi
  2. Kim package.

I removed the two packages from the list
and precede the compilation.

But, lately i end up with an error in the linking libraries.

a.o run.o set.o special.o tad.o temper.o thermo.o timer.o universe.o update.o variable.o velocity.o verlet.o verlet_split.o write_restart.o xdr_compat.o -lreax -lpoems -lmeam -lfftw -lifcore -lsvml -lompstub -limf -lgfortran -lstdc++ -o …/lmp_openmpi
/usr/bin/ld: cannot find -lifcore
collect2: ld returned 1 exit status
make[1]: *** […/lmp_openmpi] Error 1
make[1]: Leaving directory `/src/Obj_openmpi’

Can any one help me with this.
the error associated with the KIM and Volonoi packages
are given below.

best regards
Vimal

-I/KIM_API -c create_box.cpp
compute_voronoi_atom.cpp:34: error: ‘voro’ is not a namespace-name
compute_voronoi_atom.cpp:34: error: expected namespace-name before ‘;’ token
compute_voronoi_atom.cpp: In member function ‘virtual void LAMMPS_NS::ComputeVoronoi::compute_peratom()’:
compute_voronoi_atom.cpp:106: error: ‘container’ was not declared in this scope
compute_voronoi_atom.cpp:106: error: expected ‘;’ before ‘con’
compute_voronoi_atom.cpp:115: error: ‘con’ was not declared in this scope
compute_voronoi_atom.cpp:122: error: ‘voronoicell_neighbor’ was not declared in this scope
compute_voronoi_atom.cpp:122: error: expected ‘;’ before ‘c’
compute_voronoi_atom.cpp:123: error: ‘c_loop_all’ was not declared in this scope
compute_voronoi_atom.cpp:123: error: expected ‘;’ before ‘cl’
compute_voronoi_atom.cpp:124: error: ‘cl’ was not declared in this scope
compute_voronoi_atom.cpp:124: error: ‘con’ was not declared in this scope
compute_voronoi_atom.cpp:124: error: ‘c’ was not declared in this scope
make[1]: *** [compute_voronoi_atom.o] Error 1
make[1]: *** Waiting for unfinished jobs…
make[1]: Leaving directory `/scratch/agvalenti/muthukumar/Lammps/New_1/lammps-9Mar13/src/Obj_linux’
make: *** [linux] Error 2

.cpp
pair_kim.cpp:41:21: error: KIM_API.h: No such file or directory
pair_kim.cpp:42:28: error: KIM_API_status.h: No such file or directory
pair_kim.cpp: In member function ‘virtual void LAMMPS_NS::PairKIM::compute(int, int)’:
pair_kim.cpp:173: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:183: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp: In member function ‘virtual void LAMMPS_NS::PairKIM::init_style()’:
pair_kim.cpp:395: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:396: error: ‘KIM_STATUS_OK’ was not declared in this scope
pair_kim.cpp: In member function ‘void LAMMPS_NS::PairKIM::kim_error(int, const char*, int)’:
pair_kim.cpp:586: error: ‘KIM_STATUS_OK’ was not declared in this scope
pair_kim.cpp:587: error: incomplete type ‘KIM_API_model’ used in nested name specifier
pair_kim.cpp: In static member function ‘static int LAMMPS_NS::PairKIM::get_neigh(void**, int*, int*, int*, int*, int**, double**)’:
pair_kim.cpp:601: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:647: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:661: error: ‘KIM_STATUS_OK’ was not declared in this scope
pair_kim.cpp:664: error: ‘KIM_STATUS_NEIGH_ITER_PAST_END’ was not declared in this scope
pair_kim.cpp:671: error: ‘KIM_STATUS_NEIGH_ITER_INIT_OK’ was not declared in this scope
pair_kim.cpp:695: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:704: error: ‘KIM_STATUS_OK’ was not declared in this scope
pair_kim.cpp:707: error: ‘KIM_STATUS_NEIGH_INVALID_REQUEST’ was not declared in this scope
pair_kim.cpp:711: error: ‘KIM_STATUS_OK’ was not declared in this scope
pair_kim.cpp:713: error: ‘KIM_STATUS_NEIGH_INVALID_MODE’ was not declared in this scope
pair_kim.cpp: In member function ‘void LAMMPS_NS::PairKIM::kim_free()’:
pair_kim.cpp:726: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:731: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:736: warning: possible problem detected in invocation of delete operator:
pair_kim.cpp:736: warning: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: warning: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:736: note: neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined.
pair_kim.cpp: In member function ‘void LAMMPS_NS::PairKIM::kim_init()’:
pair_kim.cpp:764: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:765: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:766: error: ‘KIM_STATUS_OK’ was not declared in this scope
pair_kim.cpp:778: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:780: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:789: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:810: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp: In member function ‘void LAMMPS_NS::PairKIM::set_statics()’:
pair_kim.cpp:828: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:838: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp: In member function ‘void LAMMPS_NS::PairKIM::set_volatiles()’:
pair_kim.cpp:852: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:859: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:865: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:872: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:874: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:886: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:886: error: ‘KIM_COMPUTE_FALSE’ was not declared in this scope
pair_kim.cpp:888: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:888: error: ‘KIM_COMPUTE_TRUE’ was not declared in this scope
pair_kim.cpp:894: error: invalid use of incomplete type ‘struct KIM_API_model’
pair_kim.h:35: error: forward declaration of ‘struct KIM_API_model’
pair_kim.cpp:895: error: ‘KIM_COMPUTE_FALSE’ was not declared in this scope
pair_kim.cpp:895: error: ‘KIM_COMPUTE_TRUE’ was not declared in this scope
pair_kim.cpp: In member function ‘void LAMMPS_NS::PairKIM::set_kim_model_has_flags()’:
pair_kim.cpp:952: error: aggregate ‘KIM_API_model mdl’ has incomplete type and cannot be defined
pair_kim.cpp:962: error: ‘KIM_STATUS_OK’ was not declared in this scope
make[1]: *** [pair_kim.o] Error 1
make[1]: *** Waiting for unfinished jobs…
make[1]: Leaving directory `/scratch/agvalenti/muthukumar/Lammps/New_1/lammps-9Mar13/src/Obj_linux’
make: *** [linux] Error 2

Laurent,
Axel (as usual) is correct. The translational degrees of freedom
corresponding to zero eigenvalues of the Hessian Matrix always
decouple no matter what your molecule is doing. Thus you can compute
the COM velocity and check for thermalization in the form of the
Boltzman dist.
The same is not true for rotations, i.e. rotations only give rise to
zero eigenvalues of the Hessian when the molecule is in a minimum
energy configuration, i.e., relaxed. Otherwise the rotations will be
coupled to the vibrations and the story to decouple those DOFs is
different.
Carlos

-lifcore is a Fortran lib - you only need it if you
are compiling one of the Fortran-based add-on
packages, like MEAM or REAX. If so, you
need to make sure you are using the correct
Fortran libs for your compiler.

Steve

Great !
Thank you to both of you for your comments.
So now, I know that it's possible to determine the COM velocity of a translating, vibrating and rotating molecule.
It's a good new, but I am still wondering how.
So I still need help (I reached an impasse!), at least hints!
Is it possible to deduce it from the instantaneous atomic data set of the molecule or do we need successive atomic data set?
Can LAMMPS do it or is it by postprocessing ?
Is there any book you could advise me ?
Best regards.
Laurent.

The Vcm of any set of atoms should just be sum(m_i v_i) / sum(m_i),
no rotation, no vibration, just translation. For now you could
do this via post-processing - just dump the molecule ID and velocities
in a dump custom file. It wouldn't be hard to add a compute vcm/molecule
command, similar to compute com/molecule.

Steve

Steve,

My molecules, once equilibrated, during the production step (storing of data), from which I want to determine the com velocity, are rotating and vibrating while translating.
So what do you mean by 'no rotation, no vibration' ?
Regards.
Laurent.

Steve,

My molecules, once equilibrated, during the production step (storing of
data), from which I want to determine the com velocity, are rotating and
vibrating while translating.
So what do you mean by 'no rotation, no vibration' ?

it means that if you do the calculation as indicated, you'll only get
the C.O.M. velocity.

i think it would be *very* helpful for you to have a good look into a
text book on classical mechanics (e.g. goldstein). a lot of "mystical"
things and commonly used shortcut notations will become much more
accessible. ...and there are interesting things in between that may
come in handy at a later point.

axel.

I meant that the velocity of the COM is just
a translational velocity, there is no rotation
or vibration of the COM. And the formula
for computing it is what I said, it just uses
the translational velocity of the constituent
atoms.

Steve