{"action":"closed","issue":{"url":"https://api.github.com/repos/shirtsgroup/InterMol/issues/174","labels_url":"https://api.github.com/repos/shirtsgroup/InterMol/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/shirtsgroup/InterMol/issues/174/comments","events_url":"https://api.github.com/repos/shirtsgroup/InterMol/issues/174/events","html_url":"https://github.com/shirtsgroup/InterMol/issues/174","id":98644658,"number":174,"title":"Incorrect logic in gromacs dihedral read in conversion?","user":{"login":"mrshirts","id":4274132,"avatar_url":"https://avatars.githubusercontent.com/u/4274132?v=3","gravatar_id":"","url":"https://api.github.com/users/mrshirts","html_url":"https://github.com/mrshirts","followers_url":"https://api.github.com/users/mrshirts/followers","following_url":"https://api.github.com/users/mrshirts/following{/other_user}","gists_url":"https://api.github.com/users/mrshirts/gists{/gist_id}","starred_url":"https://api.github.com/users/mrshirts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrshirts/subscriptions","organizations_url":"https://api.github.com/users/mrshirts/orgs","repos_url":"https://api.github.com/users/mrshirts/repos","events_url":"https://api.github.com/users/mrshirts/events{/privacy}","received_events_url":"https://api.github.com/users/mrshirts/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shirtsgroup/InterMol/labels/GROMACS","name":"GROMACS","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"ctk3b","id":3527431,"avatar_url":"https://avatars.githubusercontent.com/u/3527431?v=3","gravatar_id":"","url":"https://api.github.com/users/ctk3b","html_url":"https://github.com/ctk3b","followers_url":"https://api.github.com/users/ctk3b/followers","following_url":"https://api.github.com/users/ctk3b/following{/other_user}","gists_url":"https://api.github.com/users/ctk3b/gists{/gist_id}","starred_url":"https://api.github.com/users/ctk3b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctk3b/subscriptions","organizations_url":"https://api.github.com/users/ctk3b/orgs","repos_url":"https://api.github.com/users/ctk3b/repos","events_url":"https://api.github.com/users/ctk3b/events{/privacy}","received_events_url":"https://api.github.com/users/ctk3b/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/shirtsgroup/InterMol/milestones/3","html_url":"https://github.com/shirtsgroup/InterMol/milestones/0.2","labels_url":"https://api.github.com/repos/shirtsgroup/InterMol/milestones/3/labels","id":949242,"number":3,"title":"0.2","description":"The timing to release to other developers to start to collaborate on the project.","creator":{"login":"ctk3b","id":3527431,"avatar_url":"https://avatars.githubusercontent.com/u/3527431?v=3","gravatar_id":"","url":"https://api.github.com/users/ctk3b","html_url":"https://github.com/ctk3b","followers_url":"https://api.github.com/users/ctk3b/followers","following_url":"https://api.github.com/users/ctk3b/following{/other_user}","gists_url":"https://api.github.com/users/ctk3b/gists{/gist_id}","starred_url":"https://api.github.com/users/ctk3b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctk3b/subscriptions","organizations_url":"https://api.github.com/users/ctk3b/orgs","repos_url":"https://api.github.com/users/ctk3b/repos","events_url":"https://api.github.com/users/ctk3b/events{/privacy}","received_events_url":"https://api.github.com/users/ctk3b/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":7,"state":"open","created_at":"2015-01-23T22:42:39Z","updated_at":"2015-08-03T16:07:47Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-08-02T23:19:36Z","updated_at":"2015-08-03T16:07:47Z","closed_at":"2015-08-03T16:07:47Z","body":"I noticed that the gromacs tests return a lot of warnings of the type:\r\n\r\nDid not convert dihedral: <class 'intermol.forces.trig_dihedral_type.TrigDihedral'>\r\n\r\nThe issue seems to trace down to the logic in create_dihedral in gromacs_parser. Right now, create dihedral assigns the dihedral type by the code:\r\n\r\n             if numeric_dihedraltype in ['1', '3', '4', '5', '9']:\r\n                gromacs_dihedral = TrigDihedral\r\n            else:\r\n                gromacs_dihedral = self.gromacs_dihedrals[numeric_dihedraltype]\r\n\r\nThis dihedral then gets passed to canonical dihedral, where it goes through logic \r\n\r\n            if dihedral == ProperPeriodicDihedralType:\r\n                convertfunc = convert_dihedral_from_proper_to_trig\r\n                converted_dihedral = TrigDihedralType\r\n            elif dihedral == ProperPeriodicDihedral:\r\n                convertfunc = convert_dihedral_from_proper_to_trig\r\n                converted_dihedral = TrigDihedral\r\n            elif dihedral in (ImproperHarmonicDihedralType, ImproperHarmonicDihedral):\r\n                convertfunc = convert_nothing\r\n            elif dihedral == RbDihedralType:\r\n                convertfunc = convert_dihedral_from_RB_to_trig\r\n\r\netc.  i.e. it's not expecting the dihedral to be converted to TrigDihedral yet, and ends up giving up when it finds a dihedral that is already converted. \r\n\r\nThis is clearly duplicated logic, but I'm not sure exactly where to remove the duplication. "}}