20 #ifndef OST_MM_BUILDING_BLOCK_HH
21 #define OST_MM_BUILDING_BLOCK_HH
27 #include <boost/shared_ptr.hpp>
38 namespace ost {
namespace mol{
namespace mm{
57 std::vector<String>
GetAtoms()
const {
return atoms_; }
59 std::vector<String>
GetTypes()
const {
return types_; }
61 std::vector<Real>
GetCharges()
const {
return charges_; }
63 std::vector<Real>
GetMasses()
const {
return masses_; }
71 std::vector<InteractionPtr>
GetBonds()
const {
return bonds_; }
73 std::vector<InteractionPtr>
GetAngles()
const {
return angles_; }
75 std::vector<InteractionPtr>
GetDihedrals()
const {
return dihedrals_; }
77 std::vector<InteractionPtr>
GetImpropers()
const {
return impropers_; }
79 std::vector<InteractionPtr>
GetCMaps()
const {
return cmaps_; }
81 std::vector<InteractionPtr>
GetExclusions()
const {
return exclusions_; }
111 Real new_mass = std::numeric_limits<Real>::quiet_NaN());
119 template <
typename DS>
121 int num_atoms = atoms_.size();
125 atoms_ = std::vector<String>(num_atoms);
126 types_ = std::vector<String>(num_atoms);
127 charges_ = std::vector<Real>(num_atoms);
128 masses_ = std::vector<Real>(num_atoms);
131 for(
int i = 0; i < num_atoms; ++i){
138 int num_bonds = bonds_.size();
139 int num_angles = angles_.size();
140 int num_dihedrals = dihedrals_.size();
141 int num_impropers = impropers_.size();
142 int num_exclusions = exclusions_.size();
143 int num_cmaps = cmaps_.size();
144 int num_constraints = constraints_.size();
152 ds & num_constraints;
154 for(
int i = 0; i < num_bonds; ++i){
161 func_type = bonds_[i]->GetFuncType();
167 for(
int i = 0; i < num_angles; ++i){
174 func_type = angles_[i]->GetFuncType();
180 for(
int i = 0; i < num_dihedrals; ++i){
187 func_type = dihedrals_[i]->GetFuncType();
190 ds & *(dihedrals_[i]);
193 for(
int i = 0; i < num_impropers; ++i){
200 func_type = impropers_[i]->GetFuncType();
203 ds & *(impropers_[i]);
206 for(
int i = 0; i < num_exclusions; ++i){
213 func_type = exclusions_[i]->GetFuncType();
216 ds & *(exclusions_[i]);
219 for(
int i = 0; i < num_cmaps; ++i){
226 func_type = cmaps_[i]->GetFuncType();
232 for(
int i = 0; i < num_constraints; ++i){
239 func_type = constraints_[i]->GetFuncType();
242 ds & *(constraints_[i]);
249 int GetAtomIndex(
const String& atom_name)
const;
252 std::vector<String> atoms_;
253 std::vector<String> types_;
254 std::vector<Real> charges_;
255 std::vector<Real> masses_;
256 std::vector<InteractionPtr> bonds_;
257 std::vector<InteractionPtr> angles_;
258 std::vector<InteractionPtr> dihedrals_;
259 std::vector<InteractionPtr> impropers_;
260 std::vector<InteractionPtr> exclusions_;
261 std::vector<InteractionPtr> cmaps_;
262 std::vector<InteractionPtr> constraints_;
String GetType(const String &name) const
void AddConstraint(InteractionPtr p, bool replace_existing=false)
void AddCMap(InteractionPtr p, bool replace_existing=false)
void RemoveInteractionsToPrev()
std::vector< InteractionPtr > GetDihedrals() const
void AddAtom(const String &name, const String &type, Real charge, Real mass=std::numeric_limits< Real >::quiet_NaN())
std::vector< String > GetAtoms() const
boost::shared_ptr< Interaction > InteractionPtr
std::vector< Real > GetMasses() const
Real GetCharge(const String &name) const
void AddExclusion(InteractionPtr p, bool replace_existing=false)
void ReplaceAtom(const String &name, const String &new_name, const String &new_type, Real new_charge, Real new_mass=std::numeric_limits< Real >::quiet_NaN())
void AddBond(InteractionPtr p, bool replace_existing=false)
std::vector< String > GetTypes() const
void RemoveInteractionsToNext()
std::vector< InteractionPtr > GetAngles() const
void AddImproper(InteractionPtr p, bool replace_existing=false)
std::vector< Real > GetCharges() const
std::vector< InteractionPtr > GetBonds() const
void AddAngle(InteractionPtr p, bool replace_existing=false)
std::vector< InteractionPtr > GetImpropers() const
external coordinate system editor
Real GetMass(const String &name) const
std::vector< InteractionPtr > GetConstraints() const
bool Match(const ost::mol::ResidueHandle &handle, bool match_connectivity, String &info) const
void AddDihedral(InteractionPtr p, bool replace_existing=false)
std::vector< InteractionPtr > GetCMaps() const
std::vector< InteractionPtr > GetExclusions() const
void Connect(ost::mol::ResidueHandle &handle, ost::mol::XCSEditor &ed)
void RemoveAtom(const String &name)
boost::shared_ptr< BuildingBlock > BuildingBlockPtr