Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
1cf992c
Attempting merge of pycv in v2.6
tonigi Oct 17, 2019
9d3542b
install PYCV prereqs and set PYTHON_BIN to python3
tonigi Oct 18, 2019
0444286
workaround the request for documenting components by adding the "py-"…
tonigi Oct 18, 2019
e3467bc
Delete README.md.upstream
tonigi Oct 18, 2019
5797ead
plumed-nest entry
tonigi Oct 18, 2019
04be32d
Update README.md
tonigi Oct 21, 2019
440212e
Merge tag 'v2.6.0' into v2.6-pycv-devel
tonigi May 23, 2020
7fa1259
update pybind to 2.5.0
tonigi May 23, 2020
e95e894
readme
tonigi May 23, 2020
bf6681f
readme
tonigi May 23, 2020
dd08b9f
add versions
tonigi May 23, 2020
147d476
add versions
tonigi May 23, 2020
f627fac
Merge tag 'v2.8.0' into v2.8-pycv-devel
tonigi Sep 5, 2022
1d64a49
regtest fixed
tonigi Sep 5, 2022
d023fd5
Attempting merge of pycv in v2.6
tonigi Oct 17, 2019
135d4cd
install PYCV prereqs and set PYTHON_BIN to python3
tonigi Oct 18, 2019
26439da
workaround the request for documenting components by adding the "py-"…
tonigi Oct 18, 2019
3e94e0e
Delete README.md.upstream
tonigi Oct 18, 2019
59bd537
plumed-nest entry
tonigi Oct 18, 2019
77e37a9
Update README.md
tonigi Oct 21, 2019
c7de834
update pybind to 2.5.0
tonigi May 23, 2020
007550b
add versions
tonigi May 23, 2020
66c8842
add versions
tonigi May 23, 2020
7dd5033
regtest fixed
tonigi Sep 5, 2022
517846c
update pybind 2.10.0
tonigi Sep 5, 2022
e6f9e17
travis restore
tonigi Sep 5, 2022
56990ca
add --embed for python
tonigi May 15, 2023
2946065
Merge remote-tracking branch 'origin/v2.8-pycv-devel' into pycvComm
Iximiel May 16, 2023
40b852a
remove possibly unused options for conda builds
tonigi May 16, 2023
fdada51
modernized the python interface
Iximiel Jun 9, 2023
9023646
updated gitignores
Iximiel Jun 9, 2023
ccd238d
added a test for the scopedIntepreter
Iximiel Jun 9, 2023
fa0c671
adjusted the tests
Iximiel Jun 13, 2023
e6e35f9
Merge branch 'v2.8-pycv-devel' of https://github.com/giorginolab/plum…
Iximiel Jun 14, 2023
5adb806
the base functionality is there
Iximiel Jun 19, 2023
9157624
now without verbose overloads
Iximiel Jun 19, 2023
aab51cf
setting up a better interface
Iximiel Jun 20, 2023
62cfede
passes the tests :)
Iximiel Jun 20, 2023
fd34d9a
small cosmetic changes
Iximiel Jun 20, 2023
40f6629
adding some "unit tests" to pyVector3d
Iximiel Jun 20, 2023
fc790dc
added and tested the interface to getPositions
Iximiel Jun 21, 2023
7c669a6
consolidating tests
Iximiel Jun 21, 2023
a3a28ea
added a toNumpy method for vector3D
Iximiel Jun 21, 2023
87a676c
the example should figure more clear now
Iximiel Jun 28, 2023
5a21e2b
added a test for the pbcs
Iximiel Aug 1, 2023
96a4006
now you can get the atomic positions as a np array
Iximiel Sep 21, 2023
22f1dbb
moved the embedded module in a separate source
Iximiel Sep 22, 2023
6e321ec
added an interface to the Pbcs
Iximiel Sep 22, 2023
6127962
moved test for clarity
Iximiel Sep 25, 2023
cf37bb8
adding getBox and getInvBox
Iximiel Sep 25, 2023
77393b9
Squashed commit of the following:
Iximiel Sep 27, 2023
1702a06
run astyle
Iximiel Sep 27, 2023
b0fa124
Changed the multicomponent return format
Iximiel Oct 2, 2023
cc3a06f
added the skeleton for the update func
Iximiel Oct 2, 2023
fa9d204
added a way to make data persist
Iximiel Oct 3, 2023
8b8a5dd
added charge and mass accessors but no tests
Iximiel Oct 12, 2023
74ae9de
added charge and mass accessors but no tests
Iximiel Oct 12, 2023
f413d99
Merge branch 'pycvCommUpdate' of https://github.com/Iximiel/plumed2 i…
Iximiel Oct 12, 2023
f0b7cce
first draft for the NL
Iximiel Oct 16, 2023
5f5b4c8
NL works, adding a test-example for the coordination
Iximiel Oct 17, 2023
5201992
the COORDINATIOn works (but no virial and devs)
Iximiel Oct 17, 2023
6a8d31a
added virial (for single value)
Iximiel Oct 17, 2023
009fd89
astyle'd
Iximiel Oct 17, 2023
488d303
setup rt-coord to test the virial
Iximiel Oct 17, 2023
f506f67
now the comment is more truthful
Iximiel Oct 17, 2023
5c85ab4
merged and changed how to compile the so
Iximiel Nov 9, 2023
3748b78
unification of the return interface
Iximiel Nov 9, 2023
f6ceb91
udpated tests + added list or tuple compatibility for return
Iximiel Nov 9, 2023
5d6f44a
added getAbsoluteIndex
Iximiel Nov 9, 2023
5fa428d
change in how AbsoluteIndexes are got
Iximiel Nov 10, 2023
e613092
preparing to add array getter for mass and charges
Iximiel Nov 10, 2023
d20ad68
Merge branch 'pycvCommUpdate' into pycvColvarMethods
Iximiel Nov 10, 2023
8fa06c5
added masses an charges array
Iximiel Nov 10, 2023
10a37b4
f Added some infomration on the ongoing MD
Iximiel Nov 10, 2023
f2560c0
set up the tests to be easier to work with
Iximiel Nov 10, 2023
5bb6bd7
set up the test for makeWhole
Iximiel Nov 14, 2023
5aa8f97
some reordering in the code
Iximiel Nov 14, 2023
197ba8b
moved the tree of pycv
Iximiel Nov 14, 2023
d9c0768
removed pybind11 from the directory
Iximiel Nov 14, 2023
59de055
moved the tree of pycv
Iximiel Nov 14, 2023
de7f0ab
set up a rationale for installation/compilation
Iximiel Nov 14, 2023
2e93bc9
moved also the tests
Iximiel Nov 14, 2023
018426b
clearer readme
Iximiel Nov 14, 2023
c557bec
Merge remote-tracking branch 'home/master' into pycvTree
Iximiel Nov 16, 2023
82e47b2
updated the LOAD to use the GLOBAL kw
Iximiel Nov 16, 2023
40caacd
preparing init for returning dictionary
Iximiel Nov 16, 2023
da034dd
Squashed commit of the following:
Iximiel Nov 23, 2023
b694f39
added a "doc" example
Iximiel Nov 23, 2023
4e8e14a
setting up function
Iximiel Nov 23, 2023
9e5b2e0
Squashed commit of the following:
Iximiel Nov 23, 2023
be6f6c9
preparinf for the emebedding
Iximiel Nov 23, 2023
77e548c
tested mdInfo in function
Iximiel Nov 24, 2023
847b106
now the function is embedded
Iximiel Nov 24, 2023
48295bc
changed how to threat errors, types and some movements
Iximiel Nov 24, 2023
8d726d1
added a test for func derivatives
Iximiel Nov 24, 2023
4b690d3
added arguments returned as ndarray
Iximiel Nov 24, 2023
8f98761
added components to pcvFunc
Iximiel Nov 24, 2023
f9aca88
applyed astyle
Iximiel Nov 24, 2023
87cb499
applyed astyle
Iximiel Nov 24, 2023
6ec0d6c
added some methods for function arguments
Iximiel Nov 24, 2023
8d5dfba
moved pycv in a 'plugins' folder
Iximiel Nov 29, 2023
bc2a118
Removing modifications to the respect of the master branch
Iximiel Nov 29, 2023
7a34d29
rmoved the old pycv tests
Iximiel Nov 29, 2023
30d61b9
merging the readmes
Iximiel Nov 29, 2023
dc8eb9f
Updated the readme
Iximiel Nov 29, 2023
6043802
expanding the manual
Iximiel Nov 29, 2023
f4f7cfc
expanding the manual : function calls
Iximiel Nov 29, 2023
b15beeb
expanding the readme
Iximiel Nov 30, 2023
fb75697
SimplerAbsolute Indexes, squashed commit of the following:
Iximiel Nov 30, 2023
b793209
added "make check" also in the plugin dir
Iximiel Nov 30, 2023
bedfc59
trying to improve the readability of the pyModule
Iximiel Nov 30, 2023
12a82f3
removed a few warning, changed some license headers
Iximiel Nov 30, 2023
facfc7d
tested len(NL) and changed how size is returned
Iximiel Nov 30, 2023
1678683
finished the "minidocumentation" in the readme
Iximiel Nov 30, 2023
8a4d1f9
moved the interface documentation
Iximiel Nov 30, 2023
4a364cf
corrected some some typeo
Iximiel Nov 30, 2023
bbe4dc5
corrected some change agains master
Iximiel Nov 30, 2023
3b19bed
cleaning the pycv dir
Iximiel Nov 30, 2023
0e08723
removed hidden visibility warning in compilation
Iximiel Dec 1, 2023
bd3b180
Removed the warnings with the currently active flags
Iximiel Dec 1, 2023
6a5d48b
removed jax test
Iximiel Dec 4, 2023
665429f
Added PyCV to the standard plumed CI
Iximiel Dec 6, 2023
cd1e878
reverted an error in the CI
Iximiel Dec 6, 2023
2111ea0
removed aspace change in the linux WF
Iximiel Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/dockerWF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ jobs:
- name: Build and run tests
run: |
make -C docker ${{ matrix.variant }}
- name: PyCV tests
run: |
make -C docker ${{ matrix.variant }}-pycv
12 changes: 11 additions & 1 deletion .github/workflows/linuxWF.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- -coverage-mpi-
- -debug-
- -debug-mpi-
- -pycv-mpi-
# temporarily commented out
# see https://github.com/plumed/plumed2/issues/976
# - -intel-
Expand Down Expand Up @@ -148,7 +149,7 @@ jobs:
make nmcheck
ccache -s -M 100M
- name: Run tests
if: ${{ ! contains( matrix.variant, '-doc-mpi-' ) }}
if: ${{ ! contains( matrix.variant, '-doc-mpi-' ) && ! contains( matrix.variant, '-pycv-mpi-' ) }}
run: |
(while true; do # see https://github.com/actions/virtual-environments/issues/1860
df -h
Expand Down Expand Up @@ -181,3 +182,12 @@ jobs:
GIT_TOKEN: ${{ secrets.GIT_TOKEN_PLUMEDBOT }}
run: |
.ci/push doc
- name: Compile and test pycv
if: contains( matrix.variant, '-pycv-' )
working-directory: ./plugins/pycv/
run: |
pip install --user pybind11
source ../../sourceme.sh
ln -s $(realpath ../../regtest/scripts) ./regtest/scripts
./prepareMakeForDevelop.sh
make check
14 changes: 10 additions & 4 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@

.PHONY: ubuntu plumed2.tgz clean fedora38 rocky8
.PHONY: ubuntu plumed2.tgz clean fedora38 fedora38-pycv rocky8 rocky8-pycv

ubuntu: plumed2.tgz
docker build -t plumed .
docker build -t plumed --progress=plain .

fedora38: plumed2.tgz
docker build -t plumed -f fedora38 .
docker build -t plumed:fedora38 --progress=plain -f fedora38 .
fedora38-pycv: plumed2.tgz
docker build -t plumed:fedora38-pycv --progress=plain -f fedora38-pycv .


rocky8: plumed2.tgz
docker build -t plumed -f rocky8 .
docker build -t plumed:rocky8 --progress=plain -f rocky8 .

rocky8-pycv: plumed2.tgz
docker build -t plumed:rocky8-pycv --progress=plain -f rocky8-pycv .

plumed2.tgz:
cd ../ ; git archive HEAD -o "$(CURDIR)"/plumed2.tgz --prefix plumed2/ ; cd -
Expand Down
1 change: 0 additions & 1 deletion docker/fedora38
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ RUN . /etc/bashrc \
&& ./configure --enable-modules=all --enable-boost_serialization \
&& make -j 4 \
&& make check

11 changes: 11 additions & 0 deletions docker/fedora38-pycv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM plumed:fedora38

RUN source /etc/bashrc \
&& module load mpi \
&& cd plumed2 \
&& source ./sourceme.sh \
&& cd plugins/pycv \
&& pip3 install pybind11 \
&& ln -s $(realpath ../../regtest/scripts) ./regtest/scripts \
&& ./prepareMakeForDevelop.sh \
&& make check
33 changes: 25 additions & 8 deletions docker/rocky8
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,41 @@ RUN yum -y update \
&& dnf config-manager --set-enabled powertools \
&& yum -y group install "Development Tools" \
&& yum -y install environment-modules gawk vim wget \
lapack-devel blas-devel zlib-devel gsl-devel fftw-devel openmpi-devel boost-devel \
python3 python3-devel python3-pip \
&& pip3 install pillow==8.3.2 \
&& pip3 install numpy==1.19 \
&& pip3 install "cython<3" numpy pandas mdtraj \
&& pip3 install MDAnalysis==1.0.0
lapack-devel blas-devel zlib-devel gsl-devel fftw-devel openmpi-devel boost-devel \
openssl-devel libffi-devel

RUN useradd -ms /bin/bash plumed
#These are needed for installing python

USER plumed
WORKDIR /home/plumed

#Install python with --embedded
#COPY installPythonForDocker.sh /home/plumed
RUN PYVERSION="3.9.16" \
&& curl -LO https://www.python.org/ftp/python/${PYVERSION}/Python-${PYVERSION}.tgz \
&& tar xzf Python-${PYVERSION}.tgz \
&& cd Python-${PYVERSION} \
&& ./configure --enable-shared --prefix=$HOME/.local \
&& make -j 4 \
&& make install \
&& echo "export LD_LIBRARY_PATH=$HOME/.local/lib/${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" >> "$HOME/.bashrc"

RUN . ./.bashrc \
&& pip3 install --user -U pip \
&& pip3 install --user pillow==8.3.2 \
&& pip3 install --user "Cython<3" \
&& pip3 install --user pandas \
&& pip3 install --user mdtraj \
&& pip3 install --user MDAnalysis==1.0.0
# && pip3 install --user numpy==1.19

# import plumed code.
# assumes a file plumed2.tgz is present in the Dockerfile directory
COPY plumed2.tgz /home/plumed

# build and test plumed (no install)
RUN . /etc/bashrc \
RUN . ./.bashrc \
&& module load mpi \
&& export OMPI_MCA_btl_base_warn_component_unused=0 \
&& export OMPI_MCA_btl_base_verbose=0 \
Expand All @@ -42,4 +60,3 @@ RUN . /etc/bashrc \
&& ./configure --enable-modules=all --enable-boost_serialization \
&& make -j 4 \
&& make check

11 changes: 11 additions & 0 deletions docker/rocky8-pycv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM plumed:rocky8

RUN source ./.bashrc \
&& module load mpi \
&& cd plumed2 \
&& source ./sourceme.sh \
&& cd plugins/pycv \
&& pip3 install --user pybind11 \
&& ln -s $(realpath ../../regtest/scripts) ./regtest/scripts \
&& ./prepareMakeForDevelop.sh \
&& make check
4 changes: 4 additions & 0 deletions plugins/pycv/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Make.inc
*.o
*.so
env
142 changes: 142 additions & 0 deletions plugins/pycv/ActionWithPython.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copyright (c) 2019 of Toni Giorgino

The pycv module is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

The pycv module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with plumed. If not, see <http://www.gnu.org/licenses/>.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

#include "ActionWithPython.h"

#include "core/ActionWithValue.h"

#include <pybind11/embed.h> // everything needed for embedding
#include <pybind11/numpy.h>

#include <iostream>


namespace py = pybind11;


namespace PLMD {
namespace pycv {


// We can only have one interpreter globally. This is less than ideal
// because CVs can interfere with each other. The whole purpose of
// this superclass is to make a singleton. Putting it in the
// constructor makes it so that the interpreter is only initialized if
// one of the PYCV actions are used.
// https://pybind11.readthedocs.io/en/stable/reference.html#_CPPv422initialize_interpreterb

unsigned PlumedScopedPythonInterpreter::use_count=0;
std::unique_ptr<py::scoped_interpreter> PlumedScopedPythonInterpreter::interpreterGuard =
nullptr;
std::mutex PlumedScopedPythonInterpreter::interpreterMutex{};

PlumedScopedPythonInterpreter::PlumedScopedPythonInterpreter(::PLMD::Log&outlog)
:log(outlog) {
std::lock_guard<std::mutex> lk(interpreterMutex);
if(use_count==0 && Py_IsInitialized()) {
//this addresses the "calling pycv within a python interpreter problem"
++use_count;
}

if(use_count==0) {
std::cerr<< "------ initialized Python interpreter\n";
log<< "------ initialized Python interpreter\n";
interpreterGuard = std::make_unique<py::scoped_interpreter>();
} else {
std::cerr << "------ Python interpreter already initializated\n";
log << "------ Python interpreter already initializated\n";
}
++use_count;
}

PlumedScopedPythonInterpreter::~PlumedScopedPythonInterpreter() {
// Finalization is tricky, because it should happen AFTER the
// destruction of ALL the python declared variables
std::lock_guard<std::mutex> lk(interpreterMutex);
--use_count;
if(use_count==0) {
interpreterGuard.reset(nullptr);
std::cerr << "------ Python interpreter finalized\n";
log << "------ Python interpreter finalized\n";
}
}

ActionWithPython::ActionWithPython (const ActionOptions&ao)
:Action(ao),guard(log) {}

void ActionWithPython::pyParseFlag(const char* key, const ::pybind11::dict &initDict, bool& returnValue) {
parseFlag(key, returnValue);
if(initDict.contains(key)) {
bool defaultRet;
keywords.getLogicalDefault(key,defaultRet);
if (returnValue!=defaultRet) {
error(std::string("you specified the same keyword ").append(key)+ " both in python and in the settings file");
}
returnValue = initDict[key].cast<bool>();
}
}
/******************************************************************************/
//Value/components init
void initializeValue(::PLMD::ActionWithValue& action,pybind11::dict &settingsDict) {
action.log << " will have a single component";
bool withDerivatives=false;
if(settingsDict.contains("derivative")) {
withDerivatives=settingsDict["derivative"].cast<bool>();
}
if(withDerivatives) {
action.addValueWithDerivatives();
action.log << " WITH derivatives\n";
} else {
action.addValue();
action.log << " WITHOUT derivatives\n";
}
}

void initializeComponent(::PLMD::ActionWithValue& action,const std::string&name,py::dict &settingsDict) {
bool withDerivatives=false;
if(settingsDict.contains("derivative")) {
withDerivatives=settingsDict["derivative"].cast<bool>();
}

if(withDerivatives) {
action.addComponentWithDerivatives(name);
action.log << " WITH derivatives\n";
} else {
action.addComponent(name);
action.log << " WITHOUT derivatives\n";
}
}

void valueSettings(py::dict &settings, Value* valPtr) {
if(settings.contains("period")) {
if (settings["period"].is_none()) {
valPtr->setNotPeriodic();
} else {
py::tuple t = settings["period"];
if(t.size()!=2) {
plumed_merror("period must have exactly 2 components");
}
//the ballad py::str(t[0]).cast<std::string>() is to not care about the type of input of the user
std::string min=py::str(t[0]).cast<std::string>();
std::string max=py::str(t[1]).cast<std::string>();
valPtr->setDomain(min, max);
}
}
}

} // namespace pycv
} // namespace PLMD
81 changes: 81 additions & 0 deletions plugins/pycv/ActionWithPython.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copyright (c) 2019 of Toni Giorgino

The pycv module is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

The pycv module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with plumed. If not, see <http://www.gnu.org/licenses/>.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
#ifndef __PLUMED_pycv_ActionWithPython_h //{
#define __PLUMED_pycv_ActionWithPython_h

#include <mutex>
#include <string>

#include "core/Action.h"

#include <pybind11/embed.h> // everything needed for embedding

namespace PLMD {
class Value;
namespace pycv {

using pycvComm_t = double;
static constexpr auto PYTHONCV_CITATION = "Giorgino, (2019). PYCV: a PLUMED 2 Module Enabling the Rapid Prototyping of Collective Variables in Python. Journal of Open Source Software, 4(42), 1773. doi:10.21105/joss.01773";
static constexpr auto BIASING_DISABLED = "PYCV: Gradient was expected as a second return value but is missing. Biasing won't work\n";
static constexpr std::string_view PYCV_COMPONENTPREFIX="py";

///This class act both as a guard for the interpreter and a a case container for the python module and functions
class PlumedScopedPythonInterpreter final {
public:
PlumedScopedPythonInterpreter(::PLMD::Log&);
~PlumedScopedPythonInterpreter();
private:
::PLMD::Log& log;
static unsigned use_count;
static std::unique_ptr<::pybind11::scoped_interpreter> interpreterGuard;
static std::mutex interpreterMutex;
};

class ActionWithPython: public virtual ::PLMD::Action {
//the guard MUST be set up before the python objects
// (so that it can be destroyed after them)
PlumedScopedPythonInterpreter guard;
public:
explicit ActionWithPython (const ActionOptions&);
///redefinition of parse to avoid confict between plumed.dat and python options
template<typename T>
void pyParse(const char* key, const ::pybind11::dict &initDict, T& returnValue);
///redefinition of parseFlag to avoid confict between plumed.dat and python options
void pyParseFlag(const char* key, const ::pybind11::dict &initDict, bool& returnValue);
};

template<typename T>
void ActionWithPython::pyParse(
const char* key, const ::pybind11::dict &initDict, T& returnValue) {
T initVal(returnValue);
parse(key,returnValue);
//this is not robust, but with no access to Action::line we cannot use Tools::findKeyword
if(initDict.contains(key)) {
if (returnValue != initVal) {
error(std::string("you specified the same keyword ").append(key)+ " both in python and in the settings file");
}
returnValue = initDict[key].cast<T>();
}
}

void initializeValue(::PLMD::ActionWithValue&, pybind11::dict &);
void initializeComponent(::PLMD::ActionWithValue&,const std::string&,pybind11::dict &);
void valueSettings( pybind11::dict &r, Value* valPtr);

} // namespace pycv
} // namespace PLMD
#endif //__PLUMED_pycv_ActionWithPython_h //}
14 changes: 14 additions & 0 deletions plugins/pycv/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (c) 2019 of Toni Giorgino

The pycv module is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

The pycv module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with plumed. If not, see <http://www.gnu.org/licenses/>.
Loading