rikigigi / analisi

Code to analyze molecular dynamics trajectory
GNU General Public License v3.0
16 stars 4 forks source link

Added Vibrational Spectrum in python interface #5

Closed DavideTisi closed 3 years ago

DavideTisi commented 3 years ago

the vibrational spectrum now works and give a matrix vdos(ntypes, freq, Cartesian_coordinate). cannot restart directly the computation from a specific step a complete initialization of traj is needed

DavideTisi commented 3 years ago

I added two interfaces in common.py that can be used as follow for numpy traj

ltot = 64604
l = ltot //2+1
vdab=np.zeros((4,2,l,3))
for i in range(4):
    start = i*ltot
    vdab[i,:,:,:] = analyze_vdos_numpy(pos,vel,types,box,nstep=ltot,start=start)

for lammps traj

analyze_vdos_lammps(traj,nstep=None,start=0,resetAccess=True,print=print)

where resetAccess=True means that at the end of the computation it sets again:

if (resetAccess):
      traj.setAccessWindowSize(traj.getNtimesteps())
      traj.setAccessStart(0)