use of ambit2.smarts.SingleBondAromaticityNotSpecified in project ambit-mirror by ideaconsult.
the class SLN2ChemObject method slnBondToQueryBond.
/*
* Converts only the bond type/expression info
* connected atoms info is not handled
*/
public IQueryBond slnBondToQueryBond(SLNBond slnBo) {
currentConversionError = null;
currentConversionWarning = null;
if (slnBo == null) {
currentConversionError = "Bond is null";
return null;
}
if (slnBo.bondType == 0) {
if (slnBo.bondExpression == null)
return new AnyOrderQueryBond(SilentChemObjectBuilder.getInstance());
// TODO handle bond expression
} else {
if (slnBo.bondExpression == null) {
IQueryBond bond = null;
switch(slnBo.bondType) {
case 1:
if (conversionConfig.FlagSLNSingleBondToSingleOrAromaticBond)
bond = new SingleOrAromaticBond(SilentChemObjectBuilder.getInstance());
else if (conversionConfig.FlagSupportSingleBondAromaticityNotSpecified)
bond = new SingleBondAromaticityNotSpecified(SilentChemObjectBuilder.getInstance());
else
bond = new SingleNonAromaticBond(SilentChemObjectBuilder.getInstance());
break;
case 2:
if (conversionConfig.FlagSupportDoubleBondAromaticityNotSpecified)
bond = new DoubleBondAromaticityNotSpecified(SilentChemObjectBuilder.getInstance());
else
bond = new DoubleNonAromaticBond(SilentChemObjectBuilder.getInstance());
break;
case 3:
bond = new OrderQueryBond(IBond.Order.TRIPLE, SilentChemObjectBuilder.getInstance());
break;
}
return bond;
}
// TODO handle bond expression
}
return null;
}
Aggregations