analysis.RDF package¶
Submodules¶
analysis.RDF.RDF module¶
RDF calculation
-
analysis.RDF.RDF.
rdf
(x, t, box, pairs, nbins, pbc=True)[source]¶ Calculate RDF.
Parameters: x : numpy float64 array
Positions of the particles in the system
t : numpy int32 array
Types of the particles
box : numpy float64 array
Box
pairs: iterable
List of pairs to consider. Each element of the list is a tuple of size 2, with the first element being the types considered and the second one the other types. For example, if we want to calculate the RDF on a system with 2 types of particles of all types vs all types and type 1 vs type 2, the pairs should be:
pairs = [((1, 2), (1, 2)), ((1,), (2,))]
A keyword for “all types” is type 0
nbins : int
Number of bins to consider
pbc : boolean, optional
Whether or not to use periodic boundary conditions. Default is True.
Returns: rdf : numpy array
An array with the information of the compute. The first column is ‘r’ and the rest are the RDF calculated for the pair list.
-
analysis.RDF.RDF.
ssf
(gr, density, pbc=True)[source]¶ Calculate structure factor given the radial distribution function.
Parameters: gr : numpy array
Radial Distribution Function. First column is the position, second is the RDF itself
density : float
Density of the studied system
pbc : boolean, optional
Whether or not the rdf was calculated with periodic boundary conditions.
Returns: S : numpy array
The structure factor of the system. First column is the wavenumber, second is the ssf itself.