Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
APBSWrapper.hh
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file core/scoring/ABPSWrapper.fwd.hh
11 /// @brief APBSWrapper class declaration
12 /// @author Sachko Honda (honda@apl.washington.edu)
13 
14 #ifndef INCLUDED_core_scoring_APBSWrapper_HH
15 #define INCLUDED_core_scoring_APBSWrapper_HH
16 
18 #include <utility/pointer/ReferenceCount.hh>
19 
20 // Utility headers
21 #include <numeric/xyzVector.hh>
22 
23 #include <core/types.hh>
25 #include <core/pose/Pose.fwd.hh>
26 #include <vector>
27 #include <string>
28 #include <map>
29 
30 namespace core {
31 namespace scoring {
32 
33 ///-------------------------------------------------------------------------------------
34 /// APBS wrapper
35 //--------------------------------------------------------------------------------------
37 
41 public:
42  APBSWrapper(pose::Pose const & pose,
43  std::map<std::string, bool> const & charged_residues,
44  int dbg, bool calcenergy);
45  virtual ~APBSWrapper();
47 private:
48  // Count the number of non-virtual atoms
49  int count_atoms( pose::Pose const & pose ) const;
50 };
51 ///-------------------------------------------------------------------------------------
52 /// PQR
53 //--------------------------------------------------------------------------------------
55 public:
56  PQR(pose::Pose const &pose, int natoms, std::map<std::string, bool> const & charged_residues);
57  virtual ~PQR();
58  inline int get_natoms() { return natoms_; }
59  static std::string const chains;
60  int natoms_;
61  std::vector<double> x, y, z, charge, radius;
62 };
63 ///-------------------------------------------------------------------------------------
64 /// APBSResult
65 //--------------------------------------------------------------------------------------
67 public:
68  APBSResult(int nsims, int natoms, int grid_dimes[3],
69  int calcforce, int calcenergy,
70  int write_pot, int write_charge, int write_smol,
71  int write_kappa, int write_diel, int write_atompot ) ;
72  virtual ~APBSResult();
73 
74  std::vector<double> esEnergy;
75  std::vector<double> npEnergy;
76  std::vector<double> dx;
77  std::vector<double> dy;
78  std::vector<double> dz;
79  std::vector<double> qfx;
80  std::vector<double> qfy;
81  std::vector<double> qfz;
82  std::vector<double> ibx;
83  std::vector<double> iby;
84  std::vector<double> ibz;
85  std::vector<double> npx;
86  std::vector<double> npy;
87  std::vector<double> npz;
88  std::vector<double> dbx;
89  std::vector<double> dby;
90  std::vector<double> dbz;
91  int nwrites;
92  double grid_meta[13];
93  std::vector< std::vector<double> > grid_data;
94 };
95 ///-------------------------------------------------------------------------------------
96 /// APBSConfig
97 //--------------------------------------------------------------------------------------
99 
100 public:
101 
102  ///---------------------------------------------------------
103  /// I_PARAM
104  ///---------------------------------------------------------
106  {
107  mutable int array[25];
108  public:
109  int sim_type; // 0=mg-manual, 1=mg-auto, 2=mg-parallel
110  int nlev;
111  int grid_centering_mode; // 0=use ccener[0-2], 1=mol 1
112  int coarse_centering_mode; // 0=use ccener[0-2], 1=mol 1
113  int fine_centering_mode;// 0=use ccener[0-2], 1=mol 1
114  int chgm; // 0=sp10, 1=sp12, 2=sp14
115  int pbe_mode; // 0=lpbe, 1=npbe, 2=lrpbe, 3=nrpbe, 4=smpbe
116  int bcfl; //0=zero, 1=sdh, 2=mdh, 4=focus
117  int srfm; //0=mol, 1=smol, 2=sp12, 3=sp14
118  int calcforce; // 0=no, 1=yes
119  int calcenergy; // 0=no, 1=yes
126  int use_pot;
127  int iparam19;
130  int nions;
133  int use_diel;
134 
135  I_PARAM();
136  ~I_PARAM();
137  int * raw_array();
138  };
139 
140  ///---------------------------------------------------------
141  /// R_PARAM
142  ///---------------------------------------------------------
144  {
145  mutable double array[9];
146  public:
148  R_PARAM();
149  ~R_PARAM();
150  double * raw_array();
151  };
152 
153  APBSConfig(pose::Pose const & pose, int natoms, int dbg, bool calcenergy);
154  virtual ~APBSConfig();
155 
156  // APBS debug level
157  int dbg;
158 
159  // Number of simulations
160  int nsims;
161 
162  // Number of atoms
163  int natoms;
164 
165  // Grid generation parameters:
166  double cfac;
167  double fadd;
168  double space;
169 
170  // APBS config parameters
171  double grid[3]; // For manual & energy
172  int dime[3];
173  int pdime[3]; // Non 1 for parallel
174  double glen[3]; // manual only
175  double center[3]; // manual only
176  double cglen[3];
177  double fglen[3];
178  double ccenter[3];
179  double fcenter[3];
180 
181  double ionq[4], ionc[4], ionr[4];
182  double ofrac; // parallel only
185 
186  bool calcenergy; // calculate energy?
187 
188 }; // end of APBSConfig
189 
190 } // scoring
191 } // core
192 #endif