lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
43 stars 28 forks source link

[BUG]ModuleNotFoundError: No module named 'oxpy' #43

Closed jamesdalg closed 2 years ago

jamesdalg commented 2 years ago
jd@acadia:~/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/build$ cmake .. -DPython=ON  -DPYTHON_EXECUTABLE=/usr/bin/python3
CMake Deprecation Warning at CMakeLists.txt:8 (cmake_policy):
  The OLD behavior for policy CMP0037 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
-- Adding the targets found in the /home/jd/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/contrib/randisi folder
-- Adding the targets found in the /home/jd/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/contrib/romano folder
-- Adding the targets found in the /home/jd/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/contrib/rovigatti folder
-- Adding the targets found in the /home/jd/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/contrib/tostiguerra folder
-- pybind11 v2.2.4
-- The detected Python's include dirs are: /usr/include/python3.10
-- Enabling Python bindings
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jd/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/build
jd@acadia:~/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/build$ make -j16
Consolidate compiler generated dependencies of target oxdna_common
[ 94%] Built target oxdna_common
Consolidate compiler generated dependencies of target oxDNA
Consolidate compiler generated dependencies of target DNAnalysis
Consolidate compiler generated dependencies of target confGenerator
Consolidate compiler generated dependencies of target _oxpy_lib
[ 96%] Built target oxDNA
[ 96%] Built target DNAnalysis
[ 96%] Built target confGenerator
[ 98%] Built target _oxpy_lib
Consolidate compiler generated dependencies of target core
[100%] Built target core
jd@acadia:~/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/build$ cd ..
jd@acadia:~/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178$ cd examples/OXPY
jd@acadia:~/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/examples/OXPY$ ls -lrt
total 20
-rw-rw-r-- 1 jd jd  764 Sep  8 12:28 run.py
-rw-rw-r-- 1 jd jd  874 Sep  8 12:28 run_overwrite_options.py
-rw-rw-r-- 1 jd jd  616 Sep  8 12:28 input
-rw-rw-r-- 1 jd jd  166 Sep  8 12:28 hairpin.top
-rw-rw-r-- 1 jd jd 3192 Sep  8 12:28 hairpin.conf
jd@acadia:~/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/examples/OXPY$ python3 run.py
Traceback (most recent call last):
  File "/home/jd/oxDNA2/v. 3.4.2/lorenzo-rovigatti-oxDNA-6794178/examples/OXPY/run.py", line 2, in <module>
    import oxpy
ModuleNotFoundError: No module named 'oxpy'
jamesdalg commented 2 years ago

Having a few issues getting OxDNA to run. I'm not quite sure why the oxpy module hasn't been properly installed. Any pointers on how to solve this problem would be immensely helpful.

lorenzo-rovigatti commented 2 years ago

Hi! You don't seem to have compiled the code, but rather just invoked cmake. Can you try to follow the instructions here or, if you already did, to paste the entire output of compilation process?

RodenLuo commented 2 years ago

I believe you just need make install.

And it might also be good to run make test.

jamesdalg commented 2 years ago

That worked. I overlooked the make install as it wasn't in the code block. Thanks!

jamesdalg commented 2 years ago
jd@acadia:~/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/build$ make install
Consolidate compiler generated dependencies of target oxdna_common
[ 94%] Built target oxdna_common
Consolidate compiler generated dependencies of target oxDNA
[ 96%] Built target oxDNA
Consolidate compiler generated dependencies of target DNAnalysis
[ 96%] Built target DNAnalysis
Consolidate compiler generated dependencies of target confGenerator
[ 96%] Built target confGenerator
Consolidate compiler generated dependencies of target _oxpy_lib
[ 98%] Built target _oxpy_lib
Consolidate compiler generated dependencies of target core
[100%] Built target core
Install the project...
-- Install configuration: "Release"
Processing ./oxpy/python/oxpy
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Processing //home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/analysis
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting scikit-learn>0.21.2
  Downloading scikit_learn-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (30.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 30.5/30.5 MB 27.6 MB/s eta 0:00:00
Requirement already satisfied: matplotlib>3.0.0 in /usr/lib/python3/dist-packages (from oxDNA_analysis_tools@ file://localhost//home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/analysis/->oxpy==3.3) (3.5.1)
Requirement already satisfied: numpy>1.16 in /usr/local/lib/python3.10/dist-packages (from oxDNA_analysis_tools@ file://localhost//home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/analysis/->oxpy==3.3) (1.23.1)
Collecting biopython>1.73
  Downloading biopython-1.79-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 32.5 MB/s eta 0:00:00
Collecting threadpoolctl>=2.0.0
  Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting joblib>=1.0.0
  Downloading joblib-1.2.0-py3-none-any.whl (297 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.0/298.0 KB 15.3 MB/s eta 0:00:00
Requirement already satisfied: scipy>=1.3.2 in /usr/lib/python3/dist-packages (from scikit-learn>0.21.2->oxDNA_analysis_tools@ file://localhost//home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/analysis/->oxpy==3.3) (1.8.0)
Building wheels for collected packages: oxpy, oxDNA_analysis_tools
  Building wheel for oxpy (setup.py): started
  Building wheel for oxpy (setup.py): finished with status 'done'
  Created wheel for oxpy: filename=oxpy-3.3-py3-none-any.whl size=2664174 sha256=a4bf551405de83c94e59b08a23fa655714f22580c0010bad224f52d4d0416937
  Stored in directory: /tmp/pip-ephem-wheel-cache-l0v9bdhy/wheels/d3/ae/51/c3760ccbac312848f8ed7e1e8c20d7fac4fdacf5bf4cbccae4
  Building wheel for oxDNA_analysis_tools (pyproject.toml): started
  Building wheel for oxDNA_analysis_tools (pyproject.toml): finished with status 'done'
  Created wheel for oxDNA_analysis_tools: filename=oxDNA_analysis_tools-2.0.3-cp310-cp310-linux_x86_64.whl size=282960 sha256=1d081d6706dfeb9e18cf19657e9e55ff2d584edebeaa1bd7099e2a0aa046d4d1
  Stored in directory: /tmp/pip-ephem-wheel-cache-l0v9bdhy/wheels/a1/72/33/c72f8d4015cdbb8585d1b328d38f1fd6fba9075b8800aaab82
Successfully built oxpy oxDNA_analysis_tools
Installing collected packages: threadpoolctl, joblib, biopython, scikit-learn, oxDNA_analysis_tools, oxpy
  WARNING: The script oat is installed in '/home/jd/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed biopython-1.79 joblib-1.2.0 oxDNA_analysis_tools-2.0.3 oxpy-3.3 scikit-learn-1.1.2 threadpoolctl-3.1.0
jd@acadia:~/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/build$ make test
[  0%] Running oxpy tests
/home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/test/TestSuite.py:10: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils
INFO: Running tests for level 'oxpy'
/home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/test/TestSuite.py:349: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  runner.setDaemon(True)
RESULTS: System 'OXPY':
    Passed/Total: 2/2

RESULTS: Summary for level 'oxpy'
    Passed/Total: 2/2

[  0%] Built target test_oxpy
[ 96%] Built target oxdna_common
[ 96%] Built target confGenerator
[ 98%] Built target oxDNA
[ 98%] Built target DNAnalysis
[100%] Running build integration tests
/home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/test/TestSuite.py:10: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils
INFO: Running tests for level 'run'
/home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/test/TestSuite.py:349: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  runner.setDaemon(True)
RESULTS: System 'THERMOSTATS/JOHN':
    Passed/Total: 2/2
RESULTS: System 'THERMOSTATS/BUSSI':
    Passed/Total: 2/2
RESULTS: System 'THERMOSTATS/LANGEVIN':
    Passed/Total: 2/2
RESULTS: System 'INPUT/SMART_INPUT':
    Passed/Total: 2/2

RESULTS: Summary for level 'run'
    Passed/Total: 8/8

[100%] Built target test_run
[100%] Running quick tests
/home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/test/TestSuite.py:10: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  import distutils
INFO: Running tests for level 'quick'
/home/jd/oxDNA2/v.3.4.2/lorenzo-rovigatti-oxDNA-6794178/test/TestSuite.py:349: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead
  runner.setDaemon(True)
RESULTS: System 'DNA/SSDNA15/MD':
    Passed/Total: 2/2
RESULTS: System 'DNA/SSDNA15/MC':
    Passed/Total: 1/1
RESULTS: System 'DNA/SSDNA15/VMMC':
    Passed/Total: 1/1
RESULTS: System 'DNA/DSDNA8/MD':
    Passed/Total: 1/1
RESULTS: System 'DNA/DSDNA8/MC':
    Passed/Total: 1/1
RESULTS: System 'DNA/DSDNA8/VMMC':
    Passed/Total: 1/1
RESULTS: System 'THERMOSTATS/JOHN':
    Passed/Total: 1/1
RESULTS: System 'THERMOSTATS/BUSSI':
    Passed/Total: 1/1
RESULTS: System 'THERMOSTATS/LANGEVIN':
    Passed/Total: 1/1
RESULTS: System 'LJ':
    Passed/Total: 2/2

RESULTS: Summary for level 'quick'
    Passed/Total: 12/12

[100%] Built target test_quick
[100%] Built target test