00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_EDITOR_BASE_HS
00020 #define OST_EDITOR_BASE_HS
00021
00022
00023
00024
00025 #include <ost/mol/module_config.hh>
00026
00027 #include <ost/geom/geom.hh>
00028
00029 #include "entity_handle.hh"
00030 #include "residue_prop.hh"
00031 #include "atom_prop.hh"
00032 #include "editor_type_fw.hh"
00033
00034 namespace ost { namespace mol {
00035
00047 class DLLEXPORT_OST_MOL EditorBase {
00048 public:
00059 ChainHandle InsertChain(const String& chain_name);
00060
00076 ResidueHandle AppendResidue(ChainHandle chain, const ResidueKey& k);
00077
00078 ResidueHandle AppendResidue(ChainHandle chain, const ResidueKey& k,
00079 const ResNum& num);
00095 ResidueHandle InsertResidueBefore(ChainHandle chain, int index,
00096 const ResNum& num,
00097 const ResidueKey& k);
00103 ResidueHandle InsertResidueAfter(ChainHandle chain, int index,
00104 const ResNum& num,
00105 const ResidueKey& k);
00106
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122 AtomHandle InsertAtom(ResidueHandle residue, const String& name,
00123 const geom::Vec3& pos, const AtomProp& prop=AtomProp());
00124
00127 AtomHandle InsertAltAtom(ResidueHandle residue, const String& name,
00128 const String& alt_group, const geom::Vec3& pos,
00129 const AtomProp& prop=AtomProp());
00140 void AddAltAtomPos(const String& group, const AtomHandle& atom,
00141 const geom::Vec3& position);
00142
00143
00148 BondHandle Connect(const AtomHandle& first, const AtomHandle& second);
00149 BondHandle Connect(const AtomHandle& first, const AtomHandle& second,
00150 unsigned char bond_order);
00151 BondHandle Connect(const AtomHandle& first, const AtomHandle& second,
00152 Real len, Real theta, Real phi);
00153 BondHandle Connect(const AtomHandle& first, const AtomHandle& second,
00154 Real len, Real theta, Real phi,
00155 unsigned char bond_order);
00156
00157 void RenameChain(ChainHandle chain, const String& new_name);
00161 void DeleteAllAtoms(ResidueHandle res);
00162
00170 void DeleteAtom(const AtomHandle& atom);
00171
00173 TorsionHandle AddTorsion(const String& name, const AtomHandle& a1,
00174 const AtomHandle& a2, const AtomHandle& a3,
00175 const AtomHandle& a4);
00179 void DeleteChain(const ChainHandle& chain);
00180
00186 void DeleteResidue(const ResidueHandle& residue_handle);
00187
00189 EditMode GetMode() const;
00190 protected:
00191 EditorBase(const EntityHandle& ent, EditMode mode);
00192 void UpdateTrace();
00193 EntityHandle ent_;
00194 EditMode mode_;
00195 };
00196
00197 }}
00198
00199 #endif