htmd.builder.ionize module#
- htmd.builder.ionize.ionize(mol, netcharge, nwater, neutralize=True, saltconc=None, cation=None, anion=None, ff=None)#
- htmd.builder.ionize.ionizePlace(mol, anion_resname, cation_resname, anion_name, cation_name, nanion, ncation, dfrom=5, dbetween=5, segname=None)#
Place a given number of negative and positive ions in the solvent.
Replaces water molecules al long as they respect the given distance criteria.
- Parameters:
mol (
Molecule
object) – The Molecule objectanion_resname (str) – Resname of the added anions
cation_resname (str) – Resname of the added cations
anion_name (str) – Name of the added anions
cation_name (str) – Name of the added cations
nanion (int) – Number of anions to add
ncation (int) – Number of cations to add
dfrom (float) – Min distance of ions from molecule
dbetween (float) – Min distance between ions
segname (str) – Segment name to add
- Returns:
mol – The molecule with the ions added
- Return type:
Molecule
object