code: public static Map<Integer, Integer> mapAtomsOfAlignedStructures(IAtomContainer firstAtomContainer,
              IAtomContainer secondAtomContainer, Map<Integer, Integer> mappedAtoms) throws CDKException {
          //logger.debug("**** GT MAP ATOMS ****");
          //Map atoms onto each other
          if (firstAtomContainer.getAtomCount() < 1 & secondAtomContainer.getAtomCount() < 1) {
              return mappedAtoms;
          }
          RMap map;
          IAtom atom1;
          IAtom atom2;
          List<RMap> list;
          try {
              list = new UniversalIsomorphismTester().getSubgraphAtomsMap(firstAtomContainer, secondAtomContainer);
              //logger.debug("ListSize:"+list.size());
              for (int i = 0; i < list.size(); i++) {
                  map = list.get(i);
                  atom1 = firstAtomContainer.getAtom(map.getId1());
                  atom2 = secondAtomContainer.getAtom(map.getId2());
                  if (checkAtomMapping(firstAtomContainer, secondAtomContainer, firstAtomContainer.indexOf(atom1),
                          secondAtomContainer.indexOf(atom2))) {
                      mappedAtoms.put(Integer.valueOf(firstAtomContainer.indexOf(atom1)),
                              Integer.valueOf(secondAtomContainer.indexOf(atom2)));
                      //                    logger.debug("#:"+countMappedAtoms+" Atom:"+firstAtomContainer.indexOf(atom1)+" is mapped to Atom:"+secondAtomContainer.indexOf(atom2));
                  } else {
                      logger.error("Error: Atoms are not similar !!");
                  }
              }
          } catch (CDKException e) {
              throw new CDKException("Error in UniversalIsomorphismTester due to:" + e.toString(), e);
          }
          return mappedAtoms;
      }
docs: Returns a Map with the AtomNumbers, the first number corresponds to the first (or the largest
  AtomContainer) atomContainer.
  
  Only for similar and aligned molecules with coordinates!
  
  @param firstAtomContainer  the (largest) first aligned AtomContainer which is the reference
  @param secondAtomContainer the second aligned AtomContainer
  @return a Map of the mapped atoms
  @throws CDKException if there is an error in the UniversalIsomorphismTester