ForceBalance API
1.3
Automated optimization of force fields and empirical potentials
|
Classes | |
class | AbInitio_AMBER |
Subclass of Target for force and energy matching using AMBER. More... | |
class | AMBER |
Engine for carrying out general purpose AMBER calculations. More... | |
class | FrcMod_Reader |
Finite state machine for parsing FrcMod force field file. More... | |
class | Interaction_AMBER |
Subclass of Target for calculating and matching ineraction energies using AMBER. More... | |
class | Liquid_AMBER |
Subclass of Target for calculating and matching liquid properties using AMBER. More... | |
class | Mol2_Reader |
Finite state machine for parsing Mol2 force field file. More... | |
class | PrmtopLoader |
Parsed AMBER prmtop file. More... | |
class | Vibration_AMBER |
Subclass of Target for calculating and matching vibrational modes using AMBER. More... | |
Functions | |
def | is_mol2_atom (line) |
def | write_leap (fnm, mol2=[], frcmod=[], pdb=None, prefix='amber', spath=[], delcheck=False) |
Parse and edit an AMBER LEaP input file. More... | |
def | splitComment (mystr, debug=False) |
Remove the comment from a line in an AMBER namelist. More... | |
def | parse_amber_namelist (fin) |
Parse a file containing an AMBER namelist (only significantly tested for sander input). More... | |
def | write_mdin (calctype, fout=None, nsteps=None, timestep=None, nsave=None, pbc=False, temperature=None, pressure=None, mdin_orig=None) |
Write an AMBER .mdin file to carry out a calculation using sander or pmemd.cuda. More... | |
Variables | |
logger = getLogger(__name__) | |
float | kb_kcal = 0.0019872041 |
dictionary | mol2_pdict = {'COUL':{'Atom':[1], 8:''}} |
dictionary | frcmod_pdict |
string | POINTER_LABELS |
string | POINTER_LABEL_LIST = POINTER_LABELS.replace(',', '').split() |
def src.amberio.is_mol2_atom | ( | line | ) |
def src.amberio.parse_amber_namelist | ( | fin | ) |
Parse a file containing an AMBER namelist (only significantly tested for sander input).
fin : str Name of file containing the namelist
comments (list) of lines) List of lines containing comments before first namelist names (list) List of names of each namelist (e.g. cntrl, ewald) block_dicts (list) List of ordered dictionaries containing variable names and values for each namelist suffixes (list) List of list of lines coming after the "slash" for each suffix
Definition at line 206 of file amberio.py.
def src.amberio.splitComment | ( | mystr, | |
debug = False |
|||
) |
Remove the comment from a line in an AMBER namelist.
Had to write a separate function because I couldn't get regex to work
mystr : str Input string such as: restraintmask='!:WAT,NA&!=', ! Restraint mask for non-water, non-ions
str Output string with comment removed (but keeping leading and trailing whitespace) such as: restraintmask='!:WAT,NA&!=',
Definition at line 150 of file amberio.py.
def src.amberio.write_leap | ( | fnm, | |
mol2 = [] , |
|||
frcmod = [] , |
|||
pdb = None , |
|||
prefix = 'amber' , |
|||
spath = [] , |
|||
delcheck = False |
|||
) |
Parse and edit an AMBER LEaP input file.
Output file is written to inputfile_ (with trailing underscore.)
Definition at line 67 of file amberio.py.
def src.amberio.write_mdin | ( | calctype, | |
fout = None , |
|||
nsteps = None , |
|||
timestep = None , |
|||
nsave = None , |
|||
pbc = False , |
|||
temperature = None , |
|||
pressure = None , |
|||
mdin_orig = None |
|||
) |
Write an AMBER .mdin file to carry out a calculation using sander or pmemd.cuda.
calctype : str The type of calculation being performed 'min' : minimization 'eq' : equilibration 'md' : (production) MD 'sp' : Single-point calculation
fout : str If provided, file name that the .mdin file should be written to. Each variable within a namelist will occupy one line. Comments within namelist are not written to output.
timestep : float Time step in picoseconds. For minimizations or single-point calculations, this is not needed
nsteps : int How many MD or minimization steps to take For single-point calculations, this is not needed
nsave : int How often to write trajectory and velocity frames (only production MD writes velocities) For single-point calculations, this is not needed
pbc : bool Whether to use periodic boundary conditions
temperature : float If not None, the simulation temperature
pressure : float If not None, the simulation pressure
mdin_orig : str, optional Custom mdin file provided by the user. Non-&cntrl blocks will be written to output. Top-of-file comments will be written to output.
OrderedDict key : value pairs in the &cntrl namelist, useful for passing to cpptraj or sander/cpptraj Python APIs in the future.
Definition at line 316 of file amberio.py.
dictionary src.amberio.frcmod_pdict |
Definition at line 47 of file amberio.py.
float src.amberio.kb_kcal = 0.0019872041 |
Definition at line 43 of file amberio.py.
src.amberio.logger = getLogger(__name__) |
Definition at line 40 of file amberio.py.
dictionary src.amberio.mol2_pdict = {'COUL':{'Atom':[1], 8:''}} |
Definition at line 45 of file amberio.py.
string src.amberio.POINTER_LABEL_LIST = POINTER_LABELS.replace(',', '').split() |
Definition at line 672 of file amberio.py.
string src.amberio.POINTER_LABELS |
Definition at line 663 of file amberio.py.