Protein load_protein(const boost::filesystem::path & protein_path, const boost::optional<boost::filesystem::path> & secondary_structure_path) { LOGI << "loading protein file"; ProteinFileFactory pf; std::shared_ptr<ProteinFile> protein_file(pf.create(protein_path)); SecondaryStructureFileFactory ssf; if (secondary_structure_path) { LOGI << "loading secondary structure file"; std::shared_ptr<SecondaryStructureFile> secondary_structure_file( ssf.create(*secondary_structure_path)); return Protein(protein_file, secondary_structure_file); } else { return Protein(protein_file); } }
object copy_gestator() { if(gestator) return object(Protein(*gestator)); else return object(); }
// Gestation and incubator list copy_incubator() { py::list ret; BOOST_FOREACH(const Protein& p, incubator) ret.append(Protein(p)); return ret; }