Search in sources :

Example 1 with AromaticSymbolQueryAtom

use of ambit2.smarts.AromaticSymbolQueryAtom in project ambit-mirror by ideaconsult.

the class SLN2ChemObject method queryAtomToSLNAtom.

public SLNAtom queryAtomToSLNAtom(IQueryAtom queryAtom) {
    currentConversionError = null;
    currentConversionWarning = null;
    if (queryAtom == null) {
        currentConversionError = "Atom is null";
        return null;
    }
    if (queryAtom instanceof SmartsAtomExpression) {
    // TODO
    }
    boolean FlagKnownAtomType = false;
    SLNAtom slnAt = new SLNAtom(builder);
    if (queryAtom instanceof AnyAtom) {
        slnAt.atomType = 0;
        slnAt.atomName = "Any";
        FlagKnownAtomType = true;
    }
    if (FlagKnownAtomType)
        return slnAt;
    else
        return null;
/*
         * SLNAtom slnAt = new SLNAtom(builder);		
			String atomName = atom.getSymbol();
			for (int i = 0; i < SLNConst.elSymbols.length; i++)
			if (atomName.equals(SLNConst.elSymbols[i]))
			{	
				slnAt.atomType = i;
				break;
			}	
		    slnAt.atomName = atomName;         
         
		if (a instanceof AliphaticSymbolQueryAtom)
			return (a.getSymbol());

		if (a instanceof AromaticSymbolQueryAtom)
			return (a.getSymbol().toLowerCase());

		if (a instanceof AliphaticAtom)
			return ("A");

		if (a instanceof AromaticAtom)
			return ("a");		
         */
}
Also used : SLNAtom(ambit2.sln.SLNAtom) SmartsAtomExpression(ambit2.smarts.SmartsAtomExpression) AnyAtom(org.openscience.cdk.isomorphism.matchers.smarts.AnyAtom)

Aggregations

SLNAtom (ambit2.sln.SLNAtom)1 SmartsAtomExpression (ambit2.smarts.SmartsAtomExpression)1 AnyAtom (org.openscience.cdk.isomorphism.matchers.smarts.AnyAtom)1