{"action":"created","issue":{"url":"https://api.github.com/repos/ParmEd/ParmEd/issues/299","labels_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/299/comments","events_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/299/events","html_url":"https://github.com/ParmEd/ParmEd/pull/299","id":96895511,"number":299,"title":"Try to fix the molecule ordering problem in Gromacs topologies","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-23T20:11:06Z","updated_at":"2015-07-23T20:36:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ParmEd/ParmEd/pulls/299","html_url":"https://github.com/ParmEd/ParmEd/pull/299","diff_url":"https://github.com/ParmEd/ParmEd/pull/299.diff","patch_url":"https://github.com/ParmEd/ParmEd/pull/299.patch"},"body":"Attempt to fix #292 \r\n\r\n@mpharrigan -- try this PR out and see if it does the trick.  The `[ molecules ]` section gets a lot longer, since I decided against reordering the atoms.  If I reordered atoms, then the following would *not* work:\r\n\r\n```Python\r\nparm.save('gmx.top', format='gromacs')\r\nparm.save('gmx.gro')\r\n```\r\n\r\nSince the ordering on `gmx.top` would change relative to `parm`, and the generated GRO file wouldn't match.  You'd have to do something like this instead:\r\n\r\n```Python\r\ntop = parm.gromacs.GromacsTopologyFile.from_structure(parm)\r\ntop.write('gmx.top')\r\ntop.save('gmx.gro')\r\n```\r\n\r\nAnd there would be really no good way of catching this mistake.  It's better if everything can have the same order (not always possible).  Let me know if this PR fixes the issues you're seeing and I'll merge it."},"comment":{"url":"https://api.github.com/repos/ParmEd/ParmEd/issues/comments/124233091","html_url":"https://github.com/ParmEd/ParmEd/pull/299#issuecomment-124233091","issue_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/299","id":124233091,"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":"2015-07-23T20:36:04Z","updated_at":"2015-07-23T20:36:04Z","body":"> To be clear, I should be testing the top code block\r\n\r\nThey should both be equivalent under this PR."}}