Skip to content

Commit

Permalink
Deprecate move legacy normlizer classes - functionality better met wi…
Browse files Browse the repository at this point in the history
…th SMIRKS (via AMBIT atm)
  • Loading branch information
johnmay committed Feb 12, 2017
1 parent fa43771 commit 313b1ea
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.aromaticity.Aromaticity;
import org.openscience.cdk.aromaticity.Kekulization;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
Expand Down Expand Up @@ -160,9 +161,8 @@ public void testBug771485() throws Exception {
addImplicitHydrogens(structure1);
addImplicitHydrogens(structure2);

FixBondOrdersTool fbot = new FixBondOrdersTool();
structure1 = fbot.kekuliseAromaticRings(structure1);
structure2 = fbot.kekuliseAromaticRings(structure2);
Kekulization.kekulize(structure1);
Kekulization.kekulize(structure2);

// hydrogens loaded from MDL mol files if non-query. Structure 2 has
// query aromatic bonds and the hydrogen counts are not assigned - ensure
Expand Down
1 change: 0 additions & 1 deletion legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
<groupId>org.openscience.cdk</groupId>
<artifactId>cdk-smiles</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openscience.cdk</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
*
* Contact: [email protected]
*
* 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 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.
* 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.
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 U
*/
package org.openscience.cdk.tools;

import java.util.List;
package org.openscience.cdk.normalize;

import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.aromaticity.Aromaticity;
Expand All @@ -31,6 +32,8 @@
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.tools.manipulator.RingSetManipulator;

import java.util.List;

/**
* Utility class written by Todd Martin, for help in his QSAR descriptors and SMILES
* parser. Seems to have overlap with, at least, cdk.normalize.Normalizer.
Expand All @@ -41,8 +44,10 @@
* @cdk.module extra
* @cdk.githash
*
* @see org.openscience.cdk.normalize.Normalizer
* @see Normalizer
* @deprecated better accomplished with SMARTS patterns or simple REGEX
*/
@Deprecated
public class CDKUtilities {

public static String fixSmiles(String Smiles) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,28 @@
/*
* Copyright (C) 2004-2010 The Chemistry Development Kit (CDK) project
* 2014 Mark B Vine (orcid:0000-0002-7794-0426)
* Copyright (C) 2004-2010 The Chemistry Development Kit (CDK) project
* 2014 Mark B Vine (orcid:0000-0002-7794-0426)
*
* Contact: [email protected]
* Contact: [email protected]
*
* 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 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.
* 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 U
*/
package org.openscience.cdk.normalize;

import java.util.Iterator;
import java.util.List;

import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.interfaces.IAtom;
Expand All @@ -40,14 +35,19 @@
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

import java.util.Iterator;
import java.util.List;

/**
* Adjusts parts of an AtomContainer to the configuration of a fragment.
*
* @author shk3
* @cdk.created 2004-03-04
* @cdk.module smiles
* @cdk.githash
* @deprecated The functionality provided by with class is better suited to SMIRKS
*/
@Deprecated
public class Normalizer {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
/* Copyright (C) 1997-2010 The Chemistry Development Kit (CDK) project
/*
* Copyright (C) 1997-2010 The Chemistry Development Kit (CDK) project
*
* Contact: [email protected]
*
* 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 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.
* 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.
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 U
*/
package org.openscience.cdk.normalize;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.Atom;
Expand All @@ -32,9 +33,9 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;

/**
* @cdk.module test-smiles
*/
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

public class NormalizerTest extends CDKTestCase {

@Test
Expand Down

0 comments on commit 313b1ea

Please sign in to comment.