How to use the CalCRDF function of rdkit.Chem.rdMolDescriptors to calculate RDFs of selected atom/atom type?

56 views Asked by At

I'm trying to use RDKit to calculate the radial distribution function of selected atom types (e.g. oxygen atoms in water clusters).

Simple application of RDF implementation as available through rdkit.Chem.rdMolDescriptors (https://www.rdkit.org/docs/source/rdkit.Chem.rdMolDescriptors.html#rdkit.Chem.rdMolDescriptors.CalcRDF) applied to a molecule/conformer instance gives me a list of values, but i find it difficult to understand what this list represents and whether i can use it for my specific purpose (e.g. the plot of RDF between two atom types). Do you know where could I find more information on how this function is implemented, ideally with examples?

The minimal example could be:

from rdkit import Chem
from rdkit.Chem import rdMolDescriptors

with open("water3.sdf") as f:
    data = f.read()

mol=Chem.MolFromMolBlock(data)
rdf=rdMolDescriptors.CalcRDF(mol)
rdf

which gives:

[0.0,
 0.0,
 0.0,
 0.0,
 1.56,
 0.0,
 0.0,
 0.0,
 0.015,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 2.768,
 0.0,
 0.0,
 0.0,
 0.027,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.797,
 0.0,
 0.0,
 0.0,
 0.008,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 2.747,
 0.0,
 0.0,
 0.0,
 0.026,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.322,
 0.0,
 0.0,
 0.0,
 0.003,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 2.281,
 0.0,
 0.0,
 0.0,
 0.022,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 1.56,
 0.0,
 0.0,
 0.0,
 0.015,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0,
 0.0]

The geometry on "water3.sdf" is (from https://bpb-us-e1.wpmucdn.com/sites.uw.edu/dist/1/2323/files/2019/01/W3_mp2_avtz_opt_geoms_1KJ-yuxycx.txt):

$ cat water3.sdf
-229.001716383436
 OpenBabel11232314423D

  9  6  0  0  0  0  0  0  0  0999 V2000
   -2.5974   -0.1622    0.5184 O   0  0  0  0  0  0  0  0  0  0  0  0
   -3.1124    0.5916    0.2141 H   0  0  0  0  0  0  0  0  0  0  0  0
   -2.9915   -0.9170    0.0699 H   0  0  0  0  0  0  0  0  0  0  0  0
    0.0000    0.0000   -0.8710 O   0  0  0  0  0  0  0  0  0  0  0  0
    0.7671    0.0252   -0.2838 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7671   -0.0252   -0.2838 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.5974    0.1622    0.5184 O   0  0  0  0  0  0  0  0  0  0  0  0
    3.1124   -0.5916    0.2141 H   0  0  0  0  0  0  0  0  0  0  0  0
    2.9915    0.9170    0.0699 H   0  0  0  0  0  0  0  0  0  0  0  0
  2  1  1  0  0  0  0
  3  1  1  0  0  0  0
  4  5  1  0  0  0  0
  4  6  1  0  0  0  0
  8  7  1  0  0  0  0
  9  7  1  0  0  0  0
M  END
$$$$
0

There are 0 answers