Skip to content
Snippets Groups Projects
  1. Apr 05, 2019
  2. Feb 27, 2019
  3. Feb 26, 2019
    • Giovanni Bussi's avatar
      Allow passing raw arrays. · 18452f91
      Giovanni Bussi authored
      In addition to numpy arrays, I make it possible to pass plain python arrays.
      18452f91
    • Giovanni Bussi's avatar
      Removed numpy from requirements · dcc05dd1
      Giovanni Bussi authored
      I think the inclusion of numpy headers was related to non used variables
      forgotten from an intermediate implementation.
      I just removed them. In this manner it is not necessary that numpy is
      already installed when plumed extension is compiled.
      
      Numpy would be anyway required to run our test.
      dcc05dd1
  4. Feb 22, 2019
  5. Feb 21, 2019
  6. Nov 30, 2018
  7. Nov 29, 2018
  8. Nov 28, 2018
  9. Nov 27, 2018
    • Giovanni Bussi's avatar
      Added py-plumed in MacPorts · d5ddc81a
      Giovanni Bussi authored
      I made a few more changes to setup.py in order to work with MacPorts.
      This allowed me to add a temporary Portfile for py-plumed
      that is now used in travis tests.
      
      The plan is to submit this Portfile to MacPorts after we release v2.5
      
      Notice that one test is duplicated (python/test) in order to be available
      when using nosetests from python.
      d5ddc81a
  10. Nov 20, 2018
    • Giovanni Bussi's avatar
      Improvements to allow for pip install · bebec55c
      Giovanni Bussi authored
      - renamed script to setup.py
      - Use "make pip" to copy required files in this dir for pip
      - Use try/except when importing numpy and cython so as to notify the user
      - renamed env vars to plumed_xxx so that there is no risk of clashes
      
      Plumed can now also be installed using
      
      cd python
      make pip
      pip install --user .
      
      make pip is just needed to bring version information and Plumed.h
      in this directory. Might be solved differently in MacPorts / Pypi.
      bebec55c
    • Giovanni Bussi's avatar
      Added dlopen constructors to python interface · d980421c
      Giovanni Bussi authored
      This allows creating plumed objects with
      
      p=plumed.Plumed(kernel="/path/to/libplumedKernel.so")
      
      Not strictly necessary, but might be useful to allow more
      flexibility.
      d980421c
    • Giovanni Bussi's avatar
      Made python wrapper self-contained · feb3fb9c
      Giovanni Bussi authored
      It does not link to library anymore, but just includes Plumed.h file.
      It thus could be compiled with different compilers and flags wrt plumed.
      
      Notice that as of PLUMED 2.5 Plumed.h also contains the full implementation
      of the dynamic loader, so it is sufficient to define the proper cpp
      flags in order to recompile the loader and avoiding the need to link
      plumedWrapper.a.
      
      This basically allows the python wrapper to be selfcontained and installable
      before having installed plumed.
      feb3fb9c
  11. Nov 12, 2018
    • Giovanni Bussi's avatar
      Using C++ interface in python · c4303330
      Giovanni Bussi authored
      I think python should use the C++ interface rather than the C one.
      The reason is that the C++ interface included in PLUMED 2.5
      rethrows exceptions and thus can be used to load
      a shared library compiled with a different compiler or
      linked against a different standard library.
      
      In perspective, this will allow compiling PLUMED with
      a different compiler/library than that used to compile
      python itself.
      c4303330
  12. Oct 31, 2018
    • Giovanni Bussi's avatar
      Fix #402 · dd7073f6
      Giovanni Bussi authored
      Set LD_LIBRARY_PATH before running plumed when compiling python
      interface
      dd7073f6
  13. Jun 06, 2018
    • Giovanni Bussi's avatar
      Use two-level namespace link on osx · 6f21d018
      Giovanni Bussi authored
      Now that libplumedKerneldylib does not depend anymore on libplumed.dylib
      it is possible to use two-level namespace on osx.
      
      This change has two implications:
      - the shared library used to resolve symbols during linking is recorded
        and used at runtime.
      - all symbols should be available at link time
      
      A side effect of this is that while compiling dylibs for the LOAD
      action we should link them to the libplumedKernel as well.
      For consistency I do the same on Linux, though it is not necessary in principle.
      6f21d018
  14. Oct 01, 2017
  15. Sep 20, 2017
    • Giovanni Bussi's avatar
      Passing variables to python build · 0b68f476
      Giovanni Bussi authored
      Variables are passed as environment variables from Makefile,
      where they can be constructed using Makefile variables.
      
      This solves some problems I had with python2.7 not able to parse
      correctly the Makefile.conf file. In addition, it looks like correct
      directories are used also when plumed is already installed.
      
      Also notice that the plumed executable is now only invoked
      to retrieve the version number and that it is invoked with the
      correct path, so that a previously installed plumed will
      not be in the way.
      0b68f476
    • Giovanni Bussi's avatar
      Fixed non ASCII character · c6e36f4f
      Giovanni Bussi authored
      It was giving troubles on my mac with py2.7
      c6e36f4f
    • Giovanni Bussi's avatar
    • Giovanni Bussi's avatar
      Added support for PYTHON_BIN configure variable. · 15708dc7
      Giovanni Bussi authored
      Use ./configure PYTHON_BIN=python2.7 to specify a version. Can
      be either relative path or full path. If undefined, configure will
      search from a list of names (currently, only name "python" is searched).
      
      Notice that cython command is not searched, since it is not actually used
      to build the interface. The test is rather done on the availability
      of the Cython module and other required modules.
      
      Moreover, I moved the test down in the list, after all the libraries
      15708dc7
  16. Sep 16, 2017
    • Gareth Tribello's avatar
      Python interface (#262) · 98650e1b
      Gareth Tribello authored
      * Added first working python interface
      
      * Tidied up python interface
      
      * Further simplification of python
      
      * Added example which should be deleted later
      
      * Added functions for getting values from plumed to python
      
      * Added regression test for python interface
      
      * Added mechanism to return exceptions from plumed to python
      
      * First commit of experimental stuff to catch exceptions in python correctly
      
      * Got rid of unecessarily duplicated method in PlumedMain
      
      * Fixed crazy MAC input encoding
      
      * Oops, had also broken the script..
      
      * Removed debug messages. Works on Ubuntu Linux
      
      Linus rules. Apple sucks.
      
      * Fixed PlumedMain passing of data from plumed to outside code
      
      * Hard coded real precision for python interface - this should have been with the last commit
      
      * Added first go at working makefile for python interface
      
      * Added options to configure to build python interface from makefile
      
      * Small changes to where loading of python interface is done
      
      * Removed unecessary wrapper c++ function from python interface
      
      * Made python install work in a way that is consistent with the rest of plumed
      
      * Added pythonpath to travis.yml
      
      * Added installation of Cython to travis.yml
      
      * Added ifdef block to stop cppcheck throwing an error
      
      * Using uniqu_ptr for DataFetching object in PlumedMain
      
      * Added install command for numpy to travis
      
      * Added string to tell me whether plumed+python is being built
      
      * Small change in travis.yml file to see if I can get python compile working
      
      * Compilers for cython are now specified from Makefile.conf
      
      * Now printing stuff on environment to try to work out why linking doesn't work
      
      * A new attempt to fix the travis-ci issues
      
      * Got rid of troubling TRAVIS_PYTHON_FLAG
      
      * Small change to see if we can get this to work on travis
      
      * Now setting LDSHARED from LDSO in makefile
      
      * Added something to print everything in the python path when we run the python test
      
      * Fixed python path in travis.yml
      
      * Removed stuff for debugging configuration on travis
      
      * Customized conda install (for python) in travis.yml so that osx version is installed for osx and linux version is installed for linux
      
      * Set TMPDIR in .travis.yml to hopefully get osx to compile PLUMED + Python
      
      * Made it so that python interface is rebuilt when user does make install so that correct paths are used
      
      * Made it so that python interface is rebuilt in staging area during install procedure
      
      * Corrected regtest script so that python tests are dealt with the same as everything else
      98650e1b
Loading