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

Selectively disabling steric interactions #75

Closed Alec-physics closed 8 months ago

Alec-physics commented 8 months ago

Hello,

I am interested in exploring the effects of certain steric interactions using oxDNA. I was inspired by this preprint from Sample, Liu, Matthies, and Sulc, which modified oxDNA to allow certain origami structures to pass through one another. However, the text does not mention how this was accomplished.

How can I modify oxDNA to allow one group of nucleotides to freely pass through another group of nucleotides? I have been attempting to write a new interaction to this effect, but I'm having some trouble parsing the existing code. My instinct is to inherit DNAInteraction.h and alter the excluded volume interaction. Could I accomplish this by setting rcut to zero for pairs of noninteracting bases?

Thank you so much for your help, Alec

lorenzo-rovigatti commented 8 months ago

Hey there,

they modified the source of oxDNA to do that. I'm pretty sure you can ask them to share the code they used with you. However, if you want to do it yourself note that CPU and CUDA interactions are handled differently, and changing DNAInteraction.h would only affect CPU simulations. As to how to do it, I guess you should initialise some data structure that keeps track of who's not supposed to interact with whom and then, in the *_excluded_volume interactions use it to perform an early return if p and q shouldn't interact.

ErikPoppleton commented 8 months ago

I sent this issue to @sulcgroup and Matthew Sample, hopefully they respond with the modified version of the code they used in that preprint.

sulcgroup commented 8 months ago

Yes, we made a change to the CUDA code along the lines indicated by Lorenzo, so that it loads an external file which specifies which groups of nucleotides do not interact with each other. In the interaction function, the code then first checks if the two nucleotides belong to groups which do not interact with each other, and if yes, the interaction energy between them is returned to be 0. The code is currently not available online, but if you want to use it, e-mail mlsample@asu.edu.

Alec-physics commented 8 months ago

Thank you so much!