Rosetta  2018.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Functions | Variables
pyrosetta Namespace Reference

Namespaces

 bindings
 
 io
 
 logging_support
 
 mpi
 
 teaching
 
 toolbox
 

Classes

class  CD
 
class  EnergyMethod
 
class  PyJobDistributor
 
class  PyRosettaException
 Exception handling. More...
 
class  PythonPyExitCallback
 

Functions

def _rosetta_database_from_env
 
def _is_interactive
 
def init
 
def version
 
def _vector_extend_func
 
def Vector1
 
def Set
 
def generate_nonstandard_residue_set
 
def standard_task_factory
 
def standard_packer_task
 
def etable_atom_pair_energies
 
def dump_atom_pair_energy_table
 
def print_atom_pair_energy_table
 
def dump_residue_pair_energies
 
def print_residue_pair_energies
 
def output_scorefile
 
def defineEnergyMethodCreator
 
def rrange
 

Variables

tuple logger = logging.getLogger("rosetta")
 
 get_score_function = rosetta.core.scoring.get_score_function
 
 create_score_function = rosetta.core.scoring.ScoreFunctionFactory.create_score_function
 
tuple rosetta_version = rosetta.utility.Version.package()
 Constants and globals. More...
 
string _PLATFORM = "linux"
 
 _python_py_exit_callback = None
 
list _mem_EnergyMethods_ = []
 
list _mem_EnergyCreators_ = []
 
list _ScoreTypesRegistryByType_
 
dictionary ScoreTypesRegistry = {}
 

Function Documentation

def pyrosetta._is_interactive ( )
private
Determine if in an interactive context.

See: https://stackoverflow.com/questions/2356399/tell-if-python-is-in-interactive-mode

Referenced by init().

def pyrosetta._rosetta_database_from_env ( )
private
Read rosetta database directory from environment or standard install locations.

Database resolution proceeds by first searching the current installation for a 'database' or 'rosetta_database'
path. If not found the search then continues to the users's home dir, cygwin, and osx standard installation
locations.

Returns database path if found, else None.

Referenced by init().

def pyrosetta._vector_extend_func (   vec,
  othervec 
)
private
def pyrosetta.defineEnergyMethodCreator (   class_,
  scoreType 
)

References DRRAFTER.type.

def pyrosetta.dump_atom_pair_energy_table (   sfxn,
  score_type,
  residue_1,
  residue_2,
  output_filename 
)
Usage: dump_atom_pair_energy_table(sfxn, score_type, residue_1, residue_2, output_filename)
    Description: dumps a csv formatted table (saved as "output_filename")
    of all pairwise atom pair energies for the complete list of atoms contained 
    by residue_1 and residue_2 using a specified score_type in the provided sfxn.

References etable_atom_pair_energies(), basic::database.open(), fmt.print(), and basic::options::OptionKeys::relax::range.range.

def pyrosetta.dump_residue_pair_energies (   res,
  pose,
  sfxn,
  score_type,
  output_filename 
)
Usage: dump_residue_pair_energies(res, pose, sfxn, score_type, output_filename)
    Description: dumps a csv formatted table (saved as "output_filename")
    of the interactions of a single residue (res) with all other residues in the
    specified pose using a specified score_type in the provided sfxn.

References ObjexxFCL.abs(), basic::database.open(), and basic::options::OptionKeys::relax::range.range.

def pyrosetta.etable_atom_pair_energies (   res1,
  atom_index_1,
  res2,
  atom_index_2,
  sfxn 
)
Usage: lj_atr, lj_rep, solv=etable_atom_pair_energies(res1, atom_index_1, res2, atom_index_2, sfxn)
    Description: given a pair of atoms (specified using a pair of residue objects and 
    atom indices) and scorefunction, use the precomputed 'etable' to return 
    LJ attractive, LJ repulsive, and LK solvation energies

References numeric.distance_squared().

Referenced by dump_atom_pair_energy_table(), and print_atom_pair_energy_table().

def pyrosetta.generate_nonstandard_residue_set (   pose,
  params_list 
)
Places the ResidueTypes corresponding to a list of .params filenames into a given pose

.params files must be generated beforehand. Typically, one would obtain a
molfile (.mdl) generated from the xyz coordinates of a residue, small
molecule, or ion.  The script molfile_to_params.py can be used to convert
to a Rosetta-readable .params file.  It can be found in the /test/tools
folder of your PyRosetta installation or downloaded from the Rosetta
Commons.

Example:
    params = ["penicillin.params", "amoxicillin.params"]
    pose = Pose()
    generate_nonstandard_residue_set(pose, params)
    pose_from_file(pose, "TEM-1_with_substrates.pdb")
See also:
    ResidueTypeSet
    Vector1()
    pose_from_file()

References Vector1().

def pyrosetta.init (   options = '-ex1 -ex2aro',
  extra_options = '',
  set_logging_handler = None,
  notebook = None 
)
Initialize Rosetta.  Includes core data and global options.

options string with default Rosetta command-line options args.
        (default: '-ex1 -ex2aro')
kargs -
    extra_options - Extra command line options to pass rosetta init.
                    (default None)
    set_logging_handler - Route rosetta tracing through logging logger 'rosetta':
        None - Set handler if interactive, otherwise not.
        False - Write logs via c++-level filehandles.
        "interactive" - Register python log handling and make visible if not.
        "logging" - Register python log handling, do not update logging config.
        True - Register python log handling, make visible if logging isn't configured.

Examples:
    init()                     # uses default flags
    init(extra_options='-pH')  # adds flags to supplement the default
    init('-pH -database /home/me/pyrosetta/rosetta_database')  # overrides default flags - be sure to include the dB last

References _is_interactive(), _rosetta_database_from_env(), and version().

Referenced by pyrosetta.toolbox.load_ligand.add_cid_to_database(), and pyrosetta.mpi.mpi_init().

def pyrosetta.output_scorefile (   pose,
  pdb_name,
  current_name,
  scorefilepath,
  scorefxn,
  nstruct,
  native_pose = None,
  additional_decoy_info = None 
)
Moved from PyJobDistributor (Jared Adolf-Bryfogle)
Creates a scorefile if none exists, or appends the current one.
Calculates and writes CA_rmsd if native pose is given,
as well as any additional decoy info

References basic::database.open(), round(), and basic::options::OptionKeys::DisulfideInsertion.scorefxn.

Referenced by pyrosetta.PyJobDistributor.output_decoy(), and print_residue_pair_energies().

def pyrosetta.print_atom_pair_energy_table (   sfxn,
  score_type,
  residue_1,
  residue_2,
  threshold 
)
Usage: print_atom_pair_energy_table(sfxn, score_type, residue_1, residue_2, threshold)
    Description: outputs a formatted table to the commandline of all pairwise atom 
    pair energies for the complete list of atoms contained by residue_1 and residue_2 
    using a specified score_type in the provided sfxn. Only interactions with
    an absolute value energy above the threshold are printed 

References ObjexxFCL.abs(), etable_atom_pair_energies(), fmt.format(), fmt.print(), and basic::options::OptionKeys::relax::range.range.

def pyrosetta.print_residue_pair_energies (   res,
  pose,
  sfxn,
  score_type,
  threshold 
)
Usage: print_residue_pair_energies(res, pose, sfxn, score_type, threshold)
    Description: outputs a formatted table to the commandline 
    of the interactions of a single residue (res) with all other residues in the
    specified pose using a specified score_type in the provided sfxn. 
    Only interactions with an absolute value energy above the threshold are 
    printed 

References ObjexxFCL.abs(), fmt.format(), output_scorefile(), fmt.print(), and basic::options::OptionKeys::relax::range.range.

def pyrosetta.rrange (   n)
Return an iterator from 1 to n inclusive

References basic::options::OptionKeys::relax::range.range, and DRRAFTER.type.

def pyrosetta.Set (   list_in)
Creates a std::set object, deducing type from the given list.

References basic::options::OptionKeys::out::path.all, and basic::options::OptionKeys::in::file.t.

def pyrosetta.standard_packer_task (   pose)
def pyrosetta.standard_task_factory ( )
def pyrosetta.Vector1 (   list_in)
def pyrosetta.version ( )

Referenced by init().

Variable Documentation

list pyrosetta._mem_EnergyCreators_ = []
list pyrosetta._mem_EnergyMethods_ = []
string pyrosetta._PLATFORM = "linux"
pyrosetta._python_py_exit_callback = None
list pyrosetta._ScoreTypesRegistryByType_
Initial value:
1 = [
2  CD(base=rosetta.core.scoring.methods.ContextIndependentTwoBodyEnergy,
3  first=rosetta.core.scoring.PyRosettaTwoBodyContextIndepenedentEnergy_first,
4  last=rosetta.core.scoring.PyRosettaTwoBodyContextIndepenedentEnergy_last,
5  methods={}),
6  CD(base=rosetta.core.scoring.methods.ContextDependentTwoBodyEnergy,
7  first=rosetta.core.scoring.PyRosettaTwoBodyContextDependentEnergy_first,
8  last=rosetta.core.scoring.PyRosettaTwoBodyContextDependentEnergy_last,
9  methods={}),
10  CD(base=None,
11  first=rosetta.core.scoring.PyRosettaEnergy_first,
12  last=rosetta.core.scoring.PyRosettaEnergy_last,
13  methods={}),
14 ]
Definition: __init__.py:615
pyrosetta.create_score_function = rosetta.core.scoring.ScoreFunctionFactory.create_score_function
pyrosetta.get_score_function = rosetta.core.scoring.get_score_function
tuple pyrosetta.logger = logging.getLogger("rosetta")
tuple pyrosetta.rosetta_version = rosetta.utility.Version.package()

Constants and globals.

dictionary pyrosetta.ScoreTypesRegistry = {}