OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
molck.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-2011 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_MOLCK_HH
20 #define OST_MOL_ALG_MOLCK_HH
21 
22 #include <string>
23 #include <ost/mol/entity_handle.hh>
25 
26 namespace {
27  inline std::string BoolToString(bool b)
28  {
29  return b ? "True" : "False";
30  }
31 }
32 
33 namespace ost { namespace mol{ namespace alg {
34 
35 struct MolckSettings;
36 
38 
40  bool rm_non_std;
44  bool colored;
47 
48  MolckSettings(bool init_rm_unk_atoms=false,
49  bool init_rm_non_std=false,
50  bool init_rm_hyd_atoms=true,
51  bool init_rm_oxt_atoms=false,
52  bool init_rm_zero_occ_atoms=false,
53  bool init_colored=false,
54  bool init_map_nonstd_res=true,
55  bool init_assign_elem=true):
56  rm_unk_atoms(init_rm_unk_atoms), // Remove unknown and atoms not following the nomenclature
57  rm_non_std(init_rm_non_std), // Remove all residues not one of the 20 standard amino acids
58  rm_hyd_atoms(init_rm_hyd_atoms), // Remove hydrogen atoms
59  rm_oxt_atoms(init_rm_oxt_atoms), // Remove terminal oxygens
60  rm_zero_occ_atoms(init_rm_zero_occ_atoms), // Remove atoms with zero occupancy
61  colored(init_colored), // Whether the output should be colored
62  map_nonstd_res(init_map_nonstd_res), // Map non standard residues back to standard ones (e.g.: MSE->MET,SEP->SER,etc.)
63  assign_elem(init_assign_elem){} // Clean up element column
64 
65  public:
66  std::string ToString(){
67  std::string rep = "MolckSettings(rm_unk_atoms=" + BoolToString(rm_unk_atoms) +
68  ", rm_unk_atoms=" + BoolToString(rm_unk_atoms) +
69  ", rm_non_std=" + BoolToString(rm_non_std) +
70  ", rm_hyd_atoms=" + BoolToString(rm_hyd_atoms) +
71  ", rm_oxt_atoms=" + BoolToString(rm_oxt_atoms) +
72  ", rm_zero_occ_atoms=" + BoolToString(rm_zero_occ_atoms) +
73  ", colored=" + BoolToString(colored) +
74  ", map_nonstd_res=" + BoolToString(map_nonstd_res) +
75  ", assign_elem=" + BoolToString(assign_elem) +
76  ")";
77  return rep;
78  }
79 
80 };
81 
84 
87  bool rm_unk_atoms,
88  bool rm_non_std,
89  bool rm_hyd_atoms,
90  bool rm_oxt_atoms,
91  bool rm_zero_occ_atoms,
92  bool colored=true);
93 
96 
99  const MolckSettings& settings);
100 
101 
102 }}} // namespace
103 
104 #endif
void MapNonStandardResidues(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib)
MolckSettings(bool init_rm_unk_atoms=false, bool init_rm_non_std=false, bool init_rm_hyd_atoms=true, bool init_rm_oxt_atoms=false, bool init_rm_zero_occ_atoms=false, bool init_colored=false, bool init_map_nonstd_res=true, bool init_assign_elem=true)
Definition: molck.hh:48
Protein or molecule.
boost::shared_ptr< CompoundLib > CompoundLibPtr
Definition: compound_lib.hh:34
void RemoveAtoms(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib, bool rm_unk_atoms, bool rm_non_std, bool rm_hyd_atoms, bool rm_oxt_atoms, bool rm_zero_occ_atoms, bool colored=true)
std::string ToString()
Definition: molck.hh:66
void CleanUpElementColumn(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib)
void Molck(ost::mol::EntityHandle &ent, ost::conop::CompoundLibPtr lib, const MolckSettings &settings)