Changeset 7b1824 for src/Python


Ignore:
Timestamp:
May 19, 2021, 7:06:29 PM (4 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
867fb5
Parents:
6b7765
git-author:
Frederik Heber <frederik.heber@…> (04/22/19 23:02:02)
git-committer:
Frederik Heber <frederik.heber@…> (05/19/21 19:06:29)
Message:

Exporting numpy getter/setter for positions, velocities, forces.

Location:
src/Python
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/Python/Makefile.am

    r6b7765 r7b1824  
    44PYTHONSOURCE = \
    55        Python/exit.cpp \
     6        Python/export_numpy.cpp \
    67        Python/getBoundingBox.cpp \
    78        Python/getDomainVolume.cpp \
  • src/Python/PythonScripting_impl.hpp

    r6b7765 r7b1824  
    1919#include <boost/python/module.hpp>
    2020#include <boost/python/args.hpp>
     21#include <boost/python/numpy.hpp>
    2122
    2223#include "CodePatterns/toString.hpp"
     
    7374} /* namespace MoleCuilder */
    7475
     76void export_numpy();
    7577
    7678BOOST_PYTHON_MODULE(pyMoleCuilder)
     
    8082  atexit(MoleCuilder::detail::module_exit);
    8183
     84  // initialize numpy C-API
     85  boost::python::numpy::initialize();
     86
    8287  // set the docstring of the current module scope
    8388  boost::python::scope().attr("__doc__") = "pyMolecuilder are the python bindings to all Actions of the program suite MoleCuilder.\n\nMoleCuilder is a program to build molecular (dynamics) worlds, allowing you indefinite manipulation, control and analysis over the atoms and molecules within a simulation domain.";
     89
     90  export_numpy();
    8491
    8592  boost::python::def(
Note: See TracChangeset for help on using the changeset viewer.