newanalysis.gfunction.RDF
- class newanalysis.gfunction.RDF(modes, histo_min, histo_max, histo_dr, sel1_n, sel2_n, sel1_nmol, sel2_nmol, box_x, box_y=None, box_z=None, use_cuda=False, norm_volume=None)
Bases:
object
class RDF
A container object for calculating radial distribution functions.
Methods
calcFrame(coor_sel1, coor_sel2, dip_sel1=None, dip_sel2=None,
Print some information about the RDF container.
Reset histogram arrays to zero
scale
Update the box dimensions, when analysing NpT trajectories.
- param filename .. name of the file to be written to. Each type of rdf will be written to a separate file:
with the ending specifying the type.
- calcFrame(coor_sel1, coor_sel2, dip_sel1=None, dip_sel2=None, pre_coor_sel1_gpu=None, pre_coor_sel2_gpu=None, pre_dip_sel1_gpu=None, pre_dip_sel2_gpu=None)
- calcFrame(coor_sel1, coor_sel2, dip_sel1=None, dip_sel2=None,
pre_coor_sel1_gpu=None, pre_coor_sel2_gpu=None, pre_dip_sel1_gpu=None, pre_dip_sel2_gpu=None)
- Parameters:
numpy-array (coor_sel1 ..) –
selection (dip_sel2 .. numpy-array containing the dipoles of the second) –
selection –
selection –
arrays (pre-allocated) – PyCUDA GPU array objects obtained from drv.memalloc()
Pass the data needed to calculate the RDF for the current frame and do the calculation. Optionally, pre-allocated arrays on the GPU can be used. This is useful, if they are reused for more than one rdf calculation.
- printInfo()
Print some information about the RDF container.
- resetArrays()
Reset histogram arrays to zero
- update_box(box_x, box_y, box_z)
Update the box dimensions, when analysing NpT trajectories.
- write(filename='rdf')
- Parameters:
file (filename .. name of the file to be written to. Each type of rdf will be written to a separate) – with the ending specifying the type.
Norm the calculated histograms and write them to the specified file.