The python files described in the examples can be found in $LINUS if you have set the environmental variable, LINUS as described in the installation section.
Example 1. Simulation of polyalanine
LINUS requires a PDB file. For this example we will create a PDB file of polyalaine in extended chain conformation.
We will use RIBOSOME to create the PDB file. RIBOSOME also requires a command file which by convention we call [filename].rib.
This can be created using your favorite editor (see syntax below) or it can be created from a FASTA sequence file using fasta2rib.py.
To use fasta2rib.py edit a file called ala.fasta as follows:
>polyala 9
AAAAAAAAA
Then use fasta2rib.py
python $LINUS/utils/fasta2rib.py ala.fasta
and the output file ala.rib looks like:
TITLE ala
DEFAULT PHI -120.0
DEFAULT PSI 120.0
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
(See the section on File Descriptions for more information on a .rib file).
Then use RIBOSOME to make the PDB file:
python $LINUS/utils/ribosome.py -p $LINUS/utils/ribosome.dat < ala.rib > ala.pdb
Then to run a LINUS simulation on the ala.pdb extended chain copy the file linus.py to your working directory:
cp $LINUS/linus.py .
(This is the minimal linus.py file as noted in the sample LINUS run files section.
You may want to edit the number of cycles which is set at 5000, "numcycle=5000".)
Then enter the command:
python -OO linus.py ala.pdb
and the output files are as follows:
ala_006_001.SWT
A table of conformation weights for HELIX,SHEET, TURN1, TURN2, COIL for each residue.
ala.LOG
A log file of everything.
ala.min
PDB file of minimum energy structure.
ala.out
PDB multiple model file of saved conformations.
See the VIEWOUT description for a method to view these conformations sequentially using RASMOL.
Example 2.
Comparison to Known Structure Simulation.
Get sequence from the SEQRES records of a PDB file, make extended chain conformation of that sequence, run LINUS simulation on the extended sequence.
We assume you have a protein structure file from the RCSB with a name similar to pdb[code].ent.
Enter the following commands:
python $LINUS/utils/pdbSEQRES2fasta.py pdb[code].ent
python $LINUS/utils/fasta2rib.py pdb[code].fasta
python $LINUS/utils/ribosome.py -p $LINUS/utils/ribosome.dat < pdb[code].rib > pdb[code].pdb
cp $LINUS/linus.py .
edit the file linus.py as noted in the sample LINUS run files section and enter the command:
python -OO linus.py [code].pdb
Inspect the output files listed in Example 1. above using your favorite molecular graphics program, file editor or analysis scripts.
Example 3.
Start a LINUS simulation with secondary structure conformation weights from a previous simulation.
You may want to run a series of LINUS simulations with different parameters or you may just want to continue a previous simulation from the point at which it was stopped.
In either case it may be useful to restart a simulation using the accumulated secondary structure weights that LINUS has found from successful conformational moves.
Add the following command to your linus.py command file.
(See the Read Weights Run File for an example).
sim.read_weights_from_file('weights')
and make a copy of the conformation weights file in the working directory.
(The conformation weights file would be an output file from a previous LINUS run and it has a name such as *_006_001.SWT):
cp [filename].SWT weights
Then run LINUS:
python -OO linus.py [filename].pdb
Example 4.
Run a LINUS simulation with secondary structure conformation weights from mesostate list.
A mesostate list is a list of letter codes defining the φ and ψ values for each residue of a protein.
The assignment of letters to various ranges of the φ ψ map is explained here.
You can restrain the LINUS move set to one or more mesostate codes or let individual backbone angles "float" with the default move set by using the mesostate code, "?".
First make a mesostate file.
This is a list of mesostate letter codes from which to chose the conformational move category.
You can make a mesostate file from inspection of the [filename].rc created during a LINUS simulation,
or to get started you can make a mesostate file from a known structure (or fragment) of your sequence.
For example we will make a mesostate list file from a PDB structure and edit it so that only the turn (T) regions use the default conformational move set; all other backbone conformations will be restrained to the PDB structure (or, more correctly, restrained to the range of φ ψ values defined by the mesostate code).
First, get the torsion angles from a structure. Use the helper program, TORSION, for this:
python $LINUS/utils/torsion.py pdb[code].ent
Edit the resulting file, angles.dat, so that all the mesostate codes in column MS that are next to a T in the SS column are changed to "?".
From:
SS MS phi psi omega chi1 chi2
117 PRO C P -89.40 15.89 178.74 35.98 -33.69
118 ASN C Q -87.08 68.06 -176.46 -80.42 -12.81
119 ASN T J -142.64 18.19 -177.29 77.71 136.21
120 THR T O -50.15 -48.72 -176.74 -62.68 999.99
121 HIS T J -97.77 21.09 -178.96 -61.17 -51.21
122 GLU H O -54.79 -49.56 -176.05 179.63 175.71
123 GLN H O -63.61 -43.38 178.65 -70.84 -59.79
to
SS MS phi psi omega chi1 chi2
117 PRO C P -89.40 15.89 178.74 35.98 -33.69
118 ASN C Q -87.08 68.06 -176.46 -80.42 -12.81
119 ASN ? J -142.64 18.19 -177.29 77.71 136.21
120 THR ? O -50.15 -48.72 -176.74 -62.68 999.99
121 HIS ? J -97.77 21.09 -178.96 -61.17 -51.21
122 GLU H O -54.79 -49.56 -176.05 179.63 175.71
123 GLN H O -63.61 -43.38 178.65 -70.84 -59.79
Then create your mesostates file using the following command (or your favorite shell commands),
sed '1,1d' angles.dat | awk '{print $4}' > mesostates
Now get the sequence from the ATOM (not SEQRES as above) records of a PDB file, make extended chain conformation of that sequence,
python $LINUS/utils/pdbATOM2fasta.py pdb[code].ent
which creates pdb[code].fasta.
Make a [filename].rib file for RIBOSOME,
python $LINUS/utils/fasta2rib.py pdb[code].fasta
And use RIBOSOME to make the extended PDB file,
python $LINUS/utils/ribosome.py -p $LINUS/utils/ribosome.dat < [code].rib > [code].pdb
Edit your linus.py command file so it includes the following changes
(or use the example linus.py):
.
.
.
#Note extra msfile argument here
def run(file, seed=None, msfile=None):
.
.
.
sim = linusSim.Linus(file, gen)
#Here is where the ms file is
if msfile is not None:
msfile = os.path.abspath(msfile)
sim.load_mesostates(msfile)
#Beginning of parameter section
sim.set_simulation_parameters(numsave=100,
.
.
.
filename = sys.argv[1]
#Look for name of ms file
try:
msfile = sys.argv[2]
except IndexError:
msfile = None
else:
msfile = os.path.abspath(msfile)
run(filename, msfile=msfile)
and run LINUS:
python -OO linus.py [filename].pdb mesostates
Example 5. Run a LINUS simulation with a random move set rather than the default "smart" move set.
Edit your linus.py command file so it includes the following changes:
sim.set_weights("helix", 0.0,"all")
sim.set_weights("strand", 0.0,"all")
sim.set_weights("turn1", 0.0,"all")
sim.set_weights("turn2", 0.0,"all")
sim.set_weights("coil", 1.0,"all")
sim.normalize_weights()
sim.set_hbond_parameters(use_hbond=1,
hbond_score_short=1.5,
use_sidechain_hbond=1,
sidechain_hbond_score=2.0)
The set_weights parameter values tell LINUS to use any φ ψ angle combination for each move set (i.e. all moves are coil type).
The five set_weights values need not add up to 1.0 but if they do not then the sim.normalize_weights() command is required (in this example it is included but redundant).
With this random move set helix and turn conformations will occur much less frequently than with the "smart move set" (see the Default Parameter section) and thus the hydrogen bonding score must be increased to favor these conformations when they do occur.
The hbond_score values have been increased in this example by 1.0 unit over the default values but the user should experiment with these values for specific cases.
Then use the edited linus.py command file to run LINUS:
python -OO linus.py [filename].pdb
Example 6. Build a polypeptide alpha helix with defined side chain chi angles using RIBOSOME.
Create a [filename].rib file as below.
(Notice that the PRO residue is set to a trans conformation).
title HELIX
default phi -62.0
default psi -41.0
res arg chi -60
res asn chi -60
res asp chi -60
res cys chi -60
res gly
res gln chi -60
res glu chi -60
res his chi -60
res ile chi -60
res leu chi -60
res lys chi -60
res met chi -60
res phe chi -60
res pro phi -70
res ser chi -60
res thr chi -60
res trp chi -60
res tyr chi -60
Then give the following command:
python $LINUS/utils/ribosome.py -p $LINUS/utils/ribosome.dat < [filename].rib > [filename].pdb
View the resulting structure file using your favorite molecular graphics program or use it as input to a LINUS simulation.
Example 7. Build a polypeptide beta sheet with type II beta turn between HIS and ILE using RIBOSOME.
Create a [filename].rib file as below.
(Notice that we set the CHI values using a single default statement).
title SHEET
default phi -139.0
default psi 135.0
default chi -60.0
res ala
res arg
res asn
res asp
res cys
res gly
res gln
res glu
res gly phi -60 psi 120
res ala phi 80 psi 0
res leu
res lys
res met
res phe
res pro
res ser
res thr
res trp
res tyr
res val
Then give the following command:
python $LINUS/utils/ribosome.py -p $LINUS/utils/ribosome.dat < [filename].rib > [filename].pdb
View the resulting structure file using your favorite molecular graphics program or use it as input to a LINUS simulation.
Example 8.
Analyse residue-residue contacts in structures saved during LINUS simulation using CONTACT.
This example creates a list of each pair of residues which are in contact in the structures saved in the [filename].out file.
Also included in the list is the fraction of structures in which they in contact.
Residues which were never in contact are not listed.
We will use the output from a simulation of the 20 residue hairpin turn made in Example 7 above.
After simulation of this structure (called hp.pdb here) we have a file of the saved structures in hp.out.
To list the residues that have at least one atom within 1.5 Å (surface to surface) of another residue enter the command:
python $LINUS/utils/concnt.py hp.pdb hp.out 2 20 1.5
And the output is:
4 9 0.030
4 10 0.010
9 12 0.060
9 13 0.040
10 12 0.090
10 13 0.050
10 18 0.020
12 17 0.060
12 18 0.010
13 17 0.090
13 18 0.010
17 19 0.260
|