NaN values by using fix rigid/npt (rigid/npt/small)

Dear Axel,

Following your suggestions to add in fix_modify 1 temp thermo as fowllow,

group RIGID molecule 1:3000

compute RIGID RIGID temp
velocity all create 300.0 333
neighbor 2.0 bin
timestep 0.5
thermo 1000
compute thermo all temp/asphere
thermo_modify temp thermo

(A)fix 1 RIGID rigid/nve/small molecule langevin 300.0 300.0 10.0 2211 #ok!!

(B)fix 1 RIGID rigid/npt molecule temp 300.0 300.0 10.0 iso 1 1 1

fix_modify 1 temp thermo

compute rigid_ke RIGID ke/rigid 1 #translational Ke

compute rigid_rot RIGID erotate/rigid 1 #rotational Ke
variable total_ke equal “c_rigid_ke+c_rigid_rot” #translational Ke+rotational Ke
variable dof equal 63000 ## each dimer has 6 dof
variable boltz equal 1.987e-3 # Boltzmann constant in units real: 1.987e-3 kcal/mol/K
variable rigid_temp equal "2.0
v_total_ke/v_dof/v_boltz"

thermo_style custom step c_thermo dt f_1 v_rigid_temp c_rigid_ke c_rigid_rot

(A) result

Step thermo Dt f_1 rigid_temp rigid_ke rigid_rot
0 284.90993 0.01 7077.3253 243.63538 2720.3939 1636.5375
1000 467.63367 0.01 11795.504 404.73325 4557.6589 2680.1859
2000 382.45062 0.01 8023.0693 296.73992 2716.4693 2590.1308
3000 397.54755 0.01 8230.0146 304.92974 2776.956 2676.1026
4000 396.32389 0.01 8186.2968 302.70574 2773.0101 2640.2766
5000 397.55114 0.01 8157.0978 302.5488 2746.6177 2663.8625

(B) result

Step thermo Dt 1 rigid_temp rigid_ke rigid_ro
0 284.90993 1 47980694 243.63538 2720.3939 1636.5375
1000 -nan 1 -nan nan -nan -nan
2000 -nan 1 -nan nan -nan -nan
3000 -nan 1 -nan nan -nan -nan
4000 -nan 1 -nan nan -nan -nan
5000 -nan 1 -nan nan -nan -nan

Am I using fix it rigid/NPT to calculate, ignore?

Regards

Mark Li

Hi Mark,

what happens if you use fix rigid/nvt instead of fix rigid/npt? Please provide a minimal input deck that reproduces the issue you got with fix rigid/npt.

-Trung

Hi Mark,

sorry for the delay. Please try the attached input file to see if the issue with npt/rigid(/small) is resolved.

The issue you’ve encountered comes from the fact that the initial pressure of the system is far away from, or much higher than, the set values in npt/rigid. I would suggest you first equilibrate the system with NVT (via nve/rigid + langevin, or nvt/rigid) to estimate the current pressure of the system, then switch to NPT (npt/rigid) with the initial set pressure close to/lower than the pressure obtained from the NVT run.

Also make sure that you use the correct number of bodies when computing the dof.

Best,
-Trung

in.TwoGBs.simple.trung (6.72 KB)