Author Topic: Property specific to a particle ID.  (Read 305 times)

Shamail

  • Newbie
  • *
  • Posts: 6
Property specific to a particle ID.
« on: October 18, 2018, 10:56:59 AM »
Hi,

I use OVITO frequently for supercell creation and modification. I  normally add Debye-Waller factor using Compute-property --> displacement magnitude, but I cannot add a column/property specific to a particle (like different charges for different types of atoms). I think one could do it using Linux but it could be easily employed in OVITO. Thanks.

Best regards

Shamail Ahmed

Constanze Kalcher

  • Administrator
  • Full Member
  • *****
  • Posts: 113
Re: Property specific to a particle ID.
« Reply #1 on: October 18, 2018, 11:11:33 AM »
Hi Shamail,

the Compute property modifier lets you use conditional assigments, see the section about Conditional assignments in the documenation:
http://ovito.org/manual/particles.modifiers.compute_property.html

As an example, say you want to assign a charge of 0.5 to particle type 1 and a charge of 1.1 to particle type 2. The corresponding expression for the Compute property modifier "charge" would then be

(ParticleType == 1 ) ? 0.5 : 1.1

-Constanze

Shamail

  • Newbie
  • *
  • Posts: 6
Re: Property specific to a particle ID.
« Reply #2 on: October 18, 2018, 12:33:09 PM »
Thanks, Constanze. It's working.