code: public void addChargeGroup(ChargeGroup chargeGroup) {
          if (chargeGroups == null) chargeGroups = new ArrayList<ChargeGroup>();
  
          //Check if exists
          if (chargeGroups.contains(chargeGroup)) {
              System.out.println("Charge group: " + chargeGroup.getNumber() + " already present in molecule: " + getID());
              return;
          }
  
          chargeGroups.add(chargeGroup);
      }
docs: Add a ChargeGroup to the MDMolecule if not already present.
  
  @param chargeGroup {@link ChargeGroup} to add