fluorescence-tools / labellib Goto Github PK
View Code? Open in Web Editor NEWLibrary for coarse-grained simulations of probes flexibly coupled to biomolecules.
License: Mozilla Public License 2.0
Library for coarse-grained simulations of probes flexibly coupled to biomolecules.
License: Mozilla Public License 2.0
The pypi and the conda releases are currently maintained manually. I suggest to modify both CI build process to automatically deploy conda and pypi packages for all supported platforms whenever either there is a new release or there is a push to the master branch.
Opinions?
Task list:
The master branch CI builds on macOS is failing (see: https://travis-ci.org/Fluorescence-Tools/LabelLib/jobs/659682332).
There is still a PyBind11 build issue.
This error seems only to occur if there are multiple versions of the same "Python". In the Travis build environment, the path variables are all properly set. Hence, if set(PYTHONLIBS_FOUND TRUE) is set, the Python.h include is still found.
TravisCI output:
CMake Error at thirdparty/pybind11/tools/FindPythonLibsNew.cmake:95 (message):
Python config failure:
pyenv: python3.6: command not found
The `python3.6' command exists in these Python versions:
3.6
3.6.3
I tried to "fix" it by changeing FlexLabel/CMakeList.txt
(see: pybind/pybind11#236)
set(PYTHONLIBS_FOUND TRUE) set(PYTHON_MODULE_EXTENSION .so) set(PYTHON_MODULE_PREFIX "") find_package(pybind11 2.2 QUIET) if(NOT pybind11_FOUND) message(STATUS "Using thirdparty/pybind11") add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/pybind11 pybind11_bin) endif(NOT pybind11_FOUND)
However, of course if set(PYTHONLIBS_FOUND TRUE) is used find_package(pybind11 2.2 QUIET) does not initilaize all paths to include Python.h and you get build problems on platforms where the python libraries are not in the paths.
Build
The automated way of naming the python versions is incompatible with source distributions on PyPi. When a source distribution is downloaded there is no Git version. Hence, by default, the installation will have the version "unknown_version"
Hi,
I am using the LabelLib package in my code with the new feature of using the points from the AV cloud (av.points()), which was added to the 2019 version of LabelLib (#10)
However, I cannot install the new version via pip on Windows: The command pip install LabelLib==2019.10.9
still installs the old version from 2018. It only works with conda conda install -c tpeulen labellib
.
Since I want to add LabelLib to the dependencies of a package, it should work with pip as well. Otherwise it will install the wrong version of LabelLib.
I have seen that the tar.gz file is not provided for the latest versions. But even for the version 2019.3.17, pip installs the 2018.12.14 instead. Do you know, where this might come from? Can you update PyPI to support Windows installations of the latest version. Thank you!
Unlike LGPL, MPL does not require that derived closed software is linked dynamically. Otherwise they are similar. This will allow to make LabelLib header-only.
http://www.mozilla.org/MPL/2.0/FAQ.html
This is a very trivial enhancement suggestion, that however may improve the performance of LabelLib, particularly when Python is used
Right now, to create a list of the valid labeling positions, we loop over the density array.
MP=np.array([0.0,0.0,0.0])
vol=0.0
iat = 0
for iz in range(nz):
for iy in range(ny):
for ix in range(nx):
val = g[ix, iy, iz]
if val <= 0.0:
continue
It would be more efficient, if this loop would be implemented in C/C++, meaning if there would be a function that converts a Grid3D object to a list of (Cartesian) points optionally with density values.
The source code is now tight to Zenodo releases. However, the Zenodo release does not do a git clone --submodule.
Hence, due to the dependency on thirdparty submodules LabelLib cannot be built with the Zenodo release alone.
I know, this is not very elegant, however, to make it possible to build LabelLib using the Zenodo release alone and to address the issue that conda-forge wants releases to be build from tarballs as opposed to git repositories, we should consider coping the dependencies instead of using submodules.
This would solve issues with conda-forge and zenodo alike.
For the next release we could/should link labellib to Zenodo (see: link). This way, LabelLib gets a DOI and could be cited.
Originally posted by @tpeulen in #11 (comment)
LabelLib does not compile on MacOS. I nailed down the problem to the newly introduced library pubby-flat. In the file 'flat_map.hpp' std::void_t is used. This only became a part of the std library in C++17, which is not supported by clang / LLVM - the standard MacOS compiler.
take a look at line 184 flat_map.hpp
I would like to make the LabelLib compatible with the integrative modeling (IMP) toolkit. The IMP approach of wrapping C/C++ functions and classes is through SWIG. Hence, I'd like to migrate the pybind11 bindings to SWIG.
Could you please provide documentation and some test cases so that I can try using the tool?
Hello,
I have had a persistent problem with LabelLib. Upon running the code in pymol
_genAV('ins_sub_2_test0', '/ins_sub_2_test0//F/60/CB', allowed_sphere_radius=1.5, linker_diameter=4.5, linker_length=20.5)_
I get the following error
Traceback (most recent call last):
File "C:\Users\fbsmawadmin\Anaconda3_\Lib\site-packages\LabelLib\FlexLabel\python\LabelLib_pymol.py", line 40, in genAV
av1=ll.dyeDensityAV1(xyzRT.T,source,linker_length, linker_diameter, dye_radius, disc_step)
AttributeError: module 'LabelLib' has no attribute 'dyeDensityAV1'
might there be some python script or a line missing that defines the attribute dyeDensityAV1 ??
Since the last release in 2018 the the calculation of distance distributions among other features has been added to LabelLib.
If there are no new features planned in the near future, it may be time for a new release.
We should consider to add LabelLib to conda forge. This way, LabelLib could be used with less hassle by more people. I already created a conda-recipe that builds on macOS, Windows, and Linux.
https://github.com/Fluorescence-Tools/conda-recipes/
Only Python 2.7 is a bit tricky to build on Windows because stdint.h is missing in VS 2008 (the standard compiler for Python 2.7 on Windows). If it is okay to drop python 2.7 support for conda-forge contributing LabelLib to conda-forge should be straightforward.
https://conda-forge.org/docs/maintainer/adding_pkgs.html#dev-contribute-pkgs
The question is if we fell that LabelLib is mature enough to be submitted to conda-forge.
LabelLib reached a level of maturity where others may start to use it, either by incorporating its code or by linking against it. Still, we may want to change the library. Hence, I suggest to use for future releases semantic versioning. This way, others can easily track if a new release breaks their code.
In semantic versioning:
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.
Dear all
A user from us want to use LabelLib with Pymol.
But it fails:
C:\Windows\system32>pip install LabelLib
Collecting LabelLib
Using cached LabelLib-2019.4.29.tar.gz (3.1 MB)
Requirement already satisfied: numpy in c:\program files\python37\lib\site-packages (from LabelLib) (1.16.4+mkl)
Building wheels for collected packages: LabelLib
Building wheel for LabelLib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\setup.py'"'"'; __file__='"'"'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\CRONAD~1\AppData\Local\Temp\pip-wheel-xmeh667a'
cwd: C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\
Complete output (64 lines):
running bdist_wheel
running build
running build_ext
-- Building for: NMake Makefiles
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error in CMakeLists.txt:
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/CronAdmin/AppData/Local/Temp/pip-install-yntdocqw/labellib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\setup.py", line 85, in <module>
install_requires=['numpy'],
File "c:\program files\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\program files\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python37\lib\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "c:\program files\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\setup.py", line 32, in run
self.build_extension(ext)
File "C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "c:\program files\python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib', '-DPYTHON_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\\program files\\python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for LabelLib
Running setup.py clean for LabelLib
Failed to build LabelLib
Installing collected packages: LabelLib
Running setup.py install for LabelLib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\setup.py'"'"'; __file__='"'"'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CRONAD~1\AppData\Local\Temp\pip-record-tig9e8wa\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python37\Include\LabelLib'
cwd: C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\
Complete output (66 lines):
running install
running build
running build_ext
-- Building for: NMake Makefiles
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error in CMakeLists.txt:
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/CronAdmin/AppData/Local/Temp/pip-install-yntdocqw/labellib/build/temp.win-amd64-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\setup.py", line 85, in <module>
install_requires=['numpy'],
File "c:\program files\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\program files\python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files\python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python37\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\program files\python37\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\program files\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python37\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files\python37\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\setup.py", line 32, in run
self.build_extension(ext)
File "C:\Users\CRONAD~1\AppData\Local\Temp\pip-install-yntdocqw\labellib\setup.py", line 56, in build_extension
subprocess.check_call(['cmake', ext.sourcedir] + cmake_args, cwd=self.build_temp, env=env)
File "c:\program files\python37\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib', '-DPYTHON_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\build\\lib.win-amd64-3.7', '-DPYTHON_EXECUTABLE=c:\\program files\\python37\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\build\\lib.win-amd64-3.7', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\setup.py'"'"'; __file__='"'"'C:\\Users\\CRONAD~1\\AppData\\Local\\Temp\\pip-install-yntdocqw\\labellib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\CRONAD~1\AppData\Local\Temp\pip-record-tig9e8wa\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python37\Include\LabelLib' Check the logs for full command output.
Any idea why?
Thanks
We should consider continuous integration, e.g., with TravisCI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.