[lammps-users] LAMMPS velocity command

Dear LAMMPS users;

I am currently using lammps to perform shearing of two SAM surfaces facing each other with different velocities. The velocities are in opposite directions. The shearing works good when I applied very high velocity (in the range of 1 A/fs; however, the SAM surfaces move in the same direction at low velocities (in the range of 0.001 A/fs ). Do I make any mistake while applying the velocities ? Any help regarding this will be highly apprciated.

The input script is as follows:

units real
dimension 3
boundary p p s
neigh_modify delay 2 every 1
atom_style full
bond_style harmonic
angle_style charmm
dihedral_style charmm
pair_style lj/charmm/coul/charmm 8 10
pair_modify mix arithmetic

read_data sam_water_shear.data

special_bonds charmm

include group_script.in ### All groups are in this file

fix force_upper_zero sulphur_hydrogen_group_upper setforce 0.0 0.0 0.0
fix force_lower_zero sulphur_hydrogen_group_lower setforce 0.0 0.0 0.0

fix force_upper_x_zero sulphur_hydrogen_group_upper setforce NULL 0.0 0.0
fix force_lower_x_zero sulphur_hydrogen_group_lower setforce NULL 0.0 0.0

fix wallhi all wall/lj126 zhi 55.6 1.0 1.0 2.5
fix walllo all wall/lj126 zlo 2.2 1.0 1.0 2.5

thermo 100
thermo_style custom step temp pe press evdwl ecoul epair ebond eangle edihed eimp etotal

min_style sd
minimize 1e-2 1e-2 10000 10000

min_style cg
minimize 1e-4 1e-4 10000 10000

unfix force_upper_zero
unfix force_lower_zero

fix rigid_center_upper sulphur_hydrogen_group_upper rigid single
fix rigid_center_lower sulphur_hydrogen_group_lower rigid single

fix hydrogen_shake all shake 0.0001 20 10000 b 10 a 17

timestep 1.0

################ VELOCITY INPUT ##################################################################

velocity sam_upper set -0.001 0.0 0.0 sum no units box #sam_upper is group with upper sam atoms which has given velcocity of 0.001 A/fs
velocity sam_lower set -0.001 0.0 0.0 sum no units box #sam_lower is group with lower sam atoms which has given velcocity of 0.001 A/fs

Your 2 velocity commands both apply a v of -0.0001 in x. Why would
you expect them to move in different directions?

Steve

1 Like