Difference between revisions of "Tutorial::CoiledCoils Bundles"
From MSL-Libraries
Jump to navigationJump to search (Created page with '<font color="red">Tutorial writing in progress, code may not be checked into SVN yet</font> This is an example on how to generate a coiled coil bundle (coiled-coil generation +…') |
|||
Line 9: | Line 9: | ||
In MSL the program [http://mslib.svn.sourceforge.net/viewvc/mslib/trunk/programs/generateCoiledCols.cpp?view=markup generateCoiledCoils] utilizes the type of code in this tutorial to iterate over the parameter space of coiled coils and generate large numbers of coiled coil structures. | In MSL the program [http://mslib.svn.sourceforge.net/viewvc/mslib/trunk/programs/generateCoiledCols.cpp?view=markup generateCoiledCoils] utilizes the type of code in this tutorial to iterate over the parameter space of coiled coils and generate large numbers of coiled coil structures. | ||
+ | |||
+ | [[Media:coils.png]] | ||
+ | |||
Line 26: | Line 29: | ||
<source lang="cpp"> | <source lang="cpp"> | ||
+ | // CoiledCoils object used to create a coiled helix (by a number of algorithms) | ||
+ | CoiledCoils cc; | ||
+ | |||
+ | // A super-helical radius | ||
+ | double sr = 6.5; | ||
+ | |||
+ | // An alpha-helical phase angle | ||
+ | double aph = 0.0; | ||
+ | |||
+ | // A super-helical pitch angle, and pitch distance | ||
+ | double shpa = 190; | ||
+ | double shPitch = (2*M_PI*sr)/tan(M_PI*shpa/180); | ||
+ | |||
+ | // Hard code values of h (rise/residue) = 1.51, r1 (alpha-helical radius), and theta (alpha helical frequency) | ||
+ | double risePerResidue = 1.51; | ||
+ | |||
+ | // Use observed medians by Gevorg Grigoryan (Probing Deisgnability via a Generalized Model of Helical Bundle Geometry, JMB 2010) | ||
+ | double alphaHelicalRadius = 2.26; | ||
+ | double alphaHelicalFrequency = 102.8; | ||
+ | |||
+ | // Number of residues in coil ( lets do 4 heptads = 28 residues ) | ||
+ | double numberOfResidues = 28; | ||
+ | |||
+ | // Generate a coiled coil, using specified parameters | ||
+ | cc.northCoiledCoils(sr, risePerResidue, shPitch, alphaHelicalRadius, numberOfResidues, alphaHelicalFrequency, aph); | ||
+ | |||
+ | // Get the atoms from the CoiledCoils object back (this is a single coiled-coil helix) | ||
+ | AtomPointerVector coil = cc.getAtomPointers(); | ||
+ | |||
+ | cout << "Writing /tmp/singleHelixCoil.pdb"<<endl; | ||
+ | PDBWriter pout; | ||
+ | pout.open("/tmp/singleHelixCoil.pdb"); | ||
+ | pout.write(coil); | ||
+ | pout.close(); | ||
+ | |||
+ | // Create a symmtery object to generate a coiled bundle ( C4 symmetric ) | ||
+ | Symmetry sym; | ||
+ | |||
+ | // Apply C4 to "coil" | ||
+ | sym.applyCN(coil,4); | ||
+ | cout << "Writing /tmp/C4HelixCoil.pdb"<<endl; | ||
+ | pout.open("/tmp/C4HelixCoil.pdb"); | ||
+ | pout.write(sym.getAtomPointers()); | ||
+ | pout.close(); | ||
+ | </source> | ||
Revision as of 16:08, 16 May 2010
Tutorial writing in progress, code may not be checked into SVN yet
This is an example on how to generate a coiled coil bundle (coiled-coil generation + symmetric bundle creation) in MSL. This tutorial explains functions in the CoiledCoils and the Symmetry objects.
Complete source of example_coiled_coils_and_symmetric_bundles.cpp
In MSL the program generateCoiledCoils utilizes the type of code in this tutorial to iterate over the parameter space of coiled coils and generate large numbers of coiled coil structures.
To compile
% make bin/example_coiled_coils_and_symmetric_bundles
To run the program
Go to the main directory and run the command (note, the location of the exampleFiles subdirectory needs to be provided as an argument)
% bin/example_coiled_coils_and_symmetric_bundles
Program description
// CoiledCoils object used to create a coiled helix (by a number of algorithms)
CoiledCoils cc;
// A super-helical radius
double sr = 6.5;
// An alpha-helical phase angle
double aph = 0.0;
// A super-helical pitch angle, and pitch distance
double shpa = 190;
double shPitch = (2*M_PI*sr)/tan(M_PI*shpa/180);
// Hard code values of h (rise/residue) = 1.51, r1 (alpha-helical radius), and theta (alpha helical frequency)
double risePerResidue = 1.51;
// Use observed medians by Gevorg Grigoryan (Probing Deisgnability via a Generalized Model of Helical Bundle Geometry, JMB 2010)
double alphaHelicalRadius = 2.26;
double alphaHelicalFrequency = 102.8;
// Number of residues in coil ( lets do 4 heptads = 28 residues )
double numberOfResidues = 28;
// Generate a coiled coil, using specified parameters
cc.northCoiledCoils(sr, risePerResidue, shPitch, alphaHelicalRadius, numberOfResidues, alphaHelicalFrequency, aph);
// Get the atoms from the CoiledCoils object back (this is a single coiled-coil helix)
AtomPointerVector coil = cc.getAtomPointers();
cout << "Writing /tmp/singleHelixCoil.pdb"<<endl;
PDBWriter pout;
pout.open("/tmp/singleHelixCoil.pdb");
pout.write(coil);
pout.close();
// Create a symmtery object to generate a coiled bundle ( C4 symmetric )
Symmetry sym;
// Apply C4 to "coil"
sym.applyCN(coil,4);
cout << "Writing /tmp/C4HelixCoil.pdb"<<endl;
pout.open("/tmp/C4HelixCoil.pdb");
pout.write(sym.getAtomPointers());
pout.close();