schrodinger.application.prime.wrapper module

Classes to assist in preparing prime input files

class schrodinger.application.prime.wrapper.PrimeConfig(kw=None)

Bases: schrodinger.application.inputconfig.InputConfig

Class for reading and writing simplified Prime homology modeling input files.

specs = ["JOB_TYPE                   = string(default='MODEL')", "DIR_NAME                   = string(default='.')", 'QUERY_OFFSET               = integer(default=0)', 'TAILS                      = integer(default=0)', "SIDE_OPT                   = string(default='false')", "MINIMIZE                   = string(default='true')", "BUILD_INSERTIONS           = string(default='true')", 'MAX_INSERTION_SIZE         = integer(default=20)', "BUILD_TRANSITIONS          = string(default='true')", "BUILD_DELETIONS            = string(default='true')", "KEEP_ROTAMERS              = string(default='true')", "KNOWLEDGE_BASED            = string(default='true')", 'NUM_OUTPUT_STRUCT          = integer(default=1)', "TEMPLATE_RESIDUE_NUMBERS   = string(default='false')"]
__init__(kw=None)

Accepts one argument which is either a path or a keyword dictionary.

setAlignment(alignment, ligands=('all',), include_water=False, template_number=1)
Parameters
  • alignment (BasePrimeAlignment) – Alignment.

  • ligands (tuple of str) – Names of ligands to be included in the model.

  • include_water (bool) – Whether to include water molecules in the built model.

  • template_number (int) – Template number

writeConfig(filename)

Writes a simplified input file to filename.

This input file needs to be run via $SCHRODINGER/prime.

Parameters

filename (str) – Name of output file.

class schrodinger.application.prime.wrapper.ConsensusConfig(kw=None)

Bases: schrodinger.application.inputconfig.InputConfig

Class for reading and writing simplified Prime consensus modeling input files.

specs = ["ALIGN_FILE                 = string()SC_OPT                     = string(default='yes')"]
__init__(kw=None)

Accepts one argument which is either a path or a keyword dictionary.

setAlignment(alignment)
writeConfig(filename)

Writes a simplified input file to filename.

This input file needs to be run via $SCHRODINGER/consensus_homology.

Parameters

filename (str) – Name of output file.

class schrodinger.application.prime.wrapper.PrimeTemplate(pdb_id='')

Bases: schrodinger.application.prime.wrapper._WorkingDirectoryMixin

This class encapsulates Prime template structure. A template includes a single chain.

WATER_NAMES = {'HOH', 'WAT'}
FIND_LIGANDS_KWARGS = {'allow_ion_only_molecules': True, 'excluded_residue_names': {'HOH', 'WAT'}, 'min_heavy_atom_count': 1}
__init__(pdb_id='')
property file_name
property st
property ligands

Returns a list of ligands found in the template structure.

Return type

list of schrodinger.structuils.analyze.Ligand objects

Returns

List of ligands in current template structure.

property waters
writePDB()

Writes template structure to PDB file.

Return type

bool

Returns

True on successful write.

class schrodinger.application.prime.wrapper.BasePrimeAlignment(name, query_seq)

Bases: schrodinger.application.prime.wrapper._WorkingDirectoryMixin

Encapsulates pairwise query-template alignment. Allows writing alignment files in Prime format.

__init__(name, query_seq)
Parameters
  • name (str) – Alignment name.

  • query_seq (str) – Text of prealigned query sequence.

property name
property query_sequence
property template
property template_sequence
setTemplate(template, sequence=None)

Adds a pre-aligned template sequence to the alignment.

Parameters
  • template (PrimeTemplate) – Template.

  • sequence (str) – Template sequence aligned to query (i.e. including gaps).

setWorkingDirectory(wd)

Propagate change in working directory to template

getAlnFilename()

Get the filename of the aln written by writeInputForPrime.

writeInputForPrime()

Writes Prime alignment to external file.

writeInputForConsensus(file_name, append=False)

Writes out FASTA alignment for consensus homology modeling. The alignment needs to include chain name and secondary structure definition for each template sequence.

Parameters
  • append (bool) – Whether to append to existing file.

  • file_name (str) – Name of output file.

getSSA(st, chain_id='')

Gets a secondary structure annotation string for structure st chain chain_id.

Parameters
schrodinger.application.prime.wrapper.basename_no_ext(file_name)

Returns file basename without extension.

schrodinger.application.prime.wrapper.convert_gaps_to_dots(sequence)

Replaces gap symbols with dots to make a sequence compatible with Prime.

Parameters

sequence (str) – Input gapped sequence.

Return type

str

Returns

Converted sequence.

schrodinger.application.prime.wrapper.convert_gaps_to_tildes(sequence)

Replaces gap symbols with tildes to make a sequence compatible with consensus modeling.

Parameters

sequence (str) – Input gapped sequence.

Return type

str

Returns

Converted sequence.