Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
setup_pyrosetta Namespace Reference

Functions

def get_profile_fname
 
def ask_append_rc
 

Variables

tuple parser
 INTERPRETING RESULTS. More...
 
string help = "The file to source in order to set the environment. Default is SetPyRosettaEnvironment.sh"
 
string default = "SetPyRosettaEnvironment.sh"
 
tuple options = parser.parse_args()
 
 source_environment_fname = options.source
 
tuple source_environment_dir = os.path.dirname(os.path.abspath(__file__))
 
tuple source_environment_path = os.path.join(source_environment_dir, source_environment_fname)
 
list outdir = os.environ["HOME"]
 
 pyrosetta = source_environment_dir
 
tuple outfile_path = os.path.join(outdir, options.outname)
 
tuple OUTFILE = open(outfile_path, 'w')
 
tuple rc = get_profile_fname()
 Now we figure out the bashrc or equivalent and then see if we already source it. More...
 
 rc_file_path = options.shell_profile_path
 Append the file. More...
 
tuple READ_RCFILE = open(rc_file_path, 'r')
 
tuple RCFILE = open(rc_file_path, 'a')
 
tuple lines = READ_RCFILE.readlines()
 
string source_line = "source "
 
tuple append_rc = ask_append_rc()
 

Function Documentation

def setup_pyrosetta.ask_append_rc ( )
def setup_pyrosetta.get_profile_fname ( )
Gets the filename of the profile, which is different depending on operating system and shell.
PLEASE edit this if you have a way to make this more robust.  It feels like the wild west getting this info!
:rtype: str

Variable Documentation

tuple setup_pyrosetta.append_rc = ask_append_rc()
string setup_pyrosetta.default = "SetPyRosettaEnvironment.sh"
string setup_pyrosetta.help = "The file to source in order to set the environment. Default is SetPyRosettaEnvironment.sh"
tuple setup_pyrosetta.lines = READ_RCFILE.readlines()
tuple setup_pyrosetta.options = parser.parse_args()
setup_pyrosetta.outdir = os.environ["HOME"]
tuple setup_pyrosetta.OUTFILE = open(outfile_path, 'w')
tuple setup_pyrosetta.outfile_path = os.path.join(outdir, options.outname)
tuple setup_pyrosetta.parser
Initial value:
1 = ArgumentParser("This file adds a file to your home directory, "
2  ".pyrosetta_env, "
3  "and by default adds a line to your bash or zsh profile (if not already present) to source this file. "
4  " After running this script, you will no longer need to run anything before using PyRosetta or add anything to your profile.")

INTERPRETING RESULTS.

COMMANDLINE COMPATIBILITY

Interaction Energy vs. Binding Energy COMMANDLINE COMPATIBILITY

INTERPRETING RESULTS.

INTERPRETING RESULTS COMMANDLINE COMPATIBILITY

setup_pyrosetta.pyrosetta = source_environment_dir
tuple setup_pyrosetta.rc = get_profile_fname()

Now we figure out the bashrc or equivalent and then see if we already source it.

Append it

tuple setup_pyrosetta.rc_file_path = options.shell_profile_path

Append the file.

tuple setup_pyrosetta.RCFILE = open(rc_file_path, 'a')
tuple setup_pyrosetta.READ_RCFILE = open(rc_file_path, 'r')
tuple setup_pyrosetta.source_environment_dir = os.path.dirname(os.path.abspath(__file__))
setup_pyrosetta.source_environment_fname = options.source
tuple setup_pyrosetta.source_environment_path = os.path.join(source_environment_dir, source_environment_fname)
string setup_pyrosetta.source_line = "source "