Occasionally Discovery Studio will be left with some residues not having a charge sum equal to the designated formal charge for that residue. That is usually undesirable, and will cause artifacts if using EWALD electrostatics in simulations. Or, you want to set selected atoms to some specific partial charge (for example ions). There is already a Discovery Script that will check all selected residues in a molecule and alert you of the residues which have a mismatch between the formal and partial charges – that script is called check_charges:
http://community.accelrys.com/message/1387
This script (fix_charges) provides any easy way to correct such problems when they are present.
There are currently two modes. In MODE 1 all atoms that are selected will have their partial charges set to the specified value. This is useful for changing the charges of all ions, for example. In mode two all selected residues are scanned to determine the formal and charge mismatch, and if there is a mismatch then all atom names in that residue that match a regular expression then will have their charges shifted enough to correct the sum of the partial charges to what is expected from the formal charge. By default the match regular expression is set to distribute the charge over all atom names beginning with either C or H and followed by at least one number. That will normally be the form of atom names for non-standard residues, but the match regular expression can easily be customized. To avoid changing the charges of hydrogens bound to polar atoms, a useful convention is to name all such hydrogens with the element they are bound to ie, HN1, HN2.
