「view this page in B3 βῆτα server」

Revisions №58822

branch: master 「№58822」
Commited by: Jared Adolf-Bryfogle
GitHub commit link: 「6fa655dcd903e9f9」 「№1275」
Difference from previous tested commit:  code diff
Commit date: 2016-08-01 14:46:32

Merge pull request #1275 from RosettaCommons/jadolfbr/pyrosetta/setup_pyrosetta Add PyRosetta Setup Script Add a script for setting up PyRosetta - ```setup_pyrosetta.py```. This has been needed for years. Thanks to @raemisch for the suggestion. It runs SetPyRosettaEnvironment (which is now updated), and creates a new file for PyRosetta paths (which are usually exported at the end of the shell file). This file should then sourced in your profile, which this script can append for you if it is not already present in the file. The script interactively asks you if you would like to add this to your profile if not already present ``` ## PyRosetta ## source /Users/jadolfbr/.pyrosetta_env ``` The new file looks like this: ``` # PyRosetta Paths. Source this within your profile. # Date Created: 04/13/2016 export PYROSETTA=path/To/PyRosetta.namespace.mac.release export PYTHONPATH=$PYROSETTA${PYTHONPATH+:$PYTHONPATH} export DYLD_LIBRARY_PATH=$PYROSETTA:$PYROSETTA/rosetta${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH} export export LD_LIBRARY_PATH=$PYROSETTA:$PYROSETTA/rosetta${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} export PYROSETTA_DATABASE=$PYROSETTA/database ``` You can either use SetPyRosettaEnvironment or setup_pyrosetta.py script. The setup_pyrosetta.py script should be run anytime directories are changed (Which is now actually able to be done through the dylib - this never actually worked before). Here is the help output of the python script: ``` usage: This file adds a file to your home directory, .pyrosetta_env, and by default adds a line to your bash or zsh profile (if not already present) to source this file. After running this script, you will no longer need to run anything before using PyRosetta or add anything to your profile. [-h] [--source SOURCE] [--outname OUTNAME] [--outdir OUTDIR] [--shell_profile_path SHELL_PROFILE_PATH] optional arguments: -h, --help show this help message and exit --source SOURCE, -s SOURCE The file to source in order to set the environment. Default is SetPyRosettaEnvironment.sh --outname OUTNAME, -o OUTNAME Name of the output file we will eventually source. Default is .pyrosetta_env --outdir OUTDIR, -d OUTDIR Output directory of the env file. Default is $HOME directory --shell_profile_path SHELL_PROFILE_PATH, -p SHELL_PROFILE_PATH If your shell profile path is different than the common ones, please set the path here. ```

...