Dear all,
I faced to a simple error. I would appreciated if anybody helps me.
I want to apply velocity just on Oxygen and Hydrogen (Ihave 3 atoms, Oxygen, Hydrogen and Carbon), I invoked it by the following commands
velocity 1 create 300.0 34387 rot yes dist gaussian # for Oxygen
velocity 2 create 300.0 34387 rot yes dist gaussian # for Hydrogen
But, an error has been occurred as ERROR: Could not find velocity group ID (…/velocity.cpp:68)
So that, the numbers 1 and 2 are the group-ID for Oxygen and Hydrogen.
My input file
***************** Initialization *********************
units real
dimension 3
boundary p p p
atom_style full
read_data atmdata.dat
group ox type 1
group hy type 2
group ca type 3
set group ox charge -0.8476
set group hy charge 0.4238
set group ca charge 0.0000
pair_style dpd/tstat 300.0 300.0 10.0 34387
comm_style brick
comm_modify vel yes
pair_style lj/cut/coul/long 10.0 10.0
pair_coeff 1 1 0.1553 3.169
pair_coeff 1 2 0.000000 0.000
pair_coeff 1 3 0.093627 3.190
velocity 1 create 300.0 34387 rot yes dist gaussian # for Oxygen
velocity 2 create 300.0 34387 rot yes dist gaussian # for Hydrogen
kspace_style pppm 1.0e-6
*************** Setting ******************************
neighbor 2.0 bin
neigh_modify delay 0 every 10 check yes
thermo 100
thermo_style custom step elapsed dt time atoms lx ly lz xlo xhi ylo yhi zlo zhi
thermo_modify norm no flush yes
#fix 1 all nvt temp 300.0 300.0 0.001 tchain 1
fix 1 all shake 0.0001 20 10 b 1 2 a 2
fix 1 all nvt
#dumps
dump 1 waterdump all atom 500 dump.waterinfo
write_data waterinfo.data
write_restart waterinfo.restart
timestep 0.2
run 300
Thanks in advance
I have replied to you that you missed a “group-ID” in your command.
Ray
Dear Ray,
Thank you for your replies. I think I could determine a “group id” as 1 and 2 as follows
velocity 1 create 300.0 34387 rot yes dist gaussian # for Oxygen
velocity 2 create 300.0 34387 rot yes dist gaussian # for Hydrogen
regarding to the manual structure.
velocity group-ID style args keyword value ...
Right?
Sorry I meant you have not defined group IDs 1 and 2. You only have groups ox, hy, and ca.
Ray
Dear Ray,
Thank you very much. You are right.
I’d appreciated if you explain what is the problem about this command for the SHAKE algorithm.
fix 1 hy shake 0.0001 20 0 b 2 a 2
Where I got the following error.
ERROR: Unknown fix style (…/modify.cpp:762)
My input
***************** Initialization *********************
units real
dimension 3
boundary p p p
atom_style full
read_data atmdata.dat
group ox type 1
group hy type 2
group ca type 3
set group ox charge -0.8476
set group hy charge 0.4238
set group ca charge 0.0000
pair_style dpd/tstat 300.0 300.0 1.0 34387
comm_style brick
comm_modify vel yes
pair_style lj/cut/coul/long 10.0 10.0
pair_coeff 1 1 0.1553 3.169
pair_coeff 1 2 0.000000 0.000
pair_coeff 1 3 0.093627 3.190
pair_coeff 2 3 0.000000 0.000
pair_coeff 2 2 0.000000 0.0000
pair_coeff 3 3 0.000000 0.0000
velocity ox create 300.0 34387 rot yes dist gaussian # for Oxygen
velocity hy create 300.0 34387 rot yes dist gaussian # for Hydrogen
kspace_style pppm 1.0e-6
*************** Setting ******************************
neighbor 2.0 bin
neigh_modify delay 0 every 10 check yes
thermo 100
thermo_style custom step elapsed dt time atoms lx ly lz xlo xhi ylo yhi zlo zhi
thermo_modify norm no flush yes
fix 1 hy shake 0.0001 20 0 b 2 a 2
fix nvt all nvt temp 300.0 300.0 1.0
#dumps
dump trj all atom 500 wat.lammpstrj
#dump trj all waterdump all atom 500 dump.waterinfo
write_data waterinfo.data
write_restart waterinfo.restart
timestep 0.2
run 100
Thanks in advance
Fix shake is part of the rigid package. Did you install that?
Dear Stefan,
Thank you very much for your reply.
Actually, I did not install that. Could you please explain how to install that?
Thanks in advance