Home Linus Helper Programs Examples File Descriptions Index

Examples

 


1. PolyALA Simulation

2. Comparison to Known Structure Simulation

3. Start Simulation with Known SS Weights

4. Run Simulation with Mesostate Move Set

5. Run Simulation with Random Move Set

6. Build Helix with Defined Chi Angles

7. Build Sheet with Turn

8. Residue Contact Analysis

9. Run Simulation with Certain Residues in Fixed Conformation


Main Menu

 

The python files described in the examples can be found in $LINUS24 if you have set the environmental variable, LINUS24 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 $LINUS24/utils/fasta2rib.py ala.fasta

and the output file ala.rib looks like:


TITLE      polyala
DEFAULT PHI -120.0
DEFAULT PSI  130.0
ALLH
RES ACE
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES ALA
RES NME

(See the section on File Descriptions for more information on a .rib file).

Then use RIBOSOME to make the PDB file:

python $LINUS24/utils/ribosome.py -p $LINUS24/utils/ribosome.dat < ala.rib > ala.pdb

Then to run a LINUS24 simulation on the ala.pdb extended chain copy the file linus.py to your working directory:

cp $LINUS24/linus.py .

(This is the minimal linus.py file as noted in the sample LINUS24 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 LINUS24 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 $LINUS24/utils/pdbSEQRES2fasta.py pdb[code].ent

python $LINUS24/utils/fasta2rib.py pdb[code].fasta

python $LINUS24/utils/ribosome.py -p $LINUS24/utils/ribosome.dat < pdb[code].rib > pdb[code].pdb

cp $LINUS24/linus.py .

edit the file linus.py as noted in the sample LINUS24 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 LINUS24 simulation with secondary structure conformation weights from a previous simulation.

You may want to run a series of LINUS24 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 LINUS24 has found from successful conformational moves.

See the Read Weights Run File for an example linus.py file 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 LINUS24 run and it has a name such as *_006_001.SWT):

cp [filename].SWT weights

Then run LINUS24:

python -OO linus.py [filename].pdb

Example 4. Run a LINUS24 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 LINUS24 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 LINUS24 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 $LINUS24/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     chi3     chi4
    1 MET  C ??   999.99   149.63   178.31    80.37  -172.15   177.50   999.99
    2 GLN  P Dk   -91.02   138.26   173.36   165.96   177.99  -107.41   999.99
    3 ILE  E Cl  -131.10   163.05   179.57    60.27   162.40   999.99   999.99
    4 PHE  E Ck  -115.99   140.24   175.79   -60.67    97.94   999.99   999.99
    5 VAL  E Cj  -118.03   114.22  -178.12  -179.79   999.99   999.99   999.99
    6 LYS  P Dk   -95.24   127.54   179.95  -175.56   176.20  -172.04  -174.24
    7 THR  P Dl   -99.58   170.75  -177.98    76.71   999.99   999.99   999.99
    8 LEU  T Ef   -73.43    -6.94   179.94   -68.17  -165.84   999.99   999.99
    9 THR  T Dg  -101.40    14.93   179.80    70.71   999.99   999.99   999.99
   10 GLY  C Jg    77.44    16.54   175.01   999.99   999.99   999.99   999.99
   11 LYS  P Dk   -96.27   138.08   176.16  -179.28  -179.36  -151.05   -49.33
   12 THR  E Ck  -119.94   131.76   179.70   -63.40   999.99   999.99   999.99
   13 ILE  E Ck  -109.47   141.99   178.15   125.72  -175.40   999.99   999.99

to

          SS MS    phi      psi     omega     chi1     chi2     chi3     chi4
    1 MET  C ??   999.99   149.63   178.31    80.37  -172.15   177.50   999.99
    2 GLN  P Dk   -91.02   138.26   173.36   165.96   177.99  -107.41   999.99
    3 ILE  E Cl  -131.10   163.05   179.57    60.27   162.40   999.99   999.99
    4 PHE  E Ck  -115.99   140.24   175.79   -60.67    97.94   999.99   999.99
    5 VAL  E Cj  -118.03   114.22  -178.12  -179.79   999.99   999.99   999.99
    6 LYS  P Dk   -95.24   127.54   179.95  -175.56   176.20  -172.04  -174.24
    7 THR  P Dl   -99.58   170.75  -177.98    76.71   999.99   999.99   999.99
    8 LEU  T ??   -73.43    -6.94   179.94   -68.17  -165.84   999.99   999.99
    9 THR  T ??  -101.40    14.93   179.80    70.71   999.99   999.99   999.99
   10 GLY  C Jg    77.44    16.54   175.01   999.99   999.99   999.99   999.99
   11 LYS  P Dk   -96.27   138.08   176.16  -179.28  -179.36  -151.05   -49.33
   12 THR  E Ck  -119.94   131.76   179.70   -63.40   999.99   999.99   999.99
   13 ILE  E Ck  -109.47   141.99   178.15   125.72  -175.40   999.99   999.99

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 $LINUS24/utils/pdbATOM2fasta.py pdb[code].ent

which creates pdb[code].fasta.

Make a [filename].rib file for RIBOSOME,

python $LINUS24/utils/fasta2rib.py pdb[code].fasta

And use RIBOSOME to make the extended PDB file,

python $LINUS24/utils/ribosome.py -p $LINUS24/utils/ribosome.dat < [code].rib > [code].pdb

Edit your linus.py command file as described here and run LINUS24:

python -OO linus.py [filename].pdb mesostates

Example 5. Run a LINUS24 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("PII", 0.0,"all")
sim.set_weights("coil", 1.0,"all")
sim.normalize_weights()

The set_weights parameter values tell LINUS24 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).

Then use the edited linus.py command file to run LINUS24:

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.


title HELIX
default phi -62.0
default psi -41.0
allh
res ace
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
res nme
Then give the following command:

python $LINUS24/utils/ribosome.py -p $LINUS24/utils/ribosome.dat < [filename].rib > [filename].pdb

Note: The commard argument -p $LINUS24/utils/ribosome.dat is optional. This specifies which Z-matrix definition of the amino acid residues to use in constructing the model. Ribosome will use its default Z-matrix if this is not specified.

View the resulting structure file using your favorite molecular graphics program or use it as input to a LINUS24 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 STRAND
default phi -139.0
default psi  135.0
default chi -60.0
allh
res ace
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
res nme
Then give the following command:

python $LINUS24/utils/ribosome.py < [filename].rib > [filename].pdb

View the resulting structure file using your favorite molecular graphics program or use it as input to a LINUS24 simulation.

Example 8. Analyse residue-residue contacts in structures saved during LINUS24 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 $LINUS24/utils/concnt.py hp.pdb hp.out 5 15 1.5

And the output is:


   2    7 0.020
   5   12 0.020
  10   19 0.020
  11   19 0.140
  12   19 0.040
  12   20 0.020
  13   19 0.060
  14   19 0.780

Example 9. To allow only certain residues to sample different conformations and keep others fixed in their respective conformations LINUS can read a movelist file at the start of the simulation.

The movelist file is a two column file containing the residue index numbers in the first column and a boolean indicator for each residue in the second column: 0 = fixed, 1 = allow moves.

For example, suppose you had an 18 residue fragment, starting from the extended conformation and you wanted only to sample conformations of the central 4 residues to test for beta-hairpin formation. You would make the following file called movelist,


0  0
1  0
2  0
3  0
4  0
5  0
6  0
7  0
8  1
9  1
10  0
11  0
12  0
13  0
14  0
15  0
16  0
17  0
18  0
19  0
and uncomment the appropriate two lines in your linus.py file,

#   mlfile = None
    mlfile = os.path.abspath('movelist')

    os.link('movelist', curdir+os.sep+'movelist')
Notice that there are lines for residue indices 0 and 19; these are for the ACE and NME. Also, only postions 8 and 9 are allowed to move when we want the central four residues to move. Remember that LINUS has a 3 residue moveset so when residue 8 is chosen as the "move" residue, three residues (7, 8, 9) are actually sampling different conformations.