Skip to content

Calculating the rdf for norm = "rdf" or "density" at the same time. #5362

@Soulchemist97

Description

@Soulchemist97

Is your feature request related to a problem?

When using interRDF, sometimes I am interested in $N_{ab}$ and sometimes in $G_{ab}$.
At this moment I have to calculate the rdf 2 times, to get both values or the density $rho$, which is really inefficient.

rdf_AB = rdf.InterRDF(g1, g2, nbins=n_bins, range=(ra, rb), norm="rdf",)
rdf_AB_den = rdf.InterRDF(g1, g2, nbins=n_bins, range=(ra, rb), norm="density")

$N_{ab}(r) = \rho G_{ab}(r) $

Describe the solution you'd like

I'd like to be able to return the used $rho$ as a scalar value and just convert the values in an easy way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions