Skip to content

Commit 106c09a

Browse files
committed
Only emit when the option is set.
1 parent fb5241b commit 106c09a

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

storage/smiles/src/main/java/org/openscience/cdk/smiles/CxSmilesGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ public int compare(List<Integer> a, List<Integer> b) {
231231

232232
}
233233

234-
if (state.ligandOrdering != null && !state.ligandOrdering.isEmpty()) {
234+
if (SmiFlavor.isSet(opts, SmiFlavor.CxLigandOrder) &&
235+
state.ligandOrdering != null && !state.ligandOrdering.isEmpty()) {
235236

236237
if (sb.length() > 2) sb.append(',');
237238
sb.append("LO");

storage/smiles/src/main/java/org/openscience/cdk/smiles/SmiFlavor.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,20 @@ private SmiFlavor() {
164164
*/
165165
public static final int CxFragmentGroup = 0x100000;
166166

167+
/**
168+
* Output ligand order information.
169+
*/
170+
public static final int CxLigandOrder = 0x200000;
171+
167172
/**
168173
* Renumber AtomAtomMaps during canonical generation
169174
*/
170-
public static final int AtomAtomMapRenumber = Canonical | AtomAtomMap | 0x200000;
175+
public static final int AtomAtomMapRenumber = Canonical | AtomAtomMap | 0x2000000;
171176

172177
/**
173178
* Output CXSMILES layers.
174179
*/
175-
public static final int CxSmiles = CxAtomLabel | CxAtomValue | CxRadical | CxFragmentGroup | CxMulticenter | CxPolymer;
180+
public static final int CxSmiles = CxAtomLabel | CxAtomValue | CxRadical | CxFragmentGroup | CxMulticenter | CxPolymer | CxLigandOrder;
176181

177182
/**
178183
* Output CXSMILES layers and coordinates.

0 commit comments

Comments
 (0)