periodic molecule COM moving with fix momentum

Hello all Dear lammps useres

I’m facing an odd problem with my simulation. I’m modeling an infinite CNT and another modified-functionalized CNT that are co-centered , thus the outer CNT is moving on the inner one with smaller diameter. the problem is no matter how many time steps I eliminate my infinite cnt center of mass momentum using fix momentum command, it moves! I managed to solve this problem by fix recenter but I’m not sure why this happened in fix momentum command, I’ve checked the control parameters and log file and every thing seems normal.
by the way I’ve used OPLS forcefield so I defined the extra angles and bonds and dihedrals which across the boundaries in data file.
Thanks for your kind help

this is my input file:

#processors 1 1 10
units real
dimension 3
boundary p p p
atom_style full
read_data pucnthimproper.data extra/atom/types 1 extra/bond/types 1 extra/angle/types 1 extra/dihedral/types 1
read_data innerperiodic.data add append offset 2 2 2 3 1
neighbor 2.0 bin
neigh_modify delay 2 every 1
region bottom block INF INF INF INF INF 5
region top block INF INF INF INF 355 INF
group pucnt type 1 2
group nanotube type 3
group cm id 536
#********************************************************** force-field *********************************************

pair_style lj/cut/coul/cut 10 10
bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style harmonic
special_bonds lj/coul 0.0 0.0 0.5

################set parameters#####################

argon and PUCNTH opls

pair_coeff 1 1 0.070 3.55000
pair_coeff 2 2 0.030000 2.4200
pair_coeff 3 3 0.070 3.55000 # carbon 2 = nanotube inner
pair_modify mix geometric
bond_coeff 1 469.00 1.4000
bond_coeff 2 367.00 1.0800
bond_coeff 3 469.00 1.4000
angle_coeff 1 63.00 120.00
angle_coeff 2 35.00 120.00
angle_coeff 3 63.00 120.00

dihedral_coeff 1 0.0 7.250 0.0 0.0
dihedral_coeff 2 0.0 7.250 0.0 0.0
dihedral_coeff 3 0.0 7.250 0.0 0.0
dihedral_coeff 4 0.0 7.250 0.0 0.0
improper_coeff 1 0.55 180

################simualtion#####################
#kspace_style pppm 1e-4
compute com pucnt com
timestep 1
minimize 0.001 0.001 1000 10000
velocity pucnt create 300 1234 dist gaussian
velocity nanotube create 300 1234 dist gaussian
#delete_atoms overlap 1 argon nanotube mol yes
fix 1 nanotube nvt temp 300 300 100
fix 2 pucnt nve
compute 1 pucnt chunk/atom molecule
compute msd pucnt msd/chunk 1
fix 3 pucnt ave/time 1000 1 1000 c_msd file msd.out mode vector
dump t all xyz 1000 dumpt.xyz
thermo_style custom step temp press ke pe etotal c_com[1] c_com[2] c_com[3]
thermo 1000
fix momcnt nanotube momentum 100 linear 0 0 0 angular
run 1000000
undump t
write_data cocenterrealxed.data
dump 1 all xyz 1000 dump.xyz
dump 2 pucnt xyz 1000 dump_pucnt.xyz
dump 3 cm xyz 10000 dumpcm_pucnt.xyz
restart 1000000 poly.restart
run 10000000
write_data final.data

Hello all Dear lammps useres

I'm facing an odd problem with my simulation. I'm modeling an infinite CNT
and another modified-functionalized CNT that are co-centered , thus the
outer CNT is moving on the inner one with smaller diameter. the problem is
no matter how many time steps I eliminate my infinite cnt center of mass
momentum using fix momentum command, it moves! I managed to solve this
problem by fix recenter but I'm not sure why this happened in fix momentum
command, I've checked the control parameters and log file and every thing
seems normal.

your description is very confusing. it is impossible to follow what
you are doing.
please note, that fix recenter do *nothing* to change the dynamics or
actually immobilize the object it is attached to.
it simply translates the frame of reference. this way, you will not
see, if you have a center of mass drift, yet - unlike with fix
momentum - that drift will remain. even in the most extreme case, the
so called "flying icecube syndrome", you would just see your system
spontaneously freeze, but not notice the massive COM drift that would
happen at the same time, even though the COM momentum will remain
(just output the COM velocity vcm()).

by the way I've used OPLS forcefield so I defined the extra angles and bonds
and dihedrals which across the boundaries in data file.

fix momentum will not perfectly immobilize the atoms in question, it
will just regularly remove any residual COM momentum. if your setup
has a systematic force pushing that system into a preferred direction,
it will keep - very slowly - creeping in that direction. for a typical
periodic system, the COM actually is supposed to oscillate around its
average.

a (tiny!) residual creep can result from your choice of origin and
choice of interactions. in your input, the choice of a cutoff coulomb
is rather questionable. that can lead to an unphysical shape of the
total potential. have you tried with a well converged (i.e. 10-6)
long-range coulomb solver.
also, you only apply fix momentum to a part of your system. how can
you be sure, there is not systematic residual force cause by the rest?

axel.