Giter Site home page Giter Site logo

Comments (12)

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

Hi! Can you try using the -DOxpySystemInstall=On flag when calling cmake? (see here for some additional details).

from oxdna.

jinhzhou avatar jinhzhou commented on August 13, 2024

Hello! Thanks so much for replying!

Correct me if I'm wrong, doesn't -DOxpySystemInstall=On install Oxpy on my entire system instead of in the venv?

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

That should be the case if you compile the code with the system's python. With conda (and, as far as I understand, virtualenvs) it should install the packages in your $PATH (see the docs for details).

from oxdna.

ErikPoppleton avatar ErikPoppleton commented on August 13, 2024

For reasons I don’t understand, pip installs oxpy and oat in $HOME/.local/ which isn’t on your $PATH by default. There’s probably a warning about this in the log print out about this. -DOxpySystemInstall=1 will install it your current environment’s package directory which is system-level if you’re using a system-level Python, but, at least for Conda (never used venv), that will make it install in the current environment.

from oxdna.

jinhzhou avatar jinhzhou commented on August 13, 2024

Ah! Thanks for much for clarifying.

I shall redo the steps listed in the original post while using the DOxpySystemInstall=On flag when calling cmake tomorrow! I will update this post accordingly. Do you suggest I remove the files in the site-packages directory? Also curiously, I am able to run the example CIR_ASSEMBLY without any warnings, or errors.

from oxdna.

ErikPoppleton avatar ErikPoppleton commented on August 13, 2024

I would remove the copy in .local because if you later add it to your PATH and forget it’s there, it can cause problems with pip if you try to update oxpy (see the last point in this section).

The Python installation happens after compilation of oxDNA is complete. The CIRC_ASSEMBLY example doesn’t require any of the Python features so will run just fine. Only things which use oxpy to manage simulations or oat for analysis will fail if they’re not installed.

from oxdna.

jinhzhou avatar jinhzhou commented on August 13, 2024

Hi! I removed all files inside the /.local/lib directory and performed a clean install while using the DOxpySystemInstall=On flag. No new files were added to /.local/lib while many packages were added to the lib dir of the venv in the oxDNA directory.

Running make test results in some errors.

Notable ones are:

ModuleNotFoundError: No module named 'pkg_resources'
FileNotFoundError: [Errno 2] No such file or directory: 'angles.txt' for duplex_angle_plotter
ModuleNotFoundError: No module named 'distutils'

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

First of all, thanks for trying. Regardless of this particular issue, we need to strengthen the installation of the python modules (which is a nightmare because the python ecosystem sucks big time) and this feedback is very useful.
Unfortunately, I can't fully reproduce the issue. This is the series of commands I used:

cd /tmp
python3 -m venv venv
pip3 uninstall oxpy oxDNA_analysis_tools
source venv/bin/activate
cp ~/git/oxDNA /tmp/venv
cd /tmp/venv/oxDNA
mkdir pybuild
cd pybuild
cmake .. -DPython=On -DOxpySystemInstall=On -DPYTHON_INCLUDE_DIR=/tmp/venv/include/python3.11 -DPYTHON_EXECUTABLE=/tmp/venv/bin/python3
make install -j12

Trying to test the different components of the installation, I run make test_oat, which was fine apart from duplex_finder, which returned a lot of Error in finding common intersection point and a final --> AN ERROR OCCURRED <--. @ErikPoppleton maybe we can have a look?
As for make test_oxpy, it does fail, but oxpy works in itself (e.g. examples/OXPY/run.py runs just fine), so it has to be something else.

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

UPDATE: the problem with oat is due to a problem in oxpy. It looks like nucleotide positions read by python are just [x, x, x] instead of [x, y, z]. I don't know what's going on but there is definitely an issue with using virtualenv to install oxpy. Can someone else give it a try?

from oxdna.

jinhzhou avatar jinhzhou commented on August 13, 2024

Hi! Thanks for the replies!

It seems that you are installing everything within the venv directory when you are running:
cp ~/git/oxDNA /tmp/venv
cd /tmp/venv/oxDNA
mkdir pybuild....

While I installed everything in the oxDNA directory (cloned through https by vscode) containing a venv directory. Could that be causing any issues?

I will try to install it using the commands you listed and update accordingly.

I also encountered the same Error in finding common intersection point error in duplex_finder when I followed the commands listed in the original post!

Oxpy does seem to work fine even with the "non-normal" installation! In that I am able to run CIR_ASSEMBLY along with others in the examples directory. I am also able to use oat.UTILS.RyeReader and oat.UTILS.oxview to produce an image from data outputted by the examples!

from oxdna.

ErikPoppleton avatar ErikPoppleton commented on August 13, 2024

I am unfortunately on holiday at the moment and don’t have my computer with me to test. However, the only part of oat that gets positions from oxpy is the duplex finder. So assuming that is the only problem, everything else should work. That is a very weird bug though.

from oxdna.

lorenzo-rovigatti avatar lorenzo-rovigatti commented on August 13, 2024

It seems that you are installing everything within the venv directory when you are running: cp ~/git/oxDNA /tmp/venv cd /tmp/venv/oxDNA mkdir pybuild....

This was done just for convenience. You can put it somewhere else and nothing is going to change.

While I installed everything in the oxDNA directory (cloned through https by vscode) containing a venv directory. Could that be causing any issues?

I don't think so!

I will try to install it using the commands you listed and update accordingly.

Great, let me know how it goes.

I also encountered the same Error in finding common intersection point error in duplex_finder when I followed the commands listed in the original post!

Oxpy does seem to work fine even with the "non-normal" installation! In that I am able to run CIR_ASSEMBLY along with others in the examples directory. I am also able to use oat.UTILS.RyeReader and oat.UTILS.oxview to produce an image from data outputted by the examples!

As Erik said, the CIRC_ASSEMBLY does not use oxpy, but the oxDNA executable. There are two different things, although they use the same underlying library.

from oxdna.

Related Issues (20)

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.