code: public static void translate2DCenterTo(IAtomContainer container, Point2d p) {
          Point2d com = get2DCenter(container);
          Vector2d translation = new Vector2d(p.x - com.x, p.y - com.y);
          for (IAtom atom : container.atoms()) {
              if (atom.getPoint2d() != null) {
                  atom.getPoint2d().add(translation);
              }
          }
      }
docs: Translates the geometric 2DCenter of the given AtomContainer container to the specified
  Point2d p.
  
  @param container AtomContainer which should be translated.
  @param p         New Location of the geometric 2D Center.
  @see #get2DCenter
  @see #translate2DCentreOfMassTo