Permalink
Browse files

Removed IMolecule

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
1 parent 611aaca commit 2fc6b61972af834c1fea7fcb64287363ecbcb188 @egonw egonw committed with rajarshi Dec 13, 2011
Showing with 1,460 additions and 1,834 deletions.
  1. +0 −16 src/main/org/openscience/cdk/DefaultChemObjectBuilder.java
  2. +0 −109 src/main/org/openscience/cdk/Molecule.java
  3. +1 −2 src/main/org/openscience/cdk/charges/Electronegativity.java
  4. +7 −8 src/main/org/openscience/cdk/charges/GasteigerPEPEPartialCharges.java
  5. +2 −3 src/main/org/openscience/cdk/charges/MMFF94PartialCharges.java
  6. +0 −37 src/main/org/openscience/cdk/interfaces/IMolecule.java
  7. +1 −2 src/main/org/openscience/cdk/io/CTXReader.java
  8. +3 −3 src/main/org/openscience/cdk/io/PCCompoundASNReader.java
  9. +3 −4 src/main/org/openscience/cdk/io/PCCompoundXMLReader.java
  10. +3 −4 src/main/org/openscience/cdk/io/PCSubstanceXMLReader.java
  11. +0 −1 src/main/org/openscience/cdk/io/iterator/IteratingMDLReader.java
  12. +0 −1 src/main/org/openscience/cdk/io/iterator/IteratingPCCompoundXMLReader.java
  13. +0 −1 src/main/org/openscience/cdk/io/iterator/IteratingSMILESReader.java
  14. +1 −2 src/main/org/openscience/cdk/structgen/RandomGenerator.java
  15. +2 −3 src/main/org/openscience/cdk/structgen/SingleStructureRandomGenerator.java
  16. +1 −2 src/main/org/openscience/cdk/tools/AtomTypeTools.java
  17. +5 −5 src/main/org/openscience/cdk/tools/CDKUtilities.java
  18. +2 −2 src/main/org/openscience/cdk/tools/DataFeaturesTool.java
  19. +1 −2 src/main/org/openscience/cdk/tools/HOSECodeGenerator.java
  20. +1 −2 src/main/org/openscience/cdk/tools/SaturationChecker.java
  21. +5 −7 src/main/org/openscience/cdk/tools/features/MoleculeFeaturesTool.java
  22. +2 −9 src/main/org/openscience/cdk/tools/manipulator/ChemModelManipulator.java
  23. +4 −5 src/main/org/openscience/cdk/validate/BasicValidator.java
  24. +4 −26 src/test/org/openscience/cdk/AbstractChemObjectBuilderTest.java
  25. +2 −2 src/test/org/openscience/cdk/AtomContainerTest.java
  26. +5 −5 src/test/org/openscience/cdk/MoleculeTest.java
  27. +18 −18 src/test/org/openscience/cdk/aromaticity/CDKHueckelAromaticityDetectorTest.java
  28. +160 −162 src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java
  29. +1 −1 src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTestFileReposTest.java
  30. +10 −11 src/test/org/openscience/cdk/atomtype/EStateAtomTypeMatcherTest.java
  31. +1 −3 src/test/org/openscience/cdk/atomtype/MM2AtomTypeMatcherTest.java
  32. +8 −10 src/test/org/openscience/cdk/atomtype/MMFF94AtomTypeMatcherTest.java
  33. +22 −22 src/test/org/openscience/cdk/atomtype/ReactionStructuresTest.java
  34. +2 −2 src/test/org/openscience/cdk/atomtype/ResonanceStructuresTest.java
  35. +24 −24 src/test/org/openscience/cdk/atomtype/StructGenMatcherTest.java
  36. +40 −41 src/test/org/openscience/cdk/atomtype/SybylAtomTypeMatcherTest.java
  37. +3 −3 src/test/org/openscience/cdk/charges/ElectronegativityTest.java
  38. +4 −4 src/test/org/openscience/cdk/charges/GasteigerPEPEPartialChargesTest.java
  39. +3 −3 src/test/org/openscience/cdk/charges/PiElectronegativityTest.java
  40. +1 −1 src/test/org/openscience/cdk/charges/PolarizabilityTest.java
  41. +2 −2 src/test/org/openscience/cdk/charges/StabilizationChargesTest.java
  42. +2 −2 src/test/org/openscience/cdk/debug/DebugAtomContainerTest.java
  43. +12 −12 src/test/org/openscience/cdk/fingerprint/AbstractFixedLengthFingerprinterTest.java
  44. +10 −11 src/test/org/openscience/cdk/fingerprint/ExtendedFingerprinterTest.java
  45. +1 −1 src/test/org/openscience/cdk/geometry/BondToolsTest.java
  46. +22 −23 src/test/org/openscience/cdk/geometry/GeometryToolsTest.java
  47. +2 −2 src/test/org/openscience/cdk/geometry/cip/CIPToolTest.java
  48. +5 −5 src/test/org/openscience/cdk/geometry/cip/LigancyFourChiralityTest.java
  49. +2 −3 src/test/org/openscience/cdk/graph/ConnectivityCheckerTest.java
  50. +12 −14 src/test/org/openscience/cdk/graph/PathToolsTest.java
  51. +2 −2 src/test/org/openscience/cdk/graph/SpanningTreeTest.java
  52. +9 −10 src/test/org/openscience/cdk/graph/invariant/CanonicalLabelerTest.java
  53. +3 −3 src/test/org/openscience/cdk/graph/invariant/InChINumbersToolsTest.java
  54. +4 −4 src/test/org/openscience/cdk/graph/matrix/TopologicalMatrixTest.java
  55. +6 −6 src/test/org/openscience/cdk/graph/rebond/RebondToolTest.java
  56. +30 −30 src/test/org/openscience/cdk/gui/smiles/SmilesGeneratorTest.java
  57. +2 −2 src/test/org/openscience/cdk/interfaces/AbstractAtomContainerSetTest.java
  58. +9 −9 src/test/org/openscience/cdk/interfaces/AbstractAtomContainerTest.java
  59. +7 −7 src/test/org/openscience/cdk/interfaces/AbstractChemModelTest.java
  60. +5 −5 src/test/org/openscience/cdk/interfaces/AbstractMoleculeTest.java
  61. +5 −4 src/test/org/openscience/cdk/io/CDKSourceCodeWriterTest.java
  62. +4 −5 src/test/org/openscience/cdk/io/ChemObjectIOTest.java
  63. +6 −6 src/test/org/openscience/cdk/io/MDLCMLRoundtripTest.java
  64. +13 −13 src/test/org/openscience/cdk/io/MDLRXNWriterTest.java
  65. +9 −11 src/test/org/openscience/cdk/io/MDLReaderTest.java
  66. +28 −30 src/test/org/openscience/cdk/io/MDLV2000ReaderTest.java
  67. +15 −16 src/test/org/openscience/cdk/io/MDLV2000WriterTest.java
  68. +12 −14 src/test/org/openscience/cdk/io/Mol2ReaderTest.java
  69. +3 −3 src/test/org/openscience/cdk/io/PCCompoundASNReaderTest.java
  70. +8 −8 src/test/org/openscience/cdk/io/PCCompoundXMLReaderTest.java
  71. +4 −5 src/test/org/openscience/cdk/io/PCSubstanceXMLReaderTest.java
  72. +2 −2 src/test/org/openscience/cdk/io/PDBReaderTest.java
  73. +16 −17 src/test/org/openscience/cdk/io/PDBWriterTest.java
  74. +6 −8 src/test/org/openscience/cdk/io/ReaderFactoryTest.java
  75. +15 −15 src/test/org/openscience/cdk/io/SDFWriterTest.java
  76. +11 −10 src/test/org/openscience/cdk/io/XYZWriterTest.java
  77. +20 −21 src/test/org/openscience/cdk/io/cml/CDKRoundTripTest.java
  78. +24 −24 src/test/org/openscience/cdk/io/cml/CML2WriterTest.java
  79. +32 −33 src/test/org/openscience/cdk/io/cml/CMLRoundTripTest.java
  80. +2 −2 src/test/org/openscience/cdk/io/program/GaussianInputWriterTest.java
  81. +3 −3 src/test/org/openscience/cdk/io/random/RandomAccessTest.java
  82. +2 −2 src/test/org/openscience/cdk/io/rdf/CDKOWLReaderTest.java
  83. +7 −7 src/test/org/openscience/cdk/isomorphism/IsomorphismTesterTest.java
  84. +9 −10 src/test/org/openscience/cdk/isomorphism/UniversalIsomorphismTesterTest.java
  85. +4 −4 src/test/org/openscience/cdk/isomorphism/matchers/QueryAtomContainerCreatorTest.java
  86. +5 −4 src/test/org/openscience/cdk/layout/HydrogenPlacerTest.java
  87. +8 −8 src/test/org/openscience/cdk/layout/OverlapResolverTest.java
  88. +4 −4 src/test/org/openscience/cdk/layout/StructureDiagramGeneratorTest.java
  89. +2 −2 src/test/org/openscience/cdk/layout/TemplateHandlerTest.java
  90. +1 −1 src/test/org/openscience/cdk/libio/jena/ConvertorTest.java
  91. +5 −5 src/test/org/openscience/cdk/limitations/tools/SaturationCheckerTest.java
  92. +3 −4 src/test/org/openscience/cdk/modeling/builder3d/ModelBuilder3DTest.java
  93. +6 −5 src/test/org/openscience/cdk/normalize/NormalizerTest.java
  94. +7 −7 src/test/org/openscience/cdk/qsar/descriptors/atomic/AtomHybridizationVSEPRDescriptorTest.java
  95. +3 −3 src/test/org/openscience/cdk/qsar/descriptors/atomic/AtomicDescriptorTest.java
  96. +5 −4 src/test/org/openscience/cdk/qsar/descriptors/atomic/DistanceToAtomDescriptorTest.java
  97. +5 −4 src/test/org/openscience/cdk/qsar/descriptors/atomic/InductiveAtomicHardnessDescriptorTest.java
  98. +5 −4 src/test/org/openscience/cdk/qsar/descriptors/atomic/InductiveAtomicSoftnessDescriptorTest.java
  99. +8 −8 src/test/org/openscience/cdk/qsar/descriptors/atomic/PartialTChargeMMFF94DescriptorTest.java
  100. +1 −1 src/test/org/openscience/cdk/qsar/descriptors/atomic/PiElectronegativityDescriptorTest.java
  101. +3 −3 src/test/org/openscience/cdk/qsar/descriptors/atomic/ProtonAffinityHOSEDescriptorTest.java
  102. +9 −5 src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_G3RTest.java
  103. +9 −5 src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GDRTest.java
  104. +9 −5 src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GHRTest.java
  105. +9 −5 src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GHR_topolTest.java
  106. +9 −5 src/test/org/openscience/cdk/qsar/descriptors/atomic/RDFProtonDescriptor_GSRTest.java
  107. +1 −1 src/test/org/openscience/cdk/qsar/descriptors/atomic/SigmaElectronegativityDescriptorTest.java
  108. +1 −1 src/test/org/openscience/cdk/qsar/descriptors/atomic/StabilizationPlusChargeDescriptorTest.java
  109. +3 −3 src/test/org/openscience/cdk/qsar/descriptors/bond/BondDescriptorTest.java
  110. +4 −5 src/test/org/openscience/cdk/qsar/descriptors/molecular/AcidicGroupCountDescriptorTest.java
  111. +1 −1 src/test/org/openscience/cdk/qsar/descriptors/molecular/AminoAcidCountDescriptorTest.java
  112. +3 −3 src/test/org/openscience/cdk/qsar/descriptors/molecular/AutocorrelationDescriptorChargeTest.java
  113. +3 −3 src/test/org/openscience/cdk/qsar/descriptors/molecular/AutocorrelationDescriptorMassTest.java
  114. +3 −3 ...t/org/openscience/cdk/qsar/descriptors/molecular/AutocorrelationDescriptorPolarizabilityTest.java
  115. +1 −1 src/test/org/openscience/cdk/qsar/descriptors/molecular/BCUTDescriptorTest.java
  116. +9 −10 src/test/org/openscience/cdk/qsar/descriptors/molecular/ChiChainDescriptorTest.java
  117. +7 −8 src/test/org/openscience/cdk/qsar/descriptors/molecular/ChiClusterDescriptorTest.java
  118. +3 −3 src/test/org/openscience/cdk/qsar/descriptors/molecular/ChiIndexUtilsTest.java
  119. +6 −7 src/test/org/openscience/cdk/qsar/descriptors/molecular/ChiPathClusterDescriptorTest.java
  120. +9 −10 src/test/org/openscience/cdk/qsar/descriptors/molecular/ChiPathDescriptorTest.java
  121. +4 −4 src/test/org/openscience/cdk/qsar/descriptors/molecular/FragmentComplexityDescriptorTest.java
  122. +2 −2 src/test/org/openscience/cdk/qsar/descriptors/molecular/HBondAcceptorCountDescriptorTest.java
  123. +2 −2 src/test/org/openscience/cdk/qsar/descriptors/molecular/HBondDonorCountDescriptorTest.java
  124. +4 −4 src/test/org/openscience/cdk/qsar/descriptors/molecular/MannholdLogPDescriptorTest.java
  125. +8 −8 src/test/org/openscience/cdk/qsar/descriptors/molecular/MolecularDescriptorTest.java
  126. +1 −1 src/test/org/openscience/cdk/qsar/descriptors/molecular/VABCDescriptorTest.java
  127. +6 −6 src/test/org/openscience/cdk/reaction/ReactionProcessTest.java
  128. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/AdductionLPMechanismTest.java
  129. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/AdductionPBMechanismTest.java
  130. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/HeterolyticCleavageMechanismTest.java
  131. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/HomolyticCleavageMechanismTest.java
  132. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/RadicalSiteIonizationMechanismTest.java
  133. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/RadicalSiteRearrangementMechanismTest.java
  134. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/RearrangementChargeMechanismTest.java
  135. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/RemovingSEofBMechanismTest.java
  136. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/RemovingSEofNBMechanismTest.java
  137. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/SharingElectronMechanismTest.java
  138. +1 −1 src/test/org/openscience/cdk/reaction/mechanism/TautomerizationMechanismTest.java
  139. +2 −2 src/test/org/openscience/cdk/renderer/AtomContainerRendererTest.java
  140. +17 −17 src/test/org/openscience/cdk/ringsearch/SSSRFinderTest.java
  141. +2 −2 src/test/org/openscience/cdk/signature/AbstractSignatureTest.java
  142. +1 −1 src/test/org/openscience/cdk/signature/AtomSignatureTest.java
  143. +9 −9 src/test/org/openscience/cdk/signature/MoleculeSignatureTest.java
  144. +2 −2 src/test/org/openscience/cdk/silent/AtomContainerTest.java
  145. +5 −5 src/test/org/openscience/cdk/silent/ChemModelTest.java
  146. +3 −3 src/test/org/openscience/cdk/smiles/DeduceBondSystemToolTest.java
  147. +12 −13 src/test/org/openscience/cdk/smiles/SmilesGeneratorTest.java
  148. +6 −6 src/test/org/openscience/cdk/smiles/SmilesParserTest.java
  149. +3 −3 src/test/org/openscience/cdk/smiles/smarts/SMARTSQueryToolTest.java
  150. +25 −25 src/test/org/openscience/cdk/smsd/SMSDBondInsensitiveTest.java
  151. +5 −5 src/test/org/openscience/cdk/smsd/SMSDBondSensitiveTest.java
  152. +3 −20 src/test/org/openscience/cdk/smsd/SMSDTest.java
  153. +4 −24 src/test/org/openscience/cdk/smsd/algorithm/mcsplus/MCSPlusHandlerTest.java
  154. +4 −25 src/test/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCSHandlerTest.java
  155. +9 −10 src/test/org/openscience/cdk/smsd/algorithm/rgraph/CDKMCSTest.java
  156. +10 −29 src/test/org/openscience/cdk/smsd/algorithm/single/SingleMappingHandlerTest.java
  157. +36 −36 src/test/org/openscience/cdk/smsd/algorithm/vflib/Molecules.java
  158. +5 −5 src/test/org/openscience/cdk/smsd/algorithm/vflib/VFLibTest.java
  159. +4 −4 src/test/org/openscience/cdk/smsd/algorithm/vflib/VFMapperTest.java
  160. +4 −24 src/test/org/openscience/cdk/smsd/algorithm/vflib/VFlibMCSHandlerTest.java
  161. +4 −23 src/test/org/openscience/cdk/smsd/algorithm/vflib/VFlibTurboHandlerTest.java
  162. +6 −10 src/test/org/openscience/cdk/smsd/helper/MolHandlerTest.java
  163. +3 −3 src/test/org/openscience/cdk/smsd/interfaces/AbstractMCSTest.java
  164. +0 −18 src/test/org/openscience/cdk/smsd/interfaces/IMCSBaseTest.java
  165. +5 −5 src/test/org/openscience/cdk/smsd/ring/HanserRingFinderTest.java
  166. +4 −4 src/test/org/openscience/cdk/stereo/TetrahedralChiralityTest.java
  167. +3 −4 src/test/org/openscience/cdk/tautomers/InChITautomerGeneratorTest.java
  168. +5 −5 src/test/org/openscience/cdk/tools/BremserPredictorTest.java
  169. +26 −28 src/test/org/openscience/cdk/tools/CDKHydrogenAdderTest.java
  170. +11 −12 src/test/org/openscience/cdk/tools/CDKValencyCheckerTest.java
  171. +8 −8 src/test/org/openscience/cdk/tools/HOSECodeGeneratorTest.java
  172. +8 −7 src/test/org/openscience/cdk/tools/IDCreatorTest.java
  173. +10 −10 src/test/org/openscience/cdk/tools/LonePairElectronCheckerTest.java
  174. +16 −16 src/test/org/openscience/cdk/tools/SaturationCheckerTest.java
  175. +14 −14 src/test/org/openscience/cdk/tools/StructureResonanceGeneratorTest.java
  176. +18 −20 src/test/org/openscience/cdk/tools/manipulator/AtomContainerManipulatorTest.java
  177. +7 −7 src/test/org/openscience/cdk/tools/manipulator/ChemFileManipulatorTest.java
  178. +14 −23 src/test/org/openscience/cdk/tools/manipulator/ChemModelManipulatorTest.java
  179. +11 −11 src/test/org/openscience/cdk/tools/manipulator/ChemSequenceManipulatorTest.java
  180. +3 −4 src/test/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulatorTest.java
  181. +18 −19 src/test/org/openscience/cdk/tools/manipulator/MoleculeSetManipulatorTest.java
  182. +32 −33 src/test/org/openscience/cdk/tools/manipulator/ReactionManipulatorTest.java
  183. +43 −43 src/test/org/openscience/cdk/tools/manipulator/ReactionSchemeManipulatorTest.java
  184. +53 −54 src/test/org/openscience/cdk/tools/manipulator/ReactionSetManipulatorTest.java
@@ -51,7 +51,6 @@
import org.openscience.cdk.interfaces.IMapping;
import org.openscience.cdk.interfaces.IMolecularFormula;
import org.openscience.cdk.interfaces.IMolecularFormulaSet;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.interfaces.IMonomer;
import org.openscience.cdk.interfaces.IPDBAtom;
import org.openscience.cdk.interfaces.IPDBMonomer;
@@ -206,21 +205,6 @@ public static IChemObjectBuilder getInstance() {
params[0] instanceof IAtomContainer) {
return (T)new Crystal((IAtomContainer)params[0]);
}
- } else if (IMolecule.class.isAssignableFrom(clazz)) {
- if (params.length == 0) {
- return (T)new Molecule();
- } else if (params.length == 1 &&
- params[0] instanceof IAtomContainer) {
- return (T)new Molecule((IAtomContainer)params[0]);
- } else if (params.length == 4 &&
- params[0] instanceof Integer &&
- params[1] instanceof Integer &&
- params[2] instanceof Integer &&
- params[3] instanceof Integer) {
- return (T)new Molecule(
- (Integer)params[0], (Integer)params[1], (Integer)params[2], (Integer)params[3]
- );
- }
} else if (IRing.class.isAssignableFrom(clazz)) {
if (params.length == 0) {
return (T)new Ring();
@@ -1,109 +0,0 @@
-/* $Revision$ $Author$ $Date$
- *
- * Copyright (C) 1997-2007 Christoph Steinbeck <steinbeck@users.sf.net>
- *
- * Contact: cdk-devel@lists.sourceforge.net
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-package org.openscience.cdk;
-
-import org.openscience.cdk.interfaces.IAtomContainer;
-import org.openscience.cdk.interfaces.IMolecule;
-
-import java.io.Serializable;
-
-
-/**
- * Represents the concept of a chemical molecule, an object composed of
- * atoms connected by bonds.
- *
- * @cdk.module data
- * @cdk.githash
- *
- * @author steinbeck
- * @cdk.created 2000-10-02
- *
- * @cdk.keyword molecule
- */
-public class Molecule extends AtomContainer implements Serializable, IMolecule, Cloneable
-{
-
- /**
- * Determines if a de-serialized object is compatible with this class.
- *
- * This value must only be changed if and only if the new version
- * of this class is incompatible with the old version. See Sun docs
- * for <a href=http://java.sun.com/products/jdk/1.1/docs/guide
- * /serialization/spec/version.doc.html>details</a>.
- */
- private static final long serialVersionUID = 6451193093484831136L;
-
- /**
- * Creates an Molecule without Atoms and Bonds.
- */
- public Molecule() {
- super();
- }
-
- /**
- * Constructor for the Molecule object. The parameters define the
- * initial capacity of the arrays.
- *
- * @param atomCount init capacity of Atom array
- * @param bondCount init capacity of Bond array
- * @param lonePairCount number of lone pairs
- * @param singleElectronCount number of single electrons
- */
- public Molecule(int atomCount, int bondCount, int lonePairCount, int singleElectronCount)
- {
- super(atomCount, bondCount, lonePairCount, singleElectronCount);
- }
-
- /**
- * Constructs a Molecule with
- * a shallow copy of the atoms and bonds of an AtomContainer.
- *
- * @param container An Molecule to copy the atoms and bonds from
- */
- public Molecule(IAtomContainer container)
- {
- super(container);
- }
-
- /**
- * Returns a one line string representation of this Atom.
- * Methods is conform RFC #9.
- *
- * @return The string representation of this Atom
- */
- public String toString() {
- StringBuffer description = new StringBuffer();
- description.append("Molecule(");
- description.append(hashCode());
- if (getID() != null) {
- description.append(", ID=").append(getID());
- }
- description.append(", ").append(super.toString());
- description.append(')');
- return description.toString();
- }
-
- public Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-}
-
-
@@ -24,7 +24,6 @@
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
-import org.openscience.cdk.interfaces.IMolecule;
/**
* Calculation of the electronegativity of orbitals of a molecule
@@ -103,7 +102,7 @@ public double calculateSigmaElectronegativity(IAtomContainer ac,
try {
if(!ac.equals(acOldS)){
- molSigma = ac.getBuilder().newInstance(IMolecule.class,ac);
+ molSigma = ac.getBuilder().newInstance(IAtomContainer.class,ac);
peoe.setMaxGasteigerIters(maxI);
peoe.assignGasteigerMarsiliSigmaPartialCharges(molSigma, true);
marsiliFactors = peoe.assignGasteigerSigmaMarsiliFactors(molSigma);
@@ -23,6 +23,11 @@
*/
package org.openscience.cdk.charges;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
@@ -34,7 +39,6 @@
import org.openscience.cdk.interfaces.IAtomContainerSet;
import org.openscience.cdk.interfaces.IAtomType;
import org.openscience.cdk.interfaces.IBond;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.interfaces.IReactionSet;
import org.openscience.cdk.reaction.IReactionProcess;
import org.openscience.cdk.reaction.type.HeterolyticCleavagePBReaction;
@@ -48,11 +52,6 @@
import org.openscience.cdk.tools.StructureResonanceGenerator;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
/**
* <p>The calculation of the Gasteiger (PEPE) partial charges is based on
* {@cdk.cite Saller85}. This class doesn't implement the original method of the Marsili but the
@@ -200,7 +199,7 @@ public IAtomContainer assignGasteigerPiPartialCharges(IAtomContainer ac, boolean
/*find resonance containers, which eliminates the repetitions*/
StructureResonanceGenerator gRN = new StructureResonanceGenerator();/*according G. should be integrated the breaking bonding*/
- IAtomContainerSet acSet = gRN.getContainers((IMolecule) removingFlagsAromaticity(ac));
+ IAtomContainerSet acSet = gRN.getContainers(removingFlagsAromaticity(ac));
// IAtomContainerSet acSet = ConjugatedPiSystemsDetector.detect(removingFlagsAromaticity(ac));
IAtomContainerSet iSet = ac.getBuilder().newInstance(IAtomContainerSet.class);
@@ -519,7 +518,7 @@ private IAtomContainerSet getHyperconjugationInteractions(IAtomContainer ac, IAt
return null;
- setOfReactants.addAtomContainer((IMolecule) ac);
+ setOfReactants.addAtomContainer(ac);
List<IParameterReact> paramList = new ArrayList<IParameterReact>();
IParameterReact param = new SetReactionCenter();
@@ -21,13 +21,12 @@
*/
package org.openscience.cdk.charges;
-import java.util.Map;
import java.util.List;
+import java.util.Map;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.modeling.builder3d.ForceFieldConfigurator;
/**
@@ -73,7 +72,7 @@ public MMFF94PartialCharges() { }
public IAtomContainer assignMMFF94PartialCharges(IAtomContainer ac) throws Exception {
ForceFieldConfigurator ffc = new ForceFieldConfigurator();
ffc.setForceFieldConfigurator("mmff94");
- ffc.assignAtomTyps((IMolecule)ac);
+ ffc.assignAtomTyps(ac);
Map<String,Object> parameterSet = ffc.getParameterSet();
// for this calculation,
// we need some values stored in the vector "data" in the
@@ -1,37 +0,0 @@
-/* $RCSfile$
- * $Author$
- * $Date$
- * $Revision$
- *
- * Copyright (C) 2006-2007 Egon Willighagen <egonw@users.sf.net>
- *
- * Contact: cdk-devel@lists.sourceforge.net
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2.1
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-package org.openscience.cdk.interfaces;
-
-/**
- * Represents a set of Molecules.
- *
- * @cdk.module interfaces
- * @cdk.githash
- * @author egonw
- * @cdk.created 2005-08-25
- */
-public interface IMolecule extends IAtomContainer {
-
-}
-
@@ -41,7 +41,6 @@
import org.openscience.cdk.interfaces.IChemModel;
import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IChemSequence;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.io.formats.CTXFormat;
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.tools.ILoggingTool;
@@ -125,7 +124,7 @@ private IChemFile readChemFile() throws CDKException {
IChemSequence seq = file.getBuilder().newInstance(IChemSequence.class);
IChemModel model = file.getBuilder().newInstance(IChemModel.class);
IAtomContainerSet containerSet = file.getBuilder().newInstance(IAtomContainerSet.class);
- IMolecule container = file.getBuilder().newInstance(IMolecule.class);
+ IAtomContainer container = file.getBuilder().newInstance(IAtomContainer.class);
int lineNumber = 0;
@@ -38,13 +38,13 @@
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtom;
+import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IAtomContainerSet;
import org.openscience.cdk.interfaces.IBond;
import org.openscience.cdk.interfaces.IChemFile;
import org.openscience.cdk.interfaces.IChemModel;
import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IChemSequence;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.io.formats.PubChemASNFormat;
import org.openscience.cdk.tools.ILoggingTool;
@@ -67,7 +67,7 @@
private static ILoggingTool logger =
LoggingToolFactory.createLoggingTool(PCCompoundASNReader.class);
- IMolecule molecule = null;
+ IAtomContainer molecule = null;
Map atomIDs = null;
/**
@@ -144,7 +144,7 @@ private IChemFile readChemFile(IChemFile file) throws Exception {
IChemSequence chemSequence = file.getBuilder().newInstance(IChemSequence.class);
IChemModel chemModel = file.getBuilder().newInstance(IChemModel.class);
IAtomContainerSet moleculeSet = file.getBuilder().newInstance(IAtomContainerSet.class);
- molecule = file.getBuilder().newInstance(IMolecule.class);
+ molecule = file.getBuilder().newInstance(IAtomContainer.class);
atomIDs = new HashMap();
String line = input.readLine();
@@ -35,7 +35,6 @@
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemObject;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.io.formats.PubChemSubstanceXMLFormat;
@@ -61,7 +60,7 @@
private PubChemXMLHelper parserHelper;
private IChemObjectBuilder builder;
- IMolecule molecule = null;
+ IAtomContainer molecule = null;
/**
* Construct a new reader from a Reader type object.
@@ -109,13 +108,13 @@ public void setReader(InputStream input) throws CDKException {
public boolean accepts(Class classObject) {
Class[] interfaces = classObject.getInterfaces();
for (int i=0; i<interfaces.length; i++) {
- if (IMolecule.class.equals(interfaces[i])) return true;
+ if (IAtomContainer.class.equals(interfaces[i])) return true;
}
return false;
}
public <T extends IChemObject> T read(T object) throws CDKException {
- if (object instanceof IMolecule) {
+ if (object instanceof IAtomContainer) {
try {
parserHelper = new PubChemXMLHelper(object.getBuilder());
builder = object.getBuilder();
@@ -36,7 +36,6 @@
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemObject;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.io.formats.IResourceFormat;
import org.openscience.cdk.io.formats.PubChemSubstanceXMLFormat;
import org.openscience.cdk.io.pubchemxml.PubChemXMLHelper;
@@ -61,7 +60,7 @@
private PubChemXMLHelper parserHelper;
private IChemObjectBuilder builder;
- IMolecule molecule = null;
+ IAtomContainer molecule = null;
/**
* Construct a new reader from a Reader type object.
@@ -109,13 +108,13 @@ public void setReader(InputStream input) throws CDKException {
public boolean accepts(Class classObject) {
Class[] interfaces = classObject.getInterfaces();
for (int i=0; i<interfaces.length; i++) {
- if (IMolecule.class.equals(interfaces[i])) return true;
+ if (IAtomContainer.class.equals(interfaces[i])) return true;
}
return false;
}
public <T extends IChemObject> T read(T object) throws CDKException {
- if (object instanceof IMolecule) {
+ if (object instanceof IAtomContainer) {
try {
parserHelper = new PubChemXMLHelper(object.getBuilder());
builder = object.getBuilder();
@@ -36,7 +36,6 @@
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IChemObjectBuilder;
-import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.io.ISimpleChemObjectReader;
import org.openscience.cdk.io.MDLV2000Reader;
import org.openscience.cdk.io.ReaderFactory;
Oops, something went wrong.

0 comments on commit 2fc6b61

Please sign in to comment.