20 #ifndef OST_MM_HEURISTIC_BLOCK_MODIFIERS_HH
21 #define OST_MM_HEURISTIC_BLOCK_MODIFIERS_HH
24 #include <boost/shared_ptr.hpp>
37 namespace ost{
namespace mol{
namespace mm{
39 class HeuristicHydrogenConstructor;
40 class HeuristicTerminiConstructor;
62 template <
typename DS>
67 int num_anchor_atoms = 0;
68 int num_antecendents = 0;
69 int num_hydrogens = 0;
72 ds & num_anchor_atoms;
74 for(
int i = 0; i < num_anchor_atoms; ++i){
75 ds & num_antecendents;
79 anchor_atom_names_.push_back(loaded_string);
81 antecedent_names_.push_back(std::vector<String>());
82 for(
int j = 0; j < num_antecendents; ++j){
84 antecedent_names_[i].push_back(loaded_string);
87 hydrogen_names_.push_back(std::vector<String>());
88 for(
int j = 0; j < num_hydrogens; ++j){
90 hydrogen_names_[i].push_back(loaded_string);
95 int num_anchor_atoms = anchor_atom_names_.size();
96 int num_antecendents = 0;
97 int num_hydrogens = 0;
99 ds & num_anchor_atoms;
101 for(
int i = 0; i < num_anchor_atoms; ++i){
103 num_antecendents = antecedent_names_[i].size();
104 num_hydrogens = hydrogen_names_[i].size();
105 ds & num_antecendents;
107 ds & anchor_atom_names_[i];
110 for(std::vector<String>::iterator j = antecedent_names_[i].
begin();
111 j != antecedent_names_[i].end(); ++j){
115 for(std::vector<String>::iterator j = hydrogen_names_[i].
begin();
116 j != hydrogen_names_[i].end(); ++j){
125 std::vector<String> anchor_atom_names_;
126 std::vector<std::vector<String> > antecedent_names_;
127 std::vector<std::vector<String> > hydrogen_names_;
145 template <
typename DS>
virtual void OnSave(ost::io::BinaryDataSink &ds)
boost::shared_ptr< HeuristicTerminiConstructor > HeuristicTerminiConstructorPtr
virtual BlockModifierType GetBlockModifierType()
virtual void ApplyOnBuildingBlock(BuildingBlockPtr p)
virtual void ApplyOnResidue(ost::mol::ResidueHandle &res, ost::mol::XCSEditor &ed)
boost::shared_ptr< HeuristicBlockModifier > HeuristicBlockModifierPtr
pointer_it< T > begin(const std::vector< T > &values)
HeuristicHydrogenConstructor(BuildingBlockPtr block)
virtual BlockModifierType GetBlockModifierType()
external coordinate system editor
boost::shared_ptr< HeuristicHydrogenConstructor > HeuristicHydrogenConstructorPtr
virtual void ApplyOnBuildingBlock(BuildingBlockPtr)
virtual void OnSave(ost::io::BinaryDataSink &ds)
virtual void ApplyOnResidue(ost::mol::ResidueHandle &res, ost::mol::XCSEditor &ed)
boost::shared_ptr< BuildingBlock > BuildingBlockPtr