Comments (7)
Not really, having never done it. It looks like you need to come up with a build recipe. Figuring out the dependencies is probably the main difficulty and ensuring that you are building against an appropriate version of openbabel. I would look at the recipes for other packages. I would think making torch a dependency would pull in all the CUDA stuff you need.
Incidentally, v0.5.1, which is now in pypi, has openbabel as a submodule.
from libmolgrid.
This problem seems to occur only with the pip
-installed library. If I compile libmolgrid
from source (within a Singularity container), everything seems to work as expected.
from libmolgrid.
The most likely problem is your version of openbabel is different than the one included with the pip package. Since the OBMol objects aren't compatible, it fails miserably. There a number of ways this could be dealt with.
- Change the install procedure to build from src and/or require a specific version of openbabel. This would be the conda approach and I'm not sure is possible with pip
- Implement version insensitive wrappers when converting between openbabel python objects and openbabel C++ objects (e.g., write out the molecule as a string in python and then read it back in using C++ to get a new object instead of just copying the pointer)
- Minimally, check python version versus c++ version and output a warning telling the user they will need to install a certain version of openbabel for things to work.
- Do 3, but if the check fails do 2.
- Bundle a copy of python openbabel with molgrid to use (e.g. you would import molgrid.openbabel.pybel to get a guaranteed compatible version)
I'm going to settle for 3 for now. It is possible that there is some other problem besides the versions (e.g. how the library was built vs changes in the source code).
from libmolgrid.
Can you provide the details of your system openbabel (or whatever openbabel package molgrid would be using)?
from libmolgrid.
Thank you for looking into this. I think having a warning after spotting this incompatibility would be great!
I installed openbabel
within the conda
environment from the conda-forge
channel. The version being installed was 3.1.1
. The conda
environment above was enough for me to reproduce the problem.
from libmolgrid.
I can think of two solutions:
(1) Embed a version of openbabel within molgrid that is guaranteed to be compatible (but may not be compatible with system openbabel, so less than ideal for integrating with pre-existing code).
(2) Configure a conda package that builds molgrid (rather than getting it from pip) against the conda version of openbabel. Managing these sorts of dependencies is kinda of the point of using conda.
(1) is easy to do. (2) will have to wait until I have some poor sod to fob it off onto.
from libmolgrid.
Given that (1) is less than ideal, I'd say (2) is the preferred option.
If you have any pointers I could have a look into it? I started looking at conda-forge, but it was unclear to me how to deal with CUDA packages.
from libmolgrid.
Related Issues (20)
- libmolgrid issue HOT 4
- libmolgrid issues about stratifying receptors HOT 1
- Attempting compilation for unknown architectures HOT 1
- The ExampleProvider populate part is not working properly. HOT 7
- Is there a relationship between dataset structure and ExampleProvider HOT 5
- data_root error while defining ExampleProvider HOT 3
- libmolgrid install in python2 HOT 1
- Taking care of each region when creating a gninatype HOT 1
- .
- libmolgrid install error HOT 1
- example code in libmolgrid github HOT 4
- Installation HOT 11
- Error in pytest HOT 5
- Cannot pip install HOT 3
- Pip Installation Error HOT 1
- arm64 architecture support HOT 1
- missing cuda know drivers to
- File Format Question HOT 2
- Conda forge package HOT 2
- Libmolgrid does not provide consistent batching HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmolgrid.