code: private static double deltavPhosphorous(IAtom atom, IAtomContainer atomContainer) {
          if (!atom.getSymbol().equals("P")) return -1;
  
          List<IAtom> connected = atomContainer.getConnectedAtomsList(atom);
          int conditions = 0;
  
          if (connected.size() == 4) conditions++;
  
          for (IAtom connectedAtom : connected) {
              if (connectedAtom.getSymbol().equals("O")
                      && atomContainer.getBond(atom, connectedAtom).getOrder() == IBond.Order.DOUBLE) conditions++;
              if (atomContainer.getBond(atom, connectedAtom).getOrder() == IBond.Order.SINGLE) conditions++;
          }
          if (conditions == 5) return 2.22;
          return -1;
      }
docs: Checks whether the P atom is in a PO environment.
  
  This environment is noted in Kier & Hall (1986), page 20
  
  @param atom          The P atom in question
  @param atomContainer The molecule containing the P atom
  @return The empirical delta V if present in the above environment,
  -1 otherwise