{"action":"created","issue":{"url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/456","labels_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/456/labels{/name}","comments_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/456/comments","events_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/456/events","html_url":"https://github.com/ReactionMechanismGenerator/RMG-Py/pull/456","id":107776430,"number":456,"title":"Fix bug91 website & ensure heavy atoms appear first in adj lists","user":{"login":"nickvandewiele","id":242147,"avatar_url":"https://avatars.githubusercontent.com/u/242147?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvandewiele","html_url":"https://github.com/nickvandewiele","followers_url":"https://api.github.com/users/nickvandewiele/followers","following_url":"https://api.github.com/users/nickvandewiele/following{/other_user}","gists_url":"https://api.github.com/users/nickvandewiele/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvandewiele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvandewiele/subscriptions","organizations_url":"https://api.github.com/users/nickvandewiele/orgs","repos_url":"https://api.github.com/users/nickvandewiele/repos","events_url":"https://api.github.com/users/nickvandewiele/events{/privacy}","received_events_url":"https://api.github.com/users/nickvandewiele/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-22T18:44:47Z","updated_at":"2015-09-22T22:19:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/pulls/456","html_url":"https://github.com/ReactionMechanismGenerator/RMG-Py/pull/456","diff_url":"https://github.com/ReactionMechanismGenerator/RMG-Py/pull/456.diff","patch_url":"https://github.com/ReactionMechanismGenerator/RMG-Py/pull/456.patch"},"body":"This PR addresses https://github.com/ReactionMechanismGenerator/RMG-website/issues/91 and ensures that heavy atoms appear first in the adjacency list.\r\n\r\nbf72770 is a unit test contains a number of aromatic species that include the molecule mentioned in the issue.\r\n\r\n794eb1a ensure that the risky combo of `.toRDKitMol(molecule, removeHs=True, returnMapping=True)` is not used anymore.\r\n\r\nab4d579 is an improvement of `toRDKitMol` to only add atoms to the index list that will actually exist in the generated rdkit molecule.\r\n\r\na625972 ensures that heavy atoms always preceed H-atoms, when `molecule.sortAtoms()` is called."},"comment":{"url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/comments/142438178","html_url":"https://github.com/ReactionMechanismGenerator/RMG-Py/pull/456#issuecomment-142438178","issue_url":"https://api.github.com/repos/ReactionMechanismGenerator/RMG-Py/issues/456","id":142438178,"user":{"login":"nickvandewiele","id":242147,"avatar_url":"https://avatars.githubusercontent.com/u/242147?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvandewiele","html_url":"https://github.com/nickvandewiele","followers_url":"https://api.github.com/users/nickvandewiele/followers","following_url":"https://api.github.com/users/nickvandewiele/following{/other_user}","gists_url":"https://api.github.com/users/nickvandewiele/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvandewiele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvandewiele/subscriptions","organizations_url":"https://api.github.com/users/nickvandewiele/orgs","repos_url":"https://api.github.com/users/nickvandewiele/repos","events_url":"https://api.github.com/users/nickvandewiele/events{/privacy}","received_events_url":"https://api.github.com/users/nickvandewiele/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T22:19:41Z","updated_at":"2015-09-22T22:19:41Z","body":"The idea of the new atom sorting is that you come up with an order of atoms that is always the same, regardless of how you input the molecule.\r\n\r\nIf you sort atoms purely based on `atom.number`, then the order of the sorted atoms, is heavily dependent on how you input the atoms in the first place.\r\n\r\nThat's why `atom.connectivityvalue` exists. You generate an integer that tries to differentiate atoms of the same element based on their connectivity within the molecule.\r\n\r\nNext, if you purely use atom connectivity values to sort atoms, then you run the risk that H-atoms might come before heavy atoms, purely based on their connectivity. That's why I added a secondary layer of sorting that compensates for that."}}