# Problem with pressure of CO2 gas

Hi all,

I have a problem with obtaining a pressure of CO2 gas molecules, because I'm getting a negative values of pressure.

My system contains 400 CO2 molecules (obtained by using Avogadro program) in 100x100x300A periodic box. How can I compute a pressure of whole molecules, not as a sum of pressures of individual atoms of my gas (C and O) ? Maybe the negative values come from bonds between C and O?

Here is my code:
#initialization
boundary p p p
units metal
dimension 3
echo both
atom_style hybrid angle charge
newton on

#definitions
region whole block -54.390902 45.609098 15.346184 115.346184 -99.7879998 155.932002 units box

mass 1 12.010700 #C
mass 2 15.999400 #O

#POTENTIALS
pair_style lj/cut/coul/long 12.0 12.0
pair_coeff 1 1 0.00242396884 2.757 #C-C
pair_coeff 2 2 0.00693755410 3.033 #O-O
pair_coeff 1 2 0.00410081514 2.892 #C-O

kspace_style pppm 1.0e-4

bond_style harmonic
bond_coeff 1 250.76 1.163

angle_style harmonic
angle_coeff 1 295.411 180.0

neighbor 2.0 bin
neigh_modify every 1

thermo 10

#NVT EQUILLIBRATION
velocity all create 300 383041 dist gaussian
fix 1 all nvt temp 300 300 .1

timestep .001
dump 2 all xyz 100 aaa_CO2_400mol_osobno_test.xyz
run 500000

Well, there is no “pressure of whole molecules” but the pressure of the entire box. thermo_style press will output the pressure of the entire box for you. Please note that pressure can be positive or negative. A negative pressure simply means the box wants to contract and that is not a problem at all.

Ray

Pressures can be negative or positive, that’s the way MD works

as you vary the volume.

Steve