lorenzo-rovigatti / tacoxDNA

A collection of tools for DNA modelling
http://tacoxdna.sissa.it/
GNU General Public License v3.0
17 stars 20 forks source link

Conversion OxDNA → PDB not working with new topology format and scripting interface #44

Open Lucandia opened 1 week ago

Lucandia commented 1 week ago

Hi, thank you very much for sharing the code of TacoxDNA—it's super useful! I'm opening this issue for two reasons: a bug report and a feature request.

Bug Report:

I'm encountering an issue when trying to convert structures from OxDNA format (with the new topology format) to PDB on the webserver. I receive the following error:

Parser error: invalid literal for int() with base 10: '5->3'
Some errors have been detected, output not generated

However, when I load the structure on OxView, convert it to the old topology format and try the conversion on TacoxDNA, the conversion works without errors.

Feature Request:

I'm currently writing a Python program to manipulate nucleic acids and am using the OxDNA format to represent the structures. I also utilize the OxDNA Analysis Tools to manipulate these structures by importing it as a Python module. I'd like to export the structures as PDB as well. Would it be possible to import TacoxDNA as a library and use the OxDNA-to-PDB conversion functionality within my Python scripts? Thank you very much for your hard work! Best regards, Luca

lorenzo-rovigatti commented 1 week ago

Hi, and thanks for the report!

Unfortunately, tacoxDNA has not been updated to support the new topology format yet. However, you can use the OAT's "oxDNA -> PDB" module (see docs here). In the same vein, you can use OAT's scripting interface (see docs here).

Lucandia commented 3 days ago

Hi, thank you so much for your quick response!

The OAT function for oxDNA --> PDB works perfectly for my needs, but I’m also interested in PDB --> oxDNA, which seems to be missing in OAT. In this case, I don’t mind whether the new or old topology format is used.

Would it be possible to use TacoxDNA’s PDB --> oxDNA functionality through a scripting interface? Alternatively, do you think it would make sense to include this conversion in OAT?

If neither option is feasible, I can look into incorporating the relevant scripts from TacoxDNA into my package and adapting them as needed.

Thanks again for your help, Best regards, Luca

lorenzo-rovigatti commented 1 day ago

If you look at the code, I think it shouldn't be too hard to adapt the PDB_oxDNA.py so that it is possible to use it in a python script. However, I think that including the PDB -> oxDNA interface in OAT would be a nice addition. Feel free to suggest it on the oxDNA/OAT repo!