/** * \file fitting_solutions_reader_writer.cpp * \brief handles reading and writing of fitting solutions * volume calculation. * * Copyright 2007-2010 IMP Inventors. All rights reserved. * */ #include #include #include #include IMPMULTIFIT_BEGIN_NAMESPACE FittingSolutionRecord parse_fitting_line(const std::string &line) { FittingSolutionRecord fit_sol; typedef boost::split_iterator string_split_iterator; IMP_USAGE_CHECK(line.size() > 0,"no data to parse"< line_split,rotation_split,translation_split; boost::split(line_split, line, boost::is_any_of("|")); IMP_USAGE_CHECK(line_split.size() == 8, "FittingSolutionRecord::parse_fitting_line Wrong format of input line : "<< "not enough fields:"<(line_split[0])); fit_sol.set_solution_filename( boost::lexical_cast(line_split[1])); fit_sol.set_transformation( algebra::Transformation3D( algebra::Rotation3D( boost::lexical_cast(rotation_split[0]), boost::lexical_cast(rotation_split[1]), boost::lexical_cast(rotation_split[2]), boost::lexical_cast(rotation_split[3])), algebra::Vector3D( boost::lexical_cast(translation_split[0]), boost::lexical_cast(translation_split[1]), boost::lexical_cast(translation_split[2])))); IMP_LOG(VERBOSE,"tranformation is set:" <(line_split[4])); fit_sol.set_match_average_distance( boost::lexical_cast(line_split[5])); fit_sol.set_fitting_score(boost::lexical_cast(line_split[6])); fit_sol.set_rmsd_to_reference(boost::lexical_cast(line_split[7])); IMP_LOG(VERBOSE,"finish parsing line"<