Author Topic: Regarding Partial radial distribution function (RDF) Calculations  (Read 122 times)

dualbeam

  • Newbie
  • *
  • Posts: 6
Hello,

I am trying to calculate partial RDF based on the two ways provided on the link:

http://forum.ovito.org/index.php?topic=131.0

It gives following error:

  File "<string>", line 6, in modify
AttributeError: 'Particles.Bonds' object has no attribute 'length'

(I checked the compute modifier, it shows length values.)

While the automated Python script gives following error:

File "<string>", line 14, in <module>
NameError: name 'ComputeBondLengthsModifier' is not defined

Could you please suggest the possible solution to rectify these errors.

Thanks,
Vivek

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 577
Re: Regarding Partial radial distribution function (RDF) Calculations
« Reply #1 on: January 06, 2019, 11:21:24 PM »
Hi Vivek,

From your error messages it seems that you are using a recent development version of Ovito 3.0.0. The script you mentioned is not compatible with that version anymore, because the programming interface has slightly changed.

The good news is that Ovito 3.0.0 provides a built-in capability to compute partial RDFs, see here:

http://ovito.org/manual_testing/particles.modifiers.coordination_analysis.html

You can access this new capability of the CoordinationAnalysisModifier from a Python script. Please see the first example script in the referenced Python docs. All you need to do additionally, is to set the partial option of the modifier to True.

-Alex

dualbeam

  • Newbie
  • *
  • Posts: 6
Re: Regarding Partial radial distribution function (RDF) Calculations
« Reply #2 on: January 07, 2019, 07:43:42 AM »
Hi Alex,


Thanks, this works great.


Regards,
Vivek