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
38 stars 26 forks source link

[BUG] analysis/tests/test.sh missing files #89

Closed siegmundbio closed 5 months ago

siegmundbio commented 5 months ago

Describe the bug Running test.sh fails at certain tests because oxpy.core.OxDNAError: Mandatory key `seq_dep_file_RNA' not found. Log below :) All other tests from the documentation pass and everything else seems to be running fine (have run quite a few oxDNA sims for trajectories) but just wanted to check if this is expected or whether my oxpy install had failed somewhere.

Desktop

LOG (xando) cjna@ebiand:~/oxDNA/oxDNA-3.6.0/analysis/tests$ ./test.sh Testing align... OK

Testing backbone_flexibility... OK

Testing bond_analysis... oxpy.core.OxDNAError: Mandatory key seq_dep_file_RNA' not found oxpy.core.OxDNAError: Mandatory keyseq_dep_file_RNA' not found AN ERROR OCCURED

Testing mean and deviations... OK

Testing centroid with indexing... OK

Testing contact_map... OK

Testing distance and clustering (this one takes a while because of the plot)... OK

Testing duplex_finder... oxpy.core.OxDNAError: Mandatory key seq_dep_file_RNA' not found oxpy.core.OxDNAError: Mandatory keyseq_dep_file_RNA' not found AN ERROR OCCURED

Testing duplex_angle_plotter... FileNotFoundError: [Errno 2] No such file or directory: 'angles.txt' AN ERROR OCCURED

Testing generate_force... oxpy.core.OxDNAError: Mandatory key `seq_dep_file_RNA' not found AN ERROR OCCURED

Testing minify... OK

Testing multidimensional_scaling_mean... OK

Testing output_bonds... oxpy.core.OxDNAError: Mandatory key `seq_dep_file_RNA' not found AN ERROR OCCURED

Testing pca OK Testing subset_trajectory... OK

Testing superimpose... OK

ErikPoppleton commented 5 months ago

@eryykr Is this something that got added by your model? That key didn't used to be required. For the RNA model it should just be seq_dep_file.

zoombya commented 5 months ago

we should check for more occurrences, cause oxserve also recently broke for same reason.

eryykr commented 5 months ago

Yes this came with the hybrid model, but it should only be required when interaction_type = NA. I'll take a closer look.

ErikPoppleton commented 5 months ago

I think I found the issue. When using std::string.compare() you need to check if the return value is 0, not truthy because it will return nonzero on matching substrings ('NA' is a substring of 'RNA2')

https://cplusplus.com/reference/string/string/compare/

Problem is at line 58 of RNAInteraction.cpp. There might be other instances of this.

eryykr commented 5 months ago

We also added something like this to DNAInteraction.cpp (line 240)

lorenzo-rovigatti commented 5 months ago

@synapticdecor thank you very much for pointing out this issue/bug. It should be fixed now.

siegmundbio commented 5 months ago

Sorry for being absent during its solving, but no problem! Thank you guys for creating and maintaining such a sick program :)