Skip to content

Commit 86a7183

Browse files
committed
The class expects aromatic flags to be set on the ringset, this was never the case semantics so the test IsInSameAromatic ring was not working correctly.
1 parent 44e2aa2 commit 86a7183

File tree

1 file changed

+11
-0
lines changed
  • descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular

1 file changed

+11
-0
lines changed

descriptor/qsarmolecular/src/main/java/org/openscience/cdk/qsar/descriptors/molecular/ALOGPDescriptor.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,17 @@ public DescriptorValue calculate(IAtomContainer atomContainer) {
19441944
EStateAtomTypeMatcher eStateMatcher = new EStateAtomTypeMatcher();
19451945
eStateMatcher.setRingSet(rs);
19461946

1947+
for (IAtomContainer ring : rs.atomContainers()) {
1948+
boolean arom = true;
1949+
for (IBond bond : ring.bonds()) {
1950+
if (!bond.isAromatic()) {
1951+
arom = false;
1952+
break;
1953+
}
1954+
}
1955+
ring.setFlag(CDKConstants.ISAROMATIC, arom);
1956+
}
1957+
19471958
for (int i = 0; i < container.getAtomCount(); i++) {
19481959
IAtomType atomType = eStateMatcher.findMatchingAtomType(container, container.getAtom(i));
19491960
if (atomType == null) {

0 commit comments

Comments
 (0)