{"action":"created","issue":{"url":"https://api.github.com/repos/ParmEd/ParmEd/issues/568","labels_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/568/labels{/name}","comments_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/568/comments","events_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/568/events","html_url":"https://github.com/ParmEd/ParmEd/issues/568","id":128373040,"number":568,"title":"Issues with OpenMM nonbonded ffxml section writing with frcmod files","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":[{"url":"https://api.github.com/repos/ParmEd/ParmEd/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-24T04:52:27Z","updated_at":"2016-01-26T20:39:17Z","closed_at":"2016-01-26T20:39:17Z","body":"If we ask ParmEd to read a simple `frcmod` file like this\r\n```\r\nRemark line goes here\r\nMASS\r\n\r\nBOND\r\n\r\nANGLE\r\n\r\nDIHE\r\n\r\nIMPROPER\r\nca-ca-ca-ha         1.1          180.0         2.0          Using general improper torsional angle  X- X-ca-ha, penalty score=  6.0)\r\n\r\nNONBON\r\n\r\n```\r\nand output an `ffxml` file, we get the following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"/Users/choderaj/miniconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\r\n    self.test(*self.arg)\r\n  File \"/Users/choderaj/github/choderalab/openmoltools/openmoltools.jchodera/openmoltools/tests/test_forcefield_generators.py\", line 118, in test_generateResidueTemplate\r\n    [template, ffxml] = generateResidueTemplate(mol)\r\n  File \"/Users/choderaj/github/choderalab/openmoltools/openmoltools.jchodera/openmoltools/forcefield_generators.py\", line 343, in generateResidueTemplate\r\n    params.write(ffxml)\r\n  File \"/Users/choderaj/miniconda/lib/python2.7/site-packages/parmed/openmm/parameters.py\", line 153, in write\r\n    self._write_omm_nonbonded(dest)\r\n  File \"/Users/choderaj/miniconda/lib/python2.7/site-packages/parmed/openmm/parameters.py\", line 358, in _write_omm_nonbonded\r\n    coulomb14scale = 1.0 / scee.pop()\r\nKeyError: 'pop from an empty set'\r\n```\r\nExample code:\r\n```python\r\n    # Generate ffxml file contents for parmchk-generated frcmod output.\r\n    leaprc = StringIO(\"parm = loadamberparams %s\" % frcmod_filename)\r\n    params = parmed.amber.AmberParameterSet.from_leaprc(leaprc)\r\n    params = parmed.openmm.OpenMMParameterSet.from_parameterset(params)\r\n    ffxml = StringIO()\r\n    params.write(ffxml)\r\n```"},"comment":{"url":"https://api.github.com/repos/ParmEd/ParmEd/issues/comments/175217992","html_url":"https://github.com/ParmEd/ParmEd/issues/568#issuecomment-175217992","issue_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/568","id":175217992,"user":{"login":"swails","id":779022,"avatar_url":"https://avatars.githubusercontent.com/u/779022?v=3","gravatar_id":"","url":"https://api.github.com/users/swails","html_url":"https://github.com/swails","followers_url":"https://api.github.com/users/swails/followers","following_url":"https://api.github.com/users/swails/following{/other_user}","gists_url":"https://api.github.com/users/swails/gists{/gist_id}","starred_url":"https://api.github.com/users/swails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swails/subscriptions","organizations_url":"https://api.github.com/users/swails/orgs","repos_url":"https://api.github.com/users/swails/repos","events_url":"https://api.github.com/users/swails/events{/privacy}","received_events_url":"https://api.github.com/users/swails/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T20:39:17Z","updated_at":"2016-01-26T20:39:17Z","body":"OK, this should be fixed."}}