htmd.builder.amber module#

htmd.builder.amber.build(mol, ff=None, topo=None, param=None, prefix='structure', outdir='./build', caps=None, ionize=True, saltconc=0, saltanion=None, saltcation=None, disulfide=None, teleap=None, teleapimports=None, execute=True, atomtypes=None, offlibraries=None, gbsa=False, igb=2, custombonds=None, remove=None)#

Builds a system for AMBER

Uses tleap to build a system for AMBER. Additionally it allows the user to ionize and add disulfide bridges.

Parameters:
  • mol (Molecule object) – The Molecule object containing the system

  • ff (list of str) – A list of leaprc forcefield files. Use amber.listFiles to get a list of available forcefield files. Default: amber.defaultFf

  • topo (list of str) – A list of topology prepi/prep/in/mol2/cif files. Use amber.listFiles to get a list of available topology files. Default: amber.defaultTopo When passing residues parameterized with the parameterize tool, please pass the .cif file.

  • param (list of str) – A list of parameter frcmod files. Use amber.listFiles to get a list of available parameter files. Default: amber.defaultParam

  • prefix (str) – The prefix for the generated pdb and psf files

  • outdir (str) – The path to the output directory Default: ‘./build’

  • caps (dict) – A dictionary specifying the caps. It accepts two different formats. One with keys segids and values lists of strings describing the caps for a particular protein segment. e.g. caps[‘P’] = [‘ACE’, ‘NME’] or caps[‘P’] = [‘none’, ‘none’]. Default: will apply ACE and NME caps to every protein segment. The second format is more manual and uses as keys an atomselection of a residue and as values the cap to apply to that residue. e.g. caps = {“chain A and resid 5”: “ACE”, “chain A and resid 10”: “NME”}

  • ionize (bool) – Enable or disable ionization

  • saltconc (float) – Salt concentration to add to the system after neutralization.

  • saltanion ({'Cl-'}) – The anion type. Please use only AMBER ion atom names.

  • saltcation ({'Na+', 'K+', 'Cs+'}) – The cation type. Please use only AMBER ion atom names.

  • disulfide (list of pairs of atomselection strings) – If None it will guess disulfide bonds. Otherwise provide a list pairs of atomselection strings for each pair of residues forming the disulfide bridge.

  • teleap (str) – Path to teLeap executable used to build the system for AMBER

  • teleapimports (list) – A list of paths to pass to teLeap ‘-I’ flag, i.e. directories to be searched Default: determined from amber.defaultAmberHome and amber.htmdAmberHome

  • execute (bool) – Disable building. Will only write out the input script needed by tleap. Does not include ionization.

  • atomtypes (list of triplets) – Custom atom types defined by the user as (‘type’, ‘element’, ‘hybrid’) triplets e.g. ((‘C1’, ‘C’, ‘sp2’), (‘CI’, ‘C’, ‘sp3’)). Check addAtomTypes in AmberTools docs.

  • offlibraries (str or list) – A path or a list of paths to OFF library files. Check loadOFF in AmberTools docs.

  • gbsa (bool) – Modify radii for GBSA implicit water model

  • igb (int) – GB model. Select: 1 for mbondi, 2 and 5 for mbondi2, 7 for bondi and 8 for mbondi3. Check section 4. The Generalized Born/Surface Area Model of the AMBER manual.

  • custombonds (list of pairs of atomselection strings) – Add custom bonds between two atoms

  • remove (list of atomselection strings) – Remove the specified atoms or residues from the system. This allows removing atoms which are added during building.

Returns:

molbuilt – The built system in a Molecule object

Return type:

Molecule object

Example

>>> from htmd.ui import *  
>>> mol = Molecule("3PTB")
>>> molbuilt = amber.build(mol, outdir='/tmp/build')  
>>> # More complex example
>>> disu = [['segid P and resid 157', 'segid P and resid 13'], ['segid K and resid 1', 'segid K and resid 25']]
>>> molbuilt = amber.build(mol, outdir='/tmp/build', saltconc=0.15, disulfide=disu)  
htmd.builder.amber.defaultAmberHome(teleap=None)#

Returns the default AMBERHOME as defined by the location of teLeap binary

Parameters:#

teleapstr

Path to teLeap executable used to build the system for AMBER

htmd.builder.amber.defaultFf()#

Returns the default leaprc forcefield files used by amber.build

htmd.builder.amber.defaultParam()#

Returns the default parameter frcmod files used by amber.build

htmd.builder.amber.defaultTopo()#

Returns the default topology prepi files used by amber.build

htmd.builder.amber.htmdAmberHome()#

Returns the location of the AMBER files distributed with HTMD

htmd.builder.amber.listFiles()#

Lists all AMBER forcefield files available in HTMD

Example

>>> from htmd.builder import amber
>>> amber.listFiles()             
---- Forcefield files list: ... ----
leaprc.amberdyes
leaprc.conste
leaprc.constph
leaprc.DNA.bsc1
...