You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from __future__ importprint_functionfromparmed.utils.netcdfimportnetcdf_fileimportpytrajasptimportnumpyasnpfh=netcdf_file('data/mdfrc', mmap=False) # change mdfrc to your force filenameforces=fh.variables['forces']
# do similar thing for velocitiestop=pt.load_topology('data/mdfrc.prmtop') # change prmtop to your parm7 filenametraj=pt.Trajectory(xyz=np.ascontiguousarray(forces[:], dtype='f8'), top=top)
print('original trajectory', traj)
# strip atom atoms# change ':1-100' to your mask (e.g ':WAT')new_traj=pt.strip(':1-100', traj)
print('stripped trajectory', new_traj)
# write trajectorynew_traj.save('test.nc', overwrite=True)
The text was updated successfully, but these errors were encountered:
script
The text was updated successfully, but these errors were encountered: