From 7732a822b405be1a65d591ababd2928128e3505a Mon Sep 17 00:00:00 2001 From: Chris Maffeo <cmaffeo2@illinois.edu> Date: Tue, 13 Aug 2019 15:15:52 -0500 Subject: [PATCH] Made oxDNA configuration writer use arbdmodel.debye_length if salt_concentration not provided --- mrdna/model/arbdmodel.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mrdna/model/arbdmodel.py b/mrdna/model/arbdmodel.py index b374901..d2d791b 100644 --- a/mrdna/model/arbdmodel.py +++ b/mrdna/model/arbdmodel.py @@ -1255,7 +1255,7 @@ E = 0 0 0 log_file, num_steps = 1e6, interaction_type = 'DNA2', - salt_concentration = 0.5, + salt_concentration = None, print_conf_interval = None, print_energy_every = None, timestep = 0.003, @@ -1294,7 +1294,14 @@ E = 0 0 0 if max_backbone_force is not None: max_backbone_force = 'max_backbone_force = {}'.format(max_backbone_force) + if interaction_type in ('DNA2',): + if salt_concentration is None: + try: + ## units "80 epsilon0 295 k K / (2 (AA)**2 e**2/particle)" mM + salt_concentration = 9331.3126/self.debye_length**2 + except: + salt_concentration = 0.5 salt_concentration = 'salt_concentration = {}'.format(salt_concentration) else: salt_concentration = '' -- GitLab