/** * \file cross_link_score.cpp \brief A program for scoring of docking models * with cross linking data * * Copyright 2007-2013 IMP Inventors. All rights reserved. * */ #include #include "helpers.h" #include "CrossLink.h" #include "CrossLinkingResult.h" #include "DockingDistanceRestraint.h" #include #include #include #include #include #include #include #include namespace po = boost::program_options; int main(int argc, char **argv) { // print command for(int i=0; i \ "); desc.add_options() ("help", "static and transformed molecules from docking with \ transformation file. \ Each docked complex will be compared against cross links in cross_links_file.") ("input-files", po::value< std::vector >(), "input PDB, transformation and profile files") ("output_file,o", po::value(&out_file_name)->default_value("cxms_score.res"), "output file name, default name cxms_score.res"); po::positional_options_description p; p.add("input-files", -1); po::variables_map vm; po::store( po::command_line_parser(argc,argv).options(desc).positional(p).run(), vm); po::notify(vm); // parse filenames std::string receptor_pdb, ligand_pdb, trans_file; std::string cross_links_file; std::vector files; if(vm.count("input-files")) { files = vm["input-files"].as< std::vector >(); } if(vm.count("help") || files.size() != 4) { std::cout << desc << "\n"; return 0; } receptor_pdb = files[0]; ligand_pdb = files[1]; trans_file = files[2]; cross_links_file = files[3]; // read pdb files, prepare particles IMP::Model *model = new IMP::Model(); IMP::atom::Hierarchy mhd = IMP::atom::read_pdb(receptor_pdb, model, new IMP::atom::NonWaterNonHydrogenPDBSelector(), true, true); IMP::Particles residue_particles1 = get_by_type(mhd, IMP::atom::RESIDUE_TYPE); mhd = IMP::atom::read_pdb(ligand_pdb, model, new IMP::atom::NonWaterNonHydrogenPDBSelector(), true, true); IMP::Particles residue_particles2 = get_by_type(mhd, IMP::atom::RESIDUE_TYPE); // get CA atoms for residues IMP::Particles ca_atoms1, ca_atoms2; for(unsigned int i=0; i transforms; read_trans_file(trans_file, transforms); // read cross_links_file std::vector cross_links; read_cross_link_file(cross_links_file, cross_links); std::vector distance_restraints_; // find CA atoms from cross linked residues for(unsigned int i=0; i results; for(unsigned int i=0; i 0.0) { float z_score = -(results[i].get_score() - average)/std; results[i].set_z_score(z_score); } } } // output for(unsigned int i=0; i