From c24e3bec932f186d5428b6a374477c6f78b8aad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20von=20B=C3=BClow?= Date: Wed, 7 May 2025 10:35:36 +0200 Subject: [PATCH 1/8] Read non-standard residues from PDB --- calvados/sequence.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/calvados/sequence.py b/calvados/sequence.py index 78abbf0..b25873e 100644 --- a/calvados/sequence.py +++ b/calvados/sequence.py @@ -1,6 +1,8 @@ import numpy as np from MDAnalysis import Universe +from MDAnalysis.lib.util import convert_aa_code + import random @@ -10,6 +12,7 @@ from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord + import os from localcider.sequenceParameters import SequenceParameters @@ -52,7 +55,7 @@ def seq_from_pdb(pdb,selection='all',fmt='string'): res3 = ag.residues.resnames for res in res3: if len(res) == 3: - res1 = SeqUtils.seq1(res) + res1 = convert_aa_code(res) else: res1 = res if res1 == "": From ba3999fec3673ee6d2ee99acd79cc704513c8cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20von=20B=C3=BClow?= Date: Thu, 8 May 2025 11:28:34 +0200 Subject: [PATCH 2/8] Fix slab_IDR example --- examples/slab_IDR/prepare.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/slab_IDR/prepare.py b/examples/slab_IDR/prepare.py index ca1eddf..68d395a 100644 --- a/examples/slab_IDR/prepare.py +++ b/examples/slab_IDR/prepare.py @@ -29,10 +29,6 @@ slab_width = 20, friction = 0.01, - # INPUT - ffasta = f'{cwd}/input/fastalib.fasta', # input fasta file - fresidues = f'{cwd}/input/residues.csv', # residue definitions - # RUNTIME SETTINGS gpu_id = args.gpu_id, wfreq = N_save, # dcd writing frequency, 1 = 10fs From d1cd60201c0c74cc70ee3427e48f74d317522095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20von=20B=C3=BClow?= Date: Mon, 16 Jun 2025 13:07:34 +0200 Subject: [PATCH 3/8] remove curate_bondscale --- calvados/components.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/calvados/components.py b/calvados/components.py index 80dd9a1..dbe5003 100644 --- a/calvados/components.py +++ b/calvados/components.py @@ -131,37 +131,39 @@ def calc_go_scale(self, bscale_shift = 0.1, bscale_width = 80):#, input_pdb = f'{self.pdb_folder}/{self.name}.pdb' bfac = build.bfac_from_pdb(input_pdb,confidence=0.) - bfac_map = np.add.outer(bfac,bfac) / 2. - bfac_sigm_factor = self.bfac_width*(bfac_map-self.bfac_shift) + self.bfac_map = np.minimum.outer(bfac,bfac) + bfac_sigm_factor = self.bfac_width*(self.bfac_map-self.bfac_shift) bfac_sigm = np.exp(bfac_sigm_factor) / (np.exp(bfac_sigm_factor) + 1) input_pae = f'{self.pdb_folder}/{self.name}.json' - pae = build.load_pae(input_pae,symmetrize=True,colabfold=self.colabfold) / 10. # in nm - pae_sigm_factor = -self.pae_width*(pae-self.pae_shift) + self.pae = build.load_pae(input_pae,symmetrize=True,colabfold=self.colabfold) / 10. # in nm + pae_sigm_factor = -self.pae_width*(self.pae-self.pae_shift) pae_sigm = np.exp(pae_sigm_factor) / (np.exp(pae_sigm_factor) + 1) # pae_inv = build.load_pae_inv(input_pae,colabfold=self.colabfold) # scaled_LJYU_pairlist = [] self.scale = bfac_sigm * pae_sigm # restraint scale # self.bondscale = np.minimum(1.,np.maximum(0, 1. - 10.* (self.scale - min_scale))) # residual interactions for low restraints self.bondscale = np.exp(-bscale_width*(self.scale-bscale_shift)) / (np.exp(-bscale_width*(self.scale-bscale_shift)) + 1) - self.curate_bondscale() + # self.curate_bondscale() - def curate_bondscale(self, max_bscale = 0.95): + def curate_bondscale(self, max_bscale = 0.95, nlocal=4): for idx in range(self.nbeads): - lower = self.bondscale[idx,:idx-3] - higher = self.bondscale[idx,idx+4:] - if idx <= 3: + lower = self.bondscale[idx,:idx-nlocal] + higher = self.bondscale[idx,idx+nlocal+1:] + if idx <= nlocal: others = higher - elif idx >= self.nbeads - 4: + elif idx >= self.nbeads - nlocal - 1: others = lower else: others = np.concatenate([lower, higher]) count = np.sum(np.where(others < max_bscale,1,0)) # count how many nonlocal restraints # print(idx,count) if count == 0: - for jdx in range(max(0,idx-3),min(self.nbeads,idx+4)): - self.bondscale[idx,jdx] = 1 # remove local restraints - self.bondscale[jdx,idx] = 1 # remove local restraints + for jdx in range(max(0,idx-nlocal),min(self.nbeads,idx+nlocal+1)): + self.scale[idx,jdx] = 0. # remove local restraints + self.scale[jdx,idx] = 0. + self.bondscale[idx,jdx] = 1. + self.bondscale[jdx,idx] = 1. def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: str = 'spiral'): """ Protein properties. """ From 8af2e846b3e5cb91d92eb4a0a5443fcf56387bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20von=20B=C3=BClow?= Date: Mon, 16 Jun 2025 13:44:48 +0200 Subject: [PATCH 4/8] simplify scale and bondscale --- calvados/components.py | 51 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/calvados/components.py b/calvados/components.py index dbe5003..f12964a 100644 --- a/calvados/components.py +++ b/calvados/components.py @@ -146,24 +146,24 @@ def calc_go_scale(self, bscale_shift = 0.1, bscale_width = 80):#, self.bondscale = np.exp(-bscale_width*(self.scale-bscale_shift)) / (np.exp(-bscale_width*(self.scale-bscale_shift)) + 1) # self.curate_bondscale() - def curate_bondscale(self, max_bscale = 0.95, nlocal=4): - for idx in range(self.nbeads): - lower = self.bondscale[idx,:idx-nlocal] - higher = self.bondscale[idx,idx+nlocal+1:] - if idx <= nlocal: - others = higher - elif idx >= self.nbeads - nlocal - 1: - others = lower - else: - others = np.concatenate([lower, higher]) - count = np.sum(np.where(others < max_bscale,1,0)) # count how many nonlocal restraints - # print(idx,count) - if count == 0: - for jdx in range(max(0,idx-nlocal),min(self.nbeads,idx+nlocal+1)): - self.scale[idx,jdx] = 0. # remove local restraints - self.scale[jdx,idx] = 0. - self.bondscale[idx,jdx] = 1. - self.bondscale[jdx,idx] = 1. + # def curate_bondscale(self, max_bscale = 0.95, nlocal=4): + # for idx in range(self.nbeads): + # lower = self.bondscale[idx,:idx-nlocal] + # higher = self.bondscale[idx,idx+nlocal+1:] + # if idx <= nlocal: + # others = higher + # elif idx >= self.nbeads - nlocal - 1: + # others = lower + # else: + # others = np.concatenate([lower, higher]) + # count = np.sum(np.where(others < max_bscale,1,0)) # count how many nonlocal restraints + # # print(idx,count) + # if count == 0: + # for jdx in range(max(0,idx-nlocal),min(self.nbeads,idx+nlocal+1)): + # self.scale[idx,jdx] = 0. # remove local restraints + # self.scale[jdx,idx] = 0. + # self.bondscale[idx,jdx] = 1. + # self.bondscale[jdx,idx] = 1. def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: str = 'spiral'): """ Protein properties. """ @@ -188,16 +188,18 @@ def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: st else: self.calc_x_setup(comp_setup = comp_setup) - def calc_bondlength(self, i, j, min_bscale = 0.05, max_bscale = 0.95): + def calc_bondlength(self, i, j, min_scale = 0.05, cutoff_mix_in_LJYU = 0.15): d0 = 0.5 * (self.bondlengths[i] + self.bondlengths[j]) if self.restraint: if self.restraint_type == 'harmonic': ss = build.check_ssdomain(self.ssdomains,i,j,req_both=False) d = self.dmap[i,j] if ss else d0 elif self.restraint_type == 'go': - if self.bondscale[i,j] > max_bscale: + if self.scale[i,j] < min_scale: + # if self.bondscale[i,j] > max_bscale: d = d0 - elif self.bondscale[i,j] < min_bscale: + elif self.scale[i,j] > cutoff_mix_in_LJYU: + # elif self.bondscale[i,j] < min_bscale: d = self.dmap[i,j] else: d = self.bondscale[i,j] * d0 + (1. - self.bondscale[i,j]) * self.dmap[i,j] @@ -205,7 +207,6 @@ def calc_bondlength(self, i, j, min_bscale = 0.05, max_bscale = 0.95): raise ValueError("Restraint type must be harmonic or go.") else: d = d0 - # print(i,j,self.bondscale[i,j],d0,d) return d def bond_check(self, i: int, j: int): @@ -237,7 +238,7 @@ def init_restraint_force(self, eps_lj=None, cutoff_lj=None, eps_yu=None, k_yu=No self.scLJ = interactions.init_scaled_LJ(eps_lj,cutoff_lj) self.scYU = interactions.init_scaled_YU(eps_yu,k_yu) - def add_restraints(self, offset, min_bscale = 0.05, max_bscale = 0.95): + def add_restraints(self, offset, min_scale = 0.05, cutoff_mix_in_LJYU = 0.15): """ Add restraints. """ exclusion_map = [] # for ah, yu etc. for i in range(0,self.nbeads-2): @@ -253,11 +254,11 @@ def add_restraints(self, offset, min_bscale = 0.05, max_bscale = 0.95): k = self.k_harmonic # go elif self.restraint_type == 'go': - if self.bondscale[i,j] > max_bscale: + if self.scale[i,j] < min_scale: continue k = self.k_go * self.scale[i,j] # add scaled pseudo LJ, YU for low restraints - if self.bondscale[i,j] > min_bscale: + if self.scale[i,j] < cutoff_mix_in_LJYU: # but >= min_scale self.scLJ, scaled_pair = interactions.add_scaled_lj(self.scLJ, i, j, offset, self) self.scLJ_pairlist.append(scaled_pair) if self.qs[i] * self.qs[j] != 0.: From 41262600e67a5615718bbeea8fec6608a19b979d Mon Sep 17 00:00:00 2001 From: gitesei Date: Mon, 29 Sep 2025 17:18:45 +0200 Subject: [PATCH 5/8] Push rna branch --- calvados/build.py | 41 + calvados/components.py | 208 ++++- calvados/sequence.py | 12 +- examples/single_dsRNA/input/domains.yaml | 3 + examples/single_dsRNA/input/dspolyR12.pdb | 772 ++++++++++++++++++ examples/single_dsRNA/input/fastalib.fasta | 4 + .../single_dsRNA/input/residues_C2RNA.csv | 24 + examples/single_dsRNA/prepare.py | 99 +++ 8 files changed, 1134 insertions(+), 29 deletions(-) create mode 100644 examples/single_dsRNA/input/domains.yaml create mode 100644 examples/single_dsRNA/input/dspolyR12.pdb create mode 100644 examples/single_dsRNA/input/fastalib.fasta create mode 100644 examples/single_dsRNA/input/residues_C2RNA.csv create mode 100644 examples/single_dsRNA/prepare.py diff --git a/calvados/build.py b/calvados/build.py index f217b9a..b82bf67 100644 --- a/calvados/build.py +++ b/calvados/build.py @@ -310,8 +310,49 @@ def geometry_from_pdb(pdb,use_com=False): else: cas = u.select_atoms('name CA') pos = cas.positions / 10. + box = np.append(u.dimensions[:3]/10.,u.dimensions[3:]) + return pos, box + + +def geometry_from_pdb_rna(pdb,use_com=False): + """ positions in nm""" + backbone_atoms_name = [ "1H2'", "1H5'", "2H5'", "2HO'", "C1'", + "C2'", "C3'", "C4'", "C5'", "H1'", + "H3'", "H4'", "O2'", "O3'", "O5'", + "O4'", "OP1", "OP2", "P" ] + + with catch_warnings(): + simplefilter("ignore") + u = Universe(pdb) + ag = u.atoms + ag.translate(-ag.center_of_mass()) + if use_com: + pos = [] + for res in u.residues: + backbone = res.atoms.select_atoms('name ' + ' '.join(backbone_atoms_name)) + non_backbone = res.atoms.difference(backbone) + pos.append(backbone.center_of_mass()) + pos.append(non_backbone.center_of_mass()) + pos = np.array(pos) / 10. + + else: + pos = [] + for res in u.residues: + ps = res.atoms.select_atoms('name P') + pos.append(ps.positions[0] / 10.) + if res.resname in ['U','C']: + ns = res.atoms.select_atoms('name N1') + pos.append(ns.positions[0] / 10.) + elif res.resname in ['A','G']: + ns = res.atoms.select_atoms('name N9') + pos.append(ns.positions[0] / 10.) + else: + raise ValueError(f"Invalid RNA resname, {res.resname}") + pos = np.array(pos) + return pos, u.dimensions + def bfac_from_pdb(pdb,confidence=70.): """ get pLDDT encoded in pdb b-factor column """ with catch_warnings(): diff --git a/calvados/components.py b/calvados/components.py index f12964a..56d1e90 100644 --- a/calvados/components.py +++ b/calvados/components.py @@ -1,4 +1,4 @@ -from .sequence import seq_from_pdb, read_fasta, get_qs, patch_terminal_qs +from .sequence import seq_from_pdb, read_fasta, get_qs, patch_terminal_qs, patch_terminal_mws from .analysis import self_distances from calvados import build, interactions @@ -159,11 +159,11 @@ def calc_go_scale(self, bscale_shift = 0.1, bscale_width = 80):#, # count = np.sum(np.where(others < max_bscale,1,0)) # count how many nonlocal restraints # # print(idx,count) # if count == 0: - # for jdx in range(max(0,idx-nlocal),min(self.nbeads,idx+nlocal+1)): + # for jdx in range(max(0,idx-nlocal),min(self.nbeads,idx+nlocal+1)): # self.scale[idx,jdx] = 0. # remove local restraints # self.scale[jdx,idx] = 0. - # self.bondscale[idx,jdx] = 1. - # self.bondscale[jdx,idx] = 1. + # self.bondscale[idx,jdx] = 1. + # self.bondscale[jdx,idx] = 1. def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: str = 'spiral'): """ Protein properties. """ @@ -172,10 +172,11 @@ def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: st # fix mass of termini self.mws[self.n_termini] += 2 self.mws[self.c_termini] += 16 - # fix charge of termini + # fix charge and mw of termini if verbose: print(f'Adding charges for {self.charge_termini} termini of {self.name}.', flush=True) self.qs = patch_terminal_qs(self.qs,self.n_termini,self.c_termini,loc=self.charge_termini) + self.mws = patch_terminal_mws(self.mws,self.n_termini,self.c_termini,loc=self.charge_termini) if self.restraint: # self.init_restraint_force() # Done via sim.py @@ -304,6 +305,25 @@ class RNA(Component): def __init__(self, name: str, comp_dict: dict, defaults: dict): super().__init__(name, comp_dict, defaults) + def calc_x_from_pdb(self): + """ Calculate RNA positions from pdb. """ + input_pdb = f'{self.pdb_folder}/{self.name}.pdb' + self.xinit, self.dimensions = build.geometry_from_pdb_rna(input_pdb,use_com=self.use_com) # read from pdb + + def calc_ssdomains(self): + """ Get bounds for restraints (harmonic). """ + seq_ssdomains = build.get_ssdomains(self.name,self.fdomains) + ssdomains_bead = [] + for seq_ssdomain in seq_ssdomains: + ss_domain_bead = [] + for s in seq_ssdomain: + ss_domain_bead.append(2*s) + ss_domain_bead.append(2*s+1) + ssdomains_bead.append(ss_domain_bead) + self.ssdomains = ssdomains_bead + #print(self.ssdomains) + # print(f'Setting {self.restraint_type} restraints for {comp.name}') + def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: str = 'spiral'): """ Calculate component properties (sigmas, lambdas, qs etc.) """ @@ -318,7 +338,17 @@ def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: st self.qs, _ = get_qs(self.seq2,flexhis=True,pH=pH,residues=self.residues) self.alphas = self.lambdas*self.alpha - self.calc_x_setup(comp_setup=comp_setup, d=0.58, n_per_res=2) + if self.restraint: + self.calc_x_from_pdb() + self.calc_dmap() + self.calc_angmap() + if self.restraint_type == 'harmonic': + self.calc_ssdomains() + #elif self.restraint_type == 'go': + # self.calc_go_scale() + else: + self.calc_x_setup(comp_setup=comp_setup, d=0.59, n_per_res=2) + self.init_bond_force() self.init_angle_force() @@ -334,21 +364,91 @@ def init_angle_force(self): def get_forces(self): self.forces = [self.hb, self.scLJ_rna, self.ha] + if self.restraint: + self.forces.append(self.cs) def calc_comp_seq(self): """ Calculate sequence of RNA. """ - records = read_fasta(self.ffasta) - self.seq = str(records[self.name].seq) # one bead seq - self.n_termini = [0] - self.c_termini = [len(self.seq)-1] + if self.restraint: + four_type_seq, n_termini_seq, c_termini_seq = seq_from_pdb(f'{self.pdb_folder}/{self.name}.pdb') + seq_0 = '' + seq_ssdomains = build.get_ssdomains(self.name,self.fdomains) + for i in range(len(four_type_seq)): + ss_residue_condition = any( i in seq_ssdomain for seq_ssdomain in seq_ssdomains) + if ss_residue_condition: + s = 's' # strctured RNA + else: + s = 'r' # unstructured RNA + seq_0 += s + self.seq = seq_0 + + else: + records = read_fasta(self.ffasta) + self.seq = str(records[self.name].seq) # one bead seq + n_termini_seq = [0] + c_termini_seq = [len(self.seq)-1] self.seq2 = '' # two bead seq for s in self.seq: self.seq2 += f'p{s}' + self.n_termini = [x for i in n_termini_seq for x in (2*i, 2*i+1) ] + self.c_termini = [x for i in c_termini_seq for x in (2*i, 2*i+1)] - @staticmethod - def bond_check(i: int, j: int): + + def calc_bondlength(self, i, j): + d0 = self.bondlengths[j] #0.5 * (self.bondlengths[i] + self.bondlengths[j]) + if self.restraint: + if self.restraint_type == 'harmonic': + ss = build.check_ssdomain(self.ssdomains,i,j,req_both=False) + d = self.dmap[i,j] if ss else d0 + #elif self.restraint_type == 'go': + # d = self.bondscale[i,j] * d0 + (1. - self.bondscale[i,j]) * self.dmap[i,j] + else: + #raise ValueError("Restraint type must be harmonic or go.") + raise ValueError("Restraint type must be harmonic.") + else: + d = d0 + return d + + def calc_rna_nb_sigma_length(self, i, j): + sig0 = self.rna_nb_sigma + if self.restraint: + if self.restraint_type == 'harmonic': + ss = build.check_ssdomain(self.ssdomains,i,j,req_both=False) + sig = self.dmap[i,j]/(2**(1/6)) if ss else sig0 + else: + #raise ValueError("Restraint type must be harmonic or go.") + raise ValueError("Restraint type must be harmonic.") + else: + sig = sig0 + return sig + + def calc_angmap(self): + N = len(self.xinit) + angmap = np.zeros((N)) + pos = self.xinit + for i in range(0,N-4,2): + v1 = pos[i]-pos[i+2] + v2 = pos[i+4]-pos[i+2] + cos = np.dot(v1,v2)/np.linalg.norm(v1)/np.linalg.norm(v2) + angmap[i] = np.arccos(cos) + self.angmap = angmap + + def calc_angle(self, i, j): + ang0 = self.rna_pa + if self.restraint: + if self.restraint_type == 'harmonic': + ss = build.check_ssdomain(self.ssdomains,i,j,req_both=False) + ang = self.angmap[i] if ss else ang0 + else: + #raise ValueError("Restraint type must be harmonic or go.") + raise ValueError("Restraint type must be harmonic.") + else: + ang = ang0 + return ang + + def bond_check(self, i: int, j: int): """ Define bonded term conditions. """ condition0 = (i%2 == 0) # phosphate @@ -356,23 +456,25 @@ def bond_check(i: int, j: int): condition2 = (j == i+1) # phosphate -- base condition = condition0 and (condition1 or condition2) - return condition - @staticmethod - def angle_check(i: int, j: int): + condition_termini = not ( (i in self.c_termini) and (j in self.n_termini) ) + return condition and condition_termini + + def angle_check(self, i: int, j: int): """ Define angle term conditions. """ condition = (i%2 == 0) and (j == i+4) - return condition + condition_termini = (i+2 not in self.n_termini) and (i+2 not in self.c_termini) + return condition and condition_termini - @staticmethod - def basebase_check(i: int, j: int): + def basebase_check(self, i: int, j: int): """ Base-base interaction conditions. """ condition = (i%2 == 1) and (j == i+2) - return condition + condition_termini = not ( (i in self.c_termini) and (j in self.n_termini) ) + return condition and condition_termini - def calc_x_setup(self, comp_setup: str = 'spiral', d: float = 0.58, n_per_res: int = 2): + def calc_x_setup(self, comp_setup: str = 'spiral', d: float = 0.59, n_per_res: int = 2): if comp_setup == 'spiral': self.xinit = build.build_spiral(self.bondlengths[1::2], arc=d, n_per_res=n_per_res) else: # don't allow 'compact' setup for two-bead model @@ -384,7 +486,7 @@ def add_bonds(self, offset): for i in range(0, self.nbeads-1): for j in range(i, self.nbeads): if self.bond_check(i,j): # p-p and p-b - d = self.bondlengths[j] + d = self.calc_bondlength(i,j) #self.bondlengths[j] if j%2==0: rna_kb = self.rna_kb1 else: @@ -395,7 +497,7 @@ def add_bonds(self, offset): exclusion_map.append([i+offset,j+offset]) self.bond_pairlist.append([i+offset+1,j+offset+1,bidx,d,rna_kb]) if self.basebase_check(i,j): # restrain neighboring bases - sig = self.rna_nb_sigma + sig = self.calc_rna_nb_sigma_length(i,j) #self.rna_nb_sigma lam = (self.lambdas[i] + self.lambdas[j]) / 2. n = self.rna_nb_scale bidx = self.scLJ_rna.addBond( @@ -407,21 +509,65 @@ def add_bonds(self, offset): exclusion_map.append([i+offset,j+offset]) return exclusion_map + def add_angles(self, offset): exclusion_map = [] for i in range(0, self.nbeads-1): for j in range(i, self.nbeads): if self.angle_check(i,j): + rna_pa = self.calc_angle(i,j) bidx = self.ha.addAngle( i+offset,i+2+offset,i+4+offset, - self.rna_pa*unit.radian, + rna_pa*unit.radian, self.rna_ka*unit.kilojoules_per_mole/(unit.radian**2)) self.angle_list.append( - [i+offset+1,i+2+offset+1,i+4+offset+1,bidx,self.rna_pa,self.rna_ka] + [i+offset+1,i+2+offset+1,i+4+offset+1,bidx,rna_pa,self.rna_ka] ) exclusion_map.append([i+offset,j+offset]) return exclusion_map + def init_restraint_force(self, eps_lj=None, cutoff_lj=None, eps_yu=None, k_yu=None): + self.cs = interactions.init_restraints(self.restraint_type) + self.restr_pairlist = [] + + def restraint_check(self, i: int, j: int): + """ restraint interactions conditions. """ + + #condition0 = (i%2 == 0) # phosphate + #condition1 = (j == i+2) # phosphate -- phosphate + #condition2 = (j == i+1) # phosphate -- base + + bond_condition = self.bond_check(i,j) #bond_condition = condition0 and (condition1 or condition2) + angle_condition = self.angle_check(i,j) #angle_condition = (i%2 == 0) and (j == i+4) + basebase_condition = self.basebase_check(i,j) #basebase_condition = (i%2 == 1) and (j == i+2) + condition = (not bond_condition ) and (not angle_condition ) and (not basebase_condition ) + + condition_termini = (i in self.c_termini) or (j in self.n_termini) + + return condition or condition_termini + + def add_restraints(self, offset, min_scale = 0.1): + """ Add restraints. """ + exclusion_map = [] # for ah, yu etc. + for i in range(0,self.nbeads-2): + for j in range(i+2,self.nbeads): + if self.restraint_check(i, j): + # check if below cutoff + if self.dmap[i,j] > self.cutoff_restr: + continue + # harmonic + if self.restraint_type == 'harmonic': + ss = build.check_ssdomain(self.ssdomains,i,j,req_both=True) + if not ss: + continue + k = self.k_harmonic + self.cs, restr_pair = interactions.add_single_restraint( + self.cs, self.restraint_type, self.dmap[i,j], k, + i+offset, j+offset) + self.restr_pairlist.append(restr_pair) + exclusion_map.append([i+offset,j+offset]) + return exclusion_map + def write_bonds(self, path): """ Write bonds and angles to file. """ @@ -440,6 +586,14 @@ def write_bonds(self, path): for b in self.angle_list: f.write(f'{int(b[0])}\t{int(b[1])}\t{int(b[2])}\t{int(b[3])}\t{b[4]:.4f}\t{b[5]:.4f}\n') + def write_restraints(self,path): + """ Write restraints to file. """ + + with open(f'{path}/restr_{self.name}.txt','w') as f: + f.write('i j d[nm] fc\n') + for r in self.restr_pairlist: + f.write(f'{int(r[0])} {int(r[1])} {r[2]:.4f} {r[3]:.4f}\n') + class Lipid(Component): """ Component lipid. """ @@ -586,7 +740,7 @@ def bond_check(self, i: int, j: int): # residue-residue bond (protein) if (i < self.nbeads_protein - 1) and (j == i+1): return True - + ptm_seqlocs = [] # residue-PTM bond for idx, ptm_loc in enumerate(self.ptm_locations): @@ -594,9 +748,9 @@ def bond_check(self, i: int, j: int): ptm_seqlocs.append(ptm_seqloc) if (i == ptm_loc - 1) and (j == ptm_seqloc): return True - + # PTM-PTM bond if i >= self.nbeads_protein: if (j == i+1) and (j not in ptm_seqlocs): # avoid bonding different PTMs return True - return False \ No newline at end of file + return False diff --git a/calvados/sequence.py b/calvados/sequence.py index b25873e..dc1c389 100644 --- a/calvados/sequence.py +++ b/calvados/sequence.py @@ -139,6 +139,14 @@ def patch_terminal_qs(qs,n_termini,c_termini,loc='both'): qsnew[c_termini] -= qcoeff return qsnew +def patch_terminal_mws(mws,n_termini,c_termini,loc='both'): + mwsnew = mws.copy() + if loc in ['N','both']: + mwsnew[n_termini] += 2 + if loc in ['C','both']: + mwsnew[c_termini] += 16 + return mwsnew + def seq_dipole(seq): """ 1D charge dipole along seq """ # print(seq) @@ -750,7 +758,7 @@ def __init__(self,seq,residues=None,charge_termini=False,calc_dip=False, # q_intgrl_map = make_q_intgrl_map(residues) # self.q_ij = calc_q_ij(seq,q_intgrl_map) - + if nu_file is not None: self.kappa = calc_kappa_manual(seq,residues=residues) if self.kappa == -1: # no charges @@ -766,4 +774,4 @@ def __init__(self,seq,residues=None,charge_termini=False,calc_dip=False, feats_for_nu = [self.scd_noflex, self.shd, self.kappa, self.fcr, self.mean_lambda] model_nu = load(nu_file) X_nu = np.reshape(np.array(feats_for_nu),(1,-1)) - self.nu_svr = model_nu.predict(X_nu)[0] \ No newline at end of file + self.nu_svr = model_nu.predict(X_nu)[0] diff --git a/examples/single_dsRNA/input/domains.yaml b/examples/single_dsRNA/input/domains.yaml new file mode 100644 index 0000000..a13790d --- /dev/null +++ b/examples/single_dsRNA/input/domains.yaml @@ -0,0 +1,3 @@ +dspolyR12: +- [1,24] + diff --git a/examples/single_dsRNA/input/dspolyR12.pdb b/examples/single_dsRNA/input/dspolyR12.pdb new file mode 100644 index 0000000..01af458 --- /dev/null +++ b/examples/single_dsRNA/input/dspolyR12.pdb @@ -0,0 +1,772 @@ +ATOM 1 P G 1 1 2.907 -8.210 3.750 1 1 +ATOM 2 OP1 G 1 1 3.090 -9.078 4.940 1 1 +ATOM 3 OP2 G 1 1 1.737 -7.296 3.800 1 1 +ATOM 4 O5' G 1 1 4.232 -7.360 3.480 1 1 +ATOM 5 C5' G 1 1 5.480 -8.064 3.350 1 1 +ATOM 6 1H5' G 1 1 5.399 -8.703 2.586 0 0 +ATOM 7 2H5' G 1 1 5.639 -8.573 4.196 0 0 +ATOM 8 C4' G 1 1 6.613 -7.068 3.100 1 1 +ATOM 9 H4' G 1 1 7.463 -7.585 3.206 0 0 +ATOM 10 O4' G 1 1 6.436 -6.504 1.770 1 1 +ATOM 11 C1' G 1 1 6.837 -5.134 1.770 1 1 +ATOM 12 H1' G 1 1 7.536 -4.971 1.074 0 0 +ATOM 13 N9 G 1 1 5.671 -4.305 1.390 1 1 +ATOM 14 C8 G 1 1 4.337 -4.652 1.320 1 1 +ATOM 15 H8 G 1 1 4.001 -5.567 1.540 0 0 +ATOM 16 N7 G 1 1 3.549 -3.676 0.940 1 1 +ATOM 17 C5 G 1 1 4.420 -2.604 0.740 1 1 +ATOM 18 C6 G 1 1 4.148 -1.276 0.330 1 1 +ATOM 19 O6 G 1 1 3.067 -0.759 0.040 1 1 +ATOM 20 N1 G 1 1 5.325 -0.513 0.260 1 1 +ATOM 21 H1 G 1 1 5.240 0.443 -0.020 0 0 +ATOM 22 C2 G 1 1 6.597 -0.986 0.550 1 1 +ATOM 23 N2 G 1 1 7.580 -0.093 0.420 1 1 +ATOM 24 H21 G 1 1 7.370 0.842 0.132 0 0 +ATOM 25 H22 G 1 1 8.524 -0.357 0.611 0 0 +ATOM 26 N3 G 1 1 6.847 -2.225 0.940 1 1 +ATOM 27 C4 G 1 1 5.712 -2.973 1.010 1 1 +ATOM 28 C3' G 1 1 6.646 -5.859 4.020 1 1 +ATOM 29 H3' G 1 1 5.761 -5.555 4.373 0 0 +ATOM 30 C2' G 1 1 7.380 -4.830 3.170 1 1 +ATOM 31 1H2' G 1 1 7.314 -3.891 3.508 0 0 +ATOM 32 O2' G 1 1 8.772 -5.106 3.140 1 1 +ATOM 33 2HO' G 1 1 9.169 -4.919 4.039 0 0 +ATOM 34 O3' G 1 1 7.297 -6.146 5.250 1 1 +ATOM 35 P C 1 2 6.882 -5.338 6.560 1 1 +ATOM 36 OP1 C 1 2 7.505 -5.970 7.750 1 1 +ATOM 37 OP2 C 1 2 5.403 -5.201 6.610 1 1 +ATOM 38 O5' C 1 2 7.537 -3.907 6.290 1 1 +ATOM 39 C5' C 1 2 8.968 -3.825 6.160 1 1 +ATOM 40 1H5' C 1 2 9.244 -4.407 5.396 0 0 +ATOM 41 2H5' C 1 2 9.377 -4.168 7.006 0 0 +ATOM 42 C4' C 1 2 9.383 -2.375 5.910 1 1 +ATOM 43 H4' C 1 2 10.378 -2.351 6.016 0 0 +ATOM 44 O4' C 1 2 8.930 -1.996 4.580 1 1 +ATOM 45 C1' C 1 2 8.527 -0.627 4.580 1 1 +ATOM 46 H1' C 1 2 9.027 -0.112 3.884 0 0 +ATOM 47 N1 C 1 2 7.098 -0.559 4.200 1 1 +ATOM 48 C6 C 1 2 6.310 -1.679 4.190 1 1 +ATOM 49 H6 C 1 2 6.707 -2.560 4.447 0 0 +ATOM 50 C5 C 1 2 5.005 -1.617 3.840 1 1 +ATOM 51 H5 C 1 2 4.426 -2.431 3.832 0 0 +ATOM 52 C4 C 1 2 4.488 -0.321 3.480 1 1 +ATOM 53 N4 C 1 2 3.224 -0.191 3.120 1 1 +ATOM 54 H41 C 1 2 2.626 -0.992 3.097 0 0 +ATOM 55 H42 C 1 2 2.866 0.707 2.870 0 0 +ATOM 56 N3 C 1 2 5.265 0.768 3.490 1 1 +ATOM 57 C2 C 1 2 6.575 0.679 3.850 1 1 +ATOM 58 O2 C 1 2 7.324 1.664 3.870 1 1 +ATOM 59 C3' C 1 2 8.758 -1.340 6.830 1 1 +ATOM 60 H3' C 1 2 7.849 -1.562 7.183 0 0 +ATOM 61 C2' C 1 2 8.821 -0.077 5.980 1 1 +ATOM 62 1H2' C 1 2 8.257 0.677 6.318 0 0 +ATOM 63 O2' C 1 2 10.140 0.442 5.950 1 1 +ATOM 64 2HO' C 1 2 10.373 0.814 6.849 0 0 +ATOM 65 O3' C 1 2 9.461 -1.230 8.060 1 1 +ATOM 66 P A 1 3 8.675 -0.775 9.370 1 1 +ATOM 67 OP1 A 1 3 9.540 -0.969 10.560 1 1 +ATOM 68 OP2 A 1 3 7.357 -1.458 9.420 1 1 +ATOM 69 O5' A 1 3 8.454 0.784 9.100 1 1 +ATOM 70 C5' A 1 3 9.613 1.626 8.970 1 1 +ATOM 71 1H5' A 1 3 10.161 1.286 8.206 0 0 +ATOM 72 2H5' A 1 3 10.142 1.558 9.816 0 0 +ATOM 73 C4' A 1 3 9.179 3.071 8.720 1 1 +ATOM 74 H4' A 1 3 10.003 3.628 8.826 0 0 +ATOM 75 O4' A 1 3 8.593 3.144 7.390 1 1 +ATOM 76 C1' A 1 3 7.514 4.079 7.390 1 1 +ATOM 77 H1' A 1 3 7.656 4.783 6.694 0 0 +ATOM 78 N9 A 1 3 6.275 3.364 7.010 1 1 +ATOM 79 C8 A 1 3 6.063 2.017 6.950 1 1 +ATOM 80 H8 A 1 3 6.765 1.343 7.177 0 0 +ATOM 81 N7 A 1 3 4.864 1.694 6.570 1 1 +ATOM 82 C5 A 1 3 4.236 2.911 6.370 1 1 +ATOM 83 C6 A 1 3 2.938 3.262 5.960 1 1 +ATOM 84 N6 A 1 3 1.988 2.353 5.670 1 1 +ATOM 85 H61 A 1 3 2.192 1.376 5.742 0 0 +ATOM 86 H62 A 1 3 1.078 2.654 5.382 0 0 +ATOM 87 N1 A 1 3 2.648 4.567 5.860 1 1 +ATOM 88 C2 A 1 3 3.591 5.466 6.160 1 1 +ATOM 89 H2 A 1 3 3.315 6.424 6.079 0 0 +ATOM 90 N3 A 1 3 4.840 5.263 6.550 1 1 +ATOM 91 C4 A 1 3 5.089 3.947 6.630 1 1 +ATOM 92 C3' A 1 3 8.094 3.604 9.640 1 1 +ATOM 93 H3' A 1 3 7.449 2.926 9.993 0 0 +ATOM 94 C2' A 1 3 7.464 4.700 8.790 1 1 +ATOM 95 1H2' A 1 3 6.583 5.030 9.128 0 0 +ATOM 96 O2' A 1 3 8.293 5.851 8.760 1 1 +ATOM 97 2HO' A 1 3 8.289 6.289 9.659 0 0 +ATOM 98 O3' A 1 3 8.626 4.076 10.870 1 1 +ATOM 99 P U 1 4 7.718 4.035 12.180 1 1 +ATOM 100 OP1 U 1 4 8.552 4.338 13.370 1 1 +ATOM 101 OP2 U 1 4 6.978 2.748 12.230 1 1 +ATOM 102 O5' U 1 4 6.690 5.227 11.910 1 1 +ATOM 103 C5' U 1 4 7.211 6.562 11.780 1 1 +ATOM 104 1H5' U 1 4 7.855 6.571 11.016 0 0 +ATOM 105 2H5' U 1 4 7.693 6.791 12.626 0 0 +ATOM 106 C4' U 1 4 6.066 7.543 11.530 1 1 +ATOM 107 H4' U 1 4 6.458 8.457 11.636 0 0 +ATOM 108 O4' U 1 4 5.532 7.288 10.200 1 1 +ATOM 109 C1' U 1 4 4.119 7.492 10.200 1 1 +ATOM 110 H1' U 1 4 3.859 8.161 9.504 0 0 +ATOM 111 N1 U 1 4 3.463 6.221 9.820 1 1 +ATOM 112 C6 U 1 4 4.169 5.039 9.810 1 1 +ATOM 113 H6 U 1 4 5.138 5.043 10.060 0 0 +ATOM 114 C5 U 1 4 3.581 3.881 9.470 1 1 +ATOM 115 H5 U 1 4 4.113 3.035 9.481 0 0 +ATOM 116 C4 U 1 4 2.190 3.840 9.090 1 1 +ATOM 117 O4 U 1 4 1.571 2.834 8.750 1 1 +ATOM 118 N3 U 1 4 1.561 5.076 9.120 1 1 +ATOM 119 H3 U 1 4 0.596 5.097 8.862 0 0 +ATOM 120 C2 U 1 4 2.137 6.277 9.470 1 1 +ATOM 121 O2 U 1 4 1.488 7.311 9.470 1 1 +ATOM 122 C3' U 1 4 4.864 7.405 12.450 1 1 +ATOM 123 H3' U 1 4 4.688 6.486 12.803 0 0 +ATOM 124 C2' U 1 4 3.742 7.987 11.600 1 1 +ATOM 125 1H2' U 1 4 2.822 7.789 11.938 0 0 +ATOM 126 O2' U 1 4 3.818 9.404 11.570 1 1 +ATOM 127 2HO' U 1 4 3.578 9.771 12.469 0 0 +ATOM 128 O3' U 1 4 5.057 8.090 13.680 1 1 +ATOM 129 P C 1 5 4.315 7.565 14.990 1 1 +ATOM 130 OP1 C 1 5 4.853 8.271 16.180 1 1 +ATOM 131 OP2 C 1 5 4.388 6.082 15.040 1 1 +ATOM 132 O5' C 1 5 2.806 8.013 14.720 1 1 +ATOM 133 C5' C 1 5 2.524 9.418 14.590 1 1 +ATOM 134 1H5' C 1 5 3.061 9.773 13.826 0 0 +ATOM 135 2H5' C 1 5 2.805 9.870 15.436 0 0 +ATOM 136 C4' C 1 5 1.029 9.624 14.340 1 1 +ATOM 137 H4' C 1 5 0.865 10.606 14.446 0 0 +ATOM 138 O4' C 1 5 0.718 9.122 13.010 1 1 +ATOM 139 C1' C 1 5 -0.581 8.530 13.010 1 1 +ATOM 140 H1' C 1 5 -1.161 8.953 12.314 0 0 +ATOM 141 N1 C 1 5 -0.447 7.106 12.630 1 1 +ATOM 142 C6 C 1 5 0.773 6.484 12.620 1 1 +ATOM 143 H6 C 1 5 1.590 7.001 12.877 0 0 +ATOM 144 C5 C 1 5 0.896 5.183 12.270 1 1 +ATOM 145 H5 C 1 5 1.783 4.724 12.262 0 0 +ATOM 146 C4 C 1 5 -0.314 4.488 11.910 1 1 +ATOM 147 N4 C 1 5 -0.265 3.219 11.550 1 1 +ATOM 148 H41 C 1 5 0.612 2.740 11.527 0 0 +ATOM 149 H42 C 1 5 -1.104 2.738 11.300 0 0 +ATOM 150 N3 C 1 5 -1.502 5.104 11.920 1 1 +ATOM 151 C2 C 1 5 -1.599 6.414 12.280 1 1 +ATOM 152 O2 C 1 5 -2.680 7.016 12.300 1 1 +ATOM 153 C3' C 1 5 0.093 8.859 15.260 1 1 +ATOM 154 H3' C 1 5 0.441 7.991 15.613 0 0 +ATOM 155 C2' C 1 5 -1.167 8.743 14.410 1 1 +ATOM 156 1H2' C 1 5 -1.834 8.079 14.748 0 0 +ATOM 157 O2' C 1 5 -1.867 9.977 14.380 1 1 +ATOM 158 2HO' C 1 5 -2.268 10.155 15.279 0 0 +ATOM 159 O3' C 1 5 -0.116 9.540 16.490 1 1 +ATOM 160 P G 1 6 -0.456 8.698 17.800 1 1 +ATOM 161 OP1 G 1 6 -0.384 9.582 18.990 1 1 +ATOM 162 OP2 G 1 6 0.407 7.489 17.850 1 1 +ATOM 163 O5' G 1 6 -1.967 8.259 17.530 1 1 +ATOM 164 C5' G 1 6 -2.964 9.288 17.400 1 1 +ATOM 165 1H5' G 1 6 -2.705 9.878 16.636 0 0 +ATOM 166 2H5' G 1 6 -2.972 9.822 18.246 0 0 +ATOM 167 C4' G 1 6 -4.333 8.655 17.150 1 1 +ATOM 168 H4' G 1 6 -5.001 9.392 17.256 0 0 +ATOM 169 O4' G 1 6 -4.324 8.064 15.820 1 1 +ATOM 170 C1' G 1 6 -5.097 6.864 15.820 1 1 +ATOM 171 H1' G 1 6 -5.814 6.907 15.124 0 0 +ATOM 172 N9 G 1 6 -4.215 5.738 15.440 1 1 +ATOM 173 C8 G 1 6 -2.837 5.692 15.370 1 1 +ATOM 174 H8 G 1 6 -2.255 6.474 15.590 0 0 +ATOM 175 N7 G 1 6 -2.359 4.533 14.990 1 1 +ATOM 176 C5 G 1 6 -3.498 3.752 14.790 1 1 +ATOM 177 C6 G 1 6 -3.615 2.402 14.380 1 1 +ATOM 178 O6 G 1 6 -2.725 1.599 14.090 1 1 +ATOM 179 N1 G 1 6 -4.960 2.004 14.310 1 1 +ATOM 180 H1 G 1 6 -5.150 1.063 14.030 0 0 +ATOM 181 C2 G 1 6 -6.045 2.819 14.600 1 1 +ATOM 182 N2 G 1 6 -7.241 2.242 14.470 1 1 +ATOM 183 H21 G 1 6 -7.306 1.286 14.182 0 0 +ATOM 184 H22 G 1 6 -8.072 2.763 14.661 0 0 +ATOM 185 N3 G 1 6 -5.933 4.078 14.990 1 1 +ATOM 186 C4 G 1 6 -4.632 4.473 15.060 1 1 +ATOM 187 C3' G 1 6 -4.708 7.505 18.070 1 1 +ATOM 188 H3' G 1 6 -3.946 6.962 18.423 0 0 +ATOM 189 C2' G 1 6 -5.704 6.727 17.220 1 1 +ATOM 190 1H2' G 1 6 -5.908 5.808 17.558 0 0 +ATOM 191 O2' G 1 6 -6.961 7.387 17.190 1 1 +ATOM 192 2HO' G 1 6 -7.394 7.321 18.089 0 0 +ATOM 193 O3' G 1 6 -5.251 7.965 19.300 1 1 +ATOM 194 P A 1 7 -5.082 7.073 20.610 1 1 +ATOM 195 OP1 A 1 7 -5.500 7.855 21.800 1 1 +ATOM 196 OP2 A 1 7 -3.704 6.522 20.660 1 1 +ATOM 197 O5' A 1 7 -6.117 5.887 20.340 1 1 +ATOM 198 C5' A 1 7 -7.512 6.215 20.210 1 1 +ATOM 199 1H5' A 1 7 -7.613 6.851 19.446 0 0 +ATOM 200 2H5' A 1 7 -7.807 6.659 21.056 0 0 +ATOM 201 C4' A 1 7 -8.322 4.942 19.960 1 1 +ATOM 202 H4' A 1 7 -9.283 5.202 20.066 0 0 +ATOM 203 O4' A 1 7 -7.995 4.450 18.630 1 1 +ATOM 204 C1' A 1 7 -7.998 3.023 18.630 1 1 +ATOM 205 H1' A 1 7 -8.623 2.670 17.934 0 0 +ATOM 206 N9 A 1 7 -6.647 2.552 18.250 1 1 +ATOM 207 C8 A 1 7 -5.489 3.272 18.190 1 1 +ATOM 208 H8 A 1 7 -5.437 4.244 18.417 0 0 +ATOM 209 N7 A 1 7 -4.460 2.575 17.810 1 1 +ATOM 210 C5 A 1 7 -4.971 1.305 17.610 1 1 +ATOM 211 C6 A 1 7 -4.389 0.092 17.200 1 1 +ATOM 212 N6 A 1 7 -3.080 -0.033 16.910 1 1 +ATOM 213 H61 A 1 7 -2.474 0.760 16.982 0 0 +ATOM 214 H62 A 1 7 -2.713 -0.919 16.622 0 0 +ATOM 215 N1 A 1 7 -5.188 -0.980 17.100 1 1 +ATOM 216 C2 A 1 7 -6.484 -0.853 17.400 1 1 +ATOM 217 H2 A 1 7 -7.029 -1.688 17.319 0 0 +ATOM 218 N3 A 1 7 -7.147 0.225 17.790 1 1 +ATOM 219 C4 A 1 7 -6.313 1.273 17.870 1 1 +ATOM 220 C3' A 1 7 -8.017 3.772 20.880 1 1 +ATOM 221 H3' A 1 7 -7.082 3.727 21.233 0 0 +ATOM 222 C2' A 1 7 -8.434 2.579 20.030 1 1 +ATOM 223 1H2' A 1 7 -8.109 1.696 20.368 0 0 +ATOM 224 O2' A 1 7 -9.848 2.455 20.000 1 1 +ATOM 225 2HO' A 1 7 -10.177 2.166 20.899 0 0 +ATOM 226 O3' A 1 7 -8.722 3.866 22.110 1 1 +ATOM 227 P U 1 8 -8.098 3.206 23.420 1 1 +ATOM 228 OP1 U 1 8 -8.872 3.639 24.610 1 1 +ATOM 229 OP2 U 1 8 -6.640 3.487 23.470 1 1 +ATOM 230 O5' U 1 8 -8.328 1.649 23.150 1 1 +ATOM 231 C5' U 1 8 -9.679 1.172 23.020 1 1 +ATOM 232 1H5' U 1 8 -10.107 1.653 22.256 0 0 +ATOM 233 2H5' U 1 8 -10.167 1.386 23.866 0 0 +ATOM 234 C4' U 1 8 -9.673 -0.337 22.770 1 1 +ATOM 235 H4' U 1 8 -10.622 -0.638 22.876 0 0 +ATOM 236 O4' U 1 8 -9.132 -0.574 21.440 1 1 +ATOM 237 C1' U 1 8 -8.363 -1.777 21.440 1 1 +ATOM 238 H1' U 1 8 -8.699 -2.412 20.744 0 0 +ATOM 239 N1 U 1 8 -6.972 -1.443 21.060 1 1 +ATOM 240 C6 U 1 8 -6.538 -0.137 21.050 1 1 +ATOM 241 H6 U 1 8 -7.175 0.594 21.300 0 0 +ATOM 242 C5 U 1 8 -5.278 0.175 20.710 1 1 +ATOM 243 H5 U 1 8 -4.985 1.131 20.721 0 0 +ATOM 244 C4 U 1 8 -4.338 -0.851 20.330 1 1 +ATOM 245 O4 U 1 8 -3.172 -0.662 19.990 1 1 +ATOM 246 N3 U 1 8 -4.862 -2.135 20.360 1 1 +ATOM 247 H3 U 1 8 -4.248 -2.879 20.102 0 0 +ATOM 248 C2 U 1 8 -6.148 -2.484 20.710 1 1 +ATOM 249 O2 U 1 8 -6.506 -3.651 20.710 1 1 +ATOM 250 C3' U 1 8 -8.784 -1.157 23.690 1 1 +ATOM 251 H3' U 1 8 -7.973 -0.690 24.043 0 0 +ATOM 252 C2' U 1 8 -8.491 -2.386 22.840 1 1 +ATOM 253 1H2' U 1 8 -7.740 -2.954 23.178 0 0 +ATOM 254 O2' U 1 8 -9.613 -3.254 22.810 1 1 +ATOM 255 2HO' U 1 8 -9.734 -3.676 23.709 0 0 +ATOM 256 O3' U 1 8 -9.428 -1.459 24.920 1 1 +ATOM 257 P U 1 9 -8.547 -1.676 26.230 1 1 +ATOM 258 OP1 U 1 9 -9.432 -1.731 27.420 1 1 +ATOM 259 OP2 U 1 9 -7.471 -0.653 26.280 1 1 +ATOM 260 O5' U 1 9 -7.899 -3.111 25.960 1 1 +ATOM 261 C5' U 1 9 -8.778 -4.243 25.830 1 1 +ATOM 262 1H5' U 1 9 -9.398 -4.070 25.066 0 0 +ATOM 263 2H5' U 1 9 -9.305 -4.326 26.676 0 0 +ATOM 264 C4' U 1 9 -7.958 -5.510 25.580 1 1 +ATOM 265 H4' U 1 9 -8.594 -6.275 25.686 0 0 +ATOM 266 O4' U 1 9 -7.374 -5.417 24.250 1 1 +ATOM 267 C1' U 1 9 -6.078 -6.014 24.250 1 1 +ATOM 268 H1' U 1 9 -6.018 -6.729 23.554 0 0 +ATOM 269 N1 U 1 9 -5.087 -4.981 23.870 1 1 +ATOM 270 C6 U 1 9 -5.428 -3.647 23.860 1 1 +ATOM 271 H6 U 1 9 -6.358 -3.376 24.110 0 0 +ATOM 272 C5 U 1 9 -4.536 -2.704 23.520 1 1 +ATOM 273 H5 U 1 9 -4.806 -1.742 23.531 0 0 +ATOM 274 C4 U 1 9 -3.190 -3.060 23.140 1 1 +ATOM 275 O4 U 1 9 -2.312 -2.271 22.800 1 1 +ATOM 276 N3 U 1 9 -2.939 -4.423 23.170 1 1 +ATOM 277 H3 U 1 9 -2.019 -4.718 22.912 0 0 +ATOM 278 C2 U 1 9 -3.832 -5.411 23.520 1 1 +ATOM 279 O2 U 1 9 -3.503 -6.587 23.520 1 1 +ATOM 280 C3' U 1 9 -6.767 -5.719 26.500 1 1 +ATOM 281 H3' U 1 9 -6.337 -4.888 26.853 0 0 +ATOM 282 C2' U 1 9 -5.856 -6.595 25.650 1 1 +ATOM 283 1H2' U 1 9 -4.918 -6.667 25.988 0 0 +ATOM 284 O2' U 1 9 -6.332 -7.932 25.620 1 1 +ATOM 285 2HO' U 1 9 -6.206 -8.352 26.519 0 0 +ATOM 286 O3' U 1 9 -7.146 -6.321 27.730 1 1 +ATOM 287 P G 1 10 -6.286 -6.028 29.040 1 1 +ATOM 288 OP1 G 1 10 -7.002 -6.552 30.230 1 1 +ATOM 289 OP2 G 1 10 -5.935 -4.586 29.090 1 1 +ATOM 290 O5' G 1 10 -4.966 -6.886 28.770 1 1 +ATOM 291 C5' G 1 10 -5.094 -8.313 28.640 1 1 +ATOM 292 1H5' G 1 10 -5.710 -8.502 27.876 0 0 +ATOM 293 2H5' G 1 10 -5.493 -8.667 29.486 0 0 +ATOM 294 C4' G 1 10 -3.720 -8.936 28.390 1 1 +ATOM 295 H4' G 1 10 -3.842 -9.923 28.496 0 0 +ATOM 296 O4' G 1 10 -3.279 -8.542 27.060 1 1 +ATOM 297 C1' G 1 10 -1.866 -8.344 27.060 1 1 +ATOM 298 H1' G 1 10 -1.429 -8.914 26.364 0 0 +ATOM 299 N9 G 1 10 -1.590 -6.940 26.680 1 1 +ATOM 300 C8 G 1 10 -2.455 -5.867 26.610 1 1 +ATOM 301 H8 G 1 10 -3.427 -5.937 26.830 0 0 +ATOM 302 N7 G 1 10 -1.890 -4.747 26.230 1 1 +ATOM 303 C5 G 1 10 -0.554 -5.100 26.030 1 1 +ATOM 304 C6 G 1 10 0.544 -4.306 25.620 1 1 +ATOM 305 O6 G 1 10 0.570 -3.108 25.330 1 1 +ATOM 306 N1 G 1 10 1.724 -5.064 25.550 1 1 +ATOM 307 H1 G 1 10 2.560 -4.593 25.270 0 0 +ATOM 308 C2 G 1 10 1.816 -6.418 25.840 1 1 +ATOM 309 N2 G 1 10 3.035 -6.947 25.710 1 1 +ATOM 310 H21 G 1 10 3.800 -6.371 25.422 0 0 +ATOM 311 H22 G 1 10 3.182 -7.916 25.901 0 0 +ATOM 312 N3 G 1 10 0.790 -7.156 26.230 1 1 +ATOM 313 C4 G 1 10 -0.359 -6.429 26.300 1 1 +ATOM 314 C3' G 1 10 -2.605 -8.468 29.310 1 1 +ATOM 315 H3' G 1 10 -2.692 -7.537 29.663 0 0 +ATOM 316 C2' G 1 10 -1.365 -8.714 28.460 1 1 +ATOM 317 1H2' G 1 10 -0.536 -8.267 28.798 0 0 +ATOM 318 O2' G 1 10 -1.044 -10.096 28.430 1 1 +ATOM 319 2HO' G 1 10 -0.710 -10.381 29.329 0 0 +ATOM 320 O3' G 1 10 -2.599 -9.180 30.540 1 1 +ATOM 321 P G 1 11 -2.033 -8.469 31.850 1 1 +ATOM 322 OP1 G 1 11 -2.353 -9.296 33.040 1 1 +ATOM 323 OP2 G 1 11 -2.517 -7.065 31.900 1 1 +ATOM 324 O5' G 1 11 -0.459 -8.478 31.580 1 1 +ATOM 325 C5' G 1 11 0.204 -9.748 31.450 1 1 +ATOM 326 1H5' G 1 11 -0.212 -10.239 30.686 0 0 +ATOM 327 2H5' G 1 11 0.060 -10.261 32.296 0 0 +ATOM 328 C4' G 1 11 1.697 -9.529 31.200 1 1 +ATOM 329 H4' G 1 11 2.128 -10.426 31.306 0 0 +ATOM 330 O4' G 1 11 1.855 -8.960 29.870 1 1 +ATOM 331 C1' G 1 11 2.938 -8.029 29.870 1 1 +ATOM 332 H1' G 1 11 3.613 -8.273 29.174 0 0 +ATOM 333 N9 G 1 11 2.411 -6.699 29.490 1 1 +ATOM 334 C8 G 1 11 1.104 -6.264 29.420 1 1 +ATOM 335 H8 G 1 11 0.324 -6.848 29.640 0 0 +ATOM 336 N7 G 1 11 0.974 -5.016 29.040 1 1 +ATOM 337 C5 G 1 11 2.289 -4.591 28.840 1 1 +ATOM 338 C6 G 1 11 2.784 -3.329 28.430 1 1 +ATOM 339 O6 G 1 11 2.159 -2.307 28.140 1 1 +ATOM 340 N1 G 1 11 4.187 -3.330 28.360 1 1 +ATOM 341 H1 G 1 11 4.636 -2.482 28.080 0 0 +ATOM 342 C2 G 1 11 4.996 -4.420 28.650 1 1 +ATOM 343 N2 G 1 11 6.306 -4.206 28.520 1 1 +ATOM 344 H21 G 1 11 6.640 -3.308 28.232 0 0 +ATOM 345 H22 G 1 11 6.954 -4.942 28.711 0 0 +ATOM 346 N3 G 1 11 4.531 -5.595 29.040 1 1 +ATOM 347 C4 G 1 11 3.171 -5.604 29.110 1 1 +ATOM 348 C3' G 1 11 2.383 -8.533 32.120 1 1 +ATOM 349 H3' G 1 11 1.806 -7.796 32.473 0 0 +ATOM 350 C2' G 1 11 3.559 -8.070 31.270 1 1 +ATOM 351 1H2' G 1 11 4.015 -7.247 31.608 0 0 +ATOM 352 O2' G 1 11 4.576 -9.060 31.240 1 1 +ATOM 353 2HO' G 1 11 5.011 -9.119 32.139 0 0 +ATOM 354 O3' G 1 11 2.772 -9.129 33.350 1 1 +ATOM 355 P C 1 12 2.864 -8.225 34.660 1 1 +ATOM 356 OP1 C 1 12 3.042 -9.094 35.850 1 1 +ATOM 357 OP2 C 1 12 1.699 -7.305 34.710 1 1 +ATOM 358 O5' C 1 12 4.193 -7.382 34.390 1 1 +ATOM 359 C5' C 1 12 5.438 -8.093 34.260 1 1 +ATOM 360 1H5' C 1 12 5.352 -8.731 33.496 0 0 +ATOM 361 2H5' C 1 12 5.594 -8.602 35.106 0 0 +ATOM 362 C4' C 1 12 6.576 -7.103 34.010 1 1 +ATOM 363 H4' C 1 12 7.423 -7.624 34.116 0 0 +ATOM 364 O4' C 1 12 6.402 -6.538 32.680 1 1 +ATOM 365 C1' C 1 12 6.810 -5.170 32.680 1 1 +ATOM 366 H1' C 1 12 7.510 -5.010 31.984 0 0 +ATOM 367 N1 C 1 12 5.648 -4.335 32.300 1 1 +ATOM 368 C6 C 1 12 4.378 -4.845 32.290 1 1 +ATOM 369 H6 C 1 12 4.231 -5.800 32.547 0 0 +ATOM 370 C5 C 1 12 3.317 -4.082 31.940 1 1 +ATOM 371 H5 C 1 12 2.388 -4.450 31.932 0 0 +ATOM 372 C4 C 1 12 3.589 -2.714 31.580 1 1 +ATOM 373 N4 C 1 12 2.600 -1.917 31.220 1 1 +ATOM 374 H41 C 1 12 1.662 -2.263 31.197 0 0 +ATOM 375 H42 C 1 12 2.789 -0.968 30.970 0 0 +ATOM 376 N3 C 1 12 4.833 -2.223 31.590 1 1 +ATOM 377 C2 C 1 12 5.884 -3.012 31.950 1 1 +ATOM 378 O2 C 1 12 7.049 -2.593 31.970 1 1 +ATOM 379 C3' C 1 12 6.615 -5.894 34.930 1 1 +ATOM 380 H3' C 1 12 5.732 -5.585 35.283 0 0 +ATOM 381 C2' C 1 12 7.356 -4.869 34.080 1 1 +ATOM 382 1H2' C 1 12 7.294 -3.929 34.418 0 0 +ATOM 383 O2' C 1 12 8.745 -5.152 34.050 1 1 +ATOM 384 2HO' C 1 12 9.143 -4.967 34.949 0 0 +ATOM 385 O3' C 1 12 7.265 -6.184 36.160 1 1 +TER +ATOM 384 P G 2 13 2.950 8.195 27.160 1 1 +ATOM 385 OP1 G 2 13 3.137 9.062 25.970 1 1 +ATOM 386 OP2 G 2 13 1.775 7.287 27.110 1 1 +ATOM 387 O5' G 2 13 4.270 7.338 27.430 1 1 +ATOM 388 C5' G 2 13 5.522 8.035 27.560 1 1 +ATOM 389 1H5' G 2 13 5.444 8.675 28.324 0 0 +ATOM 390 2H5' G 2 13 5.684 8.543 26.714 0 0 +ATOM 391 C4' G 2 13 6.650 7.033 27.810 1 1 +ATOM 392 H4' G 2 13 7.503 7.546 27.704 0 0 +ATOM 393 O4' G 2 13 6.470 6.470 29.140 1 1 +ATOM 394 C1' G 2 13 6.864 5.098 29.140 1 1 +ATOM 395 H1' G 2 13 7.562 4.931 29.836 0 0 +ATOM 396 N9 G 2 13 5.693 4.275 29.520 1 1 +ATOM 397 C8 G 2 13 4.361 4.629 29.590 1 1 +ATOM 398 H8 G 2 13 4.030 5.546 29.370 0 0 +ATOM 399 N7 G 2 13 3.568 3.657 29.970 1 1 +ATOM 400 C5 G 2 13 4.434 2.581 30.170 1 1 +ATOM 401 C6 G 2 13 4.155 1.254 30.580 1 1 +ATOM 402 O6 G 2 13 3.071 0.743 30.870 1 1 +ATOM 403 N1 G 2 13 5.328 0.485 30.650 1 1 +ATOM 404 H1 G 2 13 5.238 -0.470 30.930 0 0 +ATOM 405 C2 G 2 13 6.602 0.951 30.360 1 1 +ATOM 406 N2 G 2 13 7.580 0.053 30.490 1 1 +ATOM 407 H21 G 2 13 7.365 -0.881 30.778 0 0 +ATOM 408 H22 G 2 13 8.526 0.312 30.299 0 0 +ATOM 409 N3 G 2 13 6.859 2.189 29.970 1 1 +ATOM 410 C4 G 2 13 5.727 2.943 29.900 1 1 +ATOM 411 C3' G 2 13 6.677 5.824 26.890 1 1 +ATOM 412 H3' G 2 13 5.790 5.525 26.537 0 0 +ATOM 413 C2' G 2 13 7.405 4.791 27.740 1 1 +ATOM 414 1H2' G 2 13 7.334 3.853 27.402 0 0 +ATOM 415 O2' G 2 13 8.799 5.060 27.770 1 1 +ATOM 416 2HO' G 2 13 9.195 4.871 26.871 0 0 +ATOM 417 O3' G 2 13 7.329 6.108 25.660 1 1 +ATOM 418 P C 2 14 6.910 5.302 24.350 1 1 +ATOM 419 OP1 C 2 14 7.536 5.931 23.160 1 1 +ATOM 420 OP2 C 2 14 5.430 5.173 24.300 1 1 +ATOM 421 O5' C 2 14 7.558 3.868 24.620 1 1 +ATOM 422 C5' C 2 14 8.988 3.778 24.750 1 1 +ATOM 423 1H5' C 2 14 9.267 4.359 25.514 0 0 +ATOM 424 2H5' C 2 14 9.398 4.119 23.904 0 0 +ATOM 425 C4' C 2 14 9.396 2.326 25.000 1 1 +ATOM 426 H4' C 2 14 10.390 2.297 24.894 0 0 +ATOM 427 O4' C 2 14 8.940 1.949 26.330 1 1 +ATOM 428 C1' C 2 14 8.530 0.582 26.330 1 1 +ATOM 429 H1' C 2 14 9.028 0.065 27.026 0 0 +ATOM 430 N1 C 2 14 7.101 0.522 26.710 1 1 +ATOM 431 C6 C 2 14 6.319 1.646 26.720 1 1 +ATOM 432 H6 C 2 14 6.720 2.525 26.463 0 0 +ATOM 433 C5 C 2 14 5.013 1.591 27.070 1 1 +ATOM 434 H5 C 2 14 4.439 2.408 27.078 0 0 +ATOM 435 C4 C 2 14 4.490 0.298 27.430 1 1 +ATOM 436 N4 C 2 14 3.225 0.174 27.790 1 1 +ATOM 437 H41 C 2 14 2.632 0.979 27.813 0 0 +ATOM 438 H42 C 2 14 2.862 -0.722 28.040 0 0 +ATOM 439 N3 C 2 14 5.260 -0.795 27.420 1 1 +ATOM 440 C2 C 2 14 6.572 -0.713 27.060 1 1 +ATOM 441 O2 C 2 14 7.315 -1.703 27.040 1 1 +ATOM 442 C3' C 2 14 8.765 1.294 24.080 1 1 +ATOM 443 H3' C 2 14 7.857 1.521 23.727 0 0 +ATOM 444 C2' C 2 14 8.821 0.031 24.930 1 1 +ATOM 445 1H2' C 2 14 8.253 -0.720 24.592 0 0 +ATOM 446 O2' C 2 14 10.138 -0.495 24.960 1 1 +ATOM 447 2HO' C 2 14 10.369 -0.868 24.061 0 0 +ATOM 448 O3' C 2 14 9.467 1.180 22.850 1 1 +ATOM 449 P C 2 15 8.679 0.729 21.540 1 1 +ATOM 450 OP1 C 2 15 9.545 0.919 20.350 1 1 +ATOM 451 OP2 C 2 15 7.364 1.419 21.490 1 1 +ATOM 452 O5' C 2 15 8.449 -0.828 21.810 1 1 +ATOM 453 C5' C 2 15 9.605 -1.676 21.940 1 1 +ATOM 454 1H5' C 2 15 10.153 -1.338 22.704 0 0 +ATOM 455 2H5' C 2 15 10.134 -1.611 21.094 0 0 +ATOM 456 C4' C 2 15 9.163 -3.119 22.190 1 1 +ATOM 457 H4' C 2 15 9.984 -3.680 22.084 0 0 +ATOM 458 O4' C 2 15 8.576 -3.189 23.520 1 1 +ATOM 459 C1' C 2 15 7.493 -4.119 23.520 1 1 +ATOM 460 H1' C 2 15 7.632 -4.823 24.216 0 0 +ATOM 461 N1 C 2 15 6.257 -3.397 23.900 1 1 +ATOM 462 C6 C 2 15 6.207 -2.029 23.910 1 1 +ATOM 463 H6 C 2 15 7.020 -1.506 23.653 0 0 +ATOM 464 C5 C 2 15 5.078 -1.369 24.260 1 1 +ATOM 465 H5 C 2 15 5.036 -0.372 24.268 0 0 +ATOM 466 C4 C 2 15 3.939 -2.175 24.620 1 1 +ATOM 467 N4 C 2 15 2.808 -1.596 24.980 1 1 +ATOM 468 H41 C 2 15 2.743 -0.598 25.003 0 0 +ATOM 469 H42 C 2 15 2.018 -2.154 25.230 0 0 +ATOM 470 N3 C 2 15 3.997 -3.511 24.610 1 1 +ATOM 471 C2 C 2 15 5.145 -4.151 24.250 1 1 +ATOM 472 O2 C 2 15 5.236 -5.384 24.230 1 1 +ATOM 473 C3' C 2 15 8.075 -3.646 21.270 1 1 +ATOM 474 H3' C 2 15 7.434 -2.965 20.917 0 0 +ATOM 475 C2' C 2 15 7.439 -4.739 22.120 1 1 +ATOM 476 1H2' C 2 15 6.556 -5.065 21.782 0 0 +ATOM 477 O2' C 2 15 8.263 -5.894 22.150 1 1 +ATOM 478 2HO' C 2 15 8.256 -6.332 21.251 0 0 +ATOM 479 O3' C 2 15 8.604 -4.121 20.040 1 1 +ATOM 480 P A 2 16 7.697 -4.075 18.730 1 1 +ATOM 481 OP1 A 2 16 8.529 -4.383 17.540 1 1 +ATOM 482 OP2 A 2 16 6.964 -2.784 18.680 1 1 +ATOM 483 O5' A 2 16 6.663 -5.262 19.000 1 1 +ATOM 484 C5' A 2 16 7.177 -6.599 19.130 1 1 +ATOM 485 1H5' A 2 16 7.821 -6.612 19.894 0 0 +ATOM 486 2H5' A 2 16 7.657 -6.831 18.284 0 0 +ATOM 487 C4' A 2 16 6.026 -7.575 19.380 1 1 +ATOM 488 H4' A 2 16 6.413 -8.491 19.274 0 0 +ATOM 489 O4' A 2 16 5.494 -7.317 20.710 1 1 +ATOM 490 C1' A 2 16 4.080 -7.514 20.710 1 1 +ATOM 491 H1' A 2 16 3.816 -8.181 21.406 0 0 +ATOM 492 N9 A 2 16 3.430 -6.239 21.090 1 1 +ATOM 493 C8 A 2 16 3.986 -4.994 21.150 1 1 +ATOM 494 H8 A 2 16 4.942 -4.811 20.923 0 0 +ATOM 495 N7 A 2 16 3.156 -4.070 21.530 1 1 +ATOM 496 C5 A 2 16 1.967 -4.748 21.730 1 1 +ATOM 497 C6 A 2 16 0.687 -4.336 22.140 1 1 +ATOM 498 N6 A 2 16 0.386 -3.056 22.430 1 1 +ATOM 499 H61 A 2 16 1.089 -2.348 22.358 0 0 +ATOM 500 H62 A 2 16 -0.542 -2.813 22.718 0 0 +ATOM 501 N1 A 2 16 -0.267 -5.273 22.240 1 1 +ATOM 502 C2 A 2 16 0.035 -6.540 21.940 1 1 +ATOM 503 H2 A 2 16 -0.719 -7.193 22.021 0 0 +ATOM 504 N3 A 2 16 1.193 -7.050 21.550 1 1 +ATOM 505 C4 A 2 16 2.118 -6.082 21.470 1 1 +ATOM 506 C3' A 2 16 4.825 -7.431 18.460 1 1 +ATOM 507 H3' A 2 16 4.654 -6.511 18.107 0 0 +ATOM 508 C2' A 2 16 3.700 -8.006 19.310 1 1 +ATOM 509 1H2' A 2 16 2.781 -7.804 18.972 0 0 +ATOM 510 O2' A 2 16 3.769 -9.424 19.340 1 1 +ATOM 511 2HO' A 2 16 3.527 -9.789 18.441 0 0 +ATOM 512 O3' A 2 16 5.014 -8.117 17.230 1 1 +ATOM 513 P A 2 17 4.276 -7.588 15.920 1 1 +ATOM 514 OP1 A 2 17 4.810 -8.296 14.730 1 1 +ATOM 515 OP2 A 2 17 4.356 -6.105 15.870 1 1 +ATOM 516 O5' A 2 17 2.764 -8.027 16.190 1 1 +ATOM 517 C5' A 2 17 2.474 -9.431 16.320 1 1 +ATOM 518 1H5' A 2 17 3.009 -9.790 17.084 0 0 +ATOM 519 2H5' A 2 17 2.753 -9.885 15.474 0 0 +ATOM 520 C4' A 2 17 0.979 -9.630 16.570 1 1 +ATOM 521 H4' A 2 17 0.810 -10.610 16.464 0 0 +ATOM 522 O4' A 2 17 0.670 -9.126 17.900 1 1 +ATOM 523 C1' A 2 17 -0.626 -8.527 17.900 1 1 +ATOM 524 H1' A 2 17 -1.209 -8.946 18.596 0 0 +ATOM 525 N9 A 2 17 -0.484 -7.103 18.280 1 1 +ATOM 526 C8 A 2 17 0.657 -6.356 18.340 1 1 +ATOM 527 H8 A 2 17 1.560 -6.718 18.113 0 0 +ATOM 528 N7 A 2 17 0.457 -5.130 18.720 1 1 +ATOM 529 C5 A 2 17 -0.910 -5.059 18.920 1 1 +ATOM 530 C6 A 2 17 -1.764 -4.020 19.330 1 1 +ATOM 531 N6 A 2 17 -1.326 -2.780 19.620 1 1 +ATOM 532 H61 A 2 17 -0.353 -2.564 19.548 0 0 +ATOM 533 H62 A 2 17 -1.976 -2.075 19.908 0 0 +ATOM 534 N1 A 2 17 -3.073 -4.293 19.430 1 1 +ATOM 535 C2 A 2 17 -3.504 -5.523 19.130 1 1 +ATOM 536 H2 A 2 17 -4.491 -5.665 19.211 0 0 +ATOM 537 N3 A 2 17 -2.805 -6.577 18.740 1 1 +ATOM 538 C4 A 2 17 -1.503 -6.262 18.660 1 1 +ATOM 539 C3' A 2 17 0.046 -8.860 15.650 1 1 +ATOM 540 H3' A 2 17 0.399 -7.993 15.297 0 0 +ATOM 541 C2' A 2 17 -1.212 -8.736 16.500 1 1 +ATOM 542 1H2' A 2 17 -1.876 -8.069 16.162 0 0 +ATOM 543 O2' A 2 17 -1.920 -9.966 16.530 1 1 +ATOM 544 2HO' A 2 17 -2.321 -10.143 15.631 0 0 +ATOM 545 O3' A 2 17 -0.165 -9.539 14.420 1 1 +ATOM 546 P U 2 18 -0.501 -8.695 13.110 1 1 +ATOM 547 OP1 U 2 18 -0.435 -9.580 11.920 1 1 +ATOM 548 OP2 U 2 18 0.367 -7.491 13.060 1 1 +ATOM 549 O5' U 2 18 -2.011 -8.248 13.380 1 1 +ATOM 550 C5' U 2 18 -3.013 -9.273 13.510 1 1 +ATOM 551 1H5' U 2 18 -2.757 -9.864 14.274 0 0 +ATOM 552 2H5' U 2 18 -3.023 -9.806 12.664 0 0 +ATOM 553 C4' U 2 18 -4.379 -8.632 13.760 1 1 +ATOM 554 H4' U 2 18 -5.051 -9.366 13.654 0 0 +ATOM 555 O4' U 2 18 -4.366 -8.041 15.090 1 1 +ATOM 556 C1' U 2 18 -5.133 -6.838 15.090 1 1 +ATOM 557 H1' U 2 18 -5.850 -6.875 15.786 0 0 +ATOM 558 N1 U 2 18 -4.245 -5.716 15.470 1 1 +ATOM 559 C6 U 2 18 -2.877 -5.873 15.480 1 1 +ATOM 560 H6 U 2 18 -2.482 -6.758 15.230 0 0 +ATOM 561 C5 U 2 18 -2.064 -4.861 15.820 1 1 +ATOM 562 H5 U 2 18 -1.073 -4.998 15.809 0 0 +ATOM 563 C4 U 2 18 -2.599 -3.576 16.200 1 1 +ATOM 564 O4 U 2 18 -1.936 -2.598 16.540 1 1 +ATOM 565 N3 U 2 18 -3.983 -3.512 16.170 1 1 +ATOM 566 H3 U 2 18 -4.400 -2.640 16.428 0 0 +ATOM 567 C2 U 2 18 -4.841 -4.531 15.820 1 1 +ATOM 568 O2 U 2 18 -6.051 -4.364 15.820 1 1 +ATOM 569 C3' U 2 18 -4.748 -7.481 12.840 1 1 +ATOM 570 H3' U 2 18 -3.982 -6.942 12.487 0 0 +ATOM 571 C2' U 2 18 -5.739 -6.697 13.690 1 1 +ATOM 572 1H2' U 2 18 -5.938 -5.777 13.352 0 0 +ATOM 573 O2' U 2 18 -6.999 -7.350 13.720 1 1 +ATOM 574 2HO' U 2 18 -7.433 -7.282 12.821 0 0 +ATOM 575 O3' U 2 18 -5.293 -7.938 11.610 1 1 +ATOM 576 P C 2 19 -5.119 -7.046 10.300 1 1 +ATOM 577 OP1 C 2 19 -5.541 -7.827 9.110 1 1 +ATOM 578 OP2 C 2 19 -3.738 -6.502 10.250 1 1 +ATOM 579 O5' C 2 19 -6.148 -5.855 10.570 1 1 +ATOM 580 C5' C 2 19 -7.545 -6.176 10.700 1 1 +ATOM 581 1H5' C 2 19 -7.647 -6.811 11.464 0 0 +ATOM 582 2H5' C 2 19 -7.842 -6.618 9.854 0 0 +ATOM 583 C4' C 2 19 -8.348 -4.899 10.950 1 1 +ATOM 584 H4' C 2 19 -9.310 -5.153 10.844 0 0 +ATOM 585 O4' C 2 19 -8.018 -4.408 12.280 1 1 +ATOM 586 C1' C 2 19 -8.014 -2.981 12.280 1 1 +ATOM 587 H1' C 2 19 -8.638 -2.626 12.976 0 0 +ATOM 588 N1 C 2 19 -6.660 -2.517 12.660 1 1 +ATOM 589 C6 C 2 19 -5.591 -3.373 12.670 1 1 +ATOM 590 H6 C 2 19 -5.727 -4.330 12.413 0 0 +ATOM 591 C5 C 2 19 -4.355 -2.950 13.020 1 1 +ATOM 592 H5 C 2 19 -3.572 -3.570 13.028 0 0 +ATOM 593 C4 C 2 19 -4.220 -1.561 13.380 1 1 +ATOM 594 N4 C 2 19 -3.043 -1.083 13.740 1 1 +ATOM 595 H41 C 2 19 -2.245 -1.686 13.763 0 0 +ATOM 596 H42 C 2 19 -2.950 -0.120 13.990 0 0 +ATOM 597 N3 C 2 19 -5.270 -0.731 13.370 1 1 +ATOM 598 C2 C 2 19 -6.504 -1.183 13.010 1 1 +ATOM 599 O2 C 2 19 -7.497 -0.445 12.990 1 1 +ATOM 600 C3' C 2 19 -8.036 -3.730 10.030 1 1 +ATOM 601 H3' C 2 19 -7.101 -3.690 9.677 0 0 +ATOM 602 C2' C 2 19 -8.449 -2.535 10.880 1 1 +ATOM 603 1H2' C 2 19 -8.118 -1.653 10.542 0 0 +ATOM 604 O2' C 2 19 -9.861 -2.404 10.910 1 1 +ATOM 605 2HO' C 2 19 -10.188 -2.112 10.011 0 0 +ATOM 606 O3' C 2 19 -8.742 -3.820 8.800 1 1 +ATOM 607 P G 2 20 -8.114 -3.164 7.490 1 1 +ATOM 608 OP1 G 2 20 -8.891 -3.593 6.300 1 1 +ATOM 609 OP2 G 2 20 -6.658 -3.452 7.440 1 1 +ATOM 610 O5' G 2 20 -8.337 -1.606 7.760 1 1 +ATOM 611 C5' G 2 20 -9.685 -1.121 7.890 1 1 +ATOM 612 1H5' G 2 20 -10.116 -1.600 8.654 0 0 +ATOM 613 2H5' G 2 20 -10.174 -1.333 7.044 0 0 +ATOM 614 C4' G 2 20 -9.672 0.388 8.140 1 1 +ATOM 615 H4' G 2 20 -10.618 0.693 8.034 0 0 +ATOM 616 O4' G 2 20 -9.129 0.622 9.470 1 1 +ATOM 617 C1' G 2 20 -8.354 1.821 9.470 1 1 +ATOM 618 H1' G 2 20 -8.687 2.457 10.166 0 0 +ATOM 619 N9 G 2 20 -6.964 1.480 9.850 1 1 +ATOM 620 C8 G 2 20 -6.355 0.243 9.920 1 1 +ATOM 621 H8 G 2 20 -6.829 -0.609 9.700 0 0 +ATOM 622 N7 G 2 20 -5.102 0.285 10.300 1 1 +ATOM 623 C5 G 2 20 -4.859 1.644 10.500 1 1 +ATOM 624 C6 G 2 20 -3.676 2.306 10.910 1 1 +ATOM 625 O6 G 2 20 -2.579 1.826 11.200 1 1 +ATOM 626 N1 G 2 20 -3.868 3.696 10.980 1 1 +ATOM 627 H1 G 2 20 -3.089 4.256 11.260 0 0 +ATOM 628 C2 G 2 20 -5.057 4.350 10.690 1 1 +ATOM 629 N2 G 2 20 -5.023 5.677 10.820 1 1 +ATOM 630 H21 G 2 20 -4.178 6.129 11.108 0 0 +ATOM 631 H22 G 2 20 -5.840 6.219 10.629 0 0 +ATOM 632 N3 G 2 20 -6.158 3.729 10.300 1 1 +ATOM 633 C4 G 2 20 -5.983 2.381 10.230 1 1 +ATOM 634 C3' G 2 20 -8.778 1.203 7.220 1 1 +ATOM 635 H3' G 2 20 -7.969 0.731 6.867 0 0 +ATOM 636 C2' G 2 20 -8.479 2.431 8.070 1 1 +ATOM 637 1H2' G 2 20 -7.725 2.994 7.732 0 0 +ATOM 638 O2' G 2 20 -9.597 3.304 8.100 1 1 +ATOM 639 2HO' G 2 20 -9.715 3.727 7.201 0 0 +ATOM 640 O3' G 2 20 -9.421 1.508 5.990 1 1 +ATOM 641 P A 2 21 -8.538 1.721 4.680 1 1 +ATOM 642 OP1 A 2 21 -9.423 1.780 3.490 1 1 +ATOM 643 OP2 A 2 21 -7.468 0.692 4.630 1 1 +ATOM 644 O5' A 2 21 -7.883 3.153 4.950 1 1 +ATOM 645 C5' A 2 21 -8.756 4.289 5.080 1 1 +ATOM 646 1H5' A 2 21 -9.377 4.119 5.844 0 0 +ATOM 647 2H5' A 2 21 -9.282 4.375 4.234 0 0 +ATOM 648 C4' A 2 21 -7.929 5.551 5.330 1 1 +ATOM 649 H4' A 2 21 -8.561 6.320 5.224 0 0 +ATOM 650 O4' A 2 21 -7.346 5.455 6.660 1 1 +ATOM 651 C1' A 2 21 -6.046 6.045 6.660 1 1 +ATOM 652 H1' A 2 21 -5.982 6.761 7.356 0 0 +ATOM 653 N9 A 2 21 -5.061 5.008 7.040 1 1 +ATOM 654 C8 A 2 21 -5.240 3.656 7.100 1 1 +ATOM 655 H8 A 2 21 -6.105 3.209 6.873 0 0 +ATOM 656 N7 A 2 21 -4.182 3.006 7.480 1 1 +ATOM 657 C5 A 2 21 -3.235 3.994 7.680 1 1 +ATOM 658 C6 A 2 21 -1.890 3.962 8.090 1 1 +ATOM 659 N6 A 2 21 -1.238 2.821 8.380 1 1 +ATOM 660 H61 A 2 21 -1.711 1.942 8.308 0 0 +ATOM 661 H62 A 2 21 -0.280 2.851 8.668 0 0 +ATOM 662 N1 A 2 21 -1.241 5.131 8.190 1 1 +ATOM 663 C2 A 2 21 -1.891 6.261 7.890 1 1 +ATOM 664 H2 A 2 21 -1.354 7.101 7.971 0 0 +ATOM 665 N3 A 2 21 -3.146 6.421 7.500 1 1 +ATOM 666 C4 A 2 21 -3.758 5.230 7.420 1 1 +ATOM 667 C3' A 2 21 -6.737 5.754 4.410 1 1 +ATOM 668 H3' A 2 21 -6.311 4.921 4.057 0 0 +ATOM 669 C2' A 2 21 -5.822 6.626 5.260 1 1 +ATOM 670 1H2' A 2 21 -4.883 6.693 4.922 0 0 +ATOM 671 O2' A 2 21 -6.290 7.965 5.290 1 1 +ATOM 672 2HO' A 2 21 -6.162 8.384 4.391 0 0 +ATOM 673 O3' A 2 21 -7.113 6.358 3.180 1 1 +ATOM 674 P U 2 22 -6.255 6.061 1.870 1 1 +ATOM 675 OP1 U 2 22 -6.968 6.589 0.680 1 1 +ATOM 676 OP2 U 2 22 -5.911 4.617 1.820 1 1 +ATOM 677 O5' U 2 22 -4.930 6.912 2.140 1 1 +ATOM 678 C5' U 2 22 -5.051 8.340 2.270 1 1 +ATOM 679 1H5' U 2 22 -5.666 8.532 3.034 0 0 +ATOM 680 2H5' U 2 22 -5.447 8.696 1.424 0 0 +ATOM 681 C4' U 2 22 -3.674 8.955 2.520 1 1 +ATOM 682 H4' U 2 22 -3.790 9.943 2.414 0 0 +ATOM 683 O4' U 2 22 -3.234 8.559 3.850 1 1 +ATOM 684 C1' U 2 22 -1.822 8.354 3.850 1 1 +ATOM 685 H1' U 2 22 -1.382 8.921 4.546 0 0 +ATOM 686 N1 U 2 22 -1.554 6.948 4.230 1 1 +ATOM 687 C6 U 2 22 -2.566 6.015 4.240 1 1 +ATOM 688 H6 U 2 22 -3.494 6.295 3.990 0 0 +ATOM 689 C5 U 2 22 -2.331 4.738 4.580 1 1 +ATOM 690 H5 U 2 22 -3.082 4.078 4.569 0 0 +ATOM 691 C4 U 2 22 -1.009 4.304 4.960 1 1 +ATOM 692 O4 U 2 22 -0.702 3.163 5.300 1 1 +ATOM 693 N3 U 2 22 -0.056 5.310 4.930 1 1 +ATOM 694 H3 U 2 22 0.876 5.056 5.188 0 0 +ATOM 695 C2 U 2 22 -0.266 6.625 4.580 1 1 +ATOM 696 O2 U 2 22 0.650 7.432 4.580 1 1 +ATOM 697 C3' U 2 22 -2.561 8.482 1.600 1 1 +ATOM 698 H3' U 2 22 -2.653 7.551 1.247 0 0 +ATOM 699 C2' U 2 22 -1.319 8.721 2.450 1 1 +ATOM 700 1H2' U 2 22 -0.493 8.270 2.112 0 0 +ATOM 701 O2' U 2 22 -0.990 10.101 2.480 1 1 +ATOM 702 2HO' U 2 22 -0.656 10.384 1.581 0 0 +ATOM 703 O3' U 2 22 -2.551 9.193 0.370 1 1 +ATOM 704 P G 2 23 -1.989 8.479 -0.940 1 1 +ATOM 705 OP1 G 2 23 -2.304 9.309 -2.130 1 1 +ATOM 706 OP2 G 2 23 -2.480 7.078 -0.990 1 1 +ATOM 707 O5' G 2 23 -0.415 8.480 -0.670 1 1 +ATOM 708 C5' G 2 23 0.255 9.746 -0.540 1 1 +ATOM 709 1H5' G 2 23 -0.158 10.240 0.224 0 0 +ATOM 710 2H5' G 2 23 0.114 10.261 -1.386 0 0 +ATOM 711 C4' G 2 23 1.746 9.520 -0.290 1 1 +ATOM 712 H4' G 2 23 2.182 10.415 -0.396 0 0 +ATOM 713 O4' G 2 23 1.902 8.950 1.040 1 1 +ATOM 714 C1' G 2 23 2.980 8.014 1.040 1 1 +ATOM 715 H1' G 2 23 3.656 8.254 1.736 0 0 +ATOM 716 N9 G 2 23 2.446 6.686 1.420 1 1 +ATOM 717 C8 G 2 23 1.136 6.258 1.490 1 1 +ATOM 718 H8 G 2 23 0.359 6.846 1.270 0 0 +ATOM 719 N7 G 2 23 1.001 5.011 1.870 1 1 +ATOM 720 C5 G 2 23 2.313 4.579 2.070 1 1 +ATOM 721 C6 G 2 23 2.801 3.315 2.480 1 1 +ATOM 722 O6 G 2 23 2.171 2.296 2.770 1 1 +ATOM 723 N1 G 2 23 4.204 3.308 2.550 1 1 +ATOM 724 H1 G 2 23 4.649 2.458 2.830 0 0 +ATOM 725 C2 G 2 23 5.019 4.394 2.260 1 1 +ATOM 726 N2 G 2 23 6.328 4.173 2.390 1 1 +ATOM 727 H21 G 2 23 6.657 3.273 2.678 0 0 +ATOM 728 H22 G 2 23 6.980 4.905 2.199 0 0 +ATOM 729 N3 G 2 23 4.560 5.571 1.870 1 1 +ATOM 730 C4 G 2 23 3.201 5.588 1.800 1 1 +ATOM 731 C3' G 2 23 2.427 8.521 -1.210 1 1 +ATOM 732 H3' G 2 23 1.847 7.787 -1.563 0 0 +ATOM 733 C2' G 2 23 3.601 8.051 -0.360 1 1 +ATOM 734 1H2' G 2 23 4.053 7.226 -0.698 0 0 +ATOM 735 O2' G 2 23 4.623 9.036 -0.330 1 1 +ATOM 736 2HO' G 2 23 5.058 9.093 -1.229 0 0 +ATOM 737 O3' G 2 23 2.820 9.114 -2.440 1 1 +ATOM 738 P C 2 24 2.907 8.210 -3.750 1 1 +ATOM 739 OP1 C 2 24 3.090 9.078 -4.940 1 1 +ATOM 740 OP2 C 2 24 1.737 7.296 -3.800 1 1 +ATOM 741 O5' C 2 24 4.232 7.360 -3.480 1 1 +ATOM 742 C5' C 2 24 5.480 8.064 -3.350 1 1 +ATOM 743 1H5' C 2 24 5.398 8.703 -2.586 0 0 +ATOM 744 2H5' C 2 24 5.639 8.573 -4.196 0 0 +ATOM 745 C4' C 2 24 6.613 7.068 -3.100 1 1 +ATOM 746 H4' C 2 24 7.463 7.585 -3.206 0 0 +ATOM 747 O4' C 2 24 6.436 6.504 -1.770 1 1 +ATOM 748 C1' C 2 24 6.837 5.134 -1.770 1 1 +ATOM 749 H1' C 2 24 7.536 4.971 -1.074 0 0 +ATOM 750 N1 C 2 24 5.671 4.305 -1.390 1 1 +ATOM 751 C6 C 2 24 4.403 4.822 -1.380 1 1 +ATOM 752 H6 C 2 24 4.261 5.778 -1.637 0 0 +ATOM 753 C5 C 2 24 3.338 4.065 -1.030 1 1 +ATOM 754 H5 C 2 24 2.411 4.437 -1.022 0 0 +ATOM 755 C4 C 2 24 3.603 2.695 -0.670 1 1 +ATOM 756 N4 C 2 24 2.610 1.903 -0.310 1 1 +ATOM 757 H41 C 2 24 1.674 2.254 -0.287 0 0 +ATOM 758 H42 C 2 24 2.794 0.953 -0.060 0 0 +ATOM 759 N3 C 2 24 4.845 2.198 -0.680 1 1 +ATOM 760 C2 C 2 24 5.900 2.981 -1.040 1 1 +ATOM 761 O2 C 2 24 7.062 2.556 -1.060 1 1 +ATOM 762 C3' C 2 24 6.646 5.859 -4.020 1 1 +ATOM 763 H3' C 2 24 5.761 5.555 -4.373 0 0 +ATOM 764 C2' C 2 24 7.381 4.830 -3.170 1 1 +ATOM 765 1H2' C 2 24 7.314 3.891 -3.508 0 0 +ATOM 766 O2' C 2 24 8.772 5.106 -3.140 1 1 +ATOM 767 2HO' C 2 24 9.169 4.919 -4.039 0 0 +ATOM 768 O3' C 2 24 7.297 6.146 -5.250 1 1 +TER diff --git a/examples/single_dsRNA/input/fastalib.fasta b/examples/single_dsRNA/input/fastalib.fasta new file mode 100644 index 0000000..b095a77 --- /dev/null +++ b/examples/single_dsRNA/input/fastalib.fasta @@ -0,0 +1,4 @@ +>sspolyR12 +rrrrrrrrrrrr +>CAPRIN1_N623TN630T +SRGVSRGGSRGARGLMTGYRGPATGFRGGYDGYRPSFSNTPNSGYTQSQFSAPRDYSGYQRDGYQQNFKRGSGQSGPRGAPRGRGGPPRPNRGMPQMNTQQVN diff --git a/examples/single_dsRNA/input/residues_C2RNA.csv b/examples/single_dsRNA/input/residues_C2RNA.csv new file mode 100644 index 0000000..6ab9c4e --- /dev/null +++ b/examples/single_dsRNA/input/residues_C2RNA.csv @@ -0,0 +1,24 @@ +three,one,MW,lambdas,sigmas,q,bondlength +ARG,R,156.19,0.7307624767517166,0.6559999999999999,1,0.38 +ASP,D,115.09,0.0416040480605567,0.5579999999999999,-1,0.38 +ASN,N,114.1,0.4255859009787713,0.568,0,0.38 +GLU,E,129.11,0.0006935460962935,0.5920000000000001,-1,0.38 +LYS,K,128.17,0.1790211738990582,0.636,1,0.38 +HIS,H,137.14,0.4663667290557992,0.608,0,0.38 +GLN,Q,128.13,0.3934318551056041,0.602,0,0.38 +SER,S,87.08,0.4625416811611541,0.518,0,0.38 +CYS,C,103.14,0.5615435099141777,0.5479999999999999,0,0.38 +GLY,G,57.05,0.7058843733666401,0.45,0,0.38 +THR,T,101.11,0.3713162976273964,0.562,0,0.38 +ALA,A,71.07,0.2743297969040348,0.504,0,0.38 +MET,M,131.2,0.5308481134337497,0.618,0,0.38 +TYR,Y,163.18,0.9774611449343455,0.6459999999999999,0,0.38 +VAL,V,99.13,0.2083769608174481,0.5860000000000001,0,0.38 +TRP,W,186.22,0.9893764740371644,0.6779999999999999,0,0.38 +LEU,L,113.16,0.6440005007782226,0.618,0,0.38 +ILE,I,113.16,0.5423623610671892,0.618,0,0.38 +PRO,P,97.12,0.3593126576364644,0.5559999999999999,0,0.38 +PHE,F,147.18,0.8672358982062975,0.636,0,0.38 +RBC,p,194.1,0.00,0.6954,-1,0.59 +RNA,r,126.3,1.18,0.6238,0,0.54 +SRN,s,126.3,0.13,0.6238,0,0.54 diff --git a/examples/single_dsRNA/prepare.py b/examples/single_dsRNA/prepare.py new file mode 100644 index 0000000..f841282 --- /dev/null +++ b/examples/single_dsRNA/prepare.py @@ -0,0 +1,99 @@ +import os +import pandas as pd +from calvados.cfg import Config, Job, Components +import subprocess +import numpy as np +from argparse import ArgumentParser + +#parser = ArgumentParser() +#parser.add_argument('--name',nargs='?',required=True,type=str) +#args = parser.parse_args() + +cwd = os.getcwd() +sysname = 'md' + +## set the side length of the cubic box +L = 100 +Lz = 100 +# set the saving interval (number of integration steps) +N_save = 10000 + +# set final number of frames to save +N_frames = 100 + +residues_file = f'{cwd}/input/residues_C2RNA.csv' +fasta_file = f'{cwd}/input/fastalib.fasta' + +config = Config( + # GENERAL + sysname = sysname, # name of simulation system + box = [L, L, Lz], # nm + temp = 293.15, # 330.65, # K + ionic = 0.20, # molar + pH = 7.0, + topol = 'single', + + # RUNTIME SETTINGS + wfreq = N_save, # dcd writing interval, 1 = 10 fs + steps = N_frames*N_save, # number of simulation steps + runtime = 0, # overwrites 'steps' keyword if > 0 + platform = 'CPU', # or CUDA + gpu_id = 0, + threads = 1, + restart = 'checkpoint', + frestart = 'restart.chk', + slab_eq = False, + k_eq = 0.01, + steps_eq = 1000000, + verbose = True, +) + +# PATH +path = f'{cwd}/{sysname:s}' +subprocess.run(f'mkdir -p {path}',shell=True) +#subprocess.run(f'mkdir -p data',shell=True) + +#analyses = f""" +# +#from calvados.analysis import save_conf_prop +# +#save_conf_prop(path="{path:s}",name="{sysname:s}",residues_file="{residues_file:s}",output_path=f"{cwd}/data",start=100,is_idr=False,select='all') +#""" + +config.write(path,name='config.yaml') + +components = Components( + ffasta = fasta_file, + # Defaults + molecule_type = 'protein', + nmol = 1, # number of molecules + restraint = True, # apply restraints + charge_termini = 'both', # charge N or C or both + # INPUT + fresidues = residues_file, # residue definitions + fdomains = f'{cwd}/input/domains.yaml', # domain definitions (harmonic restraints) + pdb_folder = f'{cwd}/input', # directory for pdb and PAE files + # RESTRAINTS + restraint_type = 'harmonic', # harmonic or go + use_com = True, # apply on centers of mass instead of CA + colabfold = 1, # PAE format (EBI AF=0, Colabfold=1&2) + k_harmonic = 7000., # Restraint force constant + + # RNA settings + rna_kb1 = 1400.0, + rna_kb2 = 2200.0, + rna_ka = 4.20, + rna_pa = 3.14, + rna_nb_sigma = 0.4, + rna_nb_scale = 136, + rna_nb_cutoff = 2.0 + +) + +components.add(name='dspolyR12',molecule_type='rna', nmol=1, restraint=True, + restraint_type='harmonic', k_harmonic=10, cutoff_restr=1.5, + use_com = False, ext_restraint=True) + +components.write(path,name='components.yaml') + + From 17d69b3f1e911760ddf10327293996b08baf5d74 Mon Sep 17 00:00:00 2001 From: gitesei Date: Mon, 29 Sep 2025 17:24:48 +0200 Subject: [PATCH 6/8] Fix angles header --- calvados/build.py | 5 ++--- calvados/components.py | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/calvados/build.py b/calvados/build.py index b82bf67..a35276f 100644 --- a/calvados/build.py +++ b/calvados/build.py @@ -313,7 +313,6 @@ def geometry_from_pdb(pdb,use_com=False): box = np.append(u.dimensions[:3]/10.,u.dimensions[3:]) return pos, box - def geometry_from_pdb_rna(pdb,use_com=False): """ positions in nm""" backbone_atoms_name = [ "1H2'", "1H5'", "2H5'", "2HO'", "C1'", @@ -350,8 +349,8 @@ def geometry_from_pdb_rna(pdb,use_com=False): raise ValueError(f"Invalid RNA resname, {res.resname}") pos = np.array(pos) - return pos, u.dimensions - + box = np.append(u.dimensions[:3]/10.,u.dimensions[3:]) + return pos, box def bfac_from_pdb(pdb,confidence=70.): """ get pLDDT encoded in pdb b-factor column """ diff --git a/calvados/components.py b/calvados/components.py index 56d1e90..94f4362 100644 --- a/calvados/components.py +++ b/calvados/components.py @@ -169,9 +169,7 @@ def calc_properties(self, pH: float = 7.0, verbose: bool = False, comp_setup: st """ Protein properties. """ super().calc_properties(pH=pH, verbose=verbose) - # fix mass of termini - self.mws[self.n_termini] += 2 - self.mws[self.c_termini] += 16 + # fix charge and mw of termini if verbose: print(f'Adding charges for {self.charge_termini} termini of {self.name}.', flush=True) @@ -582,7 +580,7 @@ def write_bonds(self, path): f.write(f'{int(b[0])}\t{int(b[1])}\t{int(b[2])}\t{b[3]:.4f}\t{b[4]:.4f}\t{b[5]}\n') with open(f'{path}/angles_{self.name}.txt','w') as f: - f.write('i\tj\tk\tb_idx\tsig\tlam\n') + f.write('i\tj\tk\ta_idx\ta[rad]\tk[kJ/mol/rad^2]\n') for b in self.angle_list: f.write(f'{int(b[0])}\t{int(b[1])}\t{int(b[2])}\t{int(b[3])}\t{b[4]:.4f}\t{b[5]:.4f}\n') From 5a6cb1165a0593945800e9e9290e49d632f30db0 Mon Sep 17 00:00:00 2001 From: sobuelow <33522435+sobuelow@users.noreply.github.com> Date: Mon, 6 Oct 2025 10:09:46 +0100 Subject: [PATCH 7/8] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ea4ac5e..1adde58 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='calvados', - version='0.7.0', + version='0.8.0', description='Coarse-grained implicit-solvent simulations of biomolecules', url='https://github.com/KULL-Centre/CALVADOS', authors=[ From 84ba4ad332dfabcf70ea8d8adfa7f1e8c68a5999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20von=20B=C3=BClow?= Date: Sat, 18 Oct 2025 19:20:15 +0100 Subject: [PATCH 8/8] Updated AF-CALVADOS example --- calvados/data/default_component.yaml | 6 +++--- examples/{single_GO => single_AF_CALVADOS}/README.md | 2 +- .../{single_GO => single_AF_CALVADOS}/input/AF-P00698.json | 0 .../{single_GO => single_AF_CALVADOS}/input/AF-P00698.pdb | 0 .../{single_GO => single_AF_CALVADOS}/input/residues.csv | 0 examples/{single_GO => single_AF_CALVADOS}/prepare.py | 6 +++--- 6 files changed, 7 insertions(+), 7 deletions(-) rename examples/{single_GO => single_AF_CALVADOS}/README.md (53%) rename examples/{single_GO => single_AF_CALVADOS}/input/AF-P00698.json (100%) rename examples/{single_GO => single_AF_CALVADOS}/input/AF-P00698.pdb (100%) rename examples/{single_GO => single_AF_CALVADOS}/input/residues.csv (100%) rename examples/{single_GO => single_AF_CALVADOS}/prepare.py (96%) diff --git a/calvados/data/default_component.yaml b/calvados/data/default_component.yaml index ea350b0..6743144 100644 --- a/calvados/data/default_component.yaml +++ b/calvados/data/default_component.yaml @@ -13,15 +13,15 @@ pdb_folder : 'pdbs' restraint_type : 'harmonic' k_harmonic : 700. fdomains : 'domains.yaml' -k_go : 10. +k_go : 15. use_com : true periodic: false colabfold : 0 bfac_shift : 0.8 bfac_width : 50. -pae_shift : 0.4 -pae_width : 8. +pae_shift : 0.3 +pae_width : 15. rna_kb1 : 8033.0 rna_kb2 : 8033.0 diff --git a/examples/single_GO/README.md b/examples/single_AF_CALVADOS/README.md similarity index 53% rename from examples/single_GO/README.md rename to examples/single_AF_CALVADOS/README.md index 0de1f87..d841b9c 100644 --- a/examples/single_GO/README.md +++ b/examples/single_AF_CALVADOS/README.md @@ -5,4 +5,4 @@ python prepare.py --name python /run.py --path ``` -where `` (hnRNPA1S or TIA1) is a protein for which a PDB file and the residues of the folded domains are provided in the `input` folder. +where `` (AF-P00698) is a protein for which a PDB file and a JSON PAE file are provided in the `input` folder. diff --git a/examples/single_GO/input/AF-P00698.json b/examples/single_AF_CALVADOS/input/AF-P00698.json similarity index 100% rename from examples/single_GO/input/AF-P00698.json rename to examples/single_AF_CALVADOS/input/AF-P00698.json diff --git a/examples/single_GO/input/AF-P00698.pdb b/examples/single_AF_CALVADOS/input/AF-P00698.pdb similarity index 100% rename from examples/single_GO/input/AF-P00698.pdb rename to examples/single_AF_CALVADOS/input/AF-P00698.pdb diff --git a/examples/single_GO/input/residues.csv b/examples/single_AF_CALVADOS/input/residues.csv similarity index 100% rename from examples/single_GO/input/residues.csv rename to examples/single_AF_CALVADOS/input/residues.csv diff --git a/examples/single_GO/prepare.py b/examples/single_AF_CALVADOS/prepare.py similarity index 96% rename from examples/single_GO/prepare.py rename to examples/single_AF_CALVADOS/prepare.py index edf8a44..8c358f2 100644 --- a/examples/single_GO/prepare.py +++ b/examples/single_AF_CALVADOS/prepare.py @@ -13,10 +13,10 @@ sysname = f'{args.name:s}' # set the side length of the cubic box -L = 25 +L = 50 # set the saving interval (number of integration steps) -N_save = 100 +N_save = 7000 # set final number of frames to save N_frames = 1000 @@ -61,7 +61,7 @@ restraint_type = 'go', # harmonic or go use_com = True, # apply on centers of mass instead of CA colabfold = 0, # PAE format (EBI AF=0, Colabfold=1&2) - k_go = 10., # Restraint force constant + k_go = 15., # Restraint force constant ) components.add(name=args.name)