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;
79 return !(*
this == other);
82 void ToStream(std::ostream& stream)
const;
102 int anch_two_idx,
int anch_three_idx,
103 Real bond_length,
Real angle,
int dihedral_idx,
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);
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_;
static OMFPtr FromEntity(const ost::mol::EntityHandle &ent, Real max_error=0.0, uint8_t options=0)
std::vector< int > bond_orders
const std::vector< ChiDefinition > & GetChiDefinitions() const
std::vector< ResidueDefinition > residue_definitions
bool OptionSet(OMFOption opt) const
void FromStream(std::istream &stream)
int GetNChiAngles() const
std::vector< Real > occupancies
std::vector< Real > bfactors
const std::vector< Real > & GetBFactors(const String &cname) const
std::vector< ChiDefinition > chi_definitions
static int GetCurrentOMFVersion()
const std::set< int > & GetRotamericAtoms() const
bool operator!=(const ResidueDefinition &other) const
ost::mol::EntityHandle GetAUChain(const String &name) const
std::vector< String > GetChainNames() const
std::vector< int > res_def_indices
std::vector< int > bond_orders
std::vector< String > elements
std::vector< char > sec_structures
std::set< int > rotameric_atoms
const std::vector< SidechainAtomRule > & GetSidechainAtomRules() const
ost::mol::EntityHandle GetEntity() const
external coordinate system editor
static OMFPtr FromString(const String &s)
std::vector< bool > is_hetatm
std::map< String, int > idx_mapper
int GetIdx(const String &aname) const
ost::mol::ChainType chain_type
void _AddChiDefinition(int idx_one, int idx_two, int idx_three, int idx_four)
static OMFPtr FromFile(const String &fn)
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)
static DefaultPepLib & Instance()
const geom::Vec3List & GetPositions(const String &cname) const
void _InitIdxMapper() const
bool operator==(const ResidueDefinition &other) const
boost::shared_ptr< OMF > OMFPtr
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)
void ToFile(const String &fn) const
String GetSequence(const String &cname) const
ost::mol::EntityHandle GetEntityChain(const String &name) const
boost::shared_ptr< ChainData > ChainDataPtr
void ToStream(std::ostream &stream, const std::vector< ResidueDefinition > &res_def, Real max_error, bool avg_bfactors, bool round_bfactors, bool skip_ss) const
void ToStream(std::ostream &stream) const
std::vector< SidechainAtomRule > sidechain_atom_rules
std::set< int > critical_sidechain_angles
ost::mol::EntityHandle GetAU() const
std::vector< String > anames
std::vector< char > insertion_codes
std::vector< Real > GetAvgBFactors(const String &cname) const