espressopp.analysis.RDFatomistic¶
Class to compute radial distribution functions in adaptive resolution simulations in subregions of the box. Can be used for regular atomistic/coarsegrained (AT/CG) adaptive resolution simulations as well as path integralbased adaptive resolution simulations. The two functions (compute, computePathIntegral) exhibit different behavior.
The regular compute function is used for regular AT/CG simulations and there are two options:
Option 1 (spanbased = True): the RDF can be calculated in a cuboid region in the center of the box (periodic in y,z, limited in x). In this case, particle pairs are considered for which at least one of them is in the defined cuboid region. This can be useful when the high resolution region has a slab geometry. No further normalization should be required.
Option 2 (spanbased = False): the routine can also calculate unnormalized RDFs using particle pairs with both particles being in the high resolution region (based on the resolution value lambda, the span parameter is not used then). This can be useful when atomistic region has complicated or spherical geometries.
In any case, only pairs of atomistic particles belonging to two different coarsegrained particles are considered. Furthermore, note that the routine uses L_y / half (L_y is the box length in ydirection) as the maximum distance for the RDF calculation, which is then binned according to rdfN during the computation. Hence, L_y should be the shortest box side (or, equally short as L_x and/or L_z).
The computePathIntegral function is used for path integralbased adaptive resolution functions. It calculates the radial distribution functions over pairs of particles between different atoms or coarsegrained beads. Note, however, that in these types of quantum/classical adaptive resolution simulations, regular coarsegrained espressopp particles are associated with each atom and the additional “AdResS” atomistic particles correspond to the different Trotter beads. This means that the routine will, for molecules consisting of multiple atoms, calculate intramolecular rdfs, averaging over the Trotter bead pairs of the ring polymers, which represent the atoms. In doing so, it considers only particles pair with matching Trotter number and with the correct atomistic types. The results are averaged over all Trotter beads. Also in this case L_y / half (L_y is the box length in ydirection) is used as the maximum distance for the RDF calculation, which is then binned according to rdfN during the computation. Furthermore, the calculation is always “spanbased” in x direction (the function ignores the spanbased flag), but in such a fashion that BOTH particles need to be in the defined cuboid region. Normalization is performed as derived in R. Potestio et al., Phys. Rev. Lett. 111, 060601 (2013), Supp. Info. This means that, considering only particles with matching Trotter numbers, the computePathIntegral function calculates the RDF between particles of type A and B within a region bounded in xdirection by \(X_{min}\) and \(X_{max}\) as
where \(N^A\) and \(N^B\) are the number of particles of type A and B in the relevant subregion for the RDF calculation and \(V_{slab}\) is the total volume of this subregion. Furthermore, \(r_a\) denotes the radius of the spherical shell for the RDF calculation around particle \(a\), \(\Delta\) is the thickness of the shell, and \(x_a\) is the \(x\) coordinate of particle \(a\). The final result is an average over all imaginary time slices (Trotter numbers).
Examples:
>>> rdf_0_1 = espressopp.analysis.RDFatomistic(system = system, type1 = 0, type2 = 1, spanbased = True, span = 1.5)
>>> # creates the class for calculating the RDF between atomistic particles of type 1 and 0 between different molecules,
>>> # At least one of these particles has to be within plus/minus 1.5 from the center of the box in xdirection
>>> rdf_0_1.compute(100)
>>> # computes the rdf using 100 bins over a distance corresponding to L_y / 2.0

espressopp.analysis.
RDFatomistic
(system, type1, type2, spanbased, span)¶ Constructs the RDFatomistic object.
Parameters:  system (shared_ptr<System>) – system object
 type1 (int) – type of atom 1
 type2 (int) – type of atom 2
 spanbased (bool) – (default: True) If True, calculates RDFs in a cuboid region of radius span from the center (limited in x, periodic in y,z). If False, calculates RDFs with both particles being in the high resolution region (using lambda resolution values and ignoring span parameter).
 span (real) – (default: 1.0) +/ distance from centre of box in xdirection of the cuboid region used for RDF calculation if spanbased == True. If spanbased == False, this parameter is not used.

espressopp.analysis.RDFatomistic.
compute
(rdfN)¶ Calculates the atomistic RDF assuming a regular atomistic/coarsegrained adaptive resolution setup.
Parameters: rdfN (int) – number of bins Return type: list of reals

espressopp.analysis.RDFatomistic.
computePathIntegral
(rdfN)¶ Calculates the path integralbased RDF averaging over all Trotter bead pairs with the same Trotter bead number between different ring polymers assuming a path integralbased quantum/classical adaptive resolution setup.
Parameters: rdfN (int) – number of bins Return type: list of reals