本文整理汇总了Java中chemaxon.struc.MolBond.DOWN属性的典型用法代码示例。如果您正苦于以下问题:Java MolBond.DOWN属性的具体用法?Java MolBond.DOWN怎么用?Java MolBond.DOWN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类chemaxon.struc.MolBond
的用法示例。
在下文中一共展示了MolBond.DOWN属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resetEZ
public static void resetEZ (Molecule mol) {
MolBond[] bonds = mol.getBondArray();
for (int i = 0; i < bonds.length; ++i) {
MolBond b = bonds[i];
int type = b.getType();
if (type == 2) {
b.setFlags(0, MolBond.CTUMASK);
}
else if (type == 1) {
int flags = b.getFlags() & MolBond.STEREO1_MASK;
if (flags == (MolBond.UP | MolBond.DOWN)) {
// WAVY flag...
b.setFlags(0, MolBond.STEREO1_MASK);
}
}
}
}
示例2: isSingleStereo
/**
* Check if the bond that R atom is part of is single stereo bond or not
*
* @param rAtom the R atom to be checked
* @return true or false
* @throws StructureException
*/
protected static boolean isSingleStereo(MolAtom rAtom) throws StructureException {
int bondCount = rAtom.getBondCount();
if (bondCount != 1) {
throw new StructureException("RGroup is allowed to have single connection to other atom");
}
MolBond bond = rAtom.getBond(0);
int bondType = bond.getFlags() & MolBond.STEREO1_MASK;
return bondType == MolBond.UP || bondType == MolBond.DOWN || bondType == MolBond.WAVY;
}
示例3: getParityFlag
static String getParityFlag (int parity) {
if (parity == MolBond.UP) return "UP";
if (parity == MolBond.DOWN) return "DOWN";
return "?";
}
示例4: countBondParity
static int countBondParity (MolAtom atom, int dir) {
int count = 0;
Molecule mol = (Molecule)atom.getParent();
if (DEBUG) {
logger.info("** Atom "+(mol.indexOf(atom)+1));
}
for (int n = 0; n < atom.getBondCount(); ++n) {
MolBond nb = atom.getBond(n);
int parity = nb.getFlags() & MolBond.STEREO1_MASK;
if (parity == MolBond.UP) {
if (DEBUG) {
System.err.println(" UP: "+(mol.indexOf(nb.getAtom1())+1)
+"-"+(mol.indexOf(nb.getAtom2())+1));
}
if (dir < 0) {
if (nb.getAtom1() == atom) {
++count;
}
}
else if (dir > 0) {
if (nb.getAtom2() == atom) {
++count;
}
}
else {
++count;
}
}
else if (parity == MolBond.DOWN) {
if (DEBUG) {
System.err.println(" DOWN: "+(mol.indexOf(nb.getAtom1())+1)
+"-"+(mol.indexOf(nb.getAtom2())+1));
}
if (dir < 0) {
if (nb.getAtom1() == atom) {
++count;
}
}
else if (dir > 0) {
if (nb.getAtom2() == atom) {
++count;
}
}
else {
++count;
}
}
}
return count;
}