From: <eg...@us...> - 2006-08-17 11:48:53
|
Revision: 6787 Author: egonw Date: 2006-08-17 04:48:28 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/cdk/?rev=6787&view=rev Log Message: ----------- Introduced a IDeduceBondOrderTool interface to make testing them feasible. Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/tools/SaturationChecker.java trunk/cdk/src/org/openscience/cdk/tools/ValencyChecker.java trunk/cdk/src/org/openscience/cdk/tools/ValencyHybridChecker.java Added Paths: ----------- trunk/cdk/src/org/openscience/cdk/tools/IDeduceBondOrderTool.java Added: trunk/cdk/src/org/openscience/cdk/tools/IDeduceBondOrderTool.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/tools/IDeduceBondOrderTool.java (rev 0) +++ trunk/cdk/src/org/openscience/cdk/tools/IDeduceBondOrderTool.java 2006-08-17 11:48:28 UTC (rev 6787) @@ -0,0 +1,44 @@ +/* $Revision: 5940 $ $Author: egonw $ $Date: 2006-04-15 21:58:22 +0200 (Sat, 15 Apr 2006) $ + * + * Copyright (C) 2006 Egon Willighagen <eg...@us...> + * + * Contact: cdk...@li... + * + * 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. + * All we ask is that proper credit is given for our work, which includes + * - but is not limited to - adding the above copyright notice to the beginning + * of your source code files, and to any copyright notice that you may distribute + * with programs based on this work. + * + * 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.tools; + +import org.openscience.cdk.exception.CDKException; +import org.openscience.cdk.interfaces.IAtomContainer; + +/** + * A common interface for tools that deduce bond orders from connectivity + * and optionally additional information, like number of implicit or + * explicit hydrogens, or hybridization states. + * + * @author Egon Willighagen + * @cdk.created 2006-08-16 + * @cdk.module valencycheck + */ +public interface IDeduceBondOrderTool { + + public void saturate(IAtomContainer ac) throws CDKException; + +} + Modified: trunk/cdk/src/org/openscience/cdk/tools/SaturationChecker.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/tools/SaturationChecker.java 2006-08-15 16:18:47 UTC (rev 6786) +++ trunk/cdk/src/org/openscience/cdk/tools/SaturationChecker.java 2006-08-17 11:48:28 UTC (rev 6787) @@ -63,7 +63,7 @@ * @cdk.module valencycheck * @cdk.bug 1167386 */ -public class SaturationChecker implements IValencyChecker { +public class SaturationChecker implements IValencyChecker, IDeduceBondOrderTool { AtomTypeFactory structgenATF; Modified: trunk/cdk/src/org/openscience/cdk/tools/ValencyChecker.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/tools/ValencyChecker.java 2006-08-15 16:18:47 UTC (rev 6786) +++ trunk/cdk/src/org/openscience/cdk/tools/ValencyChecker.java 2006-08-17 11:48:28 UTC (rev 6787) @@ -55,7 +55,7 @@ * * @cdk.module valencycheck */ -public class ValencyChecker implements IValencyChecker { +public class ValencyChecker implements IValencyChecker, IDeduceBondOrderTool { private String atomTypeList = null; protected AtomTypeFactory structgenATF; Modified: trunk/cdk/src/org/openscience/cdk/tools/ValencyHybridChecker.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/tools/ValencyHybridChecker.java 2006-08-15 16:18:47 UTC (rev 6786) +++ trunk/cdk/src/org/openscience/cdk/tools/ValencyHybridChecker.java 2006-08-17 11:48:28 UTC (rev 6787) @@ -57,7 +57,7 @@ * @cdk.module valencycheck * @cdk.bug 1174781 */ -public class ValencyHybridChecker implements IValencyChecker { +public class ValencyHybridChecker implements IValencyChecker, IDeduceBondOrderTool { private String atomTypeList = null; protected AtomTypeFactory structgenATF; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |