OpenStructure
biounit.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2023 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_MOL_ALG_BIOUNIT_HH
20 #define OST_MOL_ALG_BIOUNIT_HH
21 
22 #include <ost/mol/entity_handle.hh>
23 #include <ost/io/mmcif_info.hh>
24 
25 namespace ost { namespace mol { namespace alg {
26 
27 struct BUInfo {
28 
29  BUInfo() { };
30 
32 
33  void ToStream(std::ostream& stream) const;
34 
35  static BUInfo FromStream(std::istream& stream);
36 
37  String ToString() const;
38 
39  static BUInfo FromString(const String& s);
40 
41  const std::vector<std::vector<String> >& GetAUChains() const;
42 
43  const std::vector<std::vector<geom::Mat4> >& GetTransformations() const;
44 
45  void _InitTransforms() const;
46 
47  std::vector<String> au_chains;
48  std::vector<int> chain_intvl;
49  std::vector<std::vector<geom::Mat4> > operations;
50  std::vector<int> op_intvl;
51 
52 private:
53  mutable std::vector<std::vector<String> > au_chains_;
54  mutable std::vector<std::vector<geom::Mat4> > transforms_;
55 };
56 
58  const ost::io::MMCifInfoBioUnit& bu);
59 
60 
62  const BUInfo& bu_info);
63 
64 }}} // ns
65 
66 #endif // OST_MOL_ALG_BIOUNIT_HH
Protein or molecule.
std::string String
Definition: base.hh:54
ost::mol::EntityHandle CreateBU(const ost::mol::EntityHandle &asu, const ost::io::MMCifInfoBioUnit &bu)
Definition: base.dox:1
const std::vector< std::vector< geom::Mat4 > > & GetTransformations() const
std::vector< String > au_chains
Definition: biounit.hh:47
BUInfo(const ost::io::MMCifInfoBioUnit &bu)
const std::vector< std::vector< String > > & GetAUChains() const
std::vector< int > chain_intvl
Definition: biounit.hh:48
void ToStream(std::ostream &stream) const
std::vector< std::vector< geom::Mat4 > > operations
Definition: biounit.hh:49
std::vector< int > op_intvl
Definition: biounit.hh:50
String ToString() const
void _InitTransforms() const
static BUInfo FromStream(std::istream &stream)
static BUInfo FromString(const String &s)