Hello,
Very basic question that I could not find an answer to. How can I tell the PDBreporter to only write out the protein coordinates and omit solvent/ions? My trajectories are unnecessarily large as I do not care about solvent positions.
Thank you,
Dennis
PDBreporter: Write only a Protein to trajectory
- Dennis Della Corte
- Posts: 10
- Joined: Wed Apr 17, 2019 7:49 am
- Peter Eastman
- Posts: 2591
- Joined: Thu Aug 09, 2007 1:25 pm
Re: PDBreporter: Write only a Protein to trajectory
PDBReporter doesn't offer that feature. On the other hand, it's a really simple class. See https://github.com/openmm/openmm/blob/m ... eporter.py. If you want to, it would be really easy to create a modified version that strips out the water. In the constructor, use Modeller.deleteWater() to create a new Topology with all the water removed, and record the indices of the non-water atoms in the original Topology. In report(), use those indices to create a new list of positions to pass to writeModel().
That said, I really don't recommend using PDB for trajectories. DCDReporter produces much smaller files, and it also stores the positions to higher precision.
That said, I really don't recommend using PDB for trajectories. DCDReporter produces much smaller files, and it also stores the positions to higher precision.