CHARMM.pm Show Source

The CHARMM package is used to run CHARMM through a perl interface. With this package an active connection to CHARMM is maintained to allow quasi-interactive use. A variety of methods are available to perform setup functions and run minimizations and molecular dynamics simulations. Additional methods provide maintenance functions related to CHARMM input and output.

new([logfile[,commandlogfile]])
creates a new CHARMM object. A log file for CHARMM output and a command log file for commands sent to CHARMM may be given as an option. The constructor opens a connection to CHARMM and sets all parameters to default values.
setEnergyLogFile(file)
sets an energy log file and switches on energy logging
 
setPertLogFile(file)
sets an pert log file
 
logEnergy(tag)
writes the energy output from the last energy evaluation or minimization run to the energy log file if one has been set before with setEnergyLogFile. A tag is required to provide identification of the output in the log file.
 
logMDEnergy(tag)
writes energy output from the last dynamics run to the energy log file if one has been set before. A tag is required as in logEnergy.
 
logPertOutput()
writes pert output to the pert log file if one has been set before.
 
finish()
stops CHARMM and closes the connection and all log files. After this function has been called CHARMM commands can no longer be used. It is called automatically by the package destructor if it has not called explicitly.
 
closeEnergy()
closes the energy log file
 
loadParameters([parameters])
CHARMM load topology and parameter files into CHARMM. This should be called as one of the first CHARMM commands before any structures are loaded. Depending on the parameter param CHARMM19 or CHARMM22 parameters are loaded. The parameter may be set through a hash-type key=>value pair argument.
 
clearEnergy([parameters])
clears energy components
 
setupEnergy([parameters]) 
setups all energy components
 
setupFromMol2(mol2file)
reads in a MOL2 file to setup structure
 
setupFromPSF(psffile,crdfile)
reads in a PSF structure and reads coordinates from a CHARMM coordinate file
 
setupFromPDB(pdbfile[,terminalgroup])
generates the CHARMM PSF structure from a protein structure in a PDB file. It also rebuilds missing atoms and adds hydrogens, if necessary. The type of terminal groups may be selected through the second argument. Possible options are none, ends, and all.
 
setupFromMolecule(mol[,terminalgroup])
generates the CHARMM PSF structure from a protein structure in a Molecule object.
 
readFromPDB(pdbfile)
reads coordinates for a protein structure from a PDB file if the PSF was setup before with setupFromMolecule. This is useful for repeating a modeling procedure for different conformations of the same protein. As setupFromMolecule this method also rebuilds missing atoms and adds hydrogens if necessary.
 
readFromPDB(pdbfile)
reads coordinates for a protein structure from a PDB file if the PSF was setup before with setupFromMolecule. This is useful for repeating a modeling procedure for different conformations of the same protein. As setupFromMolecule this method also rebuilds missing atoms and adds hydrogens if necessary.
 
loadReference(molecule)
reads coordinates for a protein structure from a PDB file into the alternate COMP coordinate set
 
initCoordinates()
initializes all coordinates
 
setupNonBonded([parameters])
calls the CHARMM command update to set non-bonded interaction parameters. Options are constant (dielec=>"CDIE") or distance-dependent dielectric (dielec=>"RDIE"), the dieletric constant epsilon and interaction and list cutoffs (cutnb, cuton, cutoff). Force shifting is set for electrostatics as well as van der Waals interactions as the default for vacuum minimizations.
 
setupEEF1([parameters]) 
sets up EEF1
 
setupHBond([parameters]) 
sets up hydrogen bonding list
 
setupOG([parameters]) 
sets up Olgun's scoring function
 
setupACE([parameters]) 
sets up ACE
 
setupASP([parameters])
sets up atomic solvation parameter based energy function
 
clearASP()
switch off ASP energy terms
 
_scaleRadii(name)
scales radii for GB/PB
 
setupGB([parameters])
sets up the Generalized Born solvent approximation The non-bonded interactions are set to constant dielectric, epsilon = 1.0, and force switching. GB is then initialized and will be used in all subsequent energy evaluations.
 
clearGB()
clear and switch off Generalized Born solvent approximation
 
noeRestraints([parameters])
sets up NOE restraints with CHARMM input from file in noe parameter
 
getNOEAnalysis()
obtain NOE distance restraint violations from CHARMM
 
minimizeSD([parameters])
runs a steepest descent minimization. Parameters are the non-bonded list update frequency updnbsd, the number of minimization steps itersd and the initial step size stepsd.
 
minimize([parameters])
runs minimization protocol Parameters are the non-bonded list update frequency minupdnb, the number of minimization steps miniter, the initial step size minstep and an energy tolerance minetol to limit the minimization run if the tolerance is reached in less than the requested number of runs. The minimization algorithm can be changed by setting minmode.
 
shake([parameters])
turns on SHAKE to fix bond distances. A fast mode is available if the parameter shakefast is set. All bonds, including hydrogens, are fixed if shakemode is set to hyd, otherwise bonds involving hydrogens are excluded. The SHAKE tolerance is determined by shaketol.
 
periodicBoundaries([parameters]) 
turns on periodic boundaries.
 
ewald([parameters])
turns on Ewald summation (PME) for non-bonded electrostatics. The parameters pmekappa is used to set the kappa value.
 
setupPHMD([parameters])
set up PHMD simulation parameters are defined in phmd.doc
 
runDynamics(restin,restout,trajout,enerout[,parameters])
runs a molecular dynamics simulation. The first four arguments are file names for restart input and output, trajectory output and CHARMM energy output files. undef can be used instead of a file name if the corresponding file should not be created. If undef is given for the restart input file, the simulation is started with a random velocity assignment. A large number of parameters are available to control the simulation run. The most important values are dynsteps (number of dynamics steps), dyntemp (temperature), dynens (ensemble: "NVT" or "NPT"), dynoutfrq (frequency of energy output), dyneqfrq (frequency of velocity reassignment to maintain constant temperature in NVT), and dynpress (pressure for NPT ensemble).
 
setupChargeFEP(select)
setup PERT
 
runPertWHAM(filename) 
 
runChargeFEP(trajout,wham,pertfile[,parameters])
runs PERT to obtain charging free energy
 
setupRestraints(fscale,conslist)
sets up harmonic restraints from a list of cons data structures (see harmonicRestraint). The first argument determines the scaling factor for all force constants.
 
harmonicRestraint(cons[,fscale[,keep]])
sets up harmonic restraints according to the cons argument. It is expected to have the following data structure: cons -> {type, list[] -> {from, to, force}, sel}. The type field is either self (current coordinates) or ref (alternate coordinates in COMP). list contains a list of protein segments that are supposed to be restrained. sel identifies which atoms are restrained for each residue in the selection list (ca, cb, cab, heavy, or all). An additional argument may be given to scale all restraint forces by a factor. If the last argument is set to 1 previously set reference coordinates will be used and only force constants are updated.
 
simpleRestraint(force,select,keep,comp)
requests harmonic restraints with a simpler interface as harmonicRestraint. The arguments are a force constant, a CHARMM selection expression and flags whether to keep previous coordinates and whether to use coordinates from the alternate coordinate set
 
hmcmRestraint(cons[,fscale])
sets up harmonic center of mass restraints according to side chain centers from a SICHO chain file given in the reffile field of the cons argument.
 
clearRestraints()
clears all harmonic restraints
 
applyBias(parameters)
imposes a harmonic restraint of the type described in the biastype data structure. This data structure must contain the key "type", while other type-dependent keys may also be present.
 
clearBias(parameters)
clear the harmonic restraint of the type described in the biastype data structure.
 
val = getBiasVal(parameters)
return the current value of the variable to which the restraint was applied
 
getEntropy()
carries out normal mode analysis to get vibrational entropy translational and rotational entropies are also calculated and returned
 
quasiHarmonicAnalysis(dcdfile,modes)
carries out quasi harmonic analysis within CHARMM
 
normalModeAnalysis(modes,block) 
carries out normal mode analysis within CHARMM specifies the number of modes if set to 1 requests block normal mode analysis
 
nmaICSample(modefile,scale,scalepar)
extrapolates coordinates along internal coordinate normal mode
 
verbose(command)
runs an arbitrary CHARMM command. Please note, that for commands requiring multiple lines all lines have to be given at once as a single argument.
 
stream(command)
sends multiple command lines to CHARMM. It returns only after the last command is finished
 
writePDB(file)
has CHARMM write out the current coordinates to a file in PDB format.
 
writePSF(file)
 
writeCRD(file)
has CHARMM write out the current coordinates to a file in CRD format.
 
orient()
orients the current structure centered at the origin and with the principal moments of inertia aligned with the principal axes.
 
$stat = coorStats()
gets coordinate statistics for the current structure and returns a data structure with the following elements: atoms (number of atoms), xmin, xmax, xcenter, ymin, ymax, ycenter, zmin, zmax, zcenter (cartesian dimensions).
 
$energy = poissonBoltzmann()
calculates the non-hydrophobic contribution to the solvation free energy by solving the Poisson-Boltzmann equation. The only argument is the grid size used for the finite difference solution grid.
 
pbgrid(gridfile,name) 
generates the molecular surface with PBEQ and writes the surface into a grid file
 
epsgrid(gridfile,max) 
generates the molecular surface with PBEQ and writes the surface into a grid file
 
$energy = atomPoissonBoltzmann(index)
calculates the Poisson-Boltzmann energy for a single atom with unity charge while all other charges are set to zero The atom index and the finite difference solution grid size are required as arguments. Please note: This command does not restore the original charges from the force field.
 
$list = getScalar(name[,selection])
obtains the list of values for a scalar quantity in CHARMM.
 
value=getDipole() 
obtain molecular dipole
 
value=getTotalCharge()
obtain total charge of system
 
$val = reportVariable(name)
returns the value of a CHARMM ?variable.
 
solvAccessSurf([accu[,rprobe]])
calculates the solvent accessible surface area. A desired accuracy and probe radius may be given as argument.
 
$sasa = getSASAOutput() 
extracts solvent accessible surface area output after solvAccessSurf has been called and returns a data structure with the surface area in area and the associated hydrophobic contribution to the free energy of solvation in energy
 
logSASA()
writes out solvent accessible surface area and the hydrophobic contribution to the solvation free energy to the energy log file after solvAccessSurf has been called.
 
$ener = getEnergy()
evaluates the energy of the current conformation and returns a data structure with the energy components
 
$rg = getRg()
evaluates and returns the radius of gyration of the current conformation
 
$rmsd = getRMSD()
evaluates and returns the RMSD with respect to the structure in COMP
 
$rho = getRho()
evaluates and returns the "continuous" fraction of native contacts of the current conformation
 
boxsizeFromRestart()
extract boxsize from restart file
pdbformat = getConvType(paramset)
return the PDB format needed for a given a force field parameter set
 
initTrajectory(file)
 
nextFrame 
 
closeTrajectory
 
defineSelection(selection,tag,extra)
 
value=analyzeMolecularVolume()
 
value=analyzeAccessibleSurface()
 
value=analyzeInertiaEntropy([options]) 
 
value=analyzeRadiusOfGyration([options])
 
value=analyzeCenterOfMass([options])
 
value=analyzeRMS([options])
 
value=minimumDistance([options])
 
value=maximumDistance([options])
 
results=analyzeRadialDistribution
 
results=analyzeDiffusion
 
(values)=analyzeRMSFluctuations([options])
 
(values)=analyzeTrajectoryAverage([options])
 
analyzeTrajectoryOrient([options])
 
analyzeTrajectoryOrderParameters([options])
 
(values)=analyzeDistance([options])
 
(values)=analyzeAngle([options])
 
(values)=analyzeDihedral([options])
 
(values)=analyzePucker([options])
 
(values)=parseOutput($rex)
 
($ener,$sasa) = readEnergy(file)
reads an energy log file and returns the data in two data structures. The first is a list of entries with the individual energy components . The second one contains the solvent accesible surface area and hydrophobic free energy of solvation, if available from the log file.
handle -> {outlog, cmdlog, enerlog, pertlog, fromcharmm, tocharmm }
file handles used for logging and communication with CHARMM
 
par -> { ... } 
CHARMM parameters used in various commands
 
mdener[] -> { step, time, temp, total, kine, 
              pot, vdwaals, elec, gb, asp, constr }
energy data extracted from the last molecular dynamics run
 
molecule
Molecule object for current molecule structure
GenUtil.pm  SICHO.pm  Molecule.pm
Michael Feig, Brooks group, TSRI
John Karanicolas, Brooks group, TSRI