Skip to content
Snippets Groups Projects
Commit c62ac059 authored by cmaffeo2's avatar cmaffeo2
Browse files

Add explicitly_unstacked argument to oxDNA reader to ensure we get terminal_crossover connections

parent f70fa502
No related branches found
No related tags found
No related merge requests found
......@@ -253,6 +253,15 @@ def model_from_basepair_stack_3prime(coordinate, basepair, stack, three_prime,
basepaired / stacked / phosphodiester-bonded nucleotide. If there
is no such nucleotide, the value should be -1.
By default, where there is a 3'-to-5' connection between
double-straned helices, they will be connected by an intrahelical
connection that makes the helical domain continue across the
connection, even if they do not stack in the stacking
array. Instead, a "terminal_crossover" representing a relatively
free (e.g. kinked) junction can be placed by including the index
of one of the participating bases in the optional
:explicitly_unstacked: tuple.
Args:
basepair: List of each nucleotide's basepair's index
stack: List containing index of the nucleotide stacked on the 3' of each nucleotide
......
......@@ -143,7 +143,7 @@ def mrdna_model_from_oxdna(coordinate_file, topology_file,virt2nuc=None,get_nt_p
orientation = [np.array(o).T.dot(_yrot) for o in zip(perp_dir,-base_dir,-normal_dir)]
seq=nt_prop["seq"]
bp=nt_prop["bp"]
stack=nt_prop["stack"]
stack=np.array((list(nt_prop["stack"])))
three_prime=nt_prop["threeprime"]
nt_prop["orientation"]=orientation
nt_prop["r"]=list(r)
......@@ -205,8 +205,9 @@ def mrdna_model_from_oxdna(coordinate_file, topology_file,virt2nuc=None,get_nt_p
## _debug_write_bonds()
logger.info(f'mrdna_model_from_oxdna: num_bp, num_ss_nt, num_stacked: {np.sum(bp>=0)//2} {np.sum(bp<0)} {np.sum(stack >= 0)}')
model = model_from_basepair_stack_3prime( r, bp, stack, three_prime, seq, orientation, **model_parameters )
model = model_from_basepair_stack_3prime( r, bp, stack, three_prime, seq, orientation,
explicitly_unstacked = np.argwhere(stack == -1),
**model_parameters )
"""
model.DEBUG = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment