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

DNA-RNA hybrids #72

Merged
merged 69 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
9f792d7
Update model.h
eryykr Mar 9, 2023
a4d180c
Update BaseParticle.cpp
eryykr Mar 9, 2023
3a5c797
Update BaseParticle.h
eryykr Mar 9, 2023
8b72e27
Update DNANucleotide.cpp
eryykr Mar 9, 2023
1f4fc62
Update RNANucleotide.cpp
eryykr Mar 9, 2023
e632f2c
Add files via upload
eryykr Mar 9, 2023
fefbf53
Update InteractionFactory.cpp
eryykr Mar 9, 2023
c84b315
Update CMakeLists.txt
eryykr Mar 9, 2023
0b6a06f
Update VMMC_CPUBackend.cpp
eryykr Mar 9, 2023
689be17
Update defs.h
eryykr Mar 10, 2023
e8836e1
Update defs.h
eryykr Mar 10, 2023
c9bb227
Update Utils.cpp
eryykr Mar 10, 2023
601a2f2
Update Utils.h
eryykr Mar 10, 2023
77110c9
Add files via upload
eryykr Mar 10, 2023
b0ceada
Add files via upload
eryykr Mar 10, 2023
15103c6
Update CMakeLists.txt
eryykr Mar 10, 2023
501656c
Update InteractionFactory.cpp
eryykr Mar 10, 2023
3bb1c68
Update model.h
eryykr Mar 10, 2023
d0a8e1c
Update DNAwithRNAInteraction.h
eryykr Mar 17, 2023
b09640c
Revert "Add a pivot move to the MC2 backend"
eryykr Mar 17, 2023
a5b4c3c
Revert "Remove some unnecessary checks on the required keys from the …
eryykr Mar 17, 2023
5bb203e
Revert "Revert "Add a pivot move to the MC2 backend""
eryykr Mar 17, 2023
0b90c31
Update model.h
eryykr Mar 23, 2023
98d8496
Add files via upload
eryykr Mar 24, 2023
94cf566
Updating interaction strengths
eryykr Mar 24, 2023
3311446
Merge branch 'master' of https://github.com/eryykr/oxDNA-dna-rna-hybrids
eryykr Mar 24, 2023
5b1e049
Update hybrid_sequence_dependent_parameters.txt
eryykr Mar 24, 2023
a5c3468
DNAwithRNA_relax interaction type
eryykr Mar 29, 2023
524ce04
Merge branch 'master' of https://github.com/eryykr/oxDNA-dna-rna-hybrids
eryykr Mar 29, 2023
2667b73
Fixing sequence-dependent parameter bug
eryykr Apr 5, 2023
01a0583
Update hybrid_sequence_dependent_parameters.txt
eryykr Apr 13, 2023
49b4f3b
Update DNAwithRNAInteraction.cpp
eryykr Apr 22, 2023
7e1c8cb
Update DNAwithRNAInteraction.cpp
eryykr Apr 22, 2023
7223779
Merge branch 'master' of https://github.com/eryykr/oxDNA-dna-rna-hybrids
eryykr Apr 22, 2023
dc9dd46
Update DNAwithRNAInteraction.cpp
eryykr Apr 22, 2023
775f01c
Update hybrid_sequence_dependent_parameters.txt
eryykr Apr 26, 2023
bab237c
Update model.h
eryykr Apr 26, 2023
b9b5001
Separate file for hybrid model parameters
eryykr May 6, 2023
4363ba0
Merge branch 'master' of https://github.com/eryykr/oxDNA-dna-rna-hybrids
eryykr May 6, 2023
51cd50e
Update model.h
eryykr May 6, 2023
6799ecc
Hybrid interaction with inheritance
eryykr May 10, 2023
152d4b1
Update DRHInteraction.cpp
eryykr May 10, 2023
95d3dfa
Update DRHInteraction.cpp
eryykr May 10, 2023
720d3d2
Update to DRH code
eryykr May 23, 2023
faac6b3
Update DRHInteraction.cpp
eryykr May 23, 2023
f4c90d1
DRHInteraction_relax
eryykr May 25, 2023
0fa5134
Merge branch 'double-inheritance' of https://github.com/eryykr/oxDNA-…
eryykr May 25, 2023
150ffec
New Topology
eryykr May 29, 2023
5529064
Updating DRH+protein interaction class
eryykr May 29, 2023
11f8f3d
DNA and RNA interactions with new topology
eryykr May 29, 2023
2f8581b
Seq-dep file keys
eryykr Jun 4, 2023
12566dd
Update VMMC_CPUBackend.cpp
eryykr Jun 16, 2023
4826c55
Fixed FFS with ANM bug
eryykr Jul 14, 2023
f145a31
Update drh_model.h
eryykr Jul 14, 2023
10c5525
Updating DRHInteraction
eryykr Jul 14, 2023
b653b53
Cleaning up inheritance of _custom_f4
eryykr Jul 15, 2023
d8554ae
Small changes to DNANM
eryykr Sep 19, 2023
da13f09
Merge pull request #1 from eryykr/double-inheritance
eryykr Sep 19, 2023
58e6843
Dropping some unneeded stuff
eryykr Sep 19, 2023
ac080cc
Cleaning up analysis/tests/
eryykr Sep 20, 2023
325c61e
Resolving conflict in MC backend
eryykr Sep 20, 2023
1b88ac5
Removing old protein model stuff
eryykr Sep 25, 2023
1b88844
Merge pull request #68 from eryykr/master
lorenzo-rovigatti Sep 26, 2023
da82d07
Add new tests
lorenzo-rovigatti Oct 8, 2023
acad5d6
Remove a private member from the DNA and RNA classes
lorenzo-rovigatti Oct 8, 2023
b695623
Clean up some code
lorenzo-rovigatti Oct 9, 2023
1292c20
Update the test docs
lorenzo-rovigatti Oct 9, 2023
43ccf6f
Update the docs with info about the DRH interaction
lorenzo-rovigatti Oct 9, 2023
aed4a01
Update the README
lorenzo-rovigatti Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
- name: Run Simple Test Script
run: |
pushd build
make test_run
make test_quick
4 changes: 4 additions & 0 deletions DRH_sequence_dependent_parameters.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HYDR_A_U = 1.21
HYDR_A_T = 1.37
HYDR_rC_dG = 1.61
HYDR_rG_dC = 1.77
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ The `analysis/paper_examples` folder contains examples for `oxDNA_analysis_tools

**A:** No, oxDNA can run simulations on single cores or single GPUs only.

**Q: Can I simulate systems containing both DNA and RNA?**

**A:** Unfortunately not: at the moment there is no force field for that.

## Citing oxDNA

[![DOI](https://joss.theoj.org/papers/10.21105/joss.04693/status.svg)](https://doi.org/10.21105/joss.04693)
Expand Down
12 changes: 10 additions & 2 deletions docs/source/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ These are the options that control the overall behaviour of the simulation and o
* `time_scale = linear/log_lin`: a linear time_scale will make oxDNA print linearly-spaced configurations. a log_lin will make it print linearly-spaced cycles of logarithmically-spaced configurations.
* `print_conf_interval = <int>`: if the time scale is linear, this is the number of time steps between the outputing of configurations, otherwise this is just the first point of the logarithmic part of the log_lin time scale.
* `print_energy_every = <int>`: number of time steps between the outputing of the energy (and of the other default observables such as acceptance ratios in Monte Carlo simulations).
* `[interaction_type = DNA|DNA2|RNA|RNA2|LJ|...]`: Particle-particle interaction of choice. Check the documentation relative to the specific interaction for more details and the supported interaction-specific options. Defaults to `DNA`.
* `[interaction_type = DNA|DNA2|RNA|RNA2|DRH|LJ|...]`: Particle-particle interaction of choice. Check the documentation relative to the specific interaction for more details and the supported interaction-specific options. Defaults to `DNA`.
* `[max_io = <float>]`: the maximum rate at which the output is printed, in MB/s. This is a useful option to avoid filling up the disk too quickly. Increase the default value (1 MB/s) at your own risk!
* `[fix_diffusion = <bool>]`: if true, particles that leave the simulation box are brought back in via periodic boundary conditions. Defaults to `true`.
* `[fix_diffusion_every = <int>]`: number of time steps every which the diffusion is fixed. Used only if `fix_diffusion = true`, defaults to 100000 ({math}`10^5`).
Expand Down Expand Up @@ -169,7 +169,15 @@ The following options control the behaviour of MC simulations.

* `[salt = <float>]`: the salt concentration in molar (M). Defaults to 1.
* `[mismatch_repulsion = <bool>]`: if `true`, add a repulsion between mismatches. Defaults to `false`.
* `[mismatch_repulsion_strength = <float>]`: set the strength of the repulsion between mismatches. Used only if `mismatch_repulsion = true`, defaults to `1`.
* `[mismatch_repulsion_strength = <float>]`: set the strength of the repulsion between mismatches. Used only if `mismatch_repulsion = true`, defaults to `1`.

## Options for `DRH` simulations

* `[use_average_seq = <bool>]`: use the average-sequence parameters. Defaults to `true`.
* `[seq_dep_file_DNA = <path>]`: path to the location of the file containing the DNA sequence-dependent parameters. Mandatory if `use_average_seq = false`.
* `[seq_dep_file_RNA = <path>]`: path to the location of the file containing the DNA sequence-dependent parameters. Mandatory if `use_average_seq = false`.
* `[seq_dep_file_DRH = <path>]`: path to the location of the file containing the DNA-RNA sequence-dependent parameters. Mandatory if `use_average_seq = false`.


## Options for `LJ` (Lennard-Jones) simulations

Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ cmake -DPython=1 -DPYTHON_EXECUTABLE=$HOME/miniconda3/bin/python -DPYTHON_INCLUD

## Testing

* `make test_run` runs quick tests to check whether oxDNA has been correctly compiled or not.
* `make test_run` runs quick tests to check that oxDNA has been correctly compiled, and that the core interactions (`DNA2`, `RNA2` and `DRH`) compute the energy contributions in a nicked double strand correctly.
* `make test_quick` runs longer tests to check that oxDNA works.
* `make test_oxpy` checks that the Python bindings work.
* `make test` runs all sets of tests above.
Expand Down
3 changes: 3 additions & 0 deletions src/Backends/FFS_MD_CPUBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ number FFS_MD_CPUBackend::pair_interaction_nonbonded_DNA_with_op(BaseParticle *p

_interaction->set_computed_r(computed_r);
number energy = _interaction->pair_interaction_term(DNAInteraction::HYDROGEN_BONDING, p, q, false, update_forces);

if(energy <= MAX_BOND_CUTOFF) {
_op.add_hb(q->index, p->index, energy);
}
Expand All @@ -235,6 +236,8 @@ number FFS_MD_CPUBackend::pair_interaction_nonbonded_DNA_with_op(BaseParticle *p
energy += _interaction->pair_interaction_term(RNA2Interaction::DEBYE_HUCKEL, p, q, false, update_forces);
}



return energy;
}

Expand Down
19 changes: 15 additions & 4 deletions src/Backends/VMMC_CPUBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "../Utilities/Utils.h"
#include "../Interactions/RNAInteraction2.h"
#include "../Interactions/DNA2Interaction.h"
#include "../Interactions/DRHInteraction.h"

#include <set>
#include <sstream>
Expand Down Expand Up @@ -192,6 +193,7 @@ void VMMC_CPUBackend::get_settings(input_file & inp) {
ok_interactions.push_back("DNA2_nomesh");
ok_interactions.push_back("RNA");
ok_interactions.push_back("RNA2");
ok_interactions.push_back("DRH");
if(getInputString(&inp, "interaction_type", inter, 0) == KEY_FOUND) {
// std::find points is equal to ok_interactions.end() if it can't find inter in ok_interactions.
if(std::find(ok_interactions.begin(), ok_interactions.end(), inter) == ok_interactions.end()) {
Expand Down Expand Up @@ -424,17 +426,26 @@ inline number VMMC_CPUBackend::_particle_particle_nonbonded_interaction_VMMC(Bas
energy += _interaction->pair_interaction_term(DNAInteraction::NONBONDED_EXCLUDED_VOLUME, p, q, false, false);
energy += _interaction->pair_interaction_term(DNAInteraction::CROSS_STACKING, p, q, false, false);

// all interactions except DNA2Interaction use the DNAInteraction coaxial stacking
if(dynamic_cast<DNA2Interaction *>(_interaction.get()) == NULL)
energy += _interaction->pair_interaction_term(DNAInteraction::COAXIAL_STACKING, p, q, false, false);
// all interactions except DNA2Interaction use the DNAInteraction coaxial stacking*
// *the hybrid interaction is a second exception
if( (dynamic_cast<DNA2Interaction *>(_interaction.get()) == NULL) || (dynamic_cast<DRHInteraction *>(_interaction.get()) == NULL) ) {
energy += _interaction->pair_interaction_term(DNAInteraction::COAXIAL_STACKING, p, q, false, false);
}

if(dynamic_cast<DNA2Interaction *>(_interaction.get()) != NULL) {
if(dynamic_cast<DRHInteraction *>(_interaction.get()) != NULL) {
energy += _interaction->pair_interaction_term(DRHInteraction::COAXIAL_STACKING, p, q, false, false);
energy += _interaction->pair_interaction_term(DRHInteraction::DEBYE_HUCKEL, p, q, false, false);
}

else if(dynamic_cast<DNA2Interaction *>(_interaction.get()) != NULL) {
energy += _interaction->pair_interaction_term(DNA2Interaction::COAXIAL_STACKING, p, q, false, false);
energy += _interaction->pair_interaction_term(DNA2Interaction::DEBYE_HUCKEL, p, q, false, false);
}
else if(dynamic_cast<RNA2Interaction *>(_interaction.get()) != NULL) {
energy += _interaction->pair_interaction_term(RNA2Interaction::DEBYE_HUCKEL, p, q, false, false);
}



return energy;
}
Expand Down
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ SET(interactions_SOURCES
Interactions/PatchyInteractionDan.cpp
Interactions/KFInteraction.cpp
Interactions/CustomInteraction.cpp
Interactions/DRHInteraction.cpp
Interactions/DRHInteraction_relax.cpp
)

SET(move_SOURCES
Expand Down
2 changes: 1 addition & 1 deletion src/Interactions/DNA2Interaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "DNAInteraction.h"

class DNA2Interaction: public DNAInteraction {
class DNA2Interaction: virtual public DNAInteraction {

protected:
float _salt_concentration;
Expand Down
10 changes: 9 additions & 1 deletion src/Interactions/DNAInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,15 @@ void DNAInteraction::get_settings(input_file &inp) {

if(getInputBool(&inp, "use_average_seq", &_average, 0) == KEY_FOUND) {
if(!_average) {
getInputString(&inp, "seq_dep_file", _seq_filename, 1);
std::string inter_type;
getInputString(&inp, "interaction_type", inter_type, 0);

if(inter_type.compare("DRH") || inter_type.compare("DRH_relax")) {
getInputString(&inp, "seq_dep_file_DNA", _seq_filename, 1);
} else {
getInputString(&inp, "seq_dep_file", _seq_filename, 1);
}

OX_LOG(Logger::LOG_INFO, "Using '%s' as the input for sequence-dependent values", _seq_filename.c_str());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Interactions/DNAInteraction.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* This is the default interaction.
*/

class DNAInteraction : public BaseInteraction {
class DNAInteraction : virtual public BaseInteraction {
protected:
bool _average;
std::string _seq_filename;
Expand Down
Loading
Loading