libRosetta Score DemoThis is a demo program that reads a PDB file, runs fullatom_energy() on the protein, and writes the score file. // libRosetta headers #include <rosetta/conformation/protein/Protein.hh> #include <rosetta/conformation/builder/ProteinBuilder.hh> #include <rosetta/io/pdb/read_pdb.hh> #include <rosetta/options/option.hh> #include <rosetta/scoring/fullatom_energy.hh> #include <rosetta/scoring/initialize.hh> #include <rosetta/scoring/io/score_file.hh> // Standard library headers #include <cstdlib> #include <iostream> #include <string> /// @brief Demo of scoring a Protein with fullatom_energy int main( int argc, char * argv[] ) { using namespace rosetta; using namespace rosetta::conformation; using namespace rosetta::conformation::builder; using namespace rosetta::conformation::protein; using namespace rosetta::io::pdb; using namespace rosetta::options; using namespace rosetta::scoring; using namespace rosetta::scoring::io; using namespace std; typedef ProteinBuilder::Proteins Proteins; // Get command line options options::initialize().load( argc, argv, true ); options::process(); // Scoring initialization scoring::initialize(); // Read the PDB Proteins proteins( read_pdb( argv[1] ) ); // Grab the first protein Protein & protein( **proteins.begin() ); // Score the protein cout << endl << "Scoring protein " << protein.id() << endl; fullatom_energy( protein ); // Write the score file write_score_file( protein, protein.id() + ".fasc", "native", true ); } |