Skip to content

Commit

Permalink
now shows attachment point cones in atomicNo color
Browse files Browse the repository at this point in the history
  • Loading branch information
thsa committed Sep 22, 2024
1 parent 1d66344 commit 7a02167
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 7a02167

Please sign in to comment.