We provide here several usage examples of the Electrostatic Tools package.
Perform fit of atomic charges and multipoles relative to reference electrostatic potential with default parameters
Assuming you have a molecule in any of the common file formats and reference molecular electrostatic potential (MEP) grid file this is as simple as calling:
$mult_fitter molecule.mol2 grid.esp
The results will be saved in file "molecule.mmol" (customizable) in human friendly file format
Precisely control topological symmetry constraints
Topological symmetry is controlled by atomic charges in the input molecule file. Atoms of the same element with equal charges are considered equivalent and constraint, preserving this equivalence, is added. You can also disable topological restraints with the "-b" flag or enforce Gasteiger charges recalculation to get symmetry information out of molecular graph with the "-r" flag.
$mult_fitter -I molecule.mol2 -G grid.esp -O output.mmol -L molecule.log -r
Specify the atoms for multipole placement with SMARTS patterns
The programs use rulefiles to understand which atoms require multipoles and where only charge is enouth. The file has an easily understandable format:
atom: "*" m atom: "[Cl,Br,I,At]" mdq* atom: "[Cl,Br,I,At]a" mq* atom: "[O]" mdq
$mult_fitter -I molecule.mol2 -G grid.esp -O output.mmol -L molecule.log -p placement.rules
Fine-tune the orientation of the multipoles
The orientation of multipoles can be fine-tuned by specifying the rules in another rulefile. These rules are also based on SMARTS matching.
rule: z "*" rule: a "[!#99]~[!#99]" rule: b "[!#99]=[!#99]~[!#99]"
$mult_fitter -I molecule.mol2 -G grid.esp -O output.mmol -L molecule.log -p orient.rules
Add additional multipole expansion centers
Additional expansion centers can be added on groups of atoms, such as benzene ring.
Fit models with extra-point centers on arbitrary atoms
Extra-points can be added to the molecule with host-atoms determined by SMARTS patterns.
$ep_fitter -I molecule.mol2 -G grid.esp -O output.mmol -L log.log -r -M"[Cl]" -M"[Br]" -d 1.3 -s 0
Optimize position of arbitrary number of extra-points
Position of extra-points can be optimized for best MEP reproduction
$ep_fitter -Imolecule.mol2 -Ggrid.esp -Ooutput.mmol -Llog.log -r -M"[Cl]" -M"[Br]" -d 1.3 -s 0.1
Process the results in Perl or Python with our library
The results can be processed with the help of script bindings of OpenBabel-compatible classes allowing for complicated analisys.
import openbabel from ElectrostaticTools import * mols = ("mol1.mmol", "mol2.mmol", "mol3.mmol") for molname in mols: mol = GeneralMultipoledMolecule() mol.readMe(molname) for i in range(1,mol.NumAtoms()+1) if (mol.hasMultipoles(i)) : mult = mol.GetRawMultipoles(i) print(mult.toString()) ...