Hi ....
Thank you for your last response.
Today I am having this problem in running this program please help me.
The Program is as follows:
import java.util.Vector;
import java.io.Reader;
import java.io.Writer;
import java.io.File;
import java.io.FileWriter;
import java.io.FileReader;
import org.openscience.cdk.isomorphism.matchers.smarts.TotalHCountAtom;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.tools.manipulator.ChemFileManipulator;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemFile;
import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.io.IChemObjectIO;
import org.openscience.cdk.io.ReaderFactory;
import org.openscience.cdk.io.IChemObjectReader;
import org.openscience.cdk.io.IChemObjectWriter;
public class thcAtom {
public static void main(String a[])
{
TotalHCountAtom thca=new TotalHCountAtom(1);
Vector v = new Vector();
v.addElement("0");
if (!v.isEmpty())
{
IAtomContainer ac = (IAtomContainer)v.get(0);
int natom = ac.getAtomCount();
IAtom[] atoms = ac.getAtoms();
for (int i = 0; i < natom; i++)
{
thca.matches(atoms[i]);
System.out.println("output is "+thca.toString());
}
}
else
{
System.out.println("Hello");
}
System.out.println("output is "+thca.toString());
}
}
end:
At this line am getting ArrayoutofIndex Exception : 0 at the run time.
So Please help me to solve the problem. and send me the improved program of
this program.
Thanking you.
Phani Rao
Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download
Now! http://messenger.yahoo.com/download.php-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user