schrodinger.application.bioluminate.mutation module¶
- class schrodinger.application.bioluminate.mutation.PolymerType(value)¶
Bases:
enum.Enum
An enumeration.
- PEPTIDE = 'peptide'¶
- RNA = 'rna'¶
- DNA = 'dna'¶
- class schrodinger.application.bioluminate.mutation.MutationStructureMap(ref_struct, struct, residue_map)¶
Bases:
object
Helper class for
Mutator
. This will store a mutated structure and the resides that were mutated.- __init__(ref_struct, struct, residue_map)¶
- Parameters
ref_struct (
schrodinger.structure.Structure
) – Reference structure (potentially “idealized”)struct (
schrodinger.structure.Structure
) – Mutated structureresidue_map (dict instance of reference and mutated
residues
) – The mapping of reference residues to their mutated residues
- class schrodinger.application.bioluminate.mutation.Mutation(chain: str, res_num: int, inscode: str, to_res_3l: str, polymer_type: str, from_res_3l: Optional[str] = None, _resnum_with_inscode: Optional[str] = None)¶
Bases:
object
Container for a single mutation
- chain: str¶
- res_num: int¶
- inscode: str¶
- to_res_3l: str¶
- polymer_type: str¶
- from_res_3l: str = None¶
- property resnum_with_inscode¶
- property mut_frag_name¶
- property res_id¶
- res_asl()¶
Return atom selection language (asl) of the mutating residue.
- Returns
asl for selecting the mutating residue of this mutation
- Return type
str
- make_reverse_mutation()¶
Return a new Mutation object that mutates the same residue from self.to_res_3l to self.from_res_3l.
- Returns
reversed mutation
- Return type
- __init__(chain: str, res_num: int, inscode: str, to_res_3l: str, polymer_type: str, from_res_3l: Optional[str] = None, _resnum_with_inscode: Optional[str] = None) None ¶
- class schrodinger.application.bioluminate.mutation.MacromoleculeMutator(mutations, concurrent)¶
Bases:
object
- __init__(mutations, concurrent)¶
- Parameters
mutations – A list of the mutations to carry out on the
ref_struct
. Each element of the list is a tuple of (“res num.”, [“pdbnames”]) where “res num.” is the residue number being altered and “pdbnames” is a list of the standard PDB residue names to mutate it to.concurrent – Maximum concurrent mutations
- Raises
RuntimeError – If concurrent is less than 1.
- property mutations¶
The list of mutations that will be carried out
- property total_mutations¶
Total number of mutations that will be generated
- static makeMutation(mutation_tuple, polymer_type)¶
Convert a mutation tuple into a Mutation object.
- static validateMutatedResidues(cls, residues)¶
Method for validating the residues used in mutations passed in to the
MutateProtein
class.- Raises
ValueError – If the 1-letter residue name is not supported by the
build.mutate
method.
- static validateMutations(mutations)¶
Private method for validating the mutations passed in to the
MutateProtein
class.- Raises
ValueError – If the
mutations
passed in is not a list, if each item in the list is not a tuple, if the tuple is not of length 4 (chain, resnum idx, inscode, mutation resnames), if the resnum is not an integer, or any of the 3-letter residue names in “mutation resnames” is not supported by thebuild,mutate
method.
- classmethod convertResFile(filename, regex=None)¶
Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each line could be multiple mutations (one residue to multiple mutation states)
- Parameters
filename (str) – Name of file containing the list of mutations.
regex (regular expression object) – Regular expression for matching residues
- Raises
RuntimeError – If any of chain, resnum or mutation is missing
- Returns
List of mutations with valid syntax for the class
- Return type
list of tuples
- classmethod convertResList(reslist, regex=None, validate=True)¶
Converts list of residues into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each residue string could be multiple mutations (one residue to multiple mutation states)
- Parameters
reslist (list of str) – List of residues to convert to mutations
regex (regular expression object) – Regular expression for matching residues
validate (bool) – Whether to validate the potential mutations
- Returns
List of mutations with valid syntax for the class or None if any item in the list is not valid
- Return type
list of tuples or None
- classmethod convertResidueList(residues, mutations, regex=None)¶
Convert a list of residues and mutations to a standard list of mutations. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “one-letter resnames for mutation”).
- Parameters
residues (list of strings (Syntax: <chain>:<resnum> if no chain use
"_"
)) – Residues that will be mutated.mutations – The one-letter names for the residues that will be used in mutation.
- Raises
RuntimeError – If any of chain, resnum or mutation is missing or if there is an invalid residue name
- Returns
List of mutations with valid syntax for the class
- Return type
list of tuples
- classmethod convertMutsFile(muts_file, regex=None)¶
Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “one-letter nucleobase for mutation”).
Each line is one mutation (could be multiple residues)
- calculateMutationsList()¶
Calculate all combintations of mutations.
- classmethod convertResToMuts(res_str, regex=None, validate=True)¶
Converts a residue string into a list of mutations to use. Returns a list of tuples of (“chain”, “resnum”, “inscode”, “one-letter resnames for mutation”). Will return None if any item in the list is not a valid residue string.
A residue string could be multiple mutations (one residue to multiple mutation states)
- Parameters
res_str (str) – Residue string to convert to mutations
regex (regular expression object) – Regular expression for matching residues
validate (bool) – Whether to run validation on the mutation
- Returns
List of mutations with valid syntax for the class or None if the res_str is not valid.
- Return type
list tuples or None
- schrodinger.application.bioluminate.mutation.generate_mutant_combinations(mutations, max_concurrent)¶
Given a tuple of allowed mutations and the number of allowed concurrent mutations, return a list of all possible mutation combinations.
- Parameters
mutations (Tuple[Tuple[str, int, str, str]]) – a tuple of mutation tuples
max_concurrent (int) – the max number of allowed simultaneous mutations, e.g. concurrent = 2 for all single and double mutants
- Returns
list of all possible mutation combinations
- Return type
List[Tuple[Tuple[str, int, str, str]]]
- schrodinger.application.bioluminate.mutation.convert_res_file(filename, regex)¶
Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Each line could be multiple mutations (one residue to multiple mutation states)
- Parameters
filename (str) – Name of file containing the list of mutations.
regex (regular expression object) – Regular expression for matching residues
- Raises
RuntimeError – If any of chain, resnum or mutation is missing
- Returns
List of mutations with valid syntax for the class
- Return type
list of tuples
- schrodinger.application.bioluminate.mutation.convert_res_to_muts(res_str, regex)¶
Converts a residue string into a list of mutations to use. Returns a list of tuples of (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”). Will return None if any item in the list is not a valid residue string.
A residue string could be multiple mutations (one residue to multiple mutation states)
- Parameters
res_str (str) – Residue string to convert to mutations
regex (regular expression object) – Regular expression for matching residues
validate (bool) – Whether to run validation on the mutation
- Returns
List of mutations with valid syntax for the class or None if the res_str is not valid.
- Return type
list tuples or None
- schrodinger.application.bioluminate.mutation.convert_muts_file(muts_file, regex)¶
Converts lines in filename into a list of mutations to use. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
Also supports loop insertion and deletion.
Each line is one mutation (could be multiple residues)
- schrodinger.application.bioluminate.mutation.convert_residue_list(residues, mutations, regex)¶
Convert a list of residues and mutations to a standard list of mutations. Returns a list of tuples where each tuple is (“chain”, “resnum”, “inscode”, “three-letter resnames for mutation”).
- Parameters
residues (list of strings (Syntax: <chain>:<resnum> if no chain use
"_"
)) – Residues that will be mutated.mutations – The three-letter names for the residues that will be used in mutation.
- Raises
RuntimeError – If any of chain, resnum or mutation is missing or if there is an invalid residue name
- Returns
List of mutations with valid syntax for the class
- Return type
list of tuples