OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pdbize.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-2020 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_PDBIZE_HH
20 #define OST_MOL_ALG_PDBIZE_HH
21 
22 #include <ost/mol/entity_view.hh>
23 #include <ost/mol/entity_handle.hh>
25 #include <ost/seq/sequence_list.hh>
26 #include "module_config.hh"
27 
28 namespace ost { namespace mol { namespace alg {
29 
30 
31 extern const char* POLYPEPTIDE_CHAIN_NAMES;
32 extern const char* LIGAND_CHAIN_NAME;
33 extern const char* WATER_CHAIN_NAME;
34 
36 public:
37  explicit PDBize(int min_polymer_size=10):
38  peptide_min_size_(min_polymer_size),
39  nucleicacid_min_size_(min_polymer_size),
40  saccharide_min_size_(min_polymer_size), ent_(mol::CreateEntity()),
41  curr_chain_name_(POLYPEPTIDE_CHAIN_NAMES), needs_adjustment_(false),
42  last_rnum_(0)
43  {}
44 
45  explicit PDBize(int peptide_min_size,
46  int nucleicacid_min_size,
47  int saccharide_min_size):
48  peptide_min_size_(peptide_min_size),
49  nucleicacid_min_size_(nucleicacid_min_size),
50  saccharide_min_size_(saccharide_min_size), ent_(mol::CreateEntity()),
51  curr_chain_name_(POLYPEPTIDE_CHAIN_NAMES), needs_adjustment_(false),
52  last_rnum_(0)
53  {}
54 
55  void Add(mol::EntityView asu, const geom::Mat4List& transforms,
56  seq::SequenceList seqres);
57 
58  EntityHandle Finish(bool shift_to_fit=true);
59 private:
60  int peptide_min_size_;
61  int nucleicacid_min_size_;
62  int saccharide_min_size_;
63  EntityHandle ent_;
64  ChainHandle ligand_chain_;
65  ChainHandle water_chain_;
66  const char* curr_chain_name_;
67  bool needs_adjustment_;
68  int last_rnum_;
69  ResNum last_water_rnum_;
70  std::map<ResidueHandle,ResidueHandle> dst_to_src_map_;
71 };
72 
73 }}}
74 #endif
75 
#define DLLEXPORT_OST_MOL_ALG
const char * WATER_CHAIN_NAME
PDBize(int peptide_min_size, int nucleicacid_min_size, int saccharide_min_size)
Definition: pdbize.hh:45
const char * LIGAND_CHAIN_NAME
Protein or molecule.
std::vector< Mat4 > Mat4List
Definition: mat4.hh:141
const char * POLYPEPTIDE_CHAIN_NAMES
linear chain of residues
Definition: chain_handle.hh:52
list of sequences.
definition of EntityView
Definition: entity_view.hh:86
PDBize(int min_polymer_size=10)
Definition: pdbize.hh:37