File: bind_constants.hpp

package info (click to toggle)
apbs 3.4.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 199,188 kB
  • sloc: ansic: 284,988; cpp: 60,416; fortran: 44,896; xml: 13,895; sh: 13,838; python: 8,105; yacc: 2,922; makefile: 1,428; f90: 989; objc: 448; lex: 294; awk: 266; sed: 205; java: 134; csh: 79
file content (22 lines) | stat: -rw-r--r-- 812 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

/**
 * @file tools/python-pybind/bind_constants.hpp
 * @author Asher Mancinelli <asher.mancinelli@pnnl.gov>
 * @brief Contains bindings for exported constants.
 *
 * @note The constants exported here were simply the same ones exported by the
 * original SWIG python interface.
 *
 * @see tools/python/apbslib.c
 */

inline void bind_constants(py::module& m)
{
  m.attr("NPT_ENERGY") 		    = py::int_(static_cast<int>(NPT_ENERGY));
  m.attr("NPT_FORCE") 		    = py::int_(static_cast<int>(NPT_FORCE));
  m.attr("NPT_ELECENERGY") 		= py::int_(static_cast<int>(NPT_ELECENERGY));
  m.attr("NPT_ELECFORCE") 		= py::int_(static_cast<int>(NPT_ELECFORCE));
  m.attr("NPT_APOLENERGY") 		= py::int_(static_cast<int>(NPT_APOLENERGY));
  m.attr("NPT_APOLFORCE") 		= py::int_(static_cast<int>(NPT_APOLFORCE));
}