/****************************************** * * ======= MAIN ======= * ******************************************/ int main(int argc, char *argv[]) { // Define Objects for the test CoiledCoils cc; CoiledCoilFitter ccf; PDBWriter pout; /****************************************************************************** * * === GEVORG/CRICKS CC GENERATION === * ******************************************************************************/ //sys.writePdb(opt.fileName); cc.getCoiledCoilCricks(4.910, -4.027, -13.530, 2.267, 102.806, 149.984, 0.0, 26); AtomPointerVector cricks = cc.getAtomPointers(); pout.open("/tmp/cricks.pdb"); pout.write(cricks); pout.close(); double shr = 4.910; double risePerRes = 1.51; double shp = 128.206; double ahr = 2.26; double ahp = 102.8; double ahphase = 149.984; double dZ = 0.0; //meaningless parameter at the moment. cc.getCoiledCoil(shr, risePerRes, shp, ahr, ahp, ahphase, dZ, 26); AtomPointerVector norths = cc.getAtomPointers(); pout.open("/tmp/norths.pdb"); pout.write(norths); pout.close(); Symmetry sym; sym.applyCN(norths,2); pout.open("/tmp/northC2.pdb"); pout.write(sym.getAtomPointers()); pout.close(); System sys; sys.readPdb("/tmp/northC2.pdb"); // Fitting procedure.. // Add helix chain A ccf.addNextHelix(&sys.getChain("A").getAtomPointers()); // Add helix chain B ccf.addNextHelix(&sys.getChain("B").getAtomPointers()); // Set symmetry ccf.setSymmetry("C"); // Do fittin procedure ccf.fit(); // Do something else.. vector<double> params = ccf.getMinimizedParameters(); if ( abs(params[0] - shr) > 0.1){ cerr << "ERROR Super-helical radius is off. Target = "<<shr<<" MinValue = "<<params[0]<<endl; } else if (abs(params[1] - risePerRes) > 0.1){ cerr << "ERROR RisePerRes is off. Target = "<<risePerRes<<" MinValue = "<<params[1]<<endl; } else if (abs(params[2] - shp) > 0.1){ cerr << "ERROR Super-helical pitch is off. Target = "<<shp<<" MinValue = "<<params[2]<<endl; } else if (abs(params[3] - ahr) > 0.1){ cerr << "ERROR Alpha-helical radius is off. Target = "<<ahr<<" MinValue = "<<params[3]<<endl; } else if (abs(params[4] - ahp) > 0.1){ cerr << "ERROR Alpha-helical pitch is off. Target = "<<ahp<<" MinValue = "<<params[4]<<endl; } else if (abs(params[5] - ahphase) > 0.1){ cerr << "ERROR Alpha-helical phase is off. Target = "<<ahphase<<" MinValue = "<<params[5]<<endl; } else if (abs(params[6] - dZ) > 0.1){ cerr << "ERROR deltaZ offset is off. Target = "<<dZ<<" MinValue = "<<params[6]<<endl; } else { cout << "LEAD"; } }
int main(int argc, char *argv[]){ // Option Parser Options opt = setupOptions(argc,argv); Transforms tr; // Super-helical Radius Loop for (double sr = opt.superHelicalRadius[0]; sr <= opt.superHelicalRadius[1]; sr += opt.superHelicalRadius[2]){ // Alpha-helical Phase Angle Loop for (double aph = opt.alphaHelicalPhaseAngle[0]; aph < opt.alphaHelicalPhaseAngle[1];aph+=opt.alphaHelicalPhaseAngle[2]){ // Super-helical Pitch Angle loop added by David Slochower for(double shpa = opt.superHelicalPitchAngle[0]; shpa < opt.superHelicalPitchAngle[1]; shpa+=opt.superHelicalPitchAngle[2]) { double shPitch = (2*M_PI*sr)/tan(M_PI*shpa/180); // Generate a coiled helix CoiledCoils cc; // Values used for previous work: cc.northCoiledCoils(sr, 1.5232, shPitch, 2.25, opt.numberOfResidues, 103.195, aph); // March 31, 2010: Jason Donald // Hard code values of h (rise/residue) = 1.51, r1 (alpha-helical radius), and theta (alpha helical frequency) // based on median values observed by Gevorg Grigoryan //cc.northCoiledCoils(sr, 1.51, shPitch, 2.26, opt.numberOfResidues, 102.8, aph); AtomPointerVector coil = cc.getCoiledCoil(sr, 1.51, shPitch, 2.26, 102.8, aph, 0.0,opt.numberOfResidues); // Apply symmetry operations to create a bundle int C_axis = atoi(opt.symmetry.substr(1,(opt.symmetry.length()-1)).c_str()); if (opt.symmetry.substr(0,1) == "C"){ Symmetry sym; sym.applyCN(coil,C_axis); // Write out bundle char filename[80]; sprintf(filename, "%s_%s_%03d_%05.2f_%05.2f_shp%05.2f.pdb", opt.name.c_str(),opt.symmetry.c_str(),opt.numberOfResidues, sr, aph, shpa); cout << "Writing "<<filename<<endl; PDBWriter pout; pout.open(filename); pout.write(sym.getAtomPointers()); pout.close(); } else if (opt.symmetry.substr(0,1) == "D"){ // Z Rotate for (double spa = opt.superHelicalPhaseAngle[0]; spa < opt.superHelicalPhaseAngle[1]; spa += opt.superHelicalPhaseAngle[2]){ coil.clearSavedCoor(); coil.saveCoor("preSPA"); Matrix zRot = CartesianGeometry::getZRotationMatrix(spa); //coil.rotate(zRot); tr.rotate(coil, zRot); // Z Trans for (double ztrans = opt.d2zTranslation[0];ztrans < opt.d2zTranslation[1]; ztrans += opt.d2zTranslation[2]){ coil.saveCoor("preZtrans"); CartesianPoint z(0,0,ztrans); //coil.translate(z); tr.translate(coil, z); Symmetry sym; sym.applyDN(coil,C_axis); // Write out bundle char filename[80]; sprintf(filename, "%s_%s_%03d_%05.2f_%05.2f_shp%05.2f_%05.2f_%05.2f.pdb", opt.name.c_str(),opt.symmetry.c_str(),opt.numberOfResidues,sr, aph, shpa, spa, ztrans); cout << "Writing "<<filename<<endl; PDBWriter pout; pout.open(filename); pout.write(sym.getAtomPointers()); pout.close(); coil.applySavedCoor("preZtrans"); } // Ztrans coil.applySavedCoor("preSPA"); } // SHA } } } } }
int main(int argc, char *argv[]) { // the program requires the location of the "exampleFiles" as an argument if (argc < 1) { cerr << "USAGE:\nexample_coiled_coil_and_symmetric_bundles" << endl; exit(0); } cout << " ***************************************************************************************" << endl; cout << "" << endl; cout << " How to generate coiled-coils in MSL (" << MslTools::getMSLversion() << ") " << endl; cout << "" << endl; cout << " ***************************************************************************************" << endl; cout << endl; cout << endl; // 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); // dZ double dZ = 0.0; // Get the atoms from the CoiledCoils object back (this is a single coiled-coil helix) AtomPointerVector coil = cc.getCoiledCoil(sr, risePerResidue, shPitch, alphaHelicalRadius, alphaHelicalFrequency,dZ, aph,numberOfResidues); 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(); }