test_class.declarator: smis = new String[] { "C", "C(=O)F", "C1ON1" }
test_class.original_string: String[] smis = new String[] { "C", "C(=O)F", "C1ON1" };
test_class.type: String[]
test_class.var_name: smis
test_class.declarator: expectedPaths =                                        // int's are ordered ascending, strings are not ordered
              {{ { } },                                               //  { "" }
               { { 1160, 2270 }, { 2260, 30692 }, { 1145, 33761 } },  //  { "-F", "=O"} , {"=C", "=C-F"} , { "-C", "-C=O"}
               { { 752,  1150, 1155, 3826,  38221, 43791},            //  { "-N-O-", "-N-O", "-N", "-O-N-", "-O-N", "-O" }
                 { 1145, 1150, 1596, 4670,  32641, 38211},            //  { "-C-N-", "-C-N", "-C", "-N-C-", "-N-C", "-N" }
                 { 1145, 1155, 5785, 32646, 43786, 65173}}}
test_class.original_string: int[][][] expectedPaths =                                        // int's are ordered ascending, strings are not ordered
              {{ { } },                                               //  { "" }
               { { 1160, 2270 }, { 2260, 30692 }, { 1145, 33761 } },  //  { "-F", "=O"} , {"=C", "=C-F"} , { "-C", "-C=O"}
               { { 752,  1150, 1155, 3826,  38221, 43791},            //  { "-N-O-", "-N-O", "-N", "-O-N-", "-O-N", "-O" }
                 { 1145, 1150, 1596, 4670,  32641, 38211},            //  { "-C-N-", "-C-N", "-C", "-N-C-", "-N-C", "-N" }
                 { 1145, 1155, 5785, 32646, 43786, 65173}}};
test_class.type: int[][][]
test_class.var_name: expectedPaths
test_class.file: src/com/genentech/chemistry/openEye/IAAPathGeneratorCharTest.java
test_class.identifier: IAAPathGeneratorCharTest
test_case.body: @Test
     public void testAPG()
     {  OEMolBase mol = new OEGraphMol();
        for( int i=0; i<smis.length; i++)
       {  String smi = smis[i];
          int[][] expectedPath = expectedPaths[i];
          mol.Clear();
          oechem.OEParseSmiles(mol, smi);
          IAAPathGeneratorChar aapg = new IAAPathGeneratorChar(mol, 7);
  
          int atIdx = 0;
          OEAtomBaseIter atit = mol.GetAtoms();
          while(atit.hasNext())
          {  char[] path = aapg.getAtomPaths(atit.next());
  
             assert path.length == expectedPath[atIdx].length:
                String.format("Did not get the expected path length %d != %d for %s\n",
                         path.length, expectedPath.length, smi);
  
             for(int j=0; j<expectedPath[atIdx].length; j++)
                assert path[j] == expectedPath[atIdx][j] :
                   String.format("Path missmatch for %s: %d != %s\n",
                            smi, (int)path[j], expectedPath[atIdx][j]);
             atIdx++;
          }
          atit.delete();
        }
        mol.delete();
     }
test_case.class_method_signature: IAAPathGeneratorCharTest.testAPG()
test_case.full_signature: @Test public void testAPG()
test_case.identifier: testAPG
test_case.invocations: Clear OEParseSmiles GetAtoms hasNext getAtomPaths next format format delete delete
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAPG()
focal_class.declarator: MAXAtomType = Prime.getPrimeLargerEqThan(217)
focal_class.modifier: private static final
focal_class.original_string: private static final int MAXAtomType = Prime.getPrimeLargerEqThan(217);
focal_class.type: int
focal_class.var_name: MAXAtomType
focal_class.declarator: MAXBondType = Prime.getPrimeLargerEqThan(5)
focal_class.modifier: private static final
focal_class.original_string: private static final int MAXBondType = Prime.getPrimeLargerEqThan(5);
focal_class.type: int
focal_class.var_name: MAXBondType
focal_class.declarator: MAXAtomNum  = 108
focal_class.modifier: private static final
focal_class.original_string: private static final int  MAXAtomNum  = 108;
focal_class.type: int
focal_class.var_name: MAXAtomNum
focal_class.declarator: maxBonds
focal_class.modifier: private final
focal_class.original_string: private final int maxBonds;
focal_class.type: int
focal_class.var_name: maxBonds
focal_class.declarator: bondTypes
focal_class.modifier: private
focal_class.original_string: private int[] bondTypes;
focal_class.type: int[]
focal_class.var_name: bondTypes
focal_class.declarator: atomTypes
focal_class.modifier: private
focal_class.original_string: private int[] atomTypes;
focal_class.type: int[]
focal_class.var_name: atomTypes
focal_class.declarator: pathList = new ArrayList<Integer>()
focal_class.modifier: private final
focal_class.original_string: private final List<Integer> pathList = new ArrayList<Integer>();
focal_class.type: List<Integer>
focal_class.var_name: pathList
focal_class.declarator: nBondsDepth
focal_class.modifier: private
focal_class.original_string: private int nBondsDepth;
focal_class.type: int
focal_class.var_name: nBondsDepth
focal_class.declarator: currentPath
focal_class.modifier: private
focal_class.original_string: private int currentPath;
focal_class.type: int
focal_class.var_name: currentPath
focal_class.declarator: atomVisited
focal_class.modifier: private final
focal_class.original_string: private final boolean[] atomVisited;
focal_class.type: boolean[]
focal_class.var_name: atomVisited
focal_class.declarator: bondVisited
focal_class.modifier: private final
focal_class.original_string: private final boolean[] bondVisited;
focal_class.type: boolean[]
focal_class.var_name: bondVisited
focal_class.file: src/com/genentech/chemistry/openEye/IAAPathGeneratorChar.java
focal_class.identifier: IAAPathGeneratorChar
focal_class.class_method_signature: IAAPathGeneratorChar.IAAPathGeneratorChar(OEMolBase mol, int maxBonds)
focal_class.full_signature:   IAAPathGeneratorChar(OEMolBase mol, int maxBonds)
focal_class.identifier: IAAPathGeneratorChar
focal_class.parameters: (OEMolBase mol, int maxBonds)
focal_class.signature:  IAAPathGeneratorChar(OEMolBase mol, int maxBonds)
focal_class.class_method_signature: IAAPathGeneratorChar.getAtomPaths(OEAtomBase at)
focal_class.full_signature: public char[] getAtomPaths(OEAtomBase at)
focal_class.identifier: getAtomPaths
focal_class.modifiers: public
focal_class.parameters: (OEAtomBase at)
focal_class.return: char[]
focal_class.signature: char[] getAtomPaths(OEAtomBase at)
focal_class.class_method_signature: IAAPathGeneratorChar.addPath(OEAtomBase at)
focal_class.full_signature: private void addPath(OEAtomBase at)
focal_class.identifier: addPath
focal_class.modifiers: private
focal_class.parameters: (OEAtomBase at)
focal_class.return: void
focal_class.signature: void addPath(OEAtomBase at)
focal_class.class_method_signature: IAAPathGeneratorChar.getAtomTypes()
focal_class.full_signature: public int[] getAtomTypes()
focal_class.identifier: getAtomTypes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int[]
focal_class.signature: int[] getAtomTypes()
focal_class.class_method_signature: IAAPathGeneratorChar.atomTypeToAtomNum(int atomType)
focal_class.full_signature: public static final int atomTypeToAtomNum(int atomType)
focal_class.identifier: atomTypeToAtomNum
focal_class.modifiers: public static final
focal_class.parameters: (int atomType)
focal_class.return: int
focal_class.signature: int atomTypeToAtomNum(int atomType)
focal_class.class_method_signature: IAAPathGeneratorChar.isAromatic(int atomType)
focal_class.full_signature: public static boolean isAromatic(int atomType)
focal_class.identifier: isAromatic
focal_class.modifiers: public static
focal_class.parameters: (int atomType)
focal_class.return: boolean
focal_class.signature: boolean isAromatic(int atomType)
focal_method.body: public char[] getAtomPaths(OEAtomBase at)
     {  pathList.clear();
  
        // do not include this atom so that we can make Cl more like F later
        // loop over neighbors
        int atIdx = at.GetIdx();
        atomVisited[atIdx] = true;
        nBondsDepth = 1;
        OEBondBaseIter bdIt = at.GetBonds();
        while( bdIt.hasNext() )
        {  OEBondBase bd = bdIt.next();
           int bdIdx = bd.GetIdx();
           currentPath = bondTypes[bdIdx]*MAXAtomType;
           bondVisited[bdIdx] = true;
           OEAtomBase nextAt = bd.GetNbr(at);
  
           addPath(nextAt);
           bondVisited[bdIdx] = false;
        }
        bdIt.delete();
        atomVisited[atIdx] = false;
  
        char[] paths = new char[pathList.size()];
        for( int i=0; i<pathList.size(); i++ )
           paths[i] = (char)pathList.get(i).intValue();
  
        //System.err.println(paths.length);
        Arrays.sort(paths);
        return paths;
     }
focal_method.class_method_signature: IAAPathGeneratorChar.getAtomPaths(OEAtomBase at)
focal_method.full_signature: public char[] getAtomPaths(OEAtomBase at)
focal_method.identifier: getAtomPaths
focal_method.invocations: clear GetIdx GetBonds hasNext next GetIdx GetNbr addPath delete size size intValue get sort
focal_method.modifiers: public
focal_method.parameters: (OEAtomBase at)
focal_method.return: char[]
focal_method.signature: char[] getAtomPaths(OEAtomBase at)