MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
orbital.h
1//
2// orbital.h
3//
4// Copyright (C) 1997 Limit Point Systems, Inc.
5//
6// Author: Curtis Janssen <cljanss@limitpt.com>
7// Maintainer: LPS
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _chemistry_qc_wfn_orbital_h
29#define _chemistry_qc_wfn_orbital_h
30
31#include <math/isosurf/volume.h>
32#include <chemistry/qc/wfn/obwfn.h>
33#include <chemistry/qc/wfn/orbitalspace.h>
34#include <math/mmisc/grid.h>
35
36namespace sc {
37
38class Orbital: public Volume {
39 protected:
41 int orbital_;
42
43 virtual void compute();
44 public:
45 Orbital(const Ref<KeyVal>&);
46 Orbital(const Ref<OneBodyWavefunction>&, int orbital);
47 ~Orbital();
48 virtual void boundingbox(double valuemin,
49 double valuemax,
50 SCVector3& p1, SCVector3& p2);
51};
52
55class WriteOrbital: public WriteGrid {
56 protected:
58 int orbital_;
59
60 void label(char* buffer);
63 void initialize();
64
65 public:
82
85
95 double resolution = 0.2,
96 double margin = 1.0);
97};
98
103 private:
104 struct OrbitalMap : public DimensionMap {
105 std::vector<int> map;
106 int operator()(int o) const { return map[o]; }
107 std::size_t ndim() const { return map.size(); }
108 };
109 protected:
110 // provide either obwfn+omap or orbs
112 OrbitalMap omap_;
113 Ref<OrbitalSpace> orbs_;
114
115 void label(char* buffer);
117 void calculate_values(const std::vector<SCVector3>& Points, std::vector<double>& Values);
118 std::size_t ndim() const { return omap_.ndim(); }
119 const DimensionMap& dimension_map() const { return omap_; }
121 public:
150 WriteOrbitals(const Ref<OrbitalSpace> & orbs, const std::vector<int>& labels, const Ref<sc::Grid> & grig,
151 std::string gridformat, std::string gridfile);
153};
154
155
156}
157
158#endif
159
160// Local Variables:
161// mode: c++
162// c-file-style: "CLJ"
163// End:
Definition orbital.h:38
virtual void compute()
Recompute at least the results that have compute true and are not already computed.
A template class that maintains references counts.
Definition ref.h:361
a 3-element version of SCVector
Definition vector3.h:44
A Volume is a Function of three variables.
Definition volume.h:38
The abstract WriteGrid class provides an interface for writing the value of a scalar function evaluat...
Definition grid.h:85
The WriteOrbital class writes an orbital at user defined grid points to the standard output or to a s...
Definition orbital.h:55
static Ref< KeyVal > process_keyval_for_base_class(const Ref< KeyVal > kv)
if needed, creates default grid for the base class using the molecule of obwfn
void initialize()
Prepares some pre-caculated values before the repetitive grid calculations are perfomed.
void label(char *buffer)
A label that identifies the scalar function evaluated at the grid points, is written to the buffer ar...
double calculate_value(SCVector3 point)
Returns the value of the scalar function at the given coordinate.
static Ref< Grid > make_default_grid(const Ref< Molecule > &mol, double resolution=0.2, double margin=1.0)
constructs a default grid for the given molecule, using VDWShape for mol.
Ref< Molecule > get_molecule()
Returns the molecule around which the grid values are calculated.
WriteOrbital(const Ref< KeyVal > &)
The KeyVal constructor uses all keywords of WriteGrid, plus the following additional keywords:
The WriteOrbitals class writes orbitals at user defined grid points to the standard output or to a se...
Definition orbital.h:102
WriteOrbitals(const Ref< OrbitalSpace > &orbs, const std::vector< int > &labels, const Ref< sc::Grid > &grig, std::string gridformat, std::string gridfile)
Evaluates orbitals orbs on grid and writes them to gridfile in format gridformat.
Ref< Molecule > get_molecule()
Returns the molecule around which the grid values are calculated.
WriteOrbitals(const Ref< KeyVal > &)
The KeyVal constructor accepts keywords of WriteVectorGrid and the following additional keywords.
void label(char *buffer)
A label that identifies the scalar function evaluated at the grid points, is written to the buffer ar...
const DimensionMap & dimension_map() const
dimension map
Definition orbital.h:119
void initialize()
Prepares some pre-calculated values before the repetitive grid calculations are perfomed.
std::size_t ndim() const
number of dimensions of the vector
Definition orbital.h:118
void calculate_values(const std::vector< SCVector3 > &Points, std::vector< double > &Values)
Returns the value of the vector function at the given coordinate.
WriteVectorGrid provides an interface for writing the value of a vector function evaluated at a given...
Definition grid.h:145
std::vector< int > map(const GaussianBasisSet &B, const GaussianBasisSet &A)
same as operator<<, except A does not have to be contained in B, map[a] = -1 if function a is not in ...
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.