22 #include <unordered_map>
23 #include <unordered_set>
25 #include <boost/iostreams/filtering_stream.hpp>
31 namespace ost {
namespace io {
37 typedef boost::shared_ptr<OMF>
OMFPtr;
40 struct SidechainAtomRule {
60 struct ResidueDefinition {
67 return (
name == other.name &&
74 bonds == other.bonds &&
79 return !(*
this == other);
102 int anch_two_idx,
int anch_three_idx,
103 Real bond_length,
Real angle,
int dihedral_idx,
110 std::vector<String>
anames;
113 std::vector<int>
bonds;
127 const std::vector<ResidueDefinition>& residue_definitions,
128 const std::unordered_map<unsigned long, int>& res_idx_map,
129 const std::vector<std::pair<unsigned long, unsigned long> >&
131 const std::vector<int>& inter_residue_bond_orders,
132 std::unordered_map<long, int>& atom_idx_mapper);
135 const std::vector<ResidueDefinition>& res_def,
136 Real max_error,
bool avg_bfactors,
bool round_bfactors,
140 const std::vector<ResidueDefinition>& res_def,
141 int version,
Real max_error,
bool avg_bfactors,
142 bool round_bfactors,
bool skip_ss);
150 std::vector<int>
rnums;
161 std::vector<int>
bonds;
188 return (opt & options_) == opt;
192 Real max_error = 0.0,
206 return this->
GetAU();
238 OMF(): options_(0) { }
240 void ToStream(std::ostream& stream)
const;
242 void FromStream(std::istream& stream);
249 std::vector<ResidueDefinition> residue_definitions_;
250 std::map<String, ChainDataPtr> chain_data_;
257 std::vector<String> bond_chain_names_;
258 std::vector<int> bond_atoms_;
259 std::vector<int> bond_orders_;
std::vector< ResidueDefinition > residue_definitions
static DefaultPepLib & Instance()
ost::mol::EntityHandle GetAUChain(const String &name) const
static OMFPtr FromFile(const String &fn)
std::vector< String > GetChainNames() const
static OMFPtr FromEntity(const ost::mol::EntityHandle &ent, Real max_error=0.0, uint8_t options=0)
bool OptionSet(OMFOption opt) const
const std::vector< Real > & GetBFactors(const String &cname) const
ost::mol::EntityHandle GetEntity() const
ost::mol::EntityHandle GetAU() const
std::vector< Real > GetAvgBFactors(const String &cname) const
static int GetCurrentOMFVersion()
String GetSequence(const String &cname) const
void ToFile(const String &fn) const
const geom::Vec3List & GetPositions(const String &cname) const
ost::mol::EntityHandle GetEntityChain(const String &name) const
static OMFPtr FromString(const String &s)
external coordinate system editor
boost::shared_ptr< ChainData > ChainDataPtr
boost::shared_ptr< OMF > OMFPtr
@ CHAINTYPE_UNKNOWN
guess what
std::vector< int > bond_orders
ChainData(const ost::mol::ChainHandle &chain, const std::vector< ResidueDefinition > &residue_definitions, const std::unordered_map< unsigned long, int > &res_idx_map, const std::vector< std::pair< unsigned long, unsigned long > > &inter_residue_bonds, const std::vector< int > &inter_residue_bond_orders, std::unordered_map< long, int > &atom_idx_mapper)
std::vector< int > res_def_indices
ost::mol::ChainType chain_type
void FromStream(std::istream &stream, const std::vector< ResidueDefinition > &res_def, int version, Real max_error, bool avg_bfactors, bool round_bfactors, bool skip_ss)
std::vector< char > insertion_codes
std::vector< char > sec_structures
void ToStream(std::ostream &stream, const std::vector< ResidueDefinition > &res_def, Real max_error, bool avg_bfactors, bool round_bfactors, bool skip_ss) const
std::vector< Real > occupancies
std::vector< Real > bfactors
std::vector< int > bond_orders
int GetNChiAngles() const
const std::vector< SidechainAtomRule > & GetSidechainAtomRules() const
std::vector< String > anames
bool operator==(const ResidueDefinition &other) const
ResidueDefinition(const ost::mol::ResidueHandle &res)
int GetIdx(const String &aname) const
void _AddChiDefinition(int idx_one, int idx_two, int idx_three, int idx_four)
std::vector< SidechainAtomRule > sidechain_atom_rules
std::set< int > rotameric_atoms
const std::vector< ChiDefinition > & GetChiDefinitions() const
void ToStream(std::ostream &stream) const
std::set< int > critical_sidechain_angles
void FromStream(std::istream &stream)
void _AddAtomRule(int a_idx, int anch_one_idx, int anch_two_idx, int anch_three_idx, Real bond_length, Real angle, int dihedral_idx, Real base_dihedral)
const std::set< int > & GetRotamericAtoms() const
std::vector< ChiDefinition > chi_definitions
bool operator!=(const ResidueDefinition &other) const
std::vector< bool > is_hetatm
std::vector< String > elements
std::map< String, int > idx_mapper
void _InitIdxMapper() const