{"action":"created","issue":{"url":"https://api.github.com/repos/ParmEd/ParmEd/issues/665","repository_url":"https://api.github.com/repos/ParmEd/ParmEd","labels_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/665/labels{/name}","comments_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/665/comments","events_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/665/events","html_url":"https://github.com/ParmEd/ParmEd/issues/665","id":146762030,"number":665,"title":"Parameter set from structure","user":{"login":"ChayaSt","id":6598229,"avatar_url":"https://avatars.githubusercontent.com/u/6598229?v=3","gravatar_id":"","url":"https://api.github.com/users/ChayaSt","html_url":"https://github.com/ChayaSt","followers_url":"https://api.github.com/users/ChayaSt/followers","following_url":"https://api.github.com/users/ChayaSt/following{/other_user}","gists_url":"https://api.github.com/users/ChayaSt/gists{/gist_id}","starred_url":"https://api.github.com/users/ChayaSt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChayaSt/subscriptions","organizations_url":"https://api.github.com/users/ChayaSt/orgs","repos_url":"https://api.github.com/users/ChayaSt/repos","events_url":"https://api.github.com/users/ChayaSt/events{/privacy}","received_events_url":"https://api.github.com/users/ChayaSt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ParmEd/ParmEd/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-07T22:39:04Z","updated_at":"2016-04-08T00:50:07Z","closed_at":null,"body":"When I try creating a ```ParameterSet``` from ```structure```, the urey bradley terms don't copy over correctly. There are only two atom types in the key (1,3 atoms) instead of all three atom types for the angle. This happens because ```structure.urey_bradleys``` only keeps the 1st and 3rd atom of the angle. \r\n\r\nThe fix I'm suggesting is keep the middle atom in ```structure.urey_bradleys``` so that you can get the identical ```ParameterSet```  used to parameterize ```structure````"},"comment":{"url":"https://api.github.com/repos/ParmEd/ParmEd/issues/comments/207151978","html_url":"https://github.com/ParmEd/ParmEd/issues/665#issuecomment-207151978","issue_url":"https://api.github.com/repos/ParmEd/ParmEd/issues/665","id":207151978,"user":{"login":"ChayaSt","id":6598229,"avatar_url":"https://avatars.githubusercontent.com/u/6598229?v=3","gravatar_id":"","url":"https://api.github.com/users/ChayaSt","html_url":"https://github.com/ChayaSt","followers_url":"https://api.github.com/users/ChayaSt/followers","following_url":"https://api.github.com/users/ChayaSt/following{/other_user}","gists_url":"https://api.github.com/users/ChayaSt/gists{/gist_id}","starred_url":"https://api.github.com/users/ChayaSt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChayaSt/subscriptions","organizations_url":"https://api.github.com/users/ChayaSt/orgs","repos_url":"https://api.github.com/users/ChayaSt/repos","events_url":"https://api.github.com/users/ChayaSt/events{/privacy}","received_events_url":"https://api.github.com/users/ChayaSt/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T00:50:06Z","updated_at":"2016-04-08T00:50:06Z","body":"Actually, I'm getting a different error now. \r\n\r\n```\r\nParameterError: Missing angle type for <Angle <Atom CA3 [0]; In PRL 0>--<Atom CA5 [4]; In PRL 0>--<Atom H4 [12]; In PRL 0>; type=<AngleType; k=29.000, theteq=124.600>>\r\n```\r\n\r\nThis is coming from [here](https://github.com/ParmEd/ParmEd/blob/master/parmed/charmm/psf.py#L520-L525). It should be a ```KeyError``` for the Urey Bradly, not the angle. \r\n\r\nI think this happens because in the original parameter set, The Urey bradley terms that don't exist are set to ```k=0.00; req=0.00```. And it seems like these don't get written to the ```structure.urey_bradleys``` list\r\n"}}