{"action":"created","issue":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/1184","labels_url":"https://api.github.com/repos/pandegroup/openmm/issues/1184/labels{/name}","comments_url":"https://api.github.com/repos/pandegroup/openmm/issues/1184/comments","events_url":"https://api.github.com/repos/pandegroup/openmm/issues/1184/events","html_url":"https://github.com/pandegroup/openmm/issues/1184","id":110760136,"number":1184,"title":"Refactoring processAmberForceField.py","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":9,"created_at":"2015-10-10T01:46:43Z","updated_at":"2015-10-12T20:29:06Z","closed_at":null,"body":"We would like to refactor [`processAmberForceField.py`](https://github.com/pandegroup/openmm/blob/master/devtools/forcefield-scripts/processAmberForceField.py) to accomplish the following goals:\r\n* Be more readable and maintainable to other developers\r\n* Produce AMBER `ffxml` files that use new `ffxml` extensions (#1168) such as the per-atom typing scheme (#1182) and the name-based `<Bond>` specification schemes (proposed in #1168)\r\n* Correctly handle `prep` files (see #1181)\r\n* Allow output of parameters and residue definitions into different `ffxml` files (if supported by `ForceField`) so that we can combine `gaff.xml`, small molecule definitions, and `gbsa` parameters in a \"mix-and-match\" way.\r\n* Convert small molecules in addition to polymeric residues, and allow these molecules to be loaded from a separate `ffxml` file by avoiding type name definition collisions\r\n* Add automated nosetests to ensure that conversion of polymeric residues and small molecules gives correct parameters\r\n* Enable the addition of an external automation harness to be able to automate the conversion of AMBER forcefields (which @rafwiewiora is working on in #1134) and inclusion of references for provenance data.\r\n\r\nMuch of this effort was actually already undertaken by @kyleabeauchamp and @juliebehr in what is now in [openmoltools](https://github.com/choderalab/openmoltools/blob/master/openmoltools/amber_parser.py), where readability has been significantly improved and small molecules can be converted.  Testing frameworks have also been written, including [test utilities](https://github.com/choderalab/openmoltools/blob/master/openmoltools/utils.py#L260-L287) and [multiple](https://github.com/choderalab/openmoltools/blob/master/openmoltools/tests/test_drugs.py) [nosetests](https://github.com/choderalab/openmoltools/blob/master/openmoltools/tests/test_common_molecules.py).\r\n\r\nI'd like to start with the [refactored class-based version of the script](https://github.com/choderalab/openmoltools/blob/master/openmoltools/amber_parser.py) and clean this up to the point where it accomplishes these goals.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pandegroup/openmm/issues/comments/147511434","html_url":"https://github.com/pandegroup/openmm/issues/1184#issuecomment-147511434","issue_url":"https://api.github.com/repos/pandegroup/openmm/issues/1184","id":147511434,"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},"created_at":"2015-10-12T20:29:06Z","updated_at":"2015-10-12T20:29:06Z","body":"How about this proposal:\r\n\r\n### Pure OpenMM workflow\r\nAllows users to exclusively use `Modeller` and `ForceField` to parameterize molecules with missing templates via their preferred plugin.\r\n* User would initialize `ForceField` with specified handlers or plugins for handling missing small molecules.  We start with an `Antechamber` based plugin, but want to add more later.\r\n* `Modeller` or `ForceField` would identify residues with missing residue templates, and use a standard workflow for creating new residue templates. \r\n* We may also need to figure out how to add missing hydrogens for these new templates\r\n\r\n### Pure external workflow\r\nWe allow users to create the whole system in another program (AMBER, CHARMM) and import the whole system into OpenMM.  This is already possible.\r\n\r\n### Conversion of forcefield definition files and user-deposited cofactor/ion definitions in online repositories\r\nWe provide a set of tools in `simtk.openmm.app.internal` for converting forcefields\r\n* Allows us to automate testing of conversion scripts in travis\r\n* Allows us to write scripts that use this API for converting forcefields with provenance information\r\n* Allows power users to convert cofactors / ion definitions, but if people end up needing this functionality more often, we add a nicer interface through `simtk.openmm.app`"}}