openforcefield / smarty

Chemical perception tree automated exploration tool.
http://openforcefield.org
MIT License
19 stars 8 forks source link

Create OEMol objects from extended OpenMM topology of #18 #19

Open davidlmobley opened 8 years ago

davidlmobley commented 8 years ago

We'll need to create OEMol objects from components of an OpenMM Topology as discussed in #18 . Assuming these topologies contain connectivity, element, bond order, and formal charge, this should be possible to do using the basic OEChem primer ingredients such as atom creation, bond creation, assignment of formal charges and so on.

I will raise an issue with OpenEye support to see if it can be done without formal charge provided all of the atoms are explicit.

davidlmobley commented 8 years ago

Regarding the formal charge, we can use OEAssignFormalCharges ( http://docs.eyesopen.com/toolkits/python/oechemtk/OEChemFunctions/OEAssignFormalCharges.html ) with this additional info:

"Sets the formal charge property of an atom, based upon a simplistic valence model. This function assumes that the bond orders and implicit hydrogen counts have been set on a molecule. For example, this function will place a single positive charge on a neutral four-valent nitrogen. Note that this function only modifies neutral atoms, with zero formal charge. This preserves any formal charges previously assigned, but requires the charge to be reset to zero in order to force a reassignment."

There are more details on the valence model here: https://docs.eyesopen.com/toolkits/python/oechemtk/valence.html#openeye-valence-models