Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make it compatible with the new UniversalIsomorphismTester.

  • Loading branch information...
commit 7439b08f6d1ec4940c7c1ba7185ba7498c8939f7 1 parent 0a70c86
Yap Chun Wei authored May 04, 2012 egonw committed July 27, 2012
11  src/main/org/openscience/cdk/qsar/descriptors/molecular/XLogPDescriptor.java
@@ -862,6 +862,7 @@ else if (getAtomTypeXCount(ac, atomi) == 2) {
862 862
             }
863 863
         }
864 864
 
  865
+        UniversalIsomorphismTester universalIsomorphismTester = new UniversalIsomorphismTester();
865 866
         if (checkAminoAcid>1){
866 867
 //			alpha amino acid
867 868
             QueryAtomContainer aminoAcid =
@@ -885,8 +886,8 @@ else if (getAtomTypeXCount(ac, atomi) == 2) {
885 886
 
886 887
             //AtomContainer aminoacid = sp.parseSmiles("NCC(=O)O");
887 888
             try {
888  
-                if (UniversalIsomorphismTester.isSubgraph(ac, aminoAcid)) {
889  
-                    List list = UniversalIsomorphismTester.getSubgraphAtomsMap(ac, aminoAcid);
  889
+                if (universalIsomorphismTester.isSubgraph(ac, aminoAcid)) {
  890
+                    List list = universalIsomorphismTester.getSubgraphAtomsMap(ac, aminoAcid);
890 891
                     RMap map = null;
891 892
                     IAtom atom1=null;
892 893
                     for (int j = 0; j < list.size(); j++){
@@ -910,7 +911,7 @@ else if (getAtomTypeXCount(ac, atomi) == 2) {
910 911
         IAtomContainer paba = createPaba(ac.getBuilder());
911 912
         // p-amino sulphonic acid
912 913
         try {
913  
-            if (UniversalIsomorphismTester.isSubgraph(ac, paba)) {
  914
+            if (universalIsomorphismTester.isSubgraph(ac, paba)) {
914 915
                 xlogP -= 0.501;
915 916
                 //logger.debug("XLOGP: p-amino sulphonic acid	-0.501");
916 917
             }
@@ -922,7 +923,7 @@ else if (getAtomTypeXCount(ac, atomi) == 2) {
922 923
         if (salicylFlag){
923 924
             IAtomContainer salicilic = createSalicylicAcid(ac.getBuilder());
924 925
             try {
925  
-                if (UniversalIsomorphismTester.isSubgraph(ac, salicilic)) {
  926
+                if (universalIsomorphismTester.isSubgraph(ac, salicilic)) {
926 927
                     xlogP += 0.554;
927 928
                     //logger.debug("XLOGP: salicylic acid	 0.554");
928 929
                 }
@@ -948,7 +949,7 @@ else if (getAtomTypeXCount(ac, atomi) == 2) {
948 949
         orthopair.addBond(new OrderQueryBond(atom2,atom4,IBond.Order.SINGLE));
949 950
 
950 951
         try {
951  
-            if (UniversalIsomorphismTester.isSubgraph(ac, orthopair)) {
  952
+            if (universalIsomorphismTester.isSubgraph(ac, orthopair)) {
952 953
                 xlogP -= 0.268;
953 954
                 //logger.debug("XLOGP: Ortho oxygen pair	-0.268");
954 955
             }

0 notes on commit 7439b08

Please sign in to comment.
Something went wrong with that request. Please try again.