Inquiry about compute_modify extra/dof

Dear Lammps Users,

I am working on a system including two Platinum plates (you can find my system’s configuration in attachment). I am going to freeze the outer most layer in each plate. To do so as you can see in my input file I am using fix setforce 0 0 0. Besides, I want to equilibrate the whole system at 300K using Brendsen thermostat. To record the temperature evaluation, I defined a compute temp for each plate. In addition, I thought because I am fixing one layer( including 1352 atoms) in each plate, I must exclude those DOFs (3*1352) from compute temp. The thing is, as you can see in my log file, the temperature in the plates at the end of equilibration are almost 50 K higher than the value that I specified. I doubt that maybe I am not using compute_modify command in a correct way!!

I will be very thankful if someone could tell me what I am doing wrong here.

----------------------------------------------------------------------------- Input file----------------------

units real
dimension 3
boundary p p p
atom_style atomic
lattice fcc 3.92

region whole block 0 100 0 120 0 100 units box

create_box 2 whole

region Pt_B block 0 100 0 6 0 100 units box #Bottom Wall

region Pt_T block 0 100.0 109 120 0 100 units box #Top wall

region Pt_B_fix block INF INF INF 1.5 INF INF units box

region Pt_T_fix block INF INF 118 INF INF INF units box

mass 1 195.1
mass 2 39.95

create_atoms 1 region Pt_B

create_atoms 1 region Pt_T

group whole region whole

group PtB region Pt_B

group PtT region Pt_T

group PtBfix region Pt_B_fix

group PtTfix region Pt_T_fix

group PtB_thermo subtract PtB PtBfix

group PtT_thermo subtract PtT PtTfix

timestep 1
#----------------------------------------------FORCE FIELD--------------------------------------------------------------

pair_style lj/cut 8.5
pair_coeff 1 1 7.49504 2.47
pair_coeff 1 2 {eps_pt_Ar} {sigma_pt_Ar}
pair_coeff 2 2 {eps_Ar_Ar} {sigma_Ar_Ar}

neighbor 2 bin

#---------------------------------------------DEFINING TEMP COMPUTE
compute TPtB PtB temp

compute_modify TPtB extra/dof 4056

compute TPtBthermo PtB_thermo temp

compute TPtT PtT temp

compute_modify TPtT extra/dof 4056

variable Etot equal “etotal”

thermo 1000
thermo_style custom step c_TPtB c_TPtT ke pe etotal
thermo_modify lost warn
#####-----------------------------------------------------------Energy minimization

min_style cg
minimize 1e-16 1e-16 100000 100000

reset_timestep 0

timestep 1

#--------------------------------------------------------------------fixing atoms
fix 2 PtBfix setforce 0 0 0
fix 3 PtTfix setforce 0 0 0
#---------------------------------------------Thermostating
fix 5 PtB nve

fix 6 PtB temp/berendsen 300 300 100.0

fix 7 PtT nve
fix 8 PtT temp/berendsen 300 300 100.0
run 1000000

system.png

Hi
Setting force to 0. is not enough this only ensure constant velocity. You you should set initial velocity to 0. too for this group of atom so velocity will be kept to 0 during the simulation
Regards

Pascal

Dear Lammps Users,

I am working on a system including two Platinum plates (you can find my system’s configuration in attachment). I am going to freeze the outer most layer in each plate. To do so as you can see in my input file I am using fix setforce 0 0 0. Besides, I want to equilibrate the whole system at 300K using Brendsen thermostat. To record the temperature evaluation, I defined a compute temp for each plate. In addition, I thought because I am fixing one layer( including 1352 atoms) in each plate, I must exclude those DOFs (3*1352) from compute temp. The thing is, as you can see in my log file, the temperature in the plates at the end of equilibration are almost 50 K higher than the value that I specified. I doubt that maybe I am not using compute_modify command in a correct way!!

I will be very thankful if someone could tell me what I am doing wrong here.

your input deck is needlessly complex and convoluted. the simplest way to immobilize some atoms, is to not include them in time integration and temperature computation.
so, create a group, that contains all atoms, but the immobilized ones and do time integration and thermostatting on those. as discussed in the manual, the thermostat will already create a temperature compute for the atoms it is working on, and you can access that (and not monitor the general temperature compute for all atoms).
there is no need at all in your system to modify degrees of freedom.

axel.

HI,

I am not sure if I am correct, but whenever I do NVT simulation with some atoms frozen I group all the mobile atoms in a group, define a compute temp for that group then I use fix_modify temp command to tell the system (by default fix uses the temp of whole system and to compensate for the frozen atoms it increase the temp of the mobile atoms) which temp should be used in temp calculation for the thermostat. You can look if the same command is applicable for Brendsen thermostat too.

Thank you,
Vinit

HI,

I am not sure if I am correct, but whenever I do NVT simulation with some atoms frozen I group all the mobile atoms in a group, define a compute temp for that group then I use fix_modify temp command to tell the system (by default fix uses the temp of whole system and to compensate for the frozen atoms it increase the temp of the mobile atoms) which temp should be used in temp calculation for the thermostat. You can look if the same command is applicable for Brendsen thermostat too.

if you apply the thermostat fix to the group of mobile atoms directly, there is no need to create a separate compute and use fix_modify, as the thermostat itself will create such a compute internally by default. the typical reason to use fix_modify temp, is when a temperature bias should be applied by the thermostat, e.g. via compute temp/profile.

axel.