molecular_simulations.build.build_amber module

class molecular_simulations.build.build_amber.ExplicitSolvent(path, pdb, padding=10.0, protein=True, rna=False, dna=False, phos_protein=False, mod_protein=False, polarizable=False, **kwargs)

Bases: ImplicitSolvent

Class for building a system using ambertools. Produces explicit solvent cubic box with user-specified padding which has been neutralized and ionized with 150mM NaCl.

Parameters:
assemble_system(dim, num_ions)

Build system in tleap.

Parameters:
  • dim (float) – Longest dimension in Angstrom.

  • num_ions (int) – Explicit number of ions to achieve 150mM.

Return type:

None

Returns:

None

build()

Orchestrate the various things that need to happen in order to produce an explicit solvent system. This includes running pdb4amber, computing the periodic box size, number of ions needed and running tleap to make the final system.

Return type:

None

Returns:

None

clean_up_directory()

Remove leap log. This is placed wherever the script calling it runs and likely will throw errors if multiple systems are being iteratively built.

Return type:

None

Returns:

None

static get_ion_numbers(volume)

Returns the number of Chloride? ions required to achieve 150mM concentration for a given volume. The number of Sodium counter ions should be equivalent.

Parameters:

volume (float) – Volume of box in cubic Angstrom.

Returns:

Number of ions for 150mM NaCl.

Return type:

(int)

get_pdb_extent()

Identifies the longest axis of the protein in terms of X/Y/Z projection. Not super accurate but likely good enough for determining PBC box size. Returns longest axis length + 2 times the padding to account for +/- padding.

Returns:

Longest dimension with 2 times padding in Angstrom.

Return type:

(int)

prep_pdb()

Runs input PDB through pdb4amber to ensure it is compliant enough that tleap won’t freak out on us later. Removes any explicit hydrogens from the input structure to avoid name mismatches.

Return type:

None

Returns:

None

class molecular_simulations.build.build_amber.ImplicitSolvent(path, pdb, protein=True, rna=False, dna=False, phos_protein=False, mod_protein=False, out=None, use_amber=False, **kwargs)

Bases: object

Class for building a system using ambertools. Produces explicit solvent cubic box with user-specified padding which has been neutralized and ionized with 150mM NaCl.

Parameters:
build()

Orchestrate the various things that need to happen in order to produce an explicit solvent system. This includes running pdb4amber, computing the periodic box size, number of ions needed and running tleap to make the final system.

Return type:

None

Returns:

None

pdbfix_it()

Using PDBFixer, add hydrogens and missing atoms and if a SEQ record exists (i.e. PDB is from RCSB) add missing residues. This is somewhat unstable so take care to make sure the outputs are ok.

Return type:

None

Returns:

None

temp_tleap(inp)

Writes a temporary file for tleap and then runs tleap. This makes handling parallel tleap runs much simpler as we are avoiding the different workers overwriting tleap inputs and getting confused.

Parameters:

inp (str) – The tleap input file contents as a single string.

Return type:

None

Returns:

None

tleap_it()

While more painful, tleap is more stable for system building. Runs the input PDB through tleap with the FF19SB protein forcefield and whichever other forcefields were turned on.

Return type:

None

Returns:

None

write_leap(inp)

Writes out a tleap input file and returns the path to the file.

Returns:

Path to tleap input file.

Return type:

(Path)

Parameters:

inp (str)