pwtools.pydos.fvacf¶
- pwtools.pydos.fvacf(vel, m=None, method=2, nthreads=None)[source]¶
Interface to Fortran function _flib.vacf(). Otherwise same functionallity as pyvacf(). Use this for production calculations.
- Parameters:
vel (3d array, (nstep, natoms, 3)) – Atomic velocities.
m (1d array (natoms,)) – Atomic masses.
method (int) –
1 : loops2 : vectorized loopsnthreads (int ot None) – If int, then use this many OpenMP threads in the Fortran extension. Only useful if the extension was compiled with OpenMP support, of course.
- Returns:
c – VACF
- Return type:
1d array (nstep,)
Notes
Fortran extension:
$ python -c "import _flib; print(_flib.vacf.__doc__)" vacf - Function signature: c = vacf(v,m,c,method,use_m,[nthreads,natoms,nstep]) Required arguments: v : input rank-3 array('d') with bounds (natoms,3,nstep) m : input rank-1 array('d') with bounds (natoms) c : input rank-1 array('d') with bounds (nstep) method : input int use_m : input int Optional arguments: nthreads : input int natoms := shape(v,0) input int nstep := shape(v,2) input int Return objects: c : rank-1 array('d') with bounds (nstep)
- Shape of vel: The old array shapes were (natoms, 3, nstep), the new is
(nstep,natoms,3). B/c we don’t want to adapt flib.f90, we change vel’s shape before passing it to the extension.
See also