code: public void addResidue(Residue residue) {
          if (residues == null) residues = new ArrayList<Residue>();
  
          //Check if exists
          if (residues.contains(residue)) {
              System.out.println("Residue: " + residue.getName() + " already present in molecule: " + getID());
              return;
          }
  
          residues.add(residue);
      }
docs: Add a Residue to the MDMolecule if not already present.
  @param residue Residue to add