Giter Site home page Giter Site logo

lorenzo-rovigatti / oxdna Goto Github PK

View Code? Open in Web Editor NEW
38.0 38.0 26.0 49.2 MB

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings

Home Page: https://dna.physics.ox.ac.uk/

License: GNU General Public License v3.0

CMake 2.21% Python 20.04% Shell 0.14% Makefile 0.02% C++ 62.98% Cuda 12.10% C 2.39% Cython 0.12%
dna physics-simulation simulation

oxdna's Introduction

oxdna's People

Contributors

cgevans avatar debeshmandal avatar dependabot[bot] avatar erikpoppleton avatar eryykr avatar ferdinandor avatar flavio-romano avatar jonahowns avatar lorenzo-rovigatti avatar mlsample avatar subhajit-roy-partho avatar sulcgroup avatar tgfrancesco avatar zoombya 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oxdna's Issues

[BUG] Failed compilation with Cuda and c++ 11.1.0

Describe the bug
Compilation fails while creating common_generated_cuda_decive_utils.cu.o for errors in stl_pair.h

To Reproduce
Steps to reproduce the behavior:

  1. Followed the installation procedure recommended on the repo
  2. Try with and without DCUDA_COMMON_ARCH

Expected behavior
Compilation :)

Desktop (please complete the following information):

  • OS: Linux
  • cmake 3.20.2 make 4.3 g++ 10.2.0 c++ 11.1.0

Additional context
I report here the error code.

Building NVCC (Device) object src/CMakeFiles/oxDNA.dir/CUDA/Interactions/oxDNA_generated_CUDAInteractionFactory.cu.o
/usr/include/c++/11.1.0/bits/stl_pair.h(460): error: argument list for class template "std::pair" is missing

/usr/include/c++/11.1.0/bits/stl_pair.h(460): error: expected a ")"

/usr/include/c++/11.1.0/bits/stl_pair.h(460): error: template parameter "_T1" may not be redeclared in this scope

/usr/include/c++/11.1.0/bits/stl_pair.h(460): error: expected a ";"

/usr/include/c++/11.1.0/bits/basic_string.h(6050): error: argument list for class template "std::__cxx11::basic_string" is missing

/usr/include/c++/11.1.0/bits/basic_string.h(6050): error: expected a ")"
[...]
100 errors detected in the compilation of "/home/matteo/Downloads/oxdna_bleed/oxdna-code/oxDNA/src/CUDA/Backends/MD_CUDABackend.cu".
Compilation terminated.
CMake Error at oxDNA_generated_MD_CUDABackend.cu.o.Release.cmake:280 (message):
  Error generating file
  /home/matteo/Downloads/oxdna_bleed/oxdna-code/oxDNA/build/src/CMakeFiles/oxDNA.dir/CUDA/Backends/./oxDNA_generated_MD_CUDABackend.cu.o

I am not entirely sure if the bug lies in oxDNA or possibly in this c++ 11.1.0, maybe you can help me a little here.

[FEATURE REQUEST] oxdna-> pdb : RMSF feature from tacoxDNA

Hi,
we recently developed a modification to the tacoxDNA oxdna->pdb script that allows including RMSF deviation data calculated with oat. the data is added into the bfactor field of the pdb output.
the current version only places a dummy variable, hence existing dependencies will not be broken by the modification

including these modifications to the pdb conversion script of oat would greatly simplify our current workflow.
I will link a pull request containing the modification to this issue, with the hope of acceptance.

best regard

Additional simulation parameters exposed via oxpy

I would request the following parameters be exposed through the oxpy interface;

  • Box size for the currently loaded configuration through ConfigInfo
  • Strand index as written in the topology file for a molecule object

These will be particularly important once the ANM-oxDNA fork is merged in as they are used in the conversion from oxDNANM back to PDB.

oxpy compile failure

oxpy bindings fail to compile with multiple python interpreters present on the system.
For me 3.7 and 3.8 were installed. python3 starts up 3.8 however the listing is:

-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so (found suitable version "3.8.2", minimum required is "3")
-- Found PythonInterp: /usr/bin/python3.7 (found version "3.7.8")
CMake Error at oxpy/pybind11/tools/FindPythonLibsNew.cmake:95 (message):
  Python config failure:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  ImportError: cannot import name 'sysconfig' from 'distutils'
  (/usr/lib/python3.7/distutils/__init__.py)
Call Stack (most recent call first):
  oxpy/pybind11/tools/pybind11Tools.cmake:16 (find_package)
  oxpy/pybind11/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred!

Distance between bonded neighbors exceeds acceptable values

defo-CUDA-1.log
defo-CUDA-1_input.txt
Dear oxDNA developers,
We are simulating a 3D structure consisting of 14000 nt in oxDNA.org, and I find it quite difficult to overcome this problem.
We use CaDNAno to design the structure, and then using oxview to relax the structure in oxserve. After relaxtion, we uploaded the files to the oxDNA.org. We use the defalut parameters, and chose "Need relax" . But we found the simulation was not run sucessfully, and the file downloaded from Log report the the error "...Distance between bonded neighbors exceeds acceptable values...". As we noted above, we have relaxed the structure in oxserve, and we have no idea what is the mistake. We are asking for your help.
Thanks in advance for any help.

Location of interaction threshold energies? (General question)

Hi there,

I have a program which takes the output from output_bonds.py (in analysis tools) and determines whether any stacking or hydrogen bonds are broken throughout the trajectory. I need to define threshold values so that if the energy of an interaction is below this threshold, it is considered bonded.

It looks like the threshold for hydrogen bonding (HB_CUTOFF) is -0.1 as defined in src>Utilities>OrderParameters.h. However I can't find the threshold for normal, coaxial or cross stacking. The stacking observable UnstackedList.h references a value called threshold_fraction, and reads "the nucleotides will be counted as stacked if their stacking energy is at least this fraction of the maximum stacking energy." Where is this defined? And where do I find the maximum stacking energy?

Any guidance would be greatly appreciated. Thank you.

Kind regards
Daniel H.

[BUG] ERROR: Cannot convert '0.' to a number

Describe the bug

When using tacoxdna CanDo → oxDNAbeta, at the input MC relax, I met the following error.

ERROR: Cannot convert '0.' to a number

To Reproduce

Feed this cndo file to tacoxdna CanDo → oxDNAbeta, and try to relax the generated result.

Expected behavior

Run through relax

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS
  • oxDNA Version:
    INFO: RELEASE: v3.3
    INFO: GIT COMMIT: c1b152f
    INFO: COMPILED ON: 05/08/22
    
  • cmake/make/compiler versions: cmake version 3.16.3/GNU Make 4.2.1/gcc version 9.4.0

Additional context

This can be easily fixed using two sed commands on the conf file for this example.

sed -i 's/0\. /0 /g' tetrahedron.cndo.dat
sed -i 's/0\.$/0/g' tetrahedron.cndo.dat

This can also be fixed in tacoxdna CanDo → oxDNAbeta.

But the cause is deep in the fast_double_parser. It's not treating 0. as a number, see lemire/fast_double_parser#65. My proposed solution there should have almost no side effects (at least in the case of oxDNA) except fixing this error. Because from the next time step onwards, that block is never reached.

[BUG] CMake sets fixed path to libcommon.so in build directory / name complicates system-wide installation

In trying to install oxDNA system-wide on a few computers (one Debian, one ArchLinux),

When linking, cmake sets a fixed, absolute RPATH to the build/src/ directory, wherever that is at the time of building, in the oxDNA executables. As a result, they will not be able to find libcommon.so (or libcommon-debug.so) if the build directory is later moved, or is inaccessible to the user (eg, if it's in another user's home directory). The RPATH could simply be removed, and libcommon.so placed in a directory on the system's library path, but in that case, the name of the library is not well-suited to a system library directory like /usr/lib.

Would you consider changing the name of libcommon.so to something like liboxdna_common.so? I've experimented with doing this on my AUR package for oxdna, and it seems to work. I'd be happy to create a PR for this if it would be helpful.

I expect that most users are not doing system-wide installations of oxDNA, and this is why cmake is not set up to install everything itself; an alternative here would be to set that up, but just renaming the library seems to be enough to let me package everything simply without changing the build process.

Oxpy & oat not working on M1 Mac

Hi all,
I'm still having issues with oxpy and oat, issues similar to those investigated here:

sulcgroup/oxdna_analysis_tools#22

This time I'm working on macOS Monterey 12.5, with M1 architecture. I was able to compile and test successfully oxDNA but make test_oxpy was not passed and if I try to call oat config this raises a brutal segmentation fault:

INFO: oxDNA_analysis_tools version: 2.0.3
INFO: running config.py installed at:  /Users/simo/opt/anaconda3/envs/oxdna/lib/python3.9/site-packages/oxDNA_analysis_tools/config.py
INFO: Python version: 3.9.13
INFO: Package Numpy found. Version: 1.21.5
INFO: Package MatPlotLib found. Version: 3.5.2
INFO: Package BioPython found. Version: 1.78
INFO: Package SciKit-Learn found. Version: 1.1.1
zsh: segmentation fault  oat config

As suggested I created a conda virtual enviroment with python3.9 and the requested libraries and then compiled with:

cmake .. -DPython=ON -DPYTHON_INCLUDE_DIRS=/Users/simo/opt/anaconda3/envs/oxdna/include/python3.9 -DPYTHON_EXECUTABLE=/Users/simo/opt/anaconda3/envs/oxdna/bin/python

I also tried without a virtual env (I use anaconda as package manager, the one developed for M1 arm architectures) and without specifying the path using only -DOxpySystemInstall=On, but this doesn't change anything.

Thank you in advance,
Simone

P.S. The cmake log output on the console:

-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Failed
-- The '-march=native' flag is not supported, compiling without it
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Adding the targets found in the /Users/simo/oxDNA/contrib/randisi folder
-- Adding the targets found in the /Users/simo/oxDNA/contrib/romano folder
-- Adding the targets found in the /Users/simo/oxDNA/contrib/rovigatti folder
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
-- Adding the targets found in the /Users/simo/oxDNA/contrib/tostiguerra folder
-- pybind11 v2.2.4
-- The detected Python's include dirs are: /Users/simo/opt/anaconda3/envs/oxdna/include/python3.9
-- Enabling Python bindings
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/simo/oxDNA/build

Include python setup files in the root directory

Summary

For most users, installation of a Python package takes place using one of three ways:

  1. pip install package - Installing from PyPi
  2. conda install package - Installing from an Anaconda source
  3. git clone /path/to/package && pip install package - downloading the source files and building manually using pip

This issue relates to number 3, allowing Python users (who may not be familiar with building C/C++ packages) to install the package without invoking CMake or any C-based build tools.

Current State

To install the oxpy package, the following steps must be done:

git clone https://github.com/lorenzo-rovigatti/oxDNA
cd oxDNA
mkdir build
cd build
cmake .. -DPython=1
make
make install

Upgraded State

The new installation method will be:

git clone https://github.com/lorenzo-rovigatti/oxDNA
cd oxDNA
pip install .

Tasks

  1. Create a setup.py files
  2. Investigate the use of other setup files, e.g. setup.cfg
  3. Investigate how to include build options e.g. -DCUDA=1

PCA inconsistencies between paper, doc, and code

Paper:

Link

Finally, the PCA script outputs a .json file for the oxView tool, which displays arrows on the structure corresponding to the sum of a user-defined number of components weighted by their respective eigenvalues.

Doc:

Snippet link

This will produce an oxView json file that plots arrows on the structure which corresond to the weighted sum of the first n components. n can be set by modifying the SUM variable in the pca.py script. To view in the viewer, drag and drop the mean structure, topology and PCA json files onto the viewer window.

From the old code snippet, the above is true.

From the current code snippet, the json files are written for each Principal Component for the top N (hard coded, can be changed by the user) components, and the weight for each component is the square root of its respective eigenvalue rather than the eigenvalue itself. It makes more sense, as the eigenvalue itself is the variance along that component, while the square root of the eigenvalue can be thought of as the standard deviation. Sorry to be picky... just that it might save someone else's time from being confused.

If I am not mistaken, it also makes more sense to visualize each component separately. As for each principal component, what the visual does essentially is that it distributes (or more mathematically, it projects) the high dimensional eigenvector to all nucleotides. Hence the visual shows the variance (deviation) of each nucleotide from its reference (mean/centroid) position. The length of the three-element vector (xyz vector) projected on each nucleotide corresponds to the importance of that nucleotide in terms of the principal component of interest. From another point of view, the total variance of each nucleotide is also distributed to all the principal components.

Taking together, the number of the significant principal components reveals the number of the significant motion patterns (the collective motion or say the interplay between all nucleotides). Then for each motion pattern (i.e., for each principal component), the arrows overlaying on the reference positions of all nucleotides visually reveal the deviations from the reference positions. With the data on hand, one can also visualize from another point of view, by showing all the projected xyz vectors for each nucleotide. In this way, it will become clear that some nucleotides are actively involved in several motion patterns, some other nucleotides are involved in just one, and the rest are not involved in any.

If the above understanding is correct, then a better way to plot the vectors is to place the center of the line on the nucleotide and draw an arrow on both ends of the line.

image

For the Holliday junction example, the PC0 reveals the scissoring motion of the "arms". PC1 reveals the motion of the "fist" perpendicular to the other duplex. PC1 reveals the motion of the "fist" parallel to the other duplex.

image

If we overlay PC0, PC1, and PC2 on each nucleotide with different colors, we can then clearly see that the single-stranded overhanging "fist" is contributing to all three motion patterns while most of the rest are contributing to just one.

image

Modifying existing external force definition

I am right now trying to change the RepulsiveSphere.cpp file to change the behaviour of the repulsive sphere from keeping elements inside the sphere to keeping them outside.

I just changed the value and potential function to

LR_vector RepulsiveSphere::value(llint step, LR_vector &pos) {
	LR_vector dist = CONFIG_INFO->box->min_image(_center, pos);
	number mdist = dist.module();
	number radius = _r0 + _rate * (number) step;
	
	std::cout << "Hello World" << std::endl;


	if(mdist >= radius) return LR_vector(0., 0., 0.);	
	else return dist * (_stiff * (1. - radius / mdist));
}

number RepulsiveSphere::potential(llint step, LR_vector &pos) {
	LR_vector dist = CONFIG_INFO->box->min_image(_center, pos);
	number mdist = dist.module();
	number radius = _r0 + _rate * (number) step;

	std::cout << "Hello World"  << std::endl;


	if(mdist >= radius) return 0.;
	else return 1e8;
}

and recompiled oxDNA completely. However, it seems that the repulsiveSphere potential behaves exactly as before (I see elements dragged into the sphere).

I don't think this is a bug but rather me not finding the right code location to change the potential behaviour. Can you tell me if my approach of modifying the potential this way is principally correct?

Best Markus

`output_bonds` not working

I have recently upgraded to the latest commit and have tried to use the output_bonds analysis tool. However, for any topology file that I use (including those in the examples), I receive the message: oxpy.core.OxDNAError: Can't read topology file 'initial.top'. Aborting

I can successfully run run.py in examples/OXPY and pass the other build tests. An example run that gives me this error message is: oat output_bonds examples/HAIRPIN/input examples/HAIRPIN/initial.conf

Precision

The research paper says mixed precision is generally more numerically stable than single, but was that claim tested specifically for oxDNA? Single precision takes a different trajectory (butterfly effect), but in MD mixed only really helps with energy minimization.

Maybe this could improve quaternions: https://hal.science/hal-02470766/document

UnicodeDecodeError when running FFS

Hi,
I'm using oxDNA to perform forward flux sampling and I'm not sure whether the script ffs_flux.py has a bug. When I try to run the example in directory oxDNA/examples/FFS_example/FFS/FLUX/, I encountered errors and copyed some of them:
Process Process-2:
Traceback (most recent call last):
File "/home/nli/anaconda3/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/home/nli/anaconda3/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/scratch/job.2414/./ffs_flux.py", line 213, in f
for line in output.readlines():
File "/home/nli/anaconda3/lib/python3.10/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 3247: invalid start byte

I attached the whole directory and errors are in job.2414.out file. Oddly, the simulatoin completed without error in ffs.log. I wonder if the error about ffs_flux.py has an impact on the result of initial flux. Thank you very much.
FLUX.zip

Best regards,
lina

[BUG] K (kinetic energy) value difference between energy_file and the conf headers

Describe the bug

Hi, I notice in MD, there are three different places that output energy values (U, K, U+K), console, energy_file, and conf headers. The console and energy_file outputs are identical. However, the K (kinetic energy) values are different in energy_file and conf headers. Is this desired or not? Thanks!

To Reproduce

Using this test example, but change the following line (print_energy_every ) to 1e5 to match the print intervals.

print_energy_every = 1e3

I get different K values.

image

Expected behavior

From my understanding of the doc, they should be the same. If they are designed to be different, why?

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS
  • oxDNA Version: 3.3
  • cmake/make/compiler versions: cmake version 3.16.3, GNU Make 4.2.1, gcc version 9.4.0

(This is also the case for oxDNA 2.3.2 on both Ubuntu 20.04.4 LTS and Windows 10.)

Additional context

The difference comes from that when printing energy_file, in the below line, the _directions.size() is 3, while when printing the conf header, it is 0.

number factor = 1.5 / _directions.size();

And hence the code snippet below is not executed when printing the conf header.

for(auto dir: _directions) {
K += SQR(p->vel[dir]) * factor;
}

See live debugging screenshots below:

image

image

Templates remaining in contrib/romano

Building with the romano contrib directory (using make romano) fails in contrib/romano/src/Backends/MCMoves/Reappear.
I assume this is because it still uses templates, but I couldn't quite figure out what changes were needed.

It is not really of an issue for me as I can just use the SourceForge release, but I thought I should make a note of it here.

[FEATURE REQUEST] bond_analysis.py

The bond_analysis.py script only outputs the correct bond occupancy in the JSON file. Will it be possible to save total/incorrect bond occupancy in the same JSON file?

GPU speed-up for small systems

Hi,

The GPU speedup is really great for larger systems like DNA origami, but is small for small systems. Presumably this is due to there being more GPU cores than nucleotides? It would be nice if was possible to run several small systems at the same time on one GPU to better use the GPU cores. Essentially putting many small systems in separate and non interacting boxes and simulating them at the same time.

Might be difficult to implement though :)

Cheers

Erik

Discussion of relaxation in documentation

Although it has been decided that relaxation is an "art," I think that it would be valuable to provide some discussion of it in the documentation -- e.g. example input files, or example commands that override particular arguments in an input file to enable relaxation.

OAT installation failing with python 3.9 and python 3.10

Greetings!

During installation of OAT it fails at building wheel for oxDNA analysis tools. The following error comes up.

Building wheel for oxDNA-analysis-tools (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for oxDNA-analysis-tools (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [93 lines of output]
      running bdist_wheel
      running build
      running build_py
      running egg_info
      writing src/oxDNA_analysis_tools.egg-info/PKG-INFO
      writing dependency_links to src/oxDNA_analysis_tools.egg-info/dependency_links.txt
      writing entry points to src/oxDNA_analysis_tools.egg-info/entry_points.txt
      writing requirements to src/oxDNA_analysis_tools.egg-info/requires.txt
      writing top-level names to src/oxDNA_analysis_tools.egg-info/top_level.txt
      reading manifest file 'src/oxDNA_analysis_tools.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      writing manifest file 'src/oxDNA_analysis_tools.egg-info/SOURCES.txt'
      /tmp/pip-build-env-jl32vqw7/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning:     Installing 'oxDNA_analysis_tools.cython_utils' as data is deprecated, please list it in `packages`.
          !!


          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'oxDNA_analysis_tools.cython_utils' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.

          'oxDNA_analysis_tools.cython_utils' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).

          Please make sure that 'oxDNA_analysis_tools.cython_utils' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" and "data files" on setuptools
          documentation page.


      !!

        check.warn(importable)
      copying src/oxDNA_analysis_tools/cython_utils/get_confs.c -> build/lib.linux-x86_64-cpython-39/oxDNA_analysis_tools/cython_utils
      running build_ext
      building 'oxDNA_analysis_tools.UTILS.get_confs' extension
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-jl32vqw7/overlay/lib/python3.9/site-packages/numpy/core/include -I/mnt/c/oxDNA/venv_oat/include -I/usr/include/python3.9 -c src/oxDNA_analysis_tools/cython_utils/get_confs.c -o build/temp.linux-x86_64-cpython-39/src/oxDNA_analysis_tools/cython_utils/get_confs.o
      In file included from /tmp/pip-build-env-jl32vqw7/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1948,
                       from /tmp/pip-build-env-jl32vqw7/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                       from /tmp/pip-build-env-jl32vqw7/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                       from src/oxDNA_analysis_tools/cython_utils/get_confs.c:759:
      /tmp/pip-build-env-jl32vqw7/overlay/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      src/oxDNA_analysis_tools/cython_utils/get_confs.c: In function ‘__pyx_pf_20oxDNA_analysis_tools_5UTILS_9get_confs_cget_confs’:
      src/oxDNA_analysis_tools/cython_utils/get_confs.c:2405:16: warning: passing argument 1 of ‘fread’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       2405 |   (void)(fread(__pyx_v_chunk, __pyx_v_chunk_size, 1, __pyx_v_traj_file));
            |                ^~~~~~~~~~~~~
      In file included from /usr/include/stdio.h:867,
                       from /usr/include/python3.9/Python.h:25,
                       from src/oxDNA_analysis_tools/cython_utils/get_confs.c:19:
      /usr/include/x86_64-linux-gnu/bits/stdio2.h:284:25: note: expected ‘void * restrict’ but argument is of type ‘const char *’
        284 | fread (void *__restrict __ptr, size_t __size, size_t __n,
            |        ~~~~~~~~~~~~~~~~~^~~~~
      src/oxDNA_analysis_tools/cython_utils/get_confs.c:2490:77: warning: passing argument 1 of ‘__pyx_f_20oxDNA_analysis_tools_5UTILS_9get_confs_parse_conf’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       2490 |     __pyx_t_4 = __pyx_f_20oxDNA_analysis_tools_5UTILS_9get_confs_parse_conf(__pyx_v_chunk, (__pyx_v_conf_starts[__pyx_t_9]), (__pyx_v_sizes[__pyx_t_13]), __pyx_v_nbases); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
            |                                                                             ^~~~~~~~~~~~~
      src/oxDNA_analysis_tools/cython_utils/get_confs.c:1780:18: note: expected ‘char *’ but argument is of type ‘const char *’
       1780 | static PyObject *__pyx_f_20oxDNA_analysis_tools_5UTILS_9get_confs_parse_conf(char *, int, int, int); /*proto*/
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/oxDNA_analysis_tools/cython_utils/get_confs.c:2530:8: warning: passing argument 1 of ‘free’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       2530 |   free(__pyx_v_chunk);
            |        ^~~~~~~~~~~~~
      In file included from /usr/include/python3.9/Python.h:34,
                       from src/oxDNA_analysis_tools/cython_utils/get_confs.c:19:
      /usr/include/stdlib.h:565:25: note: expected ‘void *’ but argument is of type ‘const char *’
        565 | extern void free (void *__ptr) __THROW;
            |                   ~~~~~~^~~~~
      src/oxDNA_analysis_tools/cython_utils/get_confs.c: In function ‘__pyx_f_20oxDNA_analysis_tools_5UTILS_9get_confs_parse_conf’:
      src/oxDNA_analysis_tools/cython_utils/get_confs.c:2847:24: warning: passing argument 1 of ‘strtok’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
       2847 |   __pyx_v_ptr = strtok(__pyx_v_ptr, ((char const *)"t = "));
            |                        ^~~~~~~~~~~
      In file included from /usr/include/python3.9/Python.h:30,
                       from src/oxDNA_analysis_tools/cython_utils/get_confs.c:19:
      /usr/include/string.h:336:14: note: expected ‘char * restrict’ but argument is of type ‘const char *’
        336 | extern char *strtok (char *__restrict __s, const char *__restrict __delim)
            |              ^~~~~~
      x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -g -fwrapv -O2 build/temp.linux-x86_64-cpython-39/src/oxDNA_analysis_tools/cython_utils/get_confs.o -L/usr/lib/x86_64-linux-gnu -o build/lib.linux-x86_64-cpython-39/oxDNA_analysis_tools/UTILS/get_confs.cpython-39-x86_64-linux-gnu.so
      installing to build/bdist.linux-x86_64/wheel
      running install
      running install_lib
      copying build/lib.linux-x86_64-cpython-39/oxDNA_analysis_tools/cython_utils/get_confs.c -> build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools/cython_utils
      copying build/lib.linux-x86_64-cpython-39/oxDNA_analysis_tools/UTILS/get_confs.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools/UTILS
      running install_egg_info
      removing 'build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools-2.0.3-py3.9.egg-info' (and everything under it)
      Copying src/oxDNA_analysis_tools.egg-info to build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools-2.0.3-py3.9.egg-info
      running install_scripts
      error: [('build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools-2.0.3-py3.9.egg-info', 'build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools-2.0.3.dist-info', "[Errno 13] Permission denied: 'build/bdist.linux-x86_64/wheel/oxDNA_analysis_tools-2.0.3.dist-info'")]
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for oxDNA-analysis-tools
Failed to build oxDNA-analysis-tools
ERROR: Could not build wheels for oxDNA-analysis-tools, which is required to install pyproject.toml-based projects

Interestingly, OAT gets installed without any issue when I use python 3.8. Could you please help me with this? I posted here since I thought after the updates, all oxDNA related queries go here. Thank you for your time and consideration.

Warm Regards
Prateek

[BUG]ModuleNotFoundError: No module named 'oxpy'

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'

coil structures

Hi
I have been reading paper on DNA-coil structures and I notice sequence length not more than 600bp (i.e. https://academic.oup.com/nar/article/50/5/2480/6533609 and https://www.nature.com/articles/srep07655). I am wondering if you have an internal benchmark or comments on coil structures more than 2000bp. I'd like to simulate a DNA gene aroung 3500bp. How could be oxDNA simulation reliable? Thanks

ed. actually here https://www.frontiersin.org/articles/10.3389/fmolb.2021.693710/full length is longer than thousands base pair)

[BUG] oxpy.core.OxDNAError: Key `use_average_seq' not found

Hello, I encountered this problem when using this script, how can I solve it, thank you very much!!! LOL

Traceback (most recent call last):
File "/home/wangyue/.local/bin/oat", line 8, in
sys.exit(main())
File "/home/wangyue/.local/lib/python3.8/site-packages/oxDNA_analysis_tools/entry.py", line 24, in main
to_call.main()
File "/home/wangyue/.local/lib/python3.8/site-packages/oxDNA_analysis_tools/generate_force.py", line 50, in main
if (not inp["use_average_seq"] or inp.get_bool("use_average_seq")) and "RNA" in inp["interaction_type"]:
oxpy.core.OxDNAError: Key `use_average_seq' not found

observable_file input option

Add an observable_file option to the oxDNA input file to have a way of storing observables,
and exchanging \ building them with 3d party tools like ox-view.

Strange relaxation trajectory

Hi,

I relaxed a structure and got the following trajectory. Some nucleotides first got exploded and then dragged back. And sometime later, the same phenomenon happened again. Is this normal? The structure and input files are mentioned after the video. For this structure, the end conf is fine to feed to the MD production run. However, I met the same issue for the oxview's icosahedron example, and the end conf cannot be simulated because of the long backbone distances (ERROR: Distance between bonded neighbors 1848 and 1849 exceeds acceptable values (d = 5.591129)). For the icosahedron, the structure is in the exploded state even after 1e8 steps of MD relaxation. For both cases, I'm using the generated external forces file, so stiff = 0.09 r0 = 1.2 PBC = 1 are in the file. back_in_box=1 is in the input file. Any help is much appreciated. Thanks.

tetrahedron_cndo_relax.mp4

I used the following structure and input files.

Structure: Feed this cndo file to tacoxdna CanDo → oxDNAbeta and check the Print an external-forces file option.
Input MC and MD relaxation files: input_relax_MC.txt, input_relax_MD.txt

[BUG] generate-RNA.py

Describe the bug
The script to generate conf and top is complaining about model.h missing:

python2 generate-RNA.py
IOError: [Errno 2] No such file or directory: '/usr/local/oxDNA-3.4.2/oxDNA/legacy/UTILS/../src/model.h'

To Reproduce
Steps to reproduce the behavior:
Run the script within the directory UTILS using python2

Expected behavior
It should generate conf and top filles from sequence txt

Desktop (please complete the following information):

  • OS: Linux Ubuntu 20.04
  • oxDNA Version 3.4.2
  • cmake/make/compiler versions

Additional context
The script works properly fixing in base.py line 25
model = os.path.join(os.path.dirname(file), "../../src/model.h")
and line 47:
model = os.path.join(os.path.dirname(file), "../../src/Interactions/rna_model.h")

More information on FSInteraction

I am using FSInteraction which is part of contrib/rovigatti and I am wondering where I can find details of the potential such as the equations used for the contributions to the potential.

Stacking Strength for Individual Nucs (General Question)

Hello again--

The sequence parameter file(s) allows us to change the bonding strengths between A, G, C and T. Is there a way to change bonding strengths for individual nucleotides? Let's say I don't want nucs 14 and 15 to stack with each other, but I still want them to hybridize to their complements and stack to their neighbors (13 and 16, respectively). Is this possible?

Kind regards
Daniel

(OAT Question) Computing Twist between bp

Hi,

Sorry if this is misplaced... I work with Daniel Hollis and I believe he's asked questions here before.

We have recently been studying helical pitch/twist angles. I noticed in a build of standalone oat (before the oxDNA + oat merge) that there used to be a function in UTILS/geom.py called get_turn_per_bp that we think might have been used to compute this.

We were wondering if this is applicable at all to oxDNA2 model (we think we found a formula for helicity vector in oxDNA1 model in paper: https://arxiv.org/abs/1009.4480 ). I thought maybe not as this function cruxes on backbone-backbone vector of the two bp, which makes more sense in oxDNA1 model than oxDNA2 model, but maybe I don't yet fully understand it.

Let me know if anything is unclear.

Thanks,
Tommy Swope

Getting error when installing

Hi,
I encountered some errors when I install oxDNA3.5.0. My system is CentOS 7.6 with gcc 4.8.5. Accroding to installation requirements for g++≥4.9, I first installed gcc5.1.0. Then I used gcc5.1.0 to compile and entered the following command:
cd oxDNA_2
mkdir build
cd build
/share/home/nli/soft/cmake-3.4.3/bin/cmake ..
make -j4

In the last step, an error occurred as follows:

1

Then I tried to use the original gcc4.8.5 of CentOS7.6. I entered the same command as above. There was no error reported this time. As I mainly want to perform forward flux sampling using oxDNA, I tested the example in the directory examples/FFS_example/FFS/FLUX/. However, it runned for a few seconds and reported the error as follows:

38aa02362a2ec6aa0da58969757eb08

I am confused about the regex_error. I tested other examples such as HAIRPIN, and it also reported regex_error. In addition, the last few lines in the screenshot seemed to indicate a bug with the ffs_flux.py code.

Does it indicate that I didn’t install the oxDNA correctly? How should I deal with these errors? Thank you.

Best regards,
na

Just a quick fix for oxView overlays

Hi all! I was visualizing some overlays with oxView (the output_bonds json files): some of them work just fine, but others present a blank scale in the colorbar. I'll post here two examples of what I mean by working and not working.

As always, thank you all for considering this issue! In alternative I could produce the colorbar separately via matplotlib, but if it's easy fixable would be nice.

Schermata 2022-09-25 alle 13 55 26

Schermata 2022-09-25 alle 13 55 59

[FEATURE REQUEST] a question about oat oxDNA_PDB -p

Hi, I encountered this problem when using this script, how can I solve it, thank you very much!!! LOL
Can this code be enabled by multi-core calculations like other codes?

oat oxDNA_PDB -p 80 1.top r1_conf.dat 53 -H
usage: oxDNA_PDB.py [-h] [-o OUTPUT] [-H] [-u] [-1] [-r RMSF_BFACTOR] topology configuration direction [pdbfiles]
oxDNA_PDB.py: error: unrecognized arguments: -p

Best regards,
Yue

[BUG] Relaxation of DNA structures behaves differently between recent oxDNA versions and the old one on oxServe

Describe the bug
When pulling structures into desired starting configurations using mutual traps, the version of oxDNA running on the oxServe plugin of oxView is significantly more stable than the current version here (or this fork by @Jonahowns). I have not been able to successfully compile the old version used by oxServe for local testing (which is using code from this repository. I don't know the specific checkout, maybe @zoombya can double check?). This implies that one or more of the following is different between this older version of oxDNA and the current (post move to GitHub) implementations:

  • Mutual traps or external forces in general
  • FENE potentials
  • The way max_backbone_force and max_backbone_far work

To Reproduce
pull_test.zip
The attached zip file contains a simulation where this behavior occurs. This structure is stable with the default oxServe input file, but the very similar input file in the example will explode within the first 10000 steps if run on the current oxDNA. The structure can be made stable by decreasing the dt 10x and the max_backbone_force 100x.

Expected behavior
It would be nice to know what changed between the two versions. It would also be nice if the older oxDNA_anm version of relaxation turns out to be physically reasonable and the current behavior could be updated to match because it is much more successful at producing starting structures for simulations.

Desktop (please complete the following information):

  • OS: SUSE Linux Enterprise Server 15 SP4, MacOS 13.4.1
  • Tested with the latest version of the oat_dev branch (using new topology) and the latest version of oxpy_anm. I haven't been able to get it to compile on the server, but I think the latest version of anm-oxdna is close to what oxServe is running.
  • cmake/make/compiler versions - probably not relevant because the behavior is the same whether I use a GPU-compiled version on the server or the CPU-compiled one on my laptop.

Output_bonds script doesn't give information on timestep [BUG] XXX

Hello!

For every configuration, the output_bonds shows t =0. Everything else seems to be the alright, based on the size, I think it has generated data completely just the time info is missing. Please help me with this, I need to run this command for a big set of data.

To Reproduce
I ran this command: oat output_bonds input.txt trajectory.dat | tee output_bonds.txt >/dev/null 2>&1 &

Desktop (please complete the following information):

  • I use WSL (Ubuntu 20.04) on windows 10.
  • oxDNA_analysis_tools version: 2.0.3
  • cmake version 3.16.3

Warm Regards
Prateek

[BUG] python3.9 compile failure with oxpy

Describe the bug
For the latest oxDNA-3.3, fail to compile oxpy with python3.9(Anaconda3).
The old version 'oxDNA-analysis-tools-1.0.15' works just fine on my system.

To Reproduce
Steps to reproduce the behavior:

  1. cmake .. -DCUDA=ON -DPython=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DOxpySystemInstall=On
  2. make
  3. make install
Processing ./oxpy/python/oxpy
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/fsa/home/user/apps/oxDNA-3.3/build2/oxpy/python/oxpy/setup.py", line 7, in <module>
          setup(
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 75, in _install_setup_requires
          dist = MinimalDistribution(attrs)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/__init__.py", line 57, in __init__
          super().__init__(filtered)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/dist.py", line 460, in __init__
          for ep in metadata.entry_points(group='distutils.setup_keywords'):
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 999, in entry_points
          return SelectableGroups.load(eps).select(**params)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 449, in load
          ordered = sorted(eps, key=by_group)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 996, in <genexpr>
          eps = itertools.chain.from_iterable(
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py", line 16, in unique_everseen
          k = key(element)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 931, in _normalized_name
          return self._name_from_stem(stem) or super()._normalized_name
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 600, in _normalized_name
          return Prepared.normalize(self.name)
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 855, in normalize
          return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
        File "/fsa/home/user/apps/anaconda3/lib/python3.9/re.py", line 210, in sub
          return _compile(pattern, flags).sub(repl, string, count)
      TypeError: expected string or bytes-like object
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

make: *** No rule to make target install. Stop.

Dear oxDNA Team,

I am currently facing an issue with the installation process of the oxDNA package. I have followed the provided instructions and successfully compiled the code using make -j4. However, when I attempt to run make install, I receive the following error message:

make: *** No rule to make target install'. Stop.`

Consequently, I am unable to proceed with the installation of the oxDNA package.

Here is some information about my environment:

Operating System: macOS 13.1 (22C65)
CMake Version: cmake version 3.25.2
Compiler: Apple clang version 14.0.0 (clang-1400.0.29.202)
Python Version: Python 3.9.15

I have tried searching for possible solutions, but I have been unable to find a way for this issue. I would appreciate any help, or I would like to know if it is a common issue.

Thank you for your time and support.

Best regards,
Jérémie Marlhens

[BUG] oxpy `file_info` segfaults when presented with a malformed trajectory file

Describe the bug
When given a trajectory file in which the final conf is malformed (i.e. the file is prematurely truncated), oxDNA_analysis_tools.file_info.file_info will crash with a segmentation fault error.
The cause of this appears to be a misalignment between the behaviors of oxDNA_analysis_tool.UTILS.RyeReader.descibe and cget_confs (which I think? is a C++ binding?). describe lists the index of the final, malformed conf as valid but passing it to cget_confs causes the segfault.

To Reproduce
Steps to reproduce the behavior:
I can reproduce the issue by mutilating my one of my other trajectories (removing the last few dozen lines), and then attempting to use file_info in the same manner.

Expected behavior
I don't think it's my place to define the failure behavior or whether it should attempt to recover but some sort of warning in this circumstance would be very helpful

Desktop (please complete the following information):

  • OS: Both CentOS an Ubuntu
  • oxDNA Version: latest commit (bf8729e)
  • cmake: 3.16.3, g++9.4.0, Python 3.9.12

Potential problems in the doc for oat clustering

Hi,

`oat mean -f oxDNA -o mean_all.dat trajectory.dat`

This line gives the error:

$ oat mean -f oxDNA -o mean_all.dat trajectory.dat
usage: mean.py [-h] [-p num_cpus] [-o output_file] [-d deviation_file] [-i index_file] [-a alignment_configuration] trajectory
mean.py: error: unrecognized arguments: -f trajectory.dat

If I remove -f oxDNA, it seems to be working.

$ oat mean -o mean_all.dat trajectory.dat
INFO: oxDNA_analysis_tools version: 2.0.3
INFO: running config.py installed at:  /home/luod/.local/lib/python3.8/site-packages/oxDNA_analysis_tools/config.py
INFO: Python version: 3.8.13
WARNING: Some scripts will not run with Python versions earler than 3.8.  You have {}, please update your environment
INFO: Package Numpy found. Version: 1.23.1
WARNING: Some packages need to be installed/updated.

Same for

`oat pca -c input_rna trajectory.dat mean_all.dat pca.json`

I have to remove input_rna.

Is this a typo/leftover from copy-paste or something related to non-proper installation?

`use_average_seq` error

I set use_average_seq = true in the input file explicitly, and I received the following error:

ERROR: Mandatory key `seq_dep_file` not found

It seems as though the error checking is flipped here, as seq_dep_file should only be required if use_average_seq = false. Happy to provide an explicit input file example of it's helpful.

[BUG] BaseForce has not attribute 'potential_grid' in ratio/angle MetaD

Describe the bug
Running a metadynamics simulation with MD on CPU using ratio.angle as the coordinate returns the following error:
Traceback (most recent call last): File "/home/mmguar/anaconda3/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/central/home/mmguar/oxDNA/examples/METADYNAMICS/metad_interface.py", line 41, in run force.potential_grid = new_potential_grid AttributeError: 'oxpy.core.forces.BaseForce' object has no attribute 'potential_grid'
I am having a hard time debugging this and understanding if it is cause by errors in my configuration. I should add that the same simulation runs normally using a single distance coordinate (changing locs.meta).
I should add, the

I wonder if it might be coming from values of the coordinate being outside my x_min/x_max, but the error does not seem to point in that direction. I have also tried setting xmax to very high values that should encompass any angle, to no avail.

P.S. My experience with subprocess is limited, but it would be great if such errors would just kill the main process. More so in the context of HPC where a dead process that keeps running results in continued billing.

**Desktop **

  • OS: Linux
  • oxDNA metad branch

Recompilation after `git pull`

Since this repository is updated quite frequently, I think there should be a section in the documentation for how to recompile the executable after a git pull. E.g., does the user have to do anything special, or can they just repeat the instructions in install.md?

[BUG] Compilation fails with AppleClang compiler

Describe the bug

Was helping somebody compile the code on a Mac with the following options:

cmake -DPython=1 -DOxpySystemInstall=1 ..

The make step produced the following error:

oxDNA-master/src/Utilities/Utils.cpp:205:60: error: cannot pass object of non-trivial type 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >') through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
   ...throw oxDNAException("Unrecognizable temperature '%s'", raw_T);
                                                              ^

It also produced a ton of warnings which look like:

oxDNA-master/src/extern/exprtk/exprtk.hpp:5146:31: warning: 
      declaration shadows a variable in namespace 'exprtk::details' [-Wshadow]
            e_none          , e_null          , e_constant    , e_unary        ,
                              ^

To Reproduce

cmake -DPython=On -DOxpySystemInstall=On ..
make -j4

We tried compiling with both the default AppleClang and Clang with gcc libs (DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++. Here is the cmake output for the default AppleClang:

-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE
-- Performing Test COMPILER_SUPPORTS_MARCH_NATIVE - Success
-- Found Git: /usr/bin/git (found version "2.21.1 (Apple Git-122.3)") 
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Adding the targets found in the /Users/aershova/oxDNA-master/contrib/randisi folder
-- Adding the targets found in the /Users/aershova/oxDNA-master/contrib/romano folder
-- Adding the targets found in the /Users/aershova/oxDNA-master/contrib/rovigatti folder
-- Found PkgConfig: /opt/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'gsl'
--   No package 'gsl' found
-- Adding the targets found in the /Users/aershova/oxDNA-master/contrib/tostiguerra folder
-- Found PythonInterp: /Users/aershova/opt/anaconda3/bin/python3 (found suitable version "3.7.7", minimum required is "3") 
-- Found PythonLibs: /Users/aershova/opt/anaconda3/lib/libpython3.7m.dylib
-- pybind11 v2.2.4
-- The detected Python's include dirs are: /Users/aershova/opt/anaconda3/include/python3.7m
-- Enabling Python bindings
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/aershova/oxDNA-master/build

Expected behavior
Correct compilation.

Desktop (please complete the following information):

  • OS: OSx 10.15.7
  • oxDNA Version: 3.3
  • cmake/make/compiler versions
    Cmake - 3.18.4
    Compiler - AppleClang 11.0.0.11000033

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.