Number of evaporated refrigerant molecules in LAMMPS dump file

Dear LAMMPS users,

I am currently simulating the evaporation of R32 (CH2F2) refrigerant molecules on a Platinum surface. In an output dump file for each time step, I need to find out the number of evaporated R32 molecules.

For a previous simulation similar to my current one, I simulated the evaporation of argon atoms from the Platinum surface, and to find the number of evaporated argon atoms, I used the “coordination analysis” in OVITO, where a boolean expression "Coordination < 7 && Position.Z > 0 && ParticleType == 1’ gave me my number of evaporated atoms for each time step.

The boundary conditions were periodic in x and y directions and fixed in the z direction, and argon had Particle Type 1.

The boundary conditions are the same for my simulation with R32, but counting the number of evaporated R32 molecules with the same principle does not apply anymore as can be seen. Is there any way to obtain this using the information from dump files?

If you want to know how to do this with OVITO, you should post a question in the OVITO forum category.

But you can also have LAMMPS do the counting. You could define a group that has the R32 carbon atom types. Then you can define a region that covers the box volume above the liquid surface. Then you can define an equal style variable using the count() function with two arguments (the group and the region) and then divide the result by 2. This you can output with the thermodynamic output or fix print.

When using a visualization tool like OVITO or VMD you would follow a similar strategy to select and then count atoms and you could even write a post processing tool in python using the dump class from “tools/python/pizza/” folder in the LAMMPS distribution with a similar approach.

Thank you! I tried the approach using LAMMPS and the results were satisfactory enough.