molecular_simulations.build.build_ligand module
- class molecular_simulations.build.build_ligand.ComplexBuilder(path, pdb, lig, padding=10.0, lig_param_prefix=None, **kwargs)
Bases:
ExplicitSolventBuilds complexes consisting of a biomolecule pdb and small molecule ligand. Runs antechamber workflow to generate gaff2 parameters. Can optionally supply precomputed frcmod/lib files by their path + suffix in the lig_param_prefix argument (e.g. /path/to/lig.mol2 or /path/to/lig)
- Parameters:
- assemble_system(dim, num_ions)
Slightly modified from the parent class, now we have to add the ligand parameters and assemble a complex rather than just placing a biomolecule in the water box.
- Return type:
- 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:
- Returns:
None
- class molecular_simulations.build.build_ligand.LigandBuilder(path, lig, lig_number=0, file_prefix='')
Bases:
objectParameterizes a ligand molecule and generates all relevant force field files for running tleap.
- check_sqm()
Checks for evidence that antechamber calculations exited successfully. This is always on the second to last line, and if not present, indicates that we failed to produce sane parameters for this molecule. In that case, I wish you good luck.
- Return type:
- Returns:
None
- convert_to_mol2()
Converts an sdf file to mol2 format using obabel.
- Return type:
- Returns:
None
- move_antechamber_outputs()
Remove unneccessary outputs from antechamber. Keep the sqm.out file as proof that antechamber did not fail.
- Return type:
- Returns:
None
- parameterize_ligand()
Ensures consistent treatment of all ligand sdf files, generating GAFF2 parameters in the form of .frcmod and .lib files. Produces a mol2 file for coordinates and connectivity and ensures that antechamber did not fail. Hydrogens are added in rdkit which generally does a good job of this.
- Return type:
- Returns:
None
- process_pdb()
Ingests a PDB file of a small molecule, adds hydrogens and writes out to an SDF file.
- Return type:
- Returns:
None
- process_sdf()
Add hydrogens in rdkit. Atom hybridization is taken from the input sdf file and if this is incorrect, hydrogens will be wrong too.
- Return type:
- Returns:
None
- exception molecular_simulations.build.build_ligand.LigandError(message='This system contains ligands which we cannot model!')
Bases:
ExceptionCustom Ligand exception to catch parameterization errors.
- class molecular_simulations.build.build_ligand.PLINDERBuilder(path, system_id, out, **kwargs)
Bases:
ImplicitSolventBuilds complexes consisting of a biomolecule pdb and small molecule ligand. Runs antechamber workflow to generate gaff2 parameters.
- assemble_system()
Slightly modified from the parent class, now we have to add the ligand parameters and assemble a complex rather than just placing a biomolecule in the water box.
- Return type:
- 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:
- Returns:
None
- check_ligand(ligand)
Check ligand for ions and other weird stuff. We need to take care not to assume all species containing formal charges are ions, nor that all species containing atoms in the cation/anion lists are ions. Good example is the multitude of small molecule drugs containing bonded halogens.
- check_ptms(sequence, chain_residues)
Check the full sequence (from fasta) against the potentially partial sequence from the structural model stored in chain_residues.
- inject_fasta(chain_map)
Checks fasta against actual sequence. Modifies sequence so that it correctly matches in the case of non-canonical residues such as phosphorylations (i.e. SER -> SEP).
- place_ions()
This is horrible and I apologize profusely if you find yourself having to go through the following. Good luck.
- Return type:
- triage_pdb(broken_pdb, repaired_pdb)
Runs PDBFixer to repair missing loops and ensure structure is in good shape. Runs a check against the sequence provided by PLINDER and ensures that any non-canonical residues are represented in the sequence properly.