choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
180 stars 51 forks source link

Checking for charges in setup #595

Open hannahbrucemacdonald opened 4 years ago

hannahbrucemacdonald commented 4 years ago

We currently allow for the set up of perturbations for molecules, either from a file with smiles in (for hydration free energies) or sdf files (with coordinates aligned to a receptor, which could be used for binding or hydration free energies).

If we are running from a smiles, we don't currently check the neutral pH protonation state of that molecule, but just run it as neutral. I suggest that:

hannahbrucemacdonald commented 4 years ago

I'm going to start working on this in branch charge-improvements

jchodera commented 4 years ago

I'm not sure I understand this issue, or that the proposed solution is the correct behavior.

For the simple perses-lite calculation that treats a fixed protonation state, we should be using canonical isomeric SMILES, which uniquely specifies a protonation state and net charge. Do you just mean that we should be checking the net charge always, since we currently assume it is zero?

hannahbrucemacdonald commented 4 years ago

Maybe the issue is twofold - I was using the smiles in the freesolv dataset, which don't specify protonation state or net charge, so if we want to simulate a molecule with a carboxylic acid, it will protonate it. I was suggesting that we use the OESetNeutralpHModel to attempt to correctly protonate it - although moving to an unambiguous canonical isomeric SMILES is a safer option.

I don't think we are checking the net charge of the old / new molecules, and suspect a simulation would run if we tried use old/new with different net charges, but I can check this

jchodera commented 4 years ago

All molecules in FreeSolv report hydration free energies for their neutral forms, so it FreeSolv doesn't contain the canonical isomeric SMILES for the neutral form, we should raise an issue on the FreeSolv repo to have that corrected.

I think OESetNeutralpHModel won't do what we want, since it generates the most appropriate ionization state for pH 7, not the most likely tautomer for the neutral molecule.

We should probably also add a check for charge changes during transformations as you suggest. We can deal with this later with switching counterions into waters, but we should at least present ourselves from doing this until we have implemented that capability.