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

How to devide the HB ENERGY into each DNA molecules #90

Closed masakikato001 closed 5 months ago

masakikato001 commented 5 months ago

I have a question for the team. I am using OxDNA to calculate systems containing multiple DNAs. Since I want to obtain the HB ENERGY that was assigned on each DNA strand, I should use command of HBEnergy.h options.

For example, if the initial topology file is as follows, how should I set the base_file and input ?

9 3 1 C -1 1 1 G 0 2 1 C 1 -1 2 C -1 4 2 G 3 5 2 C 4-1 3 C-1 7 3 G 6 8 3 C 7-1

lorenzo-rovigatti commented 5 months ago

Hi! First of all, unfortunately there was a typo in the documentation: base_file should have read bases_file. Sorry about that. Having said that, hb_energy gives you the total HB energy, so you probably want to have a separate column for each strand. Something like this:

data_output_1 = {
    print_every = 10000
    name = hb_energy.dat
    col_1 = {
        type = step
    }
    col_2 = {
        type = hb_energy
        bases_file = bases_1.dat
    }
    col_3 = {
        type = hb_energy
        bases_file = bases_2.dat
    }
    col_4 = {
        type = hb_energy
        bases_file = bases_3.dat
    }
}

where bases_1.dat is

0
1
2

bases_2.dat is

3
4
5

and bases_3.dat is

6
7
8

Note that nucleotide ids are 0-indexed.

masakikato001 commented 5 months ago

Hi, lorenzo. Thank you for your kind reply. I confirmed that the calculation was operated properly.