.. Do NOT modify this file directly. conf.py creates it. .. modify conf.py instead Using ``parmed`` ================ This page details using the command-line version of ParmEd, which is the primary front-end program using the :mod:`parmed` and :mod:`parmed.tools` packages to provide a set of *Actions* by which you can modify a system topology and parameters (it currently only works for Amber topology files, although support for the entire :class:`Structure ` hierarchy is planned). There are two ways in which ParmEd can be run---in batch reading from an input file or *script*, and with an interactive interpreter. A script can either be given to ``parmed`` on the command-line, or fed via pipes through standard input. You can provide an input file using the ``-i/--input`` flag. Command syntax -------------- All actions should be specified on the ``parmed`` command-line in the following format: .. code-block:: none ActionName arg1 arg2 arg3 ... argN [parm ] Arguments should be whitespace-delimited, the ``ActionName`` is case-insensitive, and every action (if it uses a ``parm`` object) can be applied to a specific parameter-topology instance that has been loaded. Note that in many Actions, you need to select a subset of the atoms upon which to perform the action. The way in which these atom selections are specified is using the Amber mask syntax described in the section `Atom Selection Masks`_ below. Available commands ------------------ The following ``Action`` commands are available in ParmEd. The information here is available via the help_ command in the ``parmed`` interpreter. add12_6_4 ~~~~~~~~~ .. code-block:: none add12_6_4 [] [c4file | watermodel ] [polfile [tunfactor ] Adds the LENNARD_JONES_CCOEF term for the new divalent metal ion 12-6-4 Lennard-Jones potential term. If provided, the mask will allow you to specify which ions are divalent. The C4 parameter between the metal ion and water can either be taken from Ref. ``[1]`` for the requested ``[watermodel]`` (TIP3P, TIP4PEW, or SPCE) or provided in the file specified by the c4file keyword. The polarizabilities must be present in the the polfile file. The chemical symbol of the element will be used to determine the atom type. Parameters are expected in a file with 2 columns: ```` All defaults come from Ref. ``[1]`` ``[2]`` and ``[3]`` ``[1]`` Pengfei Li and Kenneth M. Merz, J. Chem. Theory Comput., 2014, 10, 289-297 ``[2]`` Pengfei Li, Lin F. Song and Kenneth M. Merz, J. Phys. Chem. B, 2015, 119, 883-895 ``[3]`` Pengfei Li, Lin F. Song and Kenneth M. Merz, J. Chem. Theory Comput., 2015, 11, 1645-1657. addAtomicNumber ~~~~~~~~~~~~~~~ .. code-block:: none addAtomicNumber Adds the atomic number of each atom to a new section titled "ATOMIC_NUMBER" in the topology file. Elements are identified by the atomic mass found in the MASS section of the topology files. Elements are matched by picking the element whose average atomic mass in the periodic table is closest to each atom, which should work appropriately for all isotopes of all atoms, except possibly Tritium addDihedral ~~~~~~~~~~~ .. code-block:: none addDihedral [] [] [type ] Adds a dihedral between mask1, mask2, mask3, and mask4. Each mask must specify the same number of atoms, and the dihedral is defined around the bond between atoms in mask 2 and 3. If each mask selects 2 atoms, for instance, a dihedral will be placed around atom1 in mask 1, atom1 in mask 2, atom1 in mask 3, and atom1 in mask 4. A second dihedral will be placed around atom2 in mask 1, atom2 in mask 2, atom2 in mask 3, and atom2 in mask4. - ```` : Selection of one of the end-atoms for each dihedral - ```` : Selection of the middle atom bonded to ```` and ```` in each dihedral - ```` : Selection of the other middle atom bonded to ```` and ```` - ```` : Selection of the other end-atom in each dihedral - ```` : Force constant in kcal/mol - ```` : Periodicity - ```` : Torsion phase shift - ```` : 1-4 Lennard-Jones scaling constant (default 2.0) - ```` : 1-4 electrostatic scaling constant (default 1.2) - ```` : Type of dihedral, either "improper" or "normal". Default is "normal" addExclusions ~~~~~~~~~~~~~ .. code-block:: none addExclusions Allows you to add arbitrary exclusions to the exclusion list. Every atom in ```` is added to the exclusion list for each atom in ```` so that non-bonded interactions between those atom pairs will not be computed. NOTE that this ONLY applies to direct-space (short-range) non-bonded potentials. For PME simulations, long-range electrostatics between these atom pairs are still computed (in different unit cells). addLJType ~~~~~~~~~ .. code-block:: none addLJType [radius ] [epsilon ] [radius_14 ] [epsilon_14 ] Turns given mask into a new LJ atom type. It uses the radius and Rmin from the first atom type in ```` if new_radius or new_epsilon aren't provided addPDB ~~~~~~ .. code-block:: none addPDB [elem] [strict] [allicodes] Adds PDB information to new flags in an Amber topology file to enable analyses based on the original residue information in the PDB file, ```` It adds the flags: Residue Properties - RESIDUE_CHAINID: The chain ID of each residue (* if LEaP added it) - RESIDUE_ICODE: Insertion code, if it exists - RESIDUE_NUMBER: Original residue serial number in the PDB Atom Properties - ATOM_ELEMENT: Atomic element (redundant now, not printed by default) - ATOM_OCCUPANCY: The occupancy of each atom - ATOM_BFACTOR: The temperature factor of each atom - ATOM_NUMBER: The original atom serial number in the PDB The 'strict' keyword turns residue mismatches (NOT solvent) into errors The 'elem' keyword will force printing of the element names. The 'allicodes' keyword forces insertion codes to be printed, even if every one will be blank (so that parsers can count on that section existing). Residues *not* in the PDB will be assigned a CHAINID of '*' and RESIDUE_NUMBER of 0. Any occupancy or temperature (B) factor that is not present in the input PDB file is assigned a number of 0 Historical info: This action is based on, and reproduces the key results of, the historical 'add_pdb' program. It is a bit more flexible, though. cd ~~ .. code-block:: none cd Changes to a new directory like UNIX 'cd' chamber ~~~~~~~ .. code-block:: none chamber -top -param [-str ] -psf [-crd ] [-nocmap] [-box a,b,c[,alpha,beta,gamma]|bounding] [-radii ] [nosettle] This action will read CHARMM parameter, topology (RTF), and stream (STR) files and apply those parameters to a structure defined in a CHARMM PSF (protein structure file). XPLOR, CHARMM, and VMD-generated PSF files are all supported. You may specify -top, -param, and -str as many times as you want to provide multiple parameter files. All topology files are read first (in the order they are specified), followed by all parameter files, and finally all stream files are read in. Topology files are only necessary if the parameter files do not define the atom types (newer CHARMM force fields define atom types directly in the parameter file. Environment variables and shell wild-cards (* and ?), as well as the home shortcut character ~ are properly expanded when looking for files. Options - -top CHARMM topology, or Residue Topology File (RTF) file - -param CHARMM parameter file - -str CHARMM stream file. Only RTF and parameter sections read - -toppar CHARMM topology, parameter, and/or stream file(s). File type is detected from extension (or in the case of .inp files, the presence of 'top', 'par' in the name) - -psf CHARMM PSF file - -crd Coordinate file (PDB, CHARMM CRD, Amber restart, etc.) - -nocmap Do not use any CMAP parameters - -box Box dimensions. If no angles are defined, they are assumed to be 90 degrees (orthorhombic box). Alternatively, you can use the word 'bounding' to define a box that encloses the centers of all atoms. - -radii Implicit solvent solvation radii. ```` can be amber6, bondi, mbondi, mbondi2, mbondi3 Same effect as the changeRadii_ command. Default is mbondi. - nosettle This avoids changing the names of the water residue and oxygen atoms from TIP3 and OH2 to WAT and O If the PDB file has a CRYST1 record, the box information will be set from there. Any box info given on the command-line will override the box found in the crd file. change ~~~~~~ .. code-block:: none change [quiet] Changes the property of given atoms to a new value. ```` can be CHARGE, MASS, RADII, SCREEN, ATOM_NAME, ATOM_TYPE, ATOM_TYPE_INDEX, or ATOMIC_NUMBER (note, changing elements with this command will NOT change their assignment for SHAKE!). If given, the ``[quiet]`` keyword will prevent ParmEd from printing out a summary_ with every property changed for every atom that was changed useful for suppressing overwhelming output if you are zeroing every charge, for instance) changeLJ14Pair ~~~~~~~~~~~~~~ .. code-block:: none changeLJ14Pair Changes a particular 1-4 Lennard Jones pair based on a given (pre-combined) epsilon/Rmin. Only valid for CHAMBER prmtops changeLJPair ~~~~~~~~~~~~ .. code-block:: none changeLJPair Changes a particular Lennard Jones pair based on a given (pre-combined) epsilon/Rmin changeLJSingleType ~~~~~~~~~~~~~~~~~~ .. code-block:: none changeLJSingleType Allows you to change the radius/well depth of a single LJ type specified by ```` Note, this may change more than the atoms selected in just the mask! To find out what else will be changed, look at the output of printLJTypes_. Use addLJType_ to change the Lennard-Jones parameters on a set of specific atoms. - ```` : The selection of atoms to change the LJ type for. All atoms selected must have the same LJ type - ```` : Rmin/2 (van der Waals radius of the new type) - ```` : Well-depth (a.k.a., epsilon) changeProtState ~~~~~~~~~~~~~~~ .. code-block:: none changeProtState Changes the protonation state of a given titratable residue that can be treated via constant pH MD in Amber. changeRadii ~~~~~~~~~~~ .. code-block:: none changeRadii Changes intrinsic GB radii to the specified set: Allowed values are amber6, bondi, mbondi, mbondi2, mbondi3 changeRedoxState ~~~~~~~~~~~~~~~~ .. code-block:: none changeRedoxState Changes the reduction state of a given titratable residue that can be treated via constant redox potential MD in Amber. checkValidity ~~~~~~~~~~~~~ .. code-block:: none checkValidity Basic checks for prmtop validity. defineSolvent ~~~~~~~~~~~~~ .. code-block:: none defineSolvent Allows you to change what parmed will consider to be "solvent". must be a comma-separated set of residue names with no spaces between them. deleteBond ~~~~~~~~~~ .. code-block:: none deleteBond This action deletes any bonds that occur between the atoms in two masks. - ```` : Amber mask defining one of the atoms in a bond - ```` : Amber mask defining the other atom in the bond - ``[verbose]`` : Print out every bond that is deleted as well as the number of other valence terms that were eliminated. All bonds will be matched in which one atom comes from ```` and the other atom comes from ```` This action will also delete any other valence term (like angles and dihedrals) that would get severed by the deletion of one of the bonds. deleteDihedral ~~~~~~~~~~~~~~ .. code-block:: none deleteDihedral Deletes the dihedral around ```` and ```` in which the end-groups are ```` and ```` For multi-term dihedrals, it removes each term. deletePDB ~~~~~~~~~ .. code-block:: none deletePDB This action deletes the flags added by addPDB_ if they are present. energy ~~~~~~ .. code-block:: none energy [cutoff ] [[igb ] [saltcon ] | [Ewald]] [nodisper] [omm] [applayer] [platform ] [precision ] [decompose] This action will compute a single-point energy for the loaded structure (you must use 'loadRestart' prior to this command to load coordinates). The following options and keywords are supported: Options - cutoff ```` : The size of the non-bonded cutoff, in Angstroms. Default 8 A for periodic systems or infinite for nonperiodic systems For systems with no periodic box information - igb ```` : An integer corresponding to the desired GB model. May be 1, 2, 5, 7, or 8 as described by the sander and pmemd manual. Default 5. - saltcon ```` : The salt concentration, in mol/L, modeled by a Debye screening parameter. Default 0.0 For periodic systems - Ewald : Use an Ewald sum to compute long-range electrostatics instead of PME - nodisper : Do not use a long-range vdW dispersion correction OpenMM-specific options - omm : If present, this keyword will instruct ParmEd to use OpenMM_ to compute the energies (and optionally forces) using OpenMM_ instead of sander. - platform ```` : OpenMM_ compute platform to use. Options are CUDA, OpenCL, Reference, and CPU. Consult the OpenMM_ manual for details (only used if 'omm' is provided) - precision : Precision model to use. Options are single, double, and mixed. Reference platform is always double and CPU platform is always single. Mixed (default) uses single precision for calculations and double for accumulation (only used if 'omm' is provided) - decompose : Print bond, angle, dihedral, and nonbonded energies separately - applayer : Use OpenMM's class to compute the energy Examples # Using AMBER import parmed as pmd parm_ = pmd.load_file('prmtop', xyz='rst7') pmd.tools.energy(parm, 'igb 8').execute() # Using Openmm pmd.tools.energy(parm, 'igb 5 omm').execute() gromber ~~~~~~~ .. code-block:: none gromber [] [define ] [topdir ] [radii ] Load a Gromacs topology file with parameters as an Amber-formatted system. Note, if your Gromacs topology file requires any include topology files, you will need to have Gromacs installed for this to work. - : The Gromacs topology file to load - : The coordinate file to load into the system. Can be any recognized format (GRO, PDB, mmCIF, inpcrd, etc.) - define : Preprocessor defines that control the processing of the Gromacs topology file. - topdir : The directory containing all Gromacs include topology files. This is only necessary if Gromacs is not installed in a location that ParmEd can find. - radii : The GB radius set to use. Can be 'mbondi', 'bondi', 'mbondi2', or 'amber6'. Default is mbondi Gromacs topology files do not store the unit cell information. Therefore, in order to make sure that unit cell information is properly assigned to the resulting system, the provided ```` should contain unit cell information (e.g., GRO, PDB, PDBx/mmCIF, and inpcrd files can all store box information). ParmEd will try to locate the Gromacs topology directory using either the GMXDATA or GMXBIN environment variables (which should point to the ``$PREFIX/share/gromacs`` or ``$PREFIX/bin`` directories, respectively, where $PREFIX is the install prefix). If neither is set, the topology directory is located relative to the location of the ``gmx`` (Gromacs 5+) or ``pdb2gmx`` (Gromacs 4 or older) in the user's PATH. If none of the above is true, the default installation location (/usr/local/gromacs/share/gromacs/top) is used. Any provided ``topdir`` will override default choices (but only for this particular command -- future ``gromber`` actions will use the default location again). You can provide as many defines as you wish, and the ordering you specify them is preserved. The default value assigned to each define is "1". To provide multiple defines, use the ``define`` keyword multiple times, for example: define MYVAR=something define MYVAR2=something_else ... HMassRepartition ~~~~~~~~~~~~~~~~ .. code-block:: none HMassRepartition [] [dowater] This action implements hydrogen mass repartitioning in the system by changing the mass of each hydrogen to the desired value (the default new hydrogen mass is 3.024 daltons) and adjusting the mass of the atom to which it is bonded by the amount required to leave the total mass unchanged. By default, water hydrogen masses are unchanged (the SETTLE algorithm for implementing constraints on water molecules is analytical). Water masses can be repartitioned as well with the 'dowater' keyword. interpolate ~~~~~~~~~~~ .. code-block:: none interpolate [parm2 ] [eleconly] [prefix ] [startnum ] Interpolates between two topology files (VDW and electrostatic terms only). If ``[eleconly]`` is present, only the charges will be interpolated. ```` is the number of 'interpolated' topology files you want (in addition to the two end-points). The second prmtop must be specified if there are more than 2 parms currently loaded in the ParmEd parm_ list. startnum has no effect on the generated prmtops, but it can be used to control the names of the outputted topology files. - ```` : Number of topology files that will be generated - ```` : The other parm_ object used in interpolation if more than 2 parms are present (first parm_ is active one) - eleconly : Only do charge interpolation - ```` : Generated parm_ objects will be written as .#, where # starts from ```` and increases by 1 - ```` : Starting number for file names (see ```` above) listParms ~~~~~~~~~ .. code-block:: none listParms Lists all of the loaded topology files lmod ~~~~ .. code-block:: none lmod Adjusts Lennard Jones parameters to work with the LMOD code in Amber (changes LJ A coefficients that are 0 to 1000). loadCoordinates ~~~~~~~~~~~~~~~ .. code-block:: none loadCoordinates Reads a coordinate file and loads the first set of coordinates found into the active structure. File type is auto-detected. Supported file formats include: - Amber restart file - Amber NetCDF restart file - CHARMM coordinate file - CHARMM restart file - Amber mdcrd trajectory - Amber NetCDF trajectory - PDB file - PDBx/mmCIF file - Gromacs GRO file - Mol2 file loadRestrt ~~~~~~~~~~ .. code-block:: none loadRestrt Loads a restart file so we have coordinates. Necessary for distance-based mask criteria and writeOFF_ ls ~~ .. code-block:: none ls [Unix ls options] Lists directory contents. Like UNIX 'ls' minimize ~~~~~~~~ .. code-block:: none minimize [cutoff ] [[igb ] [saltcon ]] [[restrain ] [weight ]] [norun] [script ] [platform ] [precision ] [tol ] [maxcyc ] [omm] This action takes a structure and minimizes the energy_ using either scipy.optimize.minimize (with BFGS) and the sander API *or* OpenMM_. Following this action, the coordinates stored in the topology will be the minimized structure General Options - omm Use OpenMM_ instead of sander+scipy to minimize - cutoff ```` Nonbonded cutoff in Angstroms - tol ```` The largest energy_ difference between successive steps in the minimization allow the minimization to stop (Default 0.001) - maxcyc ```` The maximum number of minimization cycles permitted. No limit by default (minimization stops when tolerance is satisfied) Implicit Solvent options - igb ```` GB model to use (0=No GB, 1,2,5,7,8 correspond to Amber models) - saltcon ```` Salt concentration for GB in Molarity OpenMM-specific options - restrain ```` Selection of atoms to restrain - weight ```` Weight of positional restraints (kcal/mol/A^2) - norun Do not run the calculation - script ``