Skip to content

Commit

Permalink
Separating out cdk-extra from the cdk-io modules
Browse files Browse the repository at this point in the history
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
johnmay authored and egonw committed Jul 31, 2013
1 parent 355258d commit 513d2b6
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
list="test"/>
<foreach target="compile-module" param="module" trim="true"
parallel="${parallel}" maxthreads="${threadCount}"
list="test-interfaces,test-libiocml,test-qsar,test-data,test-io,test-core,
list="test-interfaces,test-data,test-libiocml,test-qsar,test-io,test-core,
test-valencycheck,test-smarts,test-standard,test-reaction,
test-pcore,test-sdg,test-forcefield,test-fingerprint,
test-ionpot,test-qm,test-isomorphism,test-libiomd,test-dict,
Expand Down
2 changes: 1 addition & 1 deletion src/META-INF/test-inchi.cdkdepends
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
cdk-annotation.jar
cdk-data.jar
cdk-test-data.jar
cdk-core.jar
cdk-interfaces.jar
cdk-io.jar
Expand All @@ -10,4 +11,3 @@ cdk-test.jar
cdk-inchi.jar
cdk-smiles.jar
cdk-silent.jar
cdk-extra.jar
1 change: 0 additions & 1 deletion src/META-INF/test-ioformats.cdkdepends
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ cdk-iordf.jar
cdk-smiles.jar
cdk-pdb.jar
cdk-libiocml.jar
cdk-extra.jar
cdk-data.jar
cdk-test.jar
cdk-testdata.jar
2 changes: 1 addition & 1 deletion src/META-INF/test-libiocml.cdkdepends
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cdk-core.jar
cdk-interfaces.jar
cdk-standard.jar
cdk-data.jar
cdk-extra.jar
cdk-test-data.jar
cdk-io.jar
cdk-test-io.jar
cdk-ioformats.jar
Expand Down
1 change: 0 additions & 1 deletion src/META-INF/test-libiomd.cdkdepends
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ cdk-core.jar
cdk-interfaces.jar
cdk-standard.jar
cdk-data.jar
cdk-extra.jar
cdk-libiomd.jar
cdk-io.jar
cdk-libiocml.jar
Expand Down
2 changes: 1 addition & 1 deletion src/META-INF/test-qsarcml.devellibdepends
Original file line number Diff line number Diff line change
@@ -1 +1 @@
junit-4.11.jar
junit-4.10.jar
2 changes: 1 addition & 1 deletion src/META-INF/test-smiles.cdkdepends
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ cdk-atomtype.jar
cdk-core.jar
cdk-standard.jar
cdk-data.jar
cdk-test-data.jar
cdk-datadebug.jar
cdk-silent.jar
cdk-io.jar
cdk-ioformats.jar
cdk-valencycheck.jar
cdk-smiles.jar
cdk-extra.jar
cdk-test.jar
cdk-test-core.jar
cdk-sdg.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.*;
import org.openscience.cdk.smiles.SmilesParser;
import org.openscience.cdk.templates.MoleculeFactory;
import org.openscience.cdk.templates.TestMoleculeFactory;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;

import static org.junit.Assert.assertFalse;
Expand Down Expand Up @@ -174,7 +174,7 @@ public void testGetInChIToStructure_String_IChemObjectBuilder_NullList() throws
@Test public void testInChIGenerator_AromaticBonds() throws CDKException {

// create a fairly complex aromatic molecule
IAtomContainer tetrazole = MoleculeFactory.makeTetrazole();
IAtomContainer tetrazole = TestMoleculeFactory.makeTetrazole();
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(tetrazole);
CDKHueckelAromaticityDetector.detectAromaticity(tetrazole);

Expand Down
6 changes: 3 additions & 3 deletions src/test/org/openscience/cdk/io/SMILESWriterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.openscience.cdk.AtomContainerSet;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.io.listener.PropertiesListener;
import org.openscience.cdk.templates.MoleculeFactory;
import org.openscience.cdk.templates.TestMoleculeFactory;

/**
* TestCase for the writer for SMILES files.
Expand All @@ -55,7 +55,7 @@ public class SMILESWriterTest extends ChemObjectIOTest {

@Test public void testWriteSMILESFile() throws Exception {
StringWriter stringWriter = new StringWriter();
IAtomContainer benzene = MoleculeFactory.makeBenzene();
IAtomContainer benzene = TestMoleculeFactory.makeBenzene();
SMILESWriter smilesWriter = new SMILESWriter(stringWriter);
smilesWriter.write(benzene);
smilesWriter.close();
Expand All @@ -64,7 +64,7 @@ public class SMILESWriterTest extends ChemObjectIOTest {

@Test public void testWriteAromatic() throws Exception {
StringWriter stringWriter = new StringWriter();
IAtomContainer benzene = MoleculeFactory.makeBenzene();
IAtomContainer benzene = TestMoleculeFactory.makeBenzene();
SMILESWriter smilesWriter = new SMILESWriter(stringWriter);

Properties prop = new Properties();
Expand Down
4 changes: 2 additions & 2 deletions src/test/org/openscience/cdk/io/cml/CML2WriterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
import org.openscience.cdk.silent.ChemModel;
import org.openscience.cdk.silent.Crystal;
import org.openscience.cdk.silent.Reaction;
import org.openscience.cdk.templates.MoleculeFactory;
import org.openscience.cdk.templates.TestMoleculeFactory;
import org.openscience.cdk.tools.ILoggingTool;
import org.openscience.cdk.tools.LoggingToolFactory;

Expand All @@ -79,7 +79,7 @@ public class CML2WriterTest extends CDKTestCase {

@Test public void testCMLWriterBenzene() throws Exception {
StringWriter writer = new StringWriter();
IAtomContainer molecule = MoleculeFactory.makeBenzene();
IAtomContainer molecule = TestMoleculeFactory.makeBenzene();
CDKHueckelAromaticityDetector.detectAromaticity(molecule);
CMLWriter cmlWriter = new CMLWriter(writer);

Expand Down
14 changes: 7 additions & 7 deletions src/test/org/openscience/cdk/io/cml/CMLRoundTripTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import org.openscience.cdk.qsar.DescriptorValue;
import org.openscience.cdk.qsar.IMolecularDescriptor;
import org.openscience.cdk.qsar.descriptors.molecular.WeightDescriptor;
import org.openscience.cdk.templates.MoleculeFactory;
import org.openscience.cdk.templates.TestMoleculeFactory;
import org.openscience.cdk.tools.ILoggingTool;
import org.openscience.cdk.tools.LoggingToolFactory;
import org.openscience.cdk.tools.manipulator.BondManipulator;
Expand Down Expand Up @@ -561,7 +561,7 @@ public void testAtomStereoParity() throws Exception {
}

@Test public void testDescriptorValue() throws Exception {
IAtomContainer molecule = MoleculeFactory.makeBenzene();
IAtomContainer molecule = TestMoleculeFactory.makeBenzene();

String[] propertyName = {"testKey1","testKey2"};
String[] propertyValue = {"testValue1","testValue2"};
Expand All @@ -582,7 +582,7 @@ public void testAtomStereoParity() throws Exception {
* @throws Exception
*/
@Test public void testAromaticity() throws Exception {
IAtomContainer molecule = MoleculeFactory.makeBenzene();
IAtomContainer molecule = TestMoleculeFactory.makeBenzene();
for (IBond bond : molecule.bonds()) {
bond.setFlag(CDKConstants.ISAROMATIC, true);
}
Expand All @@ -597,7 +597,7 @@ public void testAtomStereoParity() throws Exception {
}

@Test public void testAtomAromaticity() throws Exception {
IAtomContainer molecule = MoleculeFactory.makeBenzene();
IAtomContainer molecule = TestMoleculeFactory.makeBenzene();
for (IAtom atom : molecule.atoms()) {
atom.setFlag(CDKConstants.ISAROMATIC, true);
}
Expand All @@ -618,7 +618,7 @@ public void testAtomStereoParity() throws Exception {
String[] key = {"customAtomProperty1","customAtomProperty2"};
String[] value = {"true","false"};

IAtomContainer mol = MoleculeFactory.makeBenzene();
IAtomContainer mol = TestMoleculeFactory.makeBenzene();
for (Iterator<IAtom> it = mol.atoms().iterator(); it.hasNext();) {
IAtom a = it.next();
for (int i=0; i < key.length;i++)
Expand Down Expand Up @@ -648,7 +648,7 @@ public void testAtomStereoParity() throws Exception {
@Test public void testBondProperty() throws Exception {
String[] key = {"customBondProperty1","customBondProperty2"};
String[] value = {"true","false"};
IAtomContainer mol = MoleculeFactory.makeBenzene();
IAtomContainer mol = TestMoleculeFactory.makeBenzene();
for (Iterator<IBond> it = mol.bonds().iterator(); it.hasNext();) {
IBond b = it.next();
for (int i=0; i < key.length;i++)
Expand Down Expand Up @@ -679,7 +679,7 @@ public void testAtomStereoParity() throws Exception {
String[] key = {"customMoleculeProperty1","customMoleculeProperty2"};
String[] value = {"true","false"};

IAtomContainer mol = MoleculeFactory.makeAdenine();
IAtomContainer mol = TestMoleculeFactory.makeAdenine();
for (int i=0; i < key.length;i++) {
mol.setProperty(key[i], value[i]);
}
Expand Down
16 changes: 8 additions & 8 deletions src/test/org/openscience/cdk/smiles/SmilesGeneratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
import org.openscience.cdk.isomorphism.UniversalIsomorphismTester;
import org.openscience.cdk.layout.HydrogenPlacer;
import org.openscience.cdk.layout.StructureDiagramGenerator;
import org.openscience.cdk.templates.MoleculeFactory;
import org.openscience.cdk.templates.TestMoleculeFactory;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;

/**
Expand All @@ -78,7 +78,7 @@ public class SmilesGeneratorTest extends CDKTestCase {
@Test
public void testSmilesGenerator()
{
IAtomContainer mol2 = MoleculeFactory.makeAlphaPinene();
IAtomContainer mol2 = TestMoleculeFactory.makeAlphaPinene();
SmilesGenerator sg = new SmilesGenerator();
fixCarbonHCount(mol2);
String smiles2 = sg.createSMILES(mol2);
Expand All @@ -92,7 +92,7 @@ public void testSmilesGenerator()
*/
@Test public void testEthylPropylPhenantren()
{
IAtomContainer mol1 = MoleculeFactory.makeEthylPropylPhenantren();
IAtomContainer mol1 = TestMoleculeFactory.makeEthylPropylPhenantren();
SmilesGenerator sg = new SmilesGenerator();
fixCarbonHCount(mol1);
String smiles1 = sg.createSMILES(mol1);
Expand All @@ -107,7 +107,7 @@ public void testSmilesGenerator()
*/
@Test public void testPropylCycloPropane()
{
IAtomContainer mol1 = MoleculeFactory.makePropylCycloPropane();
IAtomContainer mol1 = TestMoleculeFactory.makePropylCycloPropane();
SmilesGenerator sg = new SmilesGenerator();
fixCarbonHCount(mol1);
String smiles1 = sg.createSMILES(mol1);
Expand Down Expand Up @@ -817,7 +817,7 @@ private void fixCarbonHCount(IAtomContainer mol) {
}

@Test public void testIndole() throws Exception {
IAtomContainer mol = MoleculeFactory.makeIndole();
IAtomContainer mol = TestMoleculeFactory.makeIndole();
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
CDKHueckelAromaticityDetector.detectAromaticity(mol);

Expand All @@ -828,7 +828,7 @@ private void fixCarbonHCount(IAtomContainer mol) {
}

@Test public void testPyrrole() throws Exception {
IAtomContainer mol = MoleculeFactory.makePyrrole();
IAtomContainer mol = TestMoleculeFactory.makePyrrole();
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
CDKHueckelAromaticityDetector.detectAromaticity(mol);

Expand Down Expand Up @@ -986,14 +986,14 @@ public void testBug3040273() throws Exception {


@Test public void testCreateSMILESWithoutCheckForMultipleMolecules_withDetectAromaticity() throws CDKException{
IAtomContainer benzene = MoleculeFactory.makeBenzene();
IAtomContainer benzene = TestMoleculeFactory.makeBenzene();
SmilesGenerator sg = new SmilesGenerator(false);
String smileswithoutaromaticity = sg.createSMILESWithoutCheckForMultipleMolecules(benzene, false, new boolean[benzene.getBondCount()]);
Assert.assertEquals("C=1C=CC=CC=1", smileswithoutaromaticity);
}

@Test public void testCreateSMILESWithoutCheckForMultipleMolecules_withoutDetectAromaticity() throws CDKException{
IAtomContainer benzene = MoleculeFactory.makeBenzene();
IAtomContainer benzene = TestMoleculeFactory.makeBenzene();
SmilesGenerator sg = new SmilesGenerator(true);
String smileswitharomaticity = sg.createSMILESWithoutCheckForMultipleMolecules(benzene, false, new boolean[benzene.getBondCount()]);
Assert.assertEquals("c1ccccc1", smileswitharomaticity);
Expand Down
4 changes: 2 additions & 2 deletions src/test/org/openscience/cdk/smiles/SmilesParserTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import org.openscience.cdk.isomorphism.UniversalIsomorphismTester;
import org.openscience.cdk.layout.StructureDiagramGenerator;
import org.openscience.cdk.silent.SilentChemObjectBuilder;
import org.openscience.cdk.templates.MoleculeFactory;
import org.openscience.cdk.templates.TestMoleculeFactory;
import org.openscience.cdk.tools.CDKHydrogenAdder;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.tools.manipulator.AtomTypeManipulator;
Expand Down Expand Up @@ -917,7 +917,7 @@ public void testSFBug956921() throws Exception {
@org.junit.Test (timeout=1000)
public void testSFBug1274464() throws Exception {
IAtomContainer fromSmiles = new SmilesParser(DefaultChemObjectBuilder.getInstance()).parseSmiles("C1=CC=CC=C1");
IAtomContainer fromFactory = MoleculeFactory.makeBenzene();
IAtomContainer fromFactory = TestMoleculeFactory.makeBenzene();
CDKHydrogenAdder hAdder = CDKHydrogenAdder.getInstance(fromFactory.getBuilder());
Iterator<IAtom> atoms = fromFactory.atoms().iterator();
CDKAtomTypeMatcher matcher = CDKAtomTypeMatcher.getInstance(fromFactory.getBuilder());
Expand Down

0 comments on commit 513d2b6

Please sign in to comment.