From: <ha...@us...> - 2017-05-25 22:52:27
|
Revision: 21612 http://sourceforge.net/p/jmol/code/21612 Author: hansonr Date: 2017-05-25 22:52:25 +0000 (Thu, 25 May 2017) Log Message: ----------- removing unnecessary bond chirality business Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelset/Bond.java trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java trunk/Jmol/src/org/jmol/util/Edge.java Modified: trunk/Jmol/src/org/jmol/modelset/Bond.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/Bond.java 2017-05-25 20:28:58 UTC (rev 21611) +++ trunk/Jmol/src/org/jmol/modelset/Bond.java 2017-05-25 22:52:25 UTC (rev 21612) @@ -190,7 +190,8 @@ } /** - * Determine R/S chirality at this position; non-H atoms only; cached in formalChargeAndFlags + * Not implemented. + * * @param doCalculate * * @return "" or "Z" or "E" @@ -197,29 +198,30 @@ */ @Override public String getCIPChirality(boolean doCalculate) { - int flags = (order & BOND_CIP_STEREO_MASK) >> BOND_CIP_STEREO_SHIFT; - if (flags == 0 && getCovalentOrder() == 2 && doCalculate) { - flags = atom1.group.chain.model.ms.getBondCIPChirality(this); - order |= ((flags == 0 ? 3 : flags) << BOND_CIP_STEREO_SHIFT); - } - switch (flags) { - case BOND_CIP_STEREO_E: - return "E"; - case BOND_CIP_STEREO_Z: - return "Z"; - default: +// int flags = (order & BOND_CIP_STEREO_MASK) >> BOND_CIP_STEREO_SHIFT; +// if (flags == 0 && getCovalentOrder() == 2 && doCalculate) { +// flags = atom1.group.chain.model.ms.getBondCIPChirality(this); +// order |= ((flags == 0 ? 3 : flags) << BOND_CIP_STEREO_SHIFT); +// } +// switch (flags) { +// case BOND_CIP_STEREO_E: +// return "E"; +// case BOND_CIP_STEREO_Z: +// return "Z"; +// default: return ""; - } +// } } /** + * Not implemented. * * @param c [0:unknown; 1: Z; 2: E; 3: none] */ @Override public void setCIPChirality(int c) { - order = (byte)((order & ~BOND_CIP_STEREO_MASK) - | (c << BOND_CIP_STEREO_SHIFT)); +// order = (byte)((order & ~BOND_CIP_STEREO_MASK) +// | (c << BOND_CIP_STEREO_SHIFT)); } Modified: trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java 2017-05-25 20:28:58 UTC (rev 21611) +++ trunk/Jmol/src/org/jmol/symmetry/CIPChirality.java 2017-05-25 22:52:25 UTC (rev 21612) @@ -1505,12 +1505,8 @@ else { isAlkene = true; if (isParentBond) { - auxChirality = bond.getCIPChirality(false); - if (auxChirality.equals("")) - auxChirality = "~"; if (atom.getCovalentBondCount() == 2 && atom.getValence() == 4) { parent.isAlkeneAtom2 = false; - parent.auxChirality = "~"; } else { isAlkeneAtom2 = true; } @@ -1517,7 +1513,7 @@ parent.alkeneChild = null; alkeneParent = (parent.alkeneParent == null ? parent : parent.alkeneParent); alkeneParent.alkeneChild = this; - alkeneParent.auxChirality = auxChirality; + nextSP2 = parent; if (parent.alkeneParent == null) parent.nextSP2 = this; } @@ -2130,7 +2126,7 @@ private int getEneWinnerChirality(CIPAtom end1, CIPAtom end2, int maxRule, boolean isAxial) { CIPAtom winner1 = getEneEndWinner(end1, end1.nextSP2, maxRule); CIPAtom winner2 = (winner1 == null || winner1.atom == null ? null - : getEneEndWinner(end2, end2.parent, maxRule)); + : getEneEndWinner(end2, end2.nextSP2, maxRule)); return getEneChirality(winner1, end1, end2, winner2, isAxial, false); } Modified: trunk/Jmol/src/org/jmol/util/Edge.java =================================================================== --- trunk/Jmol/src/org/jmol/util/Edge.java 2017-05-25 20:28:58 UTC (rev 21611) +++ trunk/Jmol/src/org/jmol/util/Edge.java 2017-05-25 22:52:25 UTC (rev 21612) @@ -64,11 +64,12 @@ public final static int TYPE_ATROPISOMER_REV = 0x10002; // only used by SMILES, for ^^nm- private final static int ATROPISOMER_SHIFT = 11; - public final static int BOND_CIP_STEREO_MASK = 0xC0000; // 3 << 18 - public final static int BOND_CIP_STEREO_UNK = 0xC0000; // 3 << 18 same as mask - public final static int BOND_CIP_STEREO_E = 0x80000; // 2 << 18 - public final static int BOND_CIP_STEREO_Z = 0x40000; // 1 << 18 - public final static int BOND_CIP_STEREO_SHIFT = 18; + // NOT IMPLEMENTED +// public final static int BOND_CIP_STEREO_MASK = 0xC0000; // 3 << 18 +// public final static int BOND_CIP_STEREO_UNK = 0xC0000; // 3 << 18 same as mask +// public final static int BOND_CIP_STEREO_E = 0x80000; // 2 << 18 +// public final static int BOND_CIP_STEREO_Z = 0x40000; // 1 << 18 +// public final static int BOND_CIP_STEREO_SHIFT = 18; public final static int BOND_STEREO_MASK = 0x400; // 1 << 10 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |