Exemple #1
0
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);
    }
}
Exemple #2
0
object copy_gestator() {
	if(gestator)
		return object(Protein(*gestator));
	else
		return object();
}
Exemple #3
0
// Gestation and incubator
list copy_incubator() {
	py::list ret;
	BOOST_FOREACH(const Protein& p, incubator)
		ret.append(Protein(p));
	return ret;
}