本文整理汇总了Java中chemaxon.struc.MolBond.AROMATIC属性的典型用法代码示例。如果您正苦于以下问题:Java MolBond.AROMATIC属性的具体用法?Java MolBond.AROMATIC怎么用?Java MolBond.AROMATIC使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类chemaxon.struc.MolBond
的用法示例。
在下文中一共展示了MolBond.AROMATIC属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isQueryMol
public static boolean isQueryMol (Molecule mol) {
mol.ungroupSgroups();
for (MolAtom atom : mol.getAtomArray()) {
switch (atom.getAtno()) {
case MolAtom.LIST:
case MolAtom.NOTLIST:
case MolAtom.ANY:
case MolAtom.RGROUP:
return true;
}
}
for (MolBond bond : mol.getBondArray()) {
switch (bond.getType()) {
case 1: case 2: case 3: case MolBond.AROMATIC:
break;
default:
return true;
}
}
return false;
}
示例2: isKekulized
protected static boolean isKekulized (Molecule m) {
for (MolBond b : m.getBondArray()) {
if (b.getType() == MolBond.AROMATIC) {
return false;
}
}
return true;
}
示例3: getLabel
public String getLabel (MolBond b) {
int type = b.getType();
switch (type) {
case 1: return "";
case 2: return "=";
case 3: return "#";
case MolBond.AROMATIC: return ":";
default: return "?";
}
}
示例4: postprocessing
void postprocessing (Molecule mol, boolean chargeBalance) {
if (chargeBalance) chargeBalance (mol);
if (mol.getAtomCount() > 0) {
/*
* this is needed because of tests/standardizer_case10.smi
*/
try {
String smiles = mol.toFormat("cxsmiles:u");
if (DEBUG) {
logger.log(Level.INFO, "Before final molecule cleaning: "
+smiles);
}
Molecule newmol = MolImporter.importMol(smiles);
newmol.dearomatize();
boolean hasArom = false;
for (MolBond b : newmol.getBondArray()) {
if (b.getType() == MolBond.AROMATIC) {
hasArom = true;
break;
}
}
if (hasArom) {
logger.log(Level.WARNING, mol.getName()
+": can't kekulize aromatized form: "+smiles);
// leave mol as-is
}
else {
if (DEBUG) {
logger.info("Final molecule clean-up\n"
+newmol.toFormat("mol"));
}
newmol.clonecopy(mol);
}
}
catch (Exception ex) {
logger.log(Level.SEVERE,
"Can't cleanup molecule properly", ex);
}
}
}