Parameterizing ligands for Rosetta
For this tutorial, I'll assume that you have a PDB of your protein with a ligand already bound. If you want to put in an arbitrary ligand, you will have to draw it in molecular graphics software like Avogadro first.
First, clean up and relax your PDB. We'll use 2JIE. Either fire up PyMOL and fetch or
curl -O http://www.rcsb.org/pdb/files/2jie.pdb`
grep ^HETATM 2jie.pdb
to find out that this protein has a ligand, G2F (2-fluoroglucose) bound in the active site. Use any method you like to clean up the PDB. It almost always works perfectly well to just run it through relax with -ignore_unrecognized_res turned on. This is also a good time to renumber the PDB.
relax.macosclangrelease -s 2jie.pdb -ignore_unrecognized_res 1 -constrain_relax_to_start_coords 1 -renumber_pdb 1
In "production", you want to run with -nstruct 50 or 100 and pick the lowest energy, but to a first approximation a single relaxed structure is OK (takes 3-4 min on my Mac). Now we need to parameterize our ligand and generate conformers. To do this, I usually just grep the ligand from the crystal structure into a new PDB
grep '^HET.+G2F' 2jie.pdb > G2F.pdb # simplistic regex, check in text editor
and open up the structure in Avogadro to add hydrogens, make any chemical changes, and generate conformers. Save as a .mol2 file (not .mol). If you want to model an arbitrary substrate, just draw it from scratch in Avogadro and generate conformers and save into a single MOL file.
open -a Avogadro G2F.pdb # then add hydrogens, make conformers, save as G2F.mol
Next, run molfile_to_params.py which will make a Rosetta params file and pick the first conformer out for you to dock in your relaxed structure.
python path/to/molfile_to_params.py --conformers-in-one-file -n G2F -p G2F G2F.mol
# output: G2F_0001.pdb, G2F_conformers.pdb, G2F.params
To get a file you can actually open in Foldit, combine the ATOMs of the relaxed PDB with the HETATMs of the "favored" conformer output from molfile_to_params.py into a new PDB.
( grep ^ATOM 2jie_0001.pdb && grep ^HETATM G2F_0001.pdb ) > 2JIE-G2F.pdb
Now, we're ready to open up Foldit (finally). When you load in your structure, include all three of
- 2JIE-G2F.pdb
- G2F.params
- G2F_conformers.pdb
If (when?) Foldit crashes, you can find the crash log in Foldit/Contents/Resources/log.txt (the "executable" on Mac OS X is really a folder that contains various things plus a Unix-style binary that is the actual program).
If you need conformers, use Open Babel. Generate 30 conformers with Open Babel:
obabel startingConformer.sdf -O outputConformers.sdf --conformer --nconf 30 --score rmsd --writeconformers
That's all for now, for writing constraint files I'll point you to the enzdes documentation.