Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topology and configuration file missmatch handling #7

Open
ErikPoppleton opened this issue Jun 26, 2019 · 3 comments
Open

Topology and configuration file missmatch handling #7

ErikPoppleton opened this issue Jun 26, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ErikPoppleton
Copy link
Collaborator

ErikPoppleton commented Jun 26, 2019

If the .dat and .top files are missmatched, the correct error is thrown, but the page must be refreshed before files can be dropped again. This should clear the variables and prepare the canvas for another drop.

@ErikPoppleton ErikPoppleton added the bug Something isn't working label Jun 26, 2019
@ErikPoppleton ErikPoppleton self-assigned this Jun 26, 2019
@lorenzo-rovigatti
Copy link
Contributor

I think that's not always true. If you have a pathologically wrong topology file (right number of nucleotides at the top but wrong number of lines), the viewer spits out a hard-to-parse error. I attach a very simple example where I removed a line from the topology file of a simple hairpin.

Screenshot_20200522_101821

To reproduce it, just go to oxDNA/examples/HAIRPIN, remove a line from initial.top and try to visualise it. Note that I work with a lot of exporters/converters and it is pretty common to work with "wrong" topology files. In fact, I found this bug while debugging the vHelix converter on http://tacoxdna.sissa.it/.

@ErikPoppleton
Copy link
Collaborator Author

Thanks, I'll look into it and see if I can come up with a better error. That one you're getting is because the particle that you deleted from the topology is referenced as a neighbor by another particle, so when it tries to draw the backbone, it hits a nucleotide that is referenced as a neighbor, but itself has neither neighbors nor is a strand end and that breaks the backbone position calculation.

@lorenzo-rovigatti
Copy link
Contributor

I think the better course would be to flat out fail loading the configuration if there is a mismatch between the number of nucleotides as specified in the first line and the number of lines (+1) that the topology file contains

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants