Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added aromaticity recognition for symmetry calcs
Aromaticity is now perceived in calculating cyclic symmetry numbers. This commit copies a molecule inside `calculateCyclicSymmetryNumber`, turns it into an rdkit object, finds all the aromatic bonds and atoms. The same bonds and atoms in the corresponding rmg molecule object are then redifined so that the alogorithm is using the correct information. There is one strange thing about this fix that I dont yet understand. The unittest thinks cyclic symmetry number of dimethylbenzene is 1 (should be 2). On my local machine, the same `calculateCyclicSymmetryNumber` function gets it correct, at 2. Also, i'm inadvertantly printing a bit to stdout, and not sure why it's happening? relevant to issues ReactionMechanismGenerator#12, ReactionMechanismGenerator#24, ReactionMechanismGenerator#119, ReactionMechanismGenerator#70, ReactionMechanismGenerator#141 fixup! added aromaticity recognition for symmetry calcs Better to avoid casting to string if we can - just check if it is None. fixup! added aromaticity recognition for symmetry calcs I think this could have been nasty! atomType is a mutable object. Suppose it was a Cds atom type. What your code would have done, is change the label on all Cds atom types to be 'Cb'. atom1 -> AtomTypeCds -> label -> 'Cds' would become atom1 -> AtomTypeCds -> label -> 'Cb' instead of atom1 -> AtomTypeCb -> label -> 'Cb' Because the AtomType objects are shared, I think it would have changed them everywhere, not just in this copy of this molecule.
- Loading branch information