Why add ions? Some proteins may be (and sometimes are) sensitive to the ionic strength of the surrounding solvent. Even when that is not the case, adding ions is commonly used to make the net electric charge of the system zero. In molecular dynamics (MD) simulations with periodic boundary conditions, the energy of the electrostatic interactions is often computed using the particle-mesh Ewald (PME) summation, which requires the system to be electrically neutral.

The Autoionize plugin provides a quick and easy means to make the net charge of the system zero by adding ions to the solvent. Ion placement is random, but but there are minimum distances between ions and molecule as well as between any two ions. Autoionize requires a solvated system in psf/pdb format, and produces new psf/pdb files with added ions using the CHARMM27 force field.

Ion placement modes

Autoionize currently supports three ion placement modes: (1) only neutralize system; (2) neutralize system and set the salt concentration; and (3) user-defined number of ions.

Neutralizing the system. In this mode, Autoionize will add just enough ions to neutralize the system. By default, Na+ and Cl- are used, but the cation and anion can be changed to any of the supported ions.

Setting the salt concentration. In this mode, Autoionize will first add enough ions to neutrlize the system, after which additional ions will be placed according to the requested salt concentration given in mol/L. By default, Na+ and Cl- are used, but the cation and anion can be changed to any of the supported ions.

User-defined number of ions. In this mode, Autoionize will place the exact number of each ion requested by the user.

Note. Ions placed to neutralize the system, as well as any ions previously present, are not taken into account when calculating the salt concentration! Also, when placing ions according to a requested salt concentration, the volume is estimated from the number of water molecules in the system, i.e., the solute volume is not included in the calculation.

Command-line interface

To load the plugin, type in the VMD text console or the Tk Console: package require autoionize. The autoionize command should then be available:

Usage: autoionize -psf file.psf -pdb file.pdb  [options]
Ion placement mode (choose one):
  -neutralize              -- only neutralize system
  -sc  -- neutralize and set salt concentration (mol/L)
  -nions {{ion1 num1} {ion2 num2} ...} -- user defined number of ions
Other options:
  -cation     -- default: SOD
  -anion      -- default: CLA
  -o               -- output file prefix (default: ionized)
  -from          -- min. distance from solute (default: 5A)
  -between       -- min. distance between ions (default: 5A)
  -seg            -- specify new segment name (default: ION)
Supported ions (CHARMM force field resnames):
   SOD -- sodium    (Na+)
   MG  -- magnesium (Mg2+)
   POT -- potassium (K+)
   CES -- cesium    (Cs+)
   CAL -- calcium   (Ca2+)
   ZN2 -- zinc      (Zn2+)
   CLA -- chloride  (Cl-)


In the following examples, we assume that the files input.psf/input.pdb contain the solvated system.

  1. Neutralize the system with NaCl:
    autoionize -psf input.psf -pdb input.pdb -neutralize

  2. Neutralize the system with MgCl2:
    autoionize -psf input.psf -pdb input.pdb -neutralize -cation MG

  3. Neutralize the system and add an additional 150mM KCl:
    autoionize -psf input.psf -pdb input.pdb -sc 0.15 -cation POT

  4. Add 5 Ca2+, 10 Cl-, and 3 K+ ions:
    autoionize -psf input.psf -pdb input.pdb -nions {{CAL 5} {CLA 10} {POT 3}}

Caveats and limitations

Autoionize places ions randomly, which is acceptable if the electric charge of the molecule is relatively small. If the charge is big, the ions no longer are nearly uniformly distributed in the solvent; instead, they form a screening clowd around the molecule. An example of such systems is a double-helix DNA, which carries a -1e charge per base pair. In such cases, one needs to place ions with regard to the electrostatic potential of the molecule. To neutralize highly charged systems, consider using the cionize plugin.


Ilya Balabin
Marcos Sotomayor (graphical interface)
Leonardo Trabuco (version 1.3)