cg_openmm
cg_openmm copied to clipboard
precision of positions stored in .nc file vs. pdb files
While updating the expectation native contacts code, I realized that loading in the positions to mdtraj through pdb files will reduce the precision quite a lot (4 decimal place vs. the double precision values stored in the .nc files).
This is probably ok for now, but we might want to add a function to convert to high precision positions to mdtraj trajectories, since the mdtraj native contacts calculations are orders of magnitude faster than the cg_openmm distance calculator.
Is there another format the OpenMM can generate that could be used as well, like DCD, which should be full precision? See http://docs.openmm.org/latest/userguide/application.html#writing-trajectories
I don't think we can get openmmtools to output directly to .dcd, but we can use the dcd writer instead of (or in addition to) the pdb writer in process_replica_exchange. http://docs.openmm.org/development/api-python/generated/simtk.openmm.app.dcdfile.DCDFile.html