Author Topic: Bug: Not possible to define expression with potential energy value AND occupancy  (Read 1038 times)


  • Jr. Member
  • **
  • Posts: 68
Dear OVITO users,

I am trying to visualise defects that form during a cascade using their occupancy (CoordinationAnalysis Modifier) and their potential energy.
With LAMMPS, I dumped in a file coordinates and potential energy of atoms.
Then, in OVITO (GUI), I am trying to discard some atoms by combining their occupancy and the potential energy with SelectExpression Modifier.
However, it is not possible to define an expression with the potential energy and the occupancy. Either the potential energy appears in the list of possible variables, or occupancy. Both at the same time is not possible.

Is it a bug?

With best regards,

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Dear Christophe,

I don't think this is a bug; it's normal behavior.

First, allow me to correct you: I assume that you used the Wigner Seitz analysis modifier (not the Coordination Analysis modifier) to compute the occupancy numbers. This is important, because the WS modifier performs a replacement of the dataset: It replaces all atoms from the current configuration with the set of sites loaded from the reference configuration, including all their particle properties. This replacement is done, because the occupancy numbers calculated by the WS modifier are per-site properties, not per-atom properties (It's the atoms that occupy the sites). So you loose per-atom energies and other properties during this step and you are left with only the sites loaded from the reference configuration + information on how many atoms (of the displaced configuration) occupy these sites.

If you really need to select sites based on their occupancy numbers AND the energies of the atoms that occupy the sites, then we have to think about possible solutions. There are different avenues that come to my mind.



  • Jr. Member
  • **
  • Posts: 68
Dear Alex,

Yes, you are right, I meant WS modifier.

I guess with a script in Python something could be done. If I can't, I will come back to you.

Best regards,