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

[FEATURE REQUEST] Can we adjust the range of Debye cutoff? #83

Closed churchyuan closed 6 months ago

churchyuan commented 7 months ago

The article (Introducing improved structural properties and salt dependence into a coarse-grained model of DNA) shows that the Debye cutoff is three times the Debye length. Can we change this cutoff to other constant numbers? Sometimes, the complex structure needs a more extended range.

churchyuan commented 7 months ago

And if we can get the DH_energy output like HAIRPIN example, we use hb_energy.

lorenzo-rovigatti commented 7 months ago

As it is now, it can't be done without recompiling the code. I guess I can add an option that can be used to override the factor of 3. I'll do it as soon as I can. However, note that the code will run a lot slower since increasing the cut-off will also increase the average number of neighbours per particle.

churchyuan commented 7 months ago

Thanks. And if there is an option for recording the total DH energy in the system. I notice that in general we have the kinetic energy, potential energy and total energy. And I learned from HAIRPIN example, the energy of the hydrogen bond can be output by hb_energy. Are there some commands in input file can be used to output the DH energy? And then I can compare the DH energy difference among the conformation to make sure the adjustment of Debye length is useful.

ErikPoppleton commented 7 months ago

There is also an observable option to output all the energies. It's called pair_energy and can be added to an observable during a simulation or calculated from a trajectory just like hb_energy. The documentation for it is here. You can also use oat bond_analysis to extract this information from a trajectory file. If you want to write your own script that does something similar, the way to call the observable through the oxpy interface can be found here

lorenzo-rovigatti commented 6 months ago

There is a new option debye_huckel_rhigh that sets the distance at which the smoothing of the Debye-Hucker repulsion begins, and defaults to three times the Debye screening length.

churchyuan commented 6 months ago

Thanks. I ran it yesterday, and it worked very well.