code: private static GeometricParity geometric2D(Map<IAtom, Integer> elevationMap, List<IBond> bonds, int i,
              int[] adjacent, IAtomContainer container) {
  
          IAtom atom = container.getAtom(i);
  
          // create map of the atoms and their elevation from the center,
          makeElevationMap(atom, bonds, elevationMap);
  
          Point2d[] coordinates = new Point2d[4];
          int[] elevations = new int[4];
  
          // set the forth ligand to centre as default (overwritten if
          // we have 4 neighbors)
          if (atom.getPoint2d() != null)
              coordinates[3] = atom.getPoint2d();
          else
              return null;
  
          for (int j = 0; j < adjacent.length; j++) {
              IAtom neighbor = container.getAtom(adjacent[j]);
              elevations[j] = elevationMap.get(neighbor);
  
              if (neighbor.getPoint2d() != null)
                  coordinates[j] = neighbor.getPoint2d();
              else
                  return null; // skip to next atom
  
          }
  
          return new Tetrahedral2DParity(coordinates, elevations);
  
      }
docs: Create the geometric part of an encoder of 2D configurations
  
  @param elevationMap temporary map to store the bond elevations (2D)
  @param bonds        list of bonds connected to the atom at i
  @param i            the central atom (index)
  @param adjacent     adjacent atoms (indices)
  @param container    container
  @return geometric parity encoder (or null)