From 7a021679ba4c7a5a11418e9607e9d7ed2bef749a Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 22 Sep 2024 16:50:35 +0200 Subject: [PATCH] now shows attachment point cones in atomicNo color --- .../java/org/openmolecules/render/MoleculeArchitect.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openmolecules/render/MoleculeArchitect.java b/src/main/java/org/openmolecules/render/MoleculeArchitect.java index 0d35287..c297219 100755 --- a/src/main/java/org/openmolecules/render/MoleculeArchitect.java +++ b/src/main/java/org/openmolecules/render/MoleculeArchitect.java @@ -281,7 +281,11 @@ private void buildAttachmentPoint(int atom, double radius) { double length = 2 * radius; Coordinates c3 = c1.subC(delta.scale((1.0-length/dist)/2.0)); - mBuilder.addAtomCone(atomRole(atom), radius, length, c3, b, c, getAtomColor(coreAtom)); + + // attachment points may be defined in 2 ways: atomicNo=0 or atomCustomLabel="*". In the latter case they have an atomicNo! + int rgb = getAtomARGB(mMol.getAtomicNo(mMol.getAtomicNo(atom) != 0 ? atom : coreAtom)); + + mBuilder.addAtomCone(atomRole(atom), radius, length, c3, b, c, rgb); } private void buildBond(int bond) {