Reg: Huge increment in density for two phase simulation while using NPT

Dear All,

I built a system which has a solid spherical copper nanoparticle and gas molecules in its surrounding.

I chose the simulation box with the target density of gas molecules at 1 bar and 300K (room temp.) and defined nanoparticle and gas molecules as different subsystems. Then I ran minimization to reduce the high potential collisions. I used fix NVE and fix langevin for both of my subsystems individually and then switched to NVT for the whole system and then switched to fix NPT.

But when I switched to NPT, the density changed and the gas molecules have changed phase and became liquid or solid as the density for the whole system was 0.3 g/cm3 before npt, but after a long run of NPT (1 ns) density shoots up to 4.2 g//cm3. Is this procedure of doing two phase simulation to determine a thermal property correct? Also, when I did the same simulation without doing npt, the code gave me a spurious result of the thermal conductivity using Green kubo. Please help me in understanding what I’m doing wrong and give me suggestions on how to correct this. Thanks!

Your setup may be alright, but without seeing what actual commands you used it is difficult to say. Your density increasing from 0.3 to 4.2 just indicated that the force field type and/or parameters was not adequate in describing the isolated molecules in gaseous state. Therefore, it is more a problem of your model instead of a problem of LAMMPS.

Green Kubo method is based on the assumption that heat is flowing through a homogenous system. Since your system is not homogeneous, you can’t use Green Kubo.


Thanks for the reply!

I have used the LJ potential to describe the interaction between each atom/molecule in my system . Please see the code below. Also, I have seen numerous literature on thermal conductivity of nanofluid which uses Green Kubo method mostly even though the system is not homogeneous. Please suggest.

Error I got is - “Out of range atoms - cannot compute PPPM (…/pppm.cpp:1918)”.

This error generally comes when atoms move far away but in this case density in increasing drastically.

Density increased from .3 to 4g/cm3… Please help




#unit real

setup problem

dimension 3
boundary p p p
pair_style lj/cut/coul/long 12 12
pair_coeff 1 1 0.0573209 2.7918
pair_coeff 1 2 0.097031 2.8959
pair_coeff 2 2 0.164254 3.0
pair_coeff 1 3 0.736 2.5644
pair_coeff 2 3 1.24587 2.6685
pair_coeff 3 3 9.45 2.337
bond_style harmonic
angle_style harmonic
kspace_style pppm 1.0e-4
bond_coeff 1 450.0 1.149
angle_coeff 1 295.41 180.0

group np type 3
group co2 type 1 2

min_style cg
dump 0 all custom 1000 water2_k_MSD_RDF2.lammpstrj id mol type x y z ix iy iz
thermo 1000
thermo_style custom step etotal temp vol press density
minimize 1e-5 1e-7 5000000 10000000

equilibration and thermalization

reset_timestep 0
velocity all create $T 102486 mom yes rot yes dist gaussian

compute TEMP np temp
compute TEMP1 gas temp


1)Thermostat on nanoparticle
2)Thermostat on gas

3)NVT for the whole system

4)NPT for the whole system

Error I got is - “Out of range atoms - cannot compute PPPM (…/pppm.cpp:1918)”.

My suggestions are still the same:

  1. Your force field parameters might not be appropriate for your model
  2. Green-Kubo is for homogeneous systems at equilibrium only.
    Neither of these are mailing list questions. I suggest you talk to your advisor and/or colleagues.