From: Christoph S. <c.s...@un...> - 2003-08-28 07:45:46
|
John Feinberg wrote: > I would like to look into using the CDK to do some structure rendering.= =20 > It would be extremely handy if there were a simple sample application=20 > that I could download and compile to get an idea of how to get started.= =20 > Something like what is included in the joelib build.xml file would be=20 > great - I can type >=20 > ant JOELibTestGUI Start JOELib example GUI. > ant LayoutTest Starts 2D layout test using CDK. > ant MoleculeLoadTest Start JOELib molecule load example. >=20 > and so on. >=20 > I have successfully downloaded and installed the CDK (using ant) so a=20 > sample application would be a great way to get started writing code! >=20 > John Feinberg >=20 > ps I have searched the discussion lists for links to sample=20 > applications, but I have not found anything other than code snippets. John, we have a subpackage org.openscience.cdk.test, where you should find=20 test cases for most of the classes, which should be exactly what you want. Many of the test cases have a main class, such that it can be run=20 standalone. There is an ant task for this, called "run-test", which=20 takes the name of the test class to be run, relative to the=20 org.openscience.cdk.test package. Obviously, creating an anttask for each of these would be a overkill. Instead, you need to pass the name of the test class as an argument. With the current CVS version you could do ant run-test -Dtestclass=3Dlayout.HydrogenPlacerTest This test loads a reserpine molecule without hydrogen atoms on it, adds=20 hydrogens to satisfy valency, generates 2D coordinates for these=20 hydrogens and displays the result. Again, such test cases, showing - with a few lines of code - how to use=20 the various classes, are available for most of the classes. If you have time and the resources, I invite you to visit us for a chat=20 on IRC channel #cdk on irc.freenodes.net. Cheers, Chris --=20 Dr. Christoph Steinbeck (e-mail: c.s...@un...) Groupleader Junior Research Group for Applied Bioinformatics Cologne University BioInformatics Center (http://www.cubic.uni-koeln.de) Z=FClpicher Str. 47, 50674 Cologne Tel: +49(0)221-470-7426 Fax: +49 (0) 221-470-7786 What is man but that lofty spirit - that sense of enterprise. ... Kirk, "I, Mudd," stardate 4513.3.. |