{"action":"created","issue":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/488","labels_url":"https://api.github.com/repos/pandegroup/openmm/issues/488/labels{/name}","comments_url":"https://api.github.com/repos/pandegroup/openmm/issues/488/comments","events_url":"https://api.github.com/repos/pandegroup/openmm/issues/488/events","html_url":"https://github.com/pandegroup/openmm/issues/488","id":36180917,"number":488,"title":"Extending ForceField with hooks for parameterizing residues without associated parameters","user":{"login":"jchodera","id":3656088,"avatar_url":"https://avatars.githubusercontent.com/u/3656088?v=3","gravatar_id":"","url":"https://api.github.com/users/jchodera","html_url":"https://github.com/jchodera","followers_url":"https://api.github.com/users/jchodera/followers","following_url":"https://api.github.com/users/jchodera/following{/other_user}","gists_url":"https://api.github.com/users/jchodera/gists{/gist_id}","starred_url":"https://api.github.com/users/jchodera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jchodera/subscriptions","organizations_url":"https://api.github.com/users/jchodera/orgs","repos_url":"https://api.github.com/users/jchodera/repos","events_url":"https://api.github.com/users/jchodera/events{/privacy}","received_events_url":"https://api.github.com/users/jchodera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2014-06-20T16:12:03Z","updated_at":"2016-01-01T23:23:46Z","closed_at":null,"body":"It would be useful to extend the `ForceField` class in the `app` layer to allow it to try to call out to registered \"hooks\" when it encounters residues that do not appear in any loaded forcefield.\r\n\r\nFor example, suppose a ligand is bound to a protein in a PDB file, or cofactors are present, and the user loads in this via `PDBFile` and passes the topology to `ForceField`.  It would be very useful if we could, for example, register `gaff2xml` via these hooks and have `ForceField` call out to `gaff2xml` to generate an ffxml file for any residues that it encounters without existing parameters.  This would initially be used only for small molecules, but could eventually be used to assign parameters to polymeric residues without parameters as well.  Future versions could use [ParamChem](https://www.paramchem.org/), [ATB](http://compbio.biosci.uq.edu.au/atb/), or other parameterization schemes to come.\r\n\r\nWe would need to standardize an interface for this.  Suggestions?"},"comment":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/comments/168350108","html_url":"https://github.com/pandegroup/openmm/issues/488#issuecomment-168350108","issue_url":"https://api.github.com/repos/pandegroup/openmm/issues/488","id":168350108,"user":{"login":"peastman","id":4379786,"avatar_url":"https://avatars.githubusercontent.com/u/4379786?v=3","gravatar_id":"","url":"https://api.github.com/users/peastman","html_url":"https://github.com/peastman","followers_url":"https://api.github.com/users/peastman/followers","following_url":"https://api.github.com/users/peastman/following{/other_user}","gists_url":"https://api.github.com/users/peastman/gists{/gist_id}","starred_url":"https://api.github.com/users/peastman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peastman/subscriptions","organizations_url":"https://api.github.com/users/peastman/orgs","repos_url":"https://api.github.com/users/peastman/repos","events_url":"https://api.github.com/users/peastman/events{/privacy}","received_events_url":"https://api.github.com/users/peastman/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T23:23:46Z","updated_at":"2016-01-01T23:23:46Z","body":"> Residue parameterization is an expensive task, and incurring the cost of parameterizing the same residue when calling createSystem() multiple times is not efficient.\r\n\r\nI don't think that's really an argument one way or the other.  Whether or not the ForceField gets modified, the \"parameterizer\" object can internally cache information.\r\n\r\n> Some handlers may end up producing stochastic differences in parameters produced for a given residue due to the use of numerical optimizers or stochastic conformation generation schemes (e.g. with charges).\r\n\r\nSame as above.  Also, is it any less bad to get different results when you run the identical script twice?  If this is a concern, the user should really generate all the parameters in advance and save them to disk (e.g. as a ForceField XML file).  Having the \"same\" ForceField produce different results seems like a serious problem, whether it's two calls to the same object or calls on two objects that are supposed to be identical."}}