perses: hybrid_{complex,solvent}.pdb written by FAH generation code is missing CONECT records for ligands B state
The current hybrid_{complex,solvent}.pdb written by the FAH generation code appears to be missing CONECT records for the ligand B state. It also incorrectly writes the MOL residue as ATOM instead of HETATM.
@dominicrufa : Any idea where I would fix this? It would seem to be an issue with the OpenMM topology we use for writing if we’re writing via OpenMM’s PDBFile.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (17 by maintainers)
So, it took me a while to get things running but I finally made the changes (check PR #839 ). The visualization PDBs generated by the changes are as follow (green is new), for the solvent phase.
Whereas if you want to check the serialized atom mappings you would have to do something like
Which I believe is not that friendly but just to stick to numpy object files. Maybe in the future we can think of better formats for serialization (JSON, HDF?).
@ijpulidos : Here are code snippets that will be useful for adding the features John described. You’ll probably want to insert some version of these code snippets near here
Note that these code snippets assume that we’ve instantiated a
HybridTopologyFactoryobject (which i’ve calledhtfhere), but given the way thefah_generator.pycode (linked above) is set up, you can use replacehtfhere withhtfs[phase]Note: For saving the new PDB, replace
htf.old_positions(pos)withhtf.new_positions(pos)andhtf._topology_proposal.old_topologywithhtf._topology_proposal.new_topologyHappy to review once you’ve incorporated these changes!
Whoops! You’ll want to change the
05-prepare-single-transformation.pyscript to reduce the number of steps. Fromto
These packages aren’t required by
perses, but they are required forfah-xchem. For now, I’ve just been putting thesepip+gitentries into anenvironment.yml, but once things stabilize there, it might be useful for @dotsdl to help me work with the Fragalysis devs to get stable releases of these packages onto PyPI and conda-forge.For now, this functionality is really an optional feature of fah-xchem for pushing structures to fragalysis, and should not be a significant concern right now for perses.
My apologies for neglecting to mention how I initialized this environment! I had used this
environment.ymlfromfah-xchem: https://github.com/choderalab/fah-xchem/blob/master/environment.yml