GithubHelp home page GithubHelp logo

llnl / memsurfer Goto Github PK

View Code? Open in Web Editor NEW
24.0 5.0 9.0 4.46 MB

MemSurfer is a software tool to compute bilayer membrane surfaces.

License: GNU General Public License v3.0

C++ 45.76% Python 17.83% C 33.33% Shell 2.55% SWIG 0.53%
membranes lipid analysis computational-geometry

memsurfer's Introduction

MemSurfer, Version 1.1

Released: April 19, 2022

Author: Harsh Bhatia ([email protected]) and Peer-Timo Bremer

MemSurfer is an efficient and versatile tool to compute and analyze membrane surfaces found in a wide variety of large-scale molecular simulations. MemSurfer works independent of the type of simulation, directly on the 3D point coordinates, and can handle a variety of membranes as well as atomic simulations. MemSurfer provides many in-built analysis tasks, such as computing the membrane curvature, density and normals of lipids, and area per lipid. More importantly, MemSurfer provides a simple-to-use Python API that may be easily used/extended to perform other types of analysis.

Dependencies

The interface to MemSurfer is provided via python 3, whereas the core functionality is written in C++ 11 with the following dependencies.

  1. The Computational Geometry Algorithms Library (CGAL): v 4.13.0
  2. boost: v 1.66
  3. Eigen: v 3.3.9

Installing MemSurfer and its dependencies additionally require the following software.

  • C++ compiler that supports C++ 11 and OpenMP (tested with GNU gcc 7.3.0 and GNU gcc 7.5.0)
    • Please use gcc@7. See known issues below.
  • Python 3 interpreter (tested with 3.9.12, 3.7.11, and 3.7.2)
  • Cython (tested with 0.29.10 and 0.29.24)
  • Swig (tested with 3.0.12 and 4.0.2)
  • CMake (tested with 3.13 and 3.20)
  • gmp (tested with 6.2.1)
  • mpfr (tested with 4.1.0)

All the additional packages (unnumbered) are usually available on all machines through standard package managers, for example, macports, apt-get, yum, etc. Please make use of these package managers to avail these dependencies.

The numbered dependencies may not be available, or package managers may not give full control on the version number to be installed. Here, we will discuss the installation of these major dependencies.

Installation via Spack

Currently outdated and broken. To be fixed soon.

Installation from source

MemSurfer can be downloaded using the following link.

$ git clone --recursive [email protected]:LLNL/MemSurfer.git
$ MEM_HOME=`pwd`/MemSurfer

1. Installing MemSurfer's Dependencies

The following describes the installation of cgal,, boost and eigen, whereas the rest of the dependencies are assumed to be standard and available.

1a. Eigen, Boost, and CGAL (on mac)

On macosx, the simplest way to install these is using macports. As of Jan 2019, macports installs the correct versions.

$ port install cgal           # also installs boost and eigen
1b. Eigen, Boost, and CGAL (from source)

A helper script $MEM_HOME/install_deps.sh is provided to install these dependencies. In order to use this script, you need to specify a C++ compiler that supports OpenMP.

$ export CC_COMPILER=`which gcc`
$ export CXX_COMPILER=`which g++`
$ sh install_deps.sh

This script installs all these dependencies in a folder called $MEM_HOME/external. Note that you may not need to install all four of these dependencies. Please edit the script (lines 6--8) to select which ones to install.

Once installed successfully, please add the following to your shell profile to access these dependencies.

$ export PYTHONPATH=$MEM_HOME/external/lib/python3.x/site-packages:$PYTHONPATH

# LD_LIBRARY_PATH for linux
$ export LD_LIBRARY_PATH=$MEM_HOME/external/lib:$MEM_HOME/external/lib64:$LD_LIBRARY_PATH

# DYLD_LIBRARY_PATH for mac
$ export DYLD_LIBRARY_PATH=$MEM_HOME/external/lib:$MEM_HOME/external/lib64:$DYLD_LIBRARY_PATH

2. MemSurfer

Once the dependencies have been installed, MemSurfer can be installed using distutils. However, you need to explicitly supply the path of the external dependencies.

$ export BOOST_ROOT=<path_to_boost>   # boost headers are contained in $BOOST_ROOT/include/boost
$ export CGAL_ROOT=<path_to_cgal>     # cgal headers are contained in $CGAL_ROOT/include/CGAL
$ export EIGEN_ROOT=<path_to_eigen>   # eigen headers are contained in $EIGEN_ROOT/include/eigen3

Note that, all these paths default to $MEM_HOME/external. So if you installed the dependencies using the script provided above, you do not need to specify these paths.

$ cd $MEM_HOME
$ CC=`which gcc` CXX=`which g++` LDCXXSHARED="`which g++` -bundle -undefined dynamic_lookup" \
  python setup.py install

Trobubleshooting and Known Issues

Jul 20, 2021: It appears that compilation using gcc@8 results in a segfault or a malloc error (see issue #10). The problem appears to be residing in a dependency called pypoisson. Until it is resolved, please use gcc@7.

Jan 23, 2019: If the cloning fails with the following error:

Cloning into '<your-path>/MemSurfer/pypoisson'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

This error means that your ssh keys are not registered with github. Please see here and here to register your ssh key and retry.

Examples

  • See the example directory.

Change Log

Apr 19, 2022
  • Bumped the version.
  • Bug fix in Delaunay.
  • Added perturbations in projected points for correct Delaunay.
  • Added shell analysis.
  • Added conversion of mesh properties to pandas (to support writing to csv).
Dec 06, 2021
  • Removed VTK as a C++ dependency by using it directly in python. Sufficient now to install using pip install vtk.
  • Updated examples to MDAnalysis 2.
Jul 22, 2021
  • Upgraded to Eigen 3.3.9
  • Updated pypoisson submodule to commit #94534a2.
  • Added a specific guideline to use gcc@7.
Mar 23, 2020
  • Correctly normalize Gaussian KDE and support 3D Gaussian kernel.
  • Ported to Python3.

License

MemSurfer is released under GNU GPL-3.0 license. See the LICENSE file for details.

LLNL-CODE-763493

memsurfer's People

Contributors

bhatiaharsh avatar ctlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

memsurfer's Issues

Problem to import memsurfer

Hi All,

I have successfully compiled memsurfer, after building locally GMP and MPFR libraries in the $MEM_HOME/external folder.

I try to import but I get the following error:

Python 3.7.0 (default, Jul 3 2018, 12:46:05)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.

import memsurfer
Traceback (most recent call last):
File "/mnt/software/python3.7/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 18, in swig_import_helper
fp, pathname, description = imp.find_module('_pymemsurfer', [dirname(file)])
File "/mnt/software/python3.7/lib/python3.7/imp.py", line 297, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pymemsurfer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/mnt/software/python3.7/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/init.py", line 15, in
from .membrane import Membrane
File "/mnt/software/python3.7/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/membrane.py", line 21, in
from . import pymemsurfer
File "/mnt/software/python3.7/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 28, in
_pymemsurfer = swig_import_helper()
File "/mnt/software/python3.7/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 20, in swig_import_helper
import _pymemsurfer
ImportError: /mnt/software/python3.7/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/_pymemsurfer.cpython-37m-x86_64-linux-gnu.so: undefined symbol: __gmpq_add

I would like to use local versions of GMP and MPFR since I am compiling for our local modules server.

Best regards,
Jose

Format of output files

Is it possible to save the output data in either VTK or numpy array format instead of the VTP format?

libCGAL not found on OSX

I'm attempting to install MemSurfer via the online instructions, and wound up with a problem when I attempt to actually run the installation script. I installed CGAL via homebrew, however, this is a header-only library, and so when I try to setup MemSurfer I get the following error:

  > MemSurfer = (/Users/cedelmaier/Projects/Biophysics/MemSurfer)
  > CGAL_ROOT = (/usr/local/Cellar/cgal/5.4/)
  > EIGEN_ROOT = (/usr/local/Cellar/eigen/3.4.0_1/)
  > BOOST_ROOT = (/usr/local/Cellar/boost/1.78.0_1/)
Traceback (most recent call last):
  File "/Users/cedelmaier/Projects/Biophysics/MemSurfer/setup.py", line 160, in <module>
    PATHS = fetch_paths(os.path.join(PATH_MEM, 'external'))
  File "/Users/cedelmaier/Projects/Biophysics/MemSurfer/setup.py", line 106, in fetch_paths
    paths['cgal'].update({'lib': find_shlib_path(paths['cgal']['root'], 'libCGAL')})
  File "/Users/cedelmaier/Projects/Biophysics/MemSurfer/setup.py", line 63, in find_shlib_path
    raise Exception(f'Find_shlib_path({path},{libname}) failed!')
Exception: Find_shlib_path(/usr/local/Cellar/cgal/5.4/,libCGAL) failed!

So really, need to know if the library is really needed, or change the installation instructions for the brew installation version to accommodate the different installation types.

Proplem for installation

When I finished installation of first step —— Installing MemSurfer's Dependencies,The python3.x folder does not appear in the Memsurfer/external/lib/ folder。
image

so,I don‘t add the the following to my shell.
export PYTHONPATH=$MEM_HOME/external/lib/python3.x/site-packages:$PYTHONPATH
then, I continue to the next step——install MemSurfer。
when I finished ,I open python environment, and import memsurfer。 but the following problems occurred。

image

Am I doing something wrong in the first step, or the second step?

import error

Hi,

It seems that I have installed the MemSurfer, but I am getting the below error while importing the memsurfer. A similar issue has been reported previously (#3), and I am not sure how to implement the corresponding changes in the new/current setup.py file. Please find the attached setup.py file. I tried to add the 'GMP libraries as suggested in issue #3; still, it didn't solve my issue. I am new to python, and any help will be appreciated.


Traceback (most recent call last):
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/site-packages/memsurfer-1.0.1-py3.9-linux-x86_64.egg/memsurfer/memsurfer_cmod.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 666, in _load_unlocked
File "", line 565, in module_from_spec
File "", line 1173, in create_module
File "", line 228, in _call_with_frames_removed
ImportError: /media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/site-packages/memsurfer-1.0.1-py3.9-linux-x86_64.egg/memsurfer/_memsurfer_cmod.so: undefined symbol: __gmpq_add

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/Downloads/MemSurfer-develop/examples/ex_simple.py", line 20, in
import memsurfer
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/site-packages/memsurfer-1.0.1-py3.9-linux-x86_64.egg/memsurfer/init.py", line 15, in
from .membrane import Membrane
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/site-packages/memsurfer-1.0.1-py3.9-linux-x86_64.egg/memsurfer/membrane.py", line 20, in
from . import memsurfer_cmod
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/site-packages/memsurfer-1.0.1-py3.9-linux-x86_64.egg/memsurfer/memsurfer_cmod.py", line 17, in
_memsurfer_cmod = swig_import_helper()
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/site-packages/memsurfer-1.0.1-py3.9-linux-x86_64.egg/memsurfer/memsurfer_cmod.py", line 16, in swig_import_helper
return importlib.import_module('_memsurfer_cmod')
File "/media/vinay/fd3ce634-d796-4637-86d0-1021399d6c6c/Vinay/install/python396/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_memsurfer_cmod'


Setup.py file:
setup.txt

Thanks.

Regards,
Vinay

Error when trying to import memsurfer

Hi,
I seemingly successfully installed memsurfer without issues.
However, when I try to import the library

import memsurfer 

I get the following error:

Traceback (most recent call last):
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/site-packages/memsurfer-1.0.0-py3.8-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 14, in swig_import_helper
    return importlib.import_module(mname)
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'memsurfer._pymemsurfer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "import_memsurf.py", line 7, in <module>
    import memsurfer
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/site-packages/memsurfer-1.0.0-py3.8-linux-x86_64.egg/memsurfer/__init__.py", line 15, in <module>
    from .membrane import Membrane
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/site-packages/memsurfer-1.0.0-py3.8-linux-x86_64.egg/memsurfer/membrane.py", line 21, in <module>
    from . import pymemsurfer
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/site-packages/memsurfer-1.0.0-py3.8-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 17, in <module>
    _pymemsurfer = swig_import_helper()
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/site-packages/memsurfer-1.0.0-py3.8-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 16, in swig_import_helper
    return importlib.import_module('_pymemsurfer')
  File "/home/tb/masiggel/anaconda2/envs/python3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: memsurfer/MemSurfer/external/lib/libvtkWrappingPython27Core-8.1.so.1: undefined symbol: _Py_ZeroStruct

import error

hi, i had install MemSurfer in the centsos system=8.0 , but when i tried to import the package that occur the follow error:
image
can you help me to solve this problem?

BUG: double free errors

Probably there should never be double free C++ errors, regardless of the input data, if the memory handling is safe throughout the library and its dependency stack.

Here is a reproducer using nothing more than NumPy, pytest, and the hypothesis[numpy] property-based testing library:

Run the test below with version 1.0 of memsurfer with: pytest reproducer.py -s

import numpy as np
import memsurfer
import hypothesis
from hypothesis import given
from hypothesis import strategies as st
from hypothesis.extra import numpy as hynp


@given(
      # generate the leaflet coords
      hynp.arrays(np.float64, (100, 3)),
      # and the box coords
      hynp.arrays(np.float64, (2, 3)), 
      # and the resnames
      hynp.arrays(np.str_, 100),
        )
def test_memsurfer_double_free(leaflet_coords, bbox, labels):
    # this test causes memsurfer or one of its
    # dependencies to produce C++ "double free"
    # errors
    memsurfer.Membrane.compute(leaflet_coords,
                               labels=labels,
                               bbox=bbox,
                               periodic=False)

It will hard crash:

reproducer.py free(): double free detected in tcache 2
Fatal Python error: Aborted

Current thread 0x00007f230f663b80 (most recent call first):
  File "/autofs/nccs-svm1_home1/treddy/github_projects/spack/opt/spack/linux-rhel8-zen/gcc-8.3.1/memsurfer-1.0-36bovnle23ei6dcloohpm7bnpjminva5/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/membrane.py", line 160 in compute_approx_surface
  File "/autofs/nccs-svm1_home1/treddy/github_projects/spack/opt/spack/linux-rhel8-zen/gcc-8.3.1/memsurfer-1.0-36bovnle23ei6dcloohpm7bnpjminva5/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/membrane.py", line 300 in compute
  File "/autofs/nccs-svm1_home1/treddy/voronoi_pilot2/reproducer.py", line 24 in test_memsurfer_double_free
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/core.py", line 523 in test
  File "/autofs/nccs-svm1_home1/treddy/voronoi_pilot2/reproducer.py", line 10 in test_memsurfer_double_free
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/core.py", line 599 in run
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/executors.py", line 52 in default_new_style_executor
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/core.py", line 603 in execute_once
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/core.py", line 648 in _execute_once_for_engine
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/internal/conjecture/engine.py", line 137 in __stoppable_test_function
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/internal/conjecture/engine.py", line 155 in test_function
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/internal/conjecture/engine.py", line 989 in cached_test_function
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/internal/conjecture/engine.py", line 519 in generate_new_examples
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/internal/conjecture/engine.py", line 818 in _run
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/internal/conjecture/engine.py", line 420 in run
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/core.py", line 724 in run_engine
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/hypothesis/core.py", line 1050 in wrapped_test
  File "/autofs/nccs-svm1_home1/treddy/voronoi_pilot2/reproducer.py", line 10 in test_memsurfer_double_free
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/python.py", line 183 in pytest_pyfunc_call
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/python.py", line 1641 in runtest
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 162 in pytest_runtest_call
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 255 in <lambda>
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 311 in from_call
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 255 in call_runtest_hook
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 215 in call_and_report
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 126 in runtestprotocol
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 109 in pytest_runtest_protocol
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/main.py", line 348 in pytest_runtestloop
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/main.py", line 323 in _main
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/main.py", line 269 in wrap_session
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/autofs/nccs-svm1_sw/andes/python/3.7/anaconda-base/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/ccs/home/treddy/.local/andes/anaconda3/3.7/lib/python3.7/site-packages/_pytest/config/__init__.py", line 163 in main
  File "/sw/andes/python/3.7/anaconda-base/bin/pytest", line 11 in <module>
Aborted (core dumped)

Installation by Spack has unsatisfiable version constraints

When attempting to install via Spack, an unsatisfiable version constraint is detected - see below for full error output:

$tamir> spack install memsurfer@develop %[email protected]
==> Error: An unsatisfiable version constraint has been detected for spec:

[email protected]%[email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4~uuid+zlib arch=linux-ubuntu18.04-skylake_avx512
    ^bzip2
        ^diffutils
            ^iconv
    ^expat
    ^[email protected]%[email protected] arch=linux-ubuntu18.04-skylake_avx512
        ^[email protected]%[email protected] arch=linux-ubuntu18.04-skylake_avx512
            ^[email protected]%[email protected]~symlinks+termlib arch=linux-ubuntu18.04-skylake_avx512
                ^[email protected]%[email protected] arch=linux-ubuntu18.04-skylake_avx512
    ^gettext+libxml2
        ^libxml2
            ^xz
            ^[email protected]%[email protected]+optimize+pic+shared arch=linux-ubuntu18.04-skylake_avx512
    ^libffi
    ^openssl
        ^[email protected]%[email protected]+cpanm+shared+threads arch=linux-ubuntu18.04-skylake_avx512
    ^[email protected]:

while trying to concretize the partial spec:

[email protected]%[email protected]+blas+lapack arch=linux-ubuntu18.04-skylake_avx512

py-numpy requires python version 3.5:, but spec asked for 2.7.16
$tamir>

Delaunay returning disconnected vertices

After CGAL's delaunay meshing, it appears that some vertices are disconnected. The incidence degree should be two for a properly connected vertex.

added warning in the code until this is resolved

   > TriMeshPeriodic::periodicDelaunay()... Done! created 5711 triangles (out of 50490 periodic ones)!
> Warning: found a vertex with low incidence: vertex[46] = (16.0459, 3.87606, 0), incidence = (0, raw = 0)

and

2022-04-18 21:49:23,796 [WARNING] memsurfer.trimesh:compute_delaunay - Found vertices with small incidence: [ 46 767] = [0 1]
[[16.045897  3.876062]
 [29.536968 37.83923 ]]

Import error- undefined symbol: __gmpq_add

When I'm importing memsurfer, I get the following error:

ImportError: /home/nambinik/miniconda3/lib/python3.11/site-packages/memsurfer-1.1.0-py3.11-linux-x86_64.egg/memsurfer/_memsurfer_cmod.so: undefined symbol: __gmpq_add

I believe this might be due to the GMP library not being linked,

With inspiration from an earlier question #3 I added the libgmp libraries to setup.py and reinstalled memsurfer.

Specifically changed lines 228,234 and 235

include_dirs=[PATH_PM, numpy.get_include(),
PATHS['boost']['include'],
PATHS['eigen']['include'],
PATHS['cgal']['include'],
'/opt/local/include','/usr/include/x86_64-linux-gnu'
],
LIBS_EXT.append('gmp')
libraries=LIBS_EXT,
library_dirs=[PATHS['cgal']['lib'],'/usr/lib/x86_64-linux-gnu/']

Still get the same error though. How would one go about getting around this error?

Best
Nikhil

libCGAL.so not found in building

I am having the same issue described in #20 on a Oracle Linux 8 system. CGAL 5.6.1 is header-only and a devel package with the library is not available. It is not possible to build libCGAL.so using the source distribution. Has any progress been made to eliminate this library dependency?

ImportError with spack MemSurfer with undefined symbol: __gmpq_set_si in shared object file

Hi,

I installed memsurfer with spack, but encountered an error when importing the module. I am using Ubuntu20.04 on Windows Subsystem for Linux 2 (WSL 2). I believe my issue is related to #12 , except I did not build memsurfer manually. Please find the error traceback below. Any ideas on what went wrong?

Thanks!

The commands I entered to install and import memsurfer:
. spack/share/spack/setup-env.sh
spack -d install memsurfer@develop ^[email protected] %[email protected]
spack load [email protected]
spack load memsurfer@develop
python

Python 3.7.3 (default, Mar 23 2022, 15:51:44)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import memsurfer
Traceback (most recent call last):
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/memsurfer-develop-c7ltvh5gcc5buwnaq4db5lpqb7lgyvpj/lib/python3.7/site-packages/memsurfer/memsurfer_cmod.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/python-3.7.3-34356y76tekzdqblxwjud5znmwog5xec/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 670, in _load_unlocked
File "", line 583, in module_from_spec
File "", line 1043, in create_module
File "", line 219, in _call_with_frames_removed
ImportError: /home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/memsurfer-develop-c7ltvh5gcc5buwnaq4db5lpqb7lgyvpj/lib/python3.7/site-packages/memsurfer/_memsurfer_cmod.so: undefined symbol: __gmpq_set_si

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/memsurfer-develop-c7ltvh5gcc5buwnaq4db5lpqb7lgyvpj/lib/python3.7/site-packages/memsurfer/init.py", line 15, in
from .membrane import Membrane
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/memsurfer-develop-c7ltvh5gcc5buwnaq4db5lpqb7lgyvpj/lib/python3.7/site-packages/memsurfer/membrane.py", line 20, in
from . import memsurfer_cmod
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/memsurfer-develop-c7ltvh5gcc5buwnaq4db5lpqb7lgyvpj/lib/python3.7/site-packages/memsurfer/memsurfer_cmod.py", line 17, in
_memsurfer_cmod = swig_import_helper()
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/memsurfer-develop-c7ltvh5gcc5buwnaq4db5lpqb7lgyvpj/lib/python3.7/site-packages/memsurfer/memsurfer_cmod.py", line 16, in swig_import_helper
return importlib.import_module('_memsurfer_cmod')
File "/home/rptang/spack/opt/spack/linux-ubuntu20.04-zen/gcc-7.5.0/python-3.7.3-34356y76tekzdqblxwjud5znmwog5xec/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_memsurfer_cmod'

Computing surface yields unexpected error

Hello,

I'm trying to compute a surface for a CG pure POPC membrane.
In pseudocode, the procedure I'm following looks like:

import MDAnalysis
from memsurfer import Membrane

u = MDAnalysis.Universe(pdb_file, xtc_file)

frame = u.trajectory[-1]

atoms = u.select_atoms('name PO4')
bbox = np.zeros((2,3))
bbox[1,:] = frame.dimensions[:3]

membrane = Membrane.compute(atoms.positions, atoms.resnames, bbox = bbox, periodic = True)

Which yields the following error

terminate called after throwing an instance of 'std::length_error'
what():  cannot create std::vector larger than max_size()

It looks like it has something to do with the box dimensions (maybe?) but I have no Idea how to fix it.

I also tried computing a surface from a random distribution of points within the same bounds as my membrane, and get the same error.

Thank you very much in advance for your help!

Import Issue

Hi,
I followed the instructions on the installation of memsurfer, but when I try to import memsurfer I get a ndarray error. I wondering if I could get some help on this. This is the error that I receive.

Python 3.9.10 | packaged by conda-forge | (main, Feb 1 2022, 21:24:37)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import memsurfer
Traceback (most recent call last):
File "", line 1, in
File "/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/init.py", line 15, in
from .membrane import Membrane
File "/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/membrane.py", line 19, in
from pypoisson import poisson_reconstruction
File "pypoisson/pypoisson.pyx", line 1, in init pypoisson
#cython: language_level=3str
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
exit
Use exit() or Ctrl-D (i.e. EOF) to exit
exit()

installation: import issue

Hi,

I have installed Memsurfer 1.1.0.
setup.py ran successfully. But when testing with a simple script "test_install.py", containing just one line:

import memsurfer

then I get the error:

Traceback (most recent call last):
File "test_install.py", line 1, in
import memsurfer
File "/usr/local/lib/python3.8/dist-packages/memsurfer-1.1.0-py3.8-linux-x86_64.egg/memsurfer/init.py", line 15, in
from .membrane import Membrane
File "/usr/local/lib/python3.8/dist-packages/memsurfer-1.1.0-py3.8-linux-x86_64.egg/memsurfer/membrane.py", line 20, in
from . import memsurfer_cmod
File "/usr/local/lib/python3.8/dist-packages/memsurfer-1.1.0-py3.8-linux-x86_64.egg/memsurfer/memsurfer_cmod.py", line 13, in
from . import _memsurfer_cmod
ImportError: /usr/local/lib/python3.8/dist-packages/memsurfer-1.1.0-py3.8-linux-x86_64.egg/memsurfer/_memsurfer_cmod.so: undefined symbol: __gmpq_add

notes and related issues:

  • the error is similar to issue #3, but the setup.py file has been changed since, so the solution cannot be applied.
  • This issue might be essentially the same as issue #12 , which is unsolved.
  • I read issue #23, and have ensured that I was not in the source dir when trying to import memsurfer
  • OS version: Ubuntu 20.04
  • python version: 3.8.10

kind regards,
Andreas

Change "resolution" of measured curvature

Thanks for the nice tool! After playing with it, I have managed to obtained the parametrized surfaces for a given simulation I have. I am interested in measuring the "major" curvature though, and it seems the calculation is done at a very "local" scale, and there is no way of measuring the curvature of the overall membrane, i.e., the workflow identifies imperfections in the membrane, but not real membrane curvatures. Is that the case, or am I missing some function available to do this?

Adding MemSurfer to Conda

Hi, thanks for the very nice package! I am just wondering whether you have any plans to make it available via Conda, specifically the conda-forge channel? I have not added pacakges to Conda before, but would be happy to help figure out how so that others can more easily install MemSurfer.

Importing the module after building fails

After following the installation/compilation steps descriped in the readme, importing the module fails with the message:
ImportError: cannot import name '_pymemsurfer' from partially initialized module 'memsurfer' (most likely due to a circular import)
This happens when trying to run the ex_simple.py or otherwise importing the module.
Tested on Arch with python 3.7 and 3.8

Traceback:
File "examples/ex_simple.py", line 20, in
import memsurfer
File "/home/user/python37/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/__init__.py", line 15, in
from .membrabe import Membrane
File "/home/user/python37/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/membrane.py", line 21, in
from . import pymemsurfer
File "/home/user/python37/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 13, in
from . import _pymemsurfer
ImportError: cannot import name '_pymemsurfer' from partially initialized module 'memsurfer' (most likely due to a circular import) (/home/user/python37/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/__init__.py)

setup.py fails

Hello,

I am trying to install MemSurfer on Ubuntu 22.04
The installation of all dependencies goes well, however setup.py fails with TypeError: _is_gcc() takes 1 positional argument but 2 were given.

Help is much appreciated

(base) ➜  MemSurfer git:(develop) echo $CC
/usr/bin/gcc-7
(base) ➜  MemSurfer git:(develop) echo $CXX
/usr/bin/g++-7
(base) ➜  MemSurfer git:(develop) echo $LDCXXSHARED
/usr/bin/g++-7 -bundle -undefined dynamic_lookup
(base) ➜  MemSurfer git:(develop) python --version
Python 3.7.12

(base) ➜  MemSurfer git:(develop) python setup.py install
> Installing MemSurfer for (floris) on (ika) (platform=linux)
  > MemSurfer = (/home/floris/MemSurfer)
  > CGAL_ROOT = (/home/floris/MemSurfer/external)
  > EIGEN_ROOT = (/home/floris/MemSurfer/external)
  > BOOST_ROOT = (/home/floris/MemSurfer/external)
running install
/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  setuptools.SetuptoolsDeprecationWarning,
/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
writing memsurfer.egg-info/PKG-INFO
writing dependency_links to memsurfer.egg-info/dependency_links.txt
writing requirements to memsurfer.egg-info/requires.txt
writing top-level names to memsurfer.egg-info/top_level.txt
reading manifest file 'memsurfer.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'memsurfer.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
Traceback (most recent call last):
  File "setup.py", line 252, in <module>
    cmdclass={'build_py': CustomBuildPy, 'build_ext': CustomBuildExt}
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
    self.run_command(cmd)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 123, in do_egg_install
    self.run_command('bdist_egg')
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 165, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 151, in call_command
    self.run_command(cmdname)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/command/install_lib.py", line 110, in build
    self.run_command('build_py')
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "setup.py", line 137, in run
    self.run_command("build_ext")
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
    self.distribution.run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.run()
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "/home/floris/miniconda3/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
    self.build_extensions()
  File "setup.py", line 122, in build_extensions
    if not self.compiler._is_gcc(compiler_name):
TypeError: _is_gcc() takes 1 positional argument but 2 were given

issue with importing memsurfer after installing with spack.

Python 3.7.7 (default, Jul 25 2020, 19:09:04)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import memsurfer
Traceback (most recent call last):
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/memsurfer-1.0-5jeqsygjzxqh2bgh3sjq7wuljfgaiu5o/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.7.7-4juxjrlcplzzqfleofzbvfym2shujqqz/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'memsurfer._pymemsurfer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/memsurfer-1.0-5jeqsygjzxqh2bgh3sjq7wuljfgaiu5o/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/init.py", line 15, in
from .membrane import Membrane
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/memsurfer-1.0-5jeqsygjzxqh2bgh3sjq7wuljfgaiu5o/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/membrane.py", line 21, in
from . import pymemsurfer
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/memsurfer-1.0-5jeqsygjzxqh2bgh3sjq7wuljfgaiu5o/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 17, in
_pymemsurfer = swig_import_helper()
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/memsurfer-1.0-5jeqsygjzxqh2bgh3sjq7wuljfgaiu5o/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/memsurfer/pymemsurfer.py", line 16, in swig_import_helper
return importlib.import_module('_pymemsurfer')
File "/home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.7.7-4juxjrlcplzzqfleofzbvfym2shujqqz/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /home/satya/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/memsurfer-1.0-5jeqsygjzxqh2bgh3sjq7wuljfgaiu5o/lib/python3.7/site-packages/memsurfer-1.0.0-py3.7-linux-x86_64.egg/_pymemsurfer.cpython-37m-x86_64-linux-gnu.so: undefined symbol: __gmpq_add

I have installed memsurfer using spack. GMP and MPFR were installed in the machine. when i was looking for solution, found this thread in the issues (#3) but i don't know how to implement this with spack.

Best regards
Satya Chaithanya

Build on Ubuntu16.04 requires several dependencies not satisfied by install_deps.sh

The GMP package and MPFR packages are required to build the CGAL core libraries and are not installed prior to the attempted CGAL compile.

Manual installation of GMP and MPFR may be required on some platforms, or possibly circumvented by installing CGAL using apt
"sudo apt-get install libcgal-dev"

and pointing MemSurfer in the right direction using
export CGAL_ROOT=<path_to_cgal>

Other than that thanks for all the hard work.

Installation Error

swig -python -c++ -I/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/src -o /home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/memsurfer_wrap.cpp /home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/memsurfer.i
:1: Error: Unable to find 'swig.swg'
:3: Error: Unable to find 'python.swg'
/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/memsurfer.i:26: Error: Unable to find 'stdint.i'
/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/memsurfer.i:27: Error: Unable to find 'std_vector.i'
/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/memsurfer.i:28: Error: Unable to find 'std_string.i'
/home/max/Desktop/Packages_Programs/MemSurfer/memsurfer/numpy.i:3176: Error: Unable to find 'std_complex.i'
error: command '/usr/local/bin/swig' failed with exit code 1

Hi,
I do not really know what happened here. Help would be very appreciated.

cgal error installation from source OSX

  1. I installed MemSurfer from source utilizing the README protocol:

$ git clone --recursive [email protected]:LLNL/MemSurfer.git
$ MEM_HOME=pwd/MemSurfer

  1. After installing dependencies,

$ export CC_COMPILER=which gcc
$ export CXX_COMPILER=which g++
$ sh install_deps.sh

  1. I ran into the following issue with CGAL installation:

Installing MemSurfer's dependencies for () on (). platform = (Darwin)
> Installation path = (/usr/local/anaconda3/pkgs/MemSurfer/external)
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
> Using gcc = (/usr/bin/gcc) [Apple clang version 12.0.0 (clang-1200.0.26.2)]
> Using g++ = (/usr/bin/g++) [Apple clang version 12.0.0 (clang-1200.0.26.2)]
> Using python = (/opt/anaconda3/bin/python3) [Python 3.7.6]
(eigen-3.3.9) Already installed. Found (/usr/local/anaconda3/pkgs/MemSurfer/external/include/eigen3).
(boost-1.66.0) Already installed. Found (/usr/local/anaconda3/pkgs/MemSurfer/external/lib/libboost_graph.a).
(CGAL-4.13) Configuring (/usr/local/anaconda3/pkgs/MemSurfer/external/downloads/CGAL-4.13.tar/build-20220512-161945)
(CGAL-4.13) Building and Installing
(CGAL-4.13) Installation failed. Please see build logs in (/usr/local/anaconda3/pkgs/MemSurfer/external) for more information.

  1. Upon checking log file (for the make command) several errors are generated (only first two shown):

Consolidate compiler generated dependencies of target CGAL
[ 16%] Building CXX object Installation/src/CGAL/CMakeFiles/CGAL.dir/all_files.cpp.o
In file included from /usr/local/anaconda3/pkgs/MemSurfer/external/downloads/CGAL-4.13.tar/build-20220512-161945/Installation/src/CGAL/all_files.cpp:1:
In file included from /usr/local/anaconda3/pkgs/MemSurfer/external/downloads/CGAL-4.13.tar/Geomview/src/CGAL/Geomview_stream.cpp:28:
In file included from /usr/local/anaconda3/pkgs/MemSurfer/external/downloads/CGAL-4.13.tar/Geomview/include/CGAL/IO/Geomview_stream.h:33:
In file included from /usr/local/anaconda3/pkgs/MemSurfer/external/downloads/CGAL-4.13.tar/Kernel_23/include/CGAL/Bbox_2.h:33:
In file included from /usr/local/include/boost/math/special_functions/next.hpp:13:
In file included from /usr/local/include/boost/math/special_functions/math_fwd.hpp:29:
In file included from /usr/local/include/boost/math/special_functions/detail/round_fwd.hpp:11:
/usr/local/include/boost/math/tools/config.hpp:377:61: error: expected ';' at end of declaration
inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) BOOST_MATH_NOEXCEPT(T)
^
/usr/local/include/boost/math/tools/config.hpp:377:82: error: use of undeclared identifier 'T'
inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) BOOST_MATH_NOEXCEPT(T)
^
/usr/local/include/boost/math/tools/config.hpp:377:62: error: unknown type name 'noexcept'
inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) BOOST_MATH_NOEXCEPT(T)
...
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [Installation/src/CGAL/CMakeFiles/CGAL.dir/all_files.cpp.o] Error 1
make[1]: *** [Installation/src/CGAL/CMakeFiles/CGAL.dir/all] Error 2

Can you help me with next steps in this installation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.