|
26 | 26 |
|
27 | 27 | import org.openscience.cdk.AminoAcid; |
28 | 28 | import org.openscience.cdk.ChemFile; |
| 29 | +import org.openscience.cdk.aromaticity.Aromaticity; |
| 30 | +import org.openscience.cdk.aromaticity.ElectronDonation; |
29 | 31 | import org.openscience.cdk.dict.DictRef; |
30 | 32 | import org.openscience.cdk.exception.CDKException; |
| 33 | +import org.openscience.cdk.graph.Cycles; |
31 | 34 | import org.openscience.cdk.interfaces.IAminoAcid; |
32 | 35 | import org.openscience.cdk.interfaces.IAtom; |
33 | 36 | import org.openscience.cdk.interfaces.IAtomContainer; |
|
37 | 40 | import org.openscience.cdk.tools.ILoggingTool; |
38 | 41 | import org.openscience.cdk.tools.LoggingToolFactory; |
39 | 42 | import org.openscience.cdk.tools.manipulator.AminoAcidManipulator; |
| 43 | +import org.openscience.cdk.tools.manipulator.AtomContainerManipulator; |
40 | 44 | import org.openscience.cdk.tools.manipulator.ChemFileManipulator; |
41 | 45 |
|
42 | 46 | /** |
@@ -112,6 +116,11 @@ public synchronized static AminoAcid[] createAAs() { |
112 | 116 | return aminoAcids; |
113 | 117 | } |
114 | 118 |
|
| 119 | + // amino-acids only have benzene aromaticity so we can run a simple |
| 120 | + // alternating pi-bond arom model to keep things in a consistent state |
| 121 | + Aromaticity arom = new Aromaticity(ElectronDonation.cdk(), |
| 122 | + Cycles.all(6)); |
| 123 | + |
115 | 124 | // Create set of AtomContainers |
116 | 125 | aminoAcids = new AminoAcid[20]; |
117 | 126 |
|
@@ -169,6 +178,10 @@ public synchronized static AminoAcid[] createAAs() { |
169 | 178 | AminoAcidManipulator.removeAcidicOxygen(aminoAcid); |
170 | 179 | aminoAcid.setProperty(NO_ATOMS, "" + aminoAcid.getAtomCount()); |
171 | 180 | aminoAcid.setProperty(NO_BONDS, "" + aminoAcid.getBondCount()); |
| 181 | + |
| 182 | + AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(aminoAcid); |
| 183 | + arom.apply(aminoAcid); |
| 184 | + |
172 | 185 | if (counter < aminoAcids.length) { |
173 | 186 | aminoAcids[counter] = aminoAcid; |
174 | 187 | } else { |
|
0 commit comments