Hp::Hp(FILE * resultsFile, FILE * reporter, vector<Soup *> A, vector<Soup *> B):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); set_parameters(); if(A.size() != B.size()) { cout << "WARNING: An equal amount of protein and ligand structures must be given to the HP function!\n"; return; } float result; for(unsigned int i=0; i<A.size(); i++) { result = calculate(A[i],B[i]); string decoy_number; if(B[i]->name.find_last_of("_")== string::npos) decoy_number = "-1"; else decoy_number = B[i]->name.substr(B[i]->name.find_last_of("_")+1); fprintf(resultsFile,"%-4s %-4s %8f\n", A[i]->name.substr(0,4).c_str(), decoy_number.c_str(), result); } }
Matrix_IO::Matrix_IO(FILE * reporter):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); //lista = fopen("A.txt","a"); //listb = fopen("b.txt","a"); }
Bfactor::Bfactor(FILE * reporter, vector<Soup*> proteins, vector<Soup*> ligands):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); calculate(proteins,ligands); }
Hp::Hp(FILE * reporter):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); set_parameters(); }
Pdbwriter::Pdbwriter(FILE * reporter, string fn, Soup * A):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); write(fn, A); }
NN_DISCRIMINATION_PREPARATION::NN_DISCRIMINATION_PREPARATION(FILE * resultsFile,FILE * reporter) { /*** write out to out file **/ writeDescription(reporter,resultsFile); go(); }
NN_VDW::NN_VDW(FILE * reporter):Nnmodel() { /*** write out to out file **/ writeDescription(reporter); printf("Using the NN_VDW network!\n"); set_parameters(); }
void StateManagerWindow::saveAction() { QList<QTreeWidgetItem*> items = list->selectedItems(); if(items.count() > 0) { QTreeWidgetItem *item = items[0]; unsigned n = item->data(0, Qt::UserRole).toUInt(); saveState(n); writeDescription(); synchronize(); descriptionText->setFocus(); } }
ElementsNN::ElementsNN(FILE * reporter):Nnmodel() { /*** write out to out file **/ writeDescription(reporter); printf("Using the elements network!\n"); threshold = 10; }
ProteinEntropy::ProteinEntropy(FILE * reporter):Method(reporter) { /*** set parameters ***/ set_parameters(); /*** write out to out file **/ writeDescription(reporter); }
Complementarity::Complementarity(FILE * resultsFile, FILE * reporter, vector<Soup*> A, vector<Soup*> B):Method(reporter) { set_parameters(); double result =0; bool include = true; /*** write out to out file **/ writeDescription(reporter); Distances calc(reporter); for(unsigned int i=0; i< A.size(); i++ ) { calc.calculate(A[i], B[i], false); vector<vector<float> > d =calc.getResult(); vector<Atom *> Aatoms = A[i]->getAtoms(); vector<Atom *> Batoms = B[i]->getAtoms(); for(unsigned int x=0; x<d.size(); x++) for(unsigned int y=0; y<d[0].size(); y++) { include = true; if(ignore_h == 1 && Aatoms[x]->element =="H") include = false; if(ignore_h == 1 && Batoms[y]->element =="H") include = false; // cout<<"A:"<<Aatoms[x]->element<<" B:"<<Batoms[y]->element<<" Dist:"<<sqrt(d[x][y]); if(d[x][y] < tsq && include) { result += complEnergy; // cout<<" INCLUDED"; } // cout<<endl; } string decoy_number; if(B[i]->name.find_last_of("_")== string::npos) decoy_number = "-1"; else decoy_number = B[i]->name.substr(B[i]->name.find_last_of("_")+1); fprintf(resultsFile,"%-4s %-4s %8f\n", A[i]->name.substr(0,4).c_str(), decoy_number.c_str(), result); } // fprintf(reporter,"The result is: %f kcal/mol\n", result); // fprintf(resultsFile,"%-10s %5.3f\n",A[0]->identify().substr(0,4).c_str(),result); }
void Energy::initiate() { FILE * reporter = fopen("out.txt","w"); // write out to out file writeDescription(reporter); are_coefficients_set = false; // read parameters from file read_parameters(); return; }
Energy::Energy(FILE * reporter, vector<Soup *> proteins_in, vector<Soup *> ligands_in):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); /*** do A and B have equal lengths? ***/ if(proteins.size() != ligands.size()) { cout << "WARNING: An equal amount of protein and ligand structures must be given to the energy function!\n"; return; } are_coefficients_set = false; /*** copy structures and read in setup ***/ proteins = proteins_in;ligands = ligands_in; read_parameters(); /*** set parameters ***/ // Generalparameters prepA(rep,proteins); // Generalparameters prepB(rep,ligands); simple_parameters.prepare(proteins); simple_parameters.prepare(ligands); /*** set targets ***/ generate_target_vector(); test(); if(mode == "train") train(); /*** write out matrices for octave ***/ Matrix_IO M(rep); M.open("binding.m"); M.write_matrix("A", A); M.write_vector("b",b); M.update_lists(names,A,b); M.write_string_vector("Names",names); M.close(); if(are_coefficients_set) stream_results(); }
void MSC::initiate() { FILE * reporter = fopen("out.txt","w"); //resultsFile = fopen(res.c_str(),"w"); // write out to out file writeDescription(reporter); coefficients_are_set = 0; // read parameters from file read_parameters(); }
Hp::Hp(FILE * resultsFile, FILE * reporter, vector<Soup *> A):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); set_parameters(); float result; for(unsigned int i=0; i<A.size(); i++) { result = calculate(A[i]); fprintf(resultsFile,"%-4s %8f\n", A[i]->name.substr(0,4).c_str(), result); } }
status CAFFile::writeInit(AFfilesetup setup) { if (initFromSetup(setup) == AF_FAIL) return AF_FAIL; initCompressionParams(); Tag caff("caff"); if (!writeTag(&caff)) return AF_FAIL; const uint8_t versionAndFlags[4] = { 0, 1, 0, 0 }; if (m_fh->write(versionAndFlags, 4) != 4) return AF_FAIL; if (writeDescription() == AF_FAIL) return AF_FAIL; if (writeData(false) == AF_FAIL) return AF_FAIL; return AF_SUCCEED; }
Targets::Targets(FILE * reporter, string dataset):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); T = 300;// K //R = 1.9872 / 1000;// kcal/(K mol) R = 8.314472/1000; // kJ/(K mol) log_conversion = 2.302585093; if (dataset == "wang") read_file_wang("/home/people/chresten/run/docksets/wang/all_original_dockset/complex_list_all"); else if(dataset == "pdbbind") read_file_pdbbind("/home/people/chresten/run/docksets/pdbbind/original/INDEX.2004.refined.pkd"); else if(dataset == "pdbbind2007") read_file_pdbbind("/rnase_local/chresten/run/docksets/pdbbind2007//INDEX.2007.refined.data"); else if(dataset == "fictive") read_file_fictive("targets.txt"); }
ProteinEntropy::ProteinEntropy(FILE * resultsFile, FILE * reporter, vector<Soup*> A, vector<Soup*> B):Method(reporter) { /*** set parameters ***/ set_parameters(); /*** write out to out file **/ writeDescription(reporter); if(A.size() != B.size()) { cout << "WARNING: An equal amount of protein and ligand structures must be given to the ProteinEntropy function!\n"; return; } vector<vector<float> > distances; for(unsigned int i=0; i<A.size(); i++) { float result = calculate(A[i],B[i]); string decoy_number; if(B[i]->name.find_last_of("_")== string::npos) decoy_number = "-1"; else decoy_number = B[i]->name.substr(B[i]->name.find_last_of("_")+1); fprintf(resultsFile,"%-4s %-4s %8f\n", A[i]->name.substr(0,4).c_str(), decoy_number.c_str(), result); // fprintf(resultsFile,"%-10s %f\n",convert_soup_to_objects(A[i])[0]->identify().substr(0,4).c_str(),result); } }
Bfactor::Bfactor(FILE * reporter):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); }
PrepinReader::PrepinReader(FILE * reporter):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); }
PrepinReader::PrepinReader(FILE * reporter, vector<Soup *> A):Method(reporter) { /*** write out to out file **/ writeDescription(reporter); go(A); }
MSC::MSC(FILE * reporter, FILE * results, vector<Soup *> wts_in, vector<Soup *> mutants_in):Method(reporter) { /********************************************************************** Mutant stability change Input: Proberly protonated wild type and mutant structures **********************************************************************/ wts = wts_in; mts = mutants_in; // write out to out file writeDescription(reporter); coefficients_are_set = 0; // does wts and mutants have equal lengths? if(wts.size() != mts.size()) { cout << "ERROR: An equal amount of wild type and mutant structures must be given!\n"; return; } // read parameters from file read_parameters(); // set parameters if(include_ff_components) { //correct_names.go(wts); //correct_names.go(mts); //prepin.go(wts); //prepin.go(mts); simple_parameters.prepare(wts); simple_parameters.prepare(mts); } test(); if(mode == "train") train(); /*** write out matrices for octave ***/ Matrix_IO M(rep); M.open("stability.m"); M.write_matrix("Astability", A); M.write_vector("bstability",b); M.write_string_vector("Names",names); M.close(); cout<<"Done writting to octave file"<<endl; if(coefficients_are_set) stream_results(); }