Problem with pressure of CO2 gas

Yes of course, but I would like to calculate a pressure of CO2 with treating a single molecule like a rigid body/single atom/one piece.

I was thinking about a command similar to compute stress/atom, like: compute stress/molecule.
Is there any chance to do it?

Thanks in advance,
Marta

Ray Shan 10.08.15 16:01 >>>

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

You can sum the stress/atom over the atoms in a molecule.

See the compute chunk/atom command and define each “chunk”

as a molecule. Then use the fix ave/chunk command to do

the summing.

Steve

You can define a group that only contains CO2 molecules and use compute stress/atom on that group. This will effectively give you stresses of the CO2 molecules (you also need compute reduce sum to get a summed value).

You can also use the rerun command to run two simulations: one with CO2 and the substrate, the other without CO2 just the substrate. This will give you some idea of the partial pressure of CO2.

Ray

if you want to exclude the (usually unwanted) contribution to the stress from the intra-body interactions of the rigid body, you can use:

neigh_modify exclude molecule

with the being an identifier for a group containing all your CO2 molecules. if you have defined bonds/angles, this will usually have no effect, however, you should then set the corresponding force constants to zero. if you use long-range electrostatics, you must not use this exclude option, but rather define bonds and angles with zero force constants, otherwise you will get bogus contributions from the kspace solver.

it may also help to speed up your calculation a little and improve numerical accuracy.

axel.