The AMBRose python module was developed by Maria Szegedy (Khare Lab), Kristin Blacklock (Khare Lab), and Hai Nguyen (Case Lab) at Rutgers University.
Last updated August 28, 2019.
For questions please contact:
Have you ever wanted Rosetta to seamlessly make an MD simulation of your structure and use frames from it in your protocol? Or just wished you could automate the creation of MD input files? If so, AMBRose is the PyRosetta companion module for you. With AMBRose, obtaining MD data can be as easy as setting up a mover! Download AMBRose today and see what MD can do for your project. (No actual movers were harmed in the making of this software.)
This module provides several functions for intercompatibility between AMBER and Rosetta, with major functions being:
For the full API, see the docstrings of AMBRose's modules and objects. These will be turned into readthedocs.io documentation eventually.
Make sure your environment variable
$AMBERHOME is set to the directory where AMBER lives. (This is the directory where
bin/pmemd.CUDA lives, where
amber.sh lives, et cetera.)
AMBRose can work with (i.e. convert from one medium to another) any of three things:
Anything beyond this (ligands, noncanonical residues, most post-translational modifications) will almost certainly fail to be converted.
AMBRose's movers currently only run minimizations and simulations on the GPU, with pmemd.cuda. This is not a huge problem, because GPU computation is the state of the art for AMBER, and all the AMBER devs are currently focused on it. However, if for whatever reason you need CPU computation instead, they can be set to do that, but they will only be able to run on one core in most cases. This issue is not likely to be solved.
Currently, you can install AMBRose with anything capable of handling a
setup.py script, such as
pip. If you are taking this route, you must first clone RosettaCommons/tools, and then navigate to the directory
tools/AmbRose. Here, run
$ pip install --user .
which will copy the folder
ambrose to the correct place in your
If you know where in your
PYTHONPATH you want to keep AMBRose, you can copy the directory
tools/AmbRose/ambrose directly to wherever you need it to be. Just make sure it's somewhere in one of the folders in your
First, import PyRosetta and AMBRose:
>>> import pyrosetta as pr; pr.init() >>> import ambrose
AMBRose's API is currently best explored through its docstrings. These are accessible through the
If you want to read the docstrings in a specific submodule or pertaining to a specific object, that can be
>>> help(ambrose.pose_selectors) >>> help(ambrose.AMBERSimulateMover)
AMBRose can turn a pose into input files for sander/PMEMD. To do this, use the function
>>> pose = pr.pose_from_file('my-protein.pdb') >>> ambrose.pose_to_amber_params(pose, ... crd_path='my-protein.rst7', ... top_path='my-protein.parm7')
This will create the files
my-protein.parm7, which can be used as starting coordinates for sander/PMEMD. Additional arguments may be given to control the solvation of the pose; see the output of the command
AMBRose can read a trajectory and output the frames as poses. To do this, you must first import the AmberTools module pytraj, and read in your trajectory as a
Trajectory object. Then, you can use AMBRose's
TrajToPoses object to turn it into a sequence of poses:
>>> import pytraj as pt >>> traj = pt.iterload('my-protein.rst7', 'my-protein.parm7') >>> poses = ambrose.TrajToPoses(traj)
TrajToPoses objects can be indexed and sliced like any sequence. Their elements are poses corresponding to each successive frame of the trajectory that they were made from. For example, to get a pose corresponding to the last frame of a trajectory, you can run the previous code, and then:
>>> pose = poses[-1]
AMBRose's "movers" (which aren't real movers, but are built to function like them) are intended to abstract away the entire process of converting to AMBER, simulating a pose, converting the frames back, and selecting a frame.
AMBERSimulateMover does exactly this. When its
apply() is called on a pose, it creates and runs a simulation with the parameters you have specified, and replaces the pose with the last frame of the simulation's trajectory. Here is an example where we simulate a pose for 10 ps at 303 K (but starting from 273 K), with an explicit solvent, and replace it with the last frame of the simulation:
>>> pose = pr.pose_from_file('my-protein.pdb') >>> mover = ambrose.AMBERSimulateMover() >>> mover.duration = 10. # 10 picoseconds >>> mover.temperature = 303. # 303 kelvin >>> mover.starting_temperature = 273. >>> mover.solvent = ambrose.Solvents.SPCE_WATER >>> mover.working_dir = 'my-simulation-dir' >>> mover.prefix = 'my-simulation' >>> mover.apply(pose) # overwrites pose and creates many files in my-simulation-dir
You can change which pose is selected by overwriting the mover's
pose_selector. See the submodule
ambrose.pose_selectors for what pose selector functions should look like.