From 3cb7829aade3db0c47ff7e47e909cd061dae6626 Mon Sep 17 00:00:00 2001 From: pinyili2 <pinyili2@illinois.edu> Date: Thu, 22 Aug 2024 10:49:04 -0500 Subject: [PATCH] fix some bugs --- mrdna/readers/segmentmodel_from_oxdna_pinyi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mrdna/readers/segmentmodel_from_oxdna_pinyi.py b/mrdna/readers/segmentmodel_from_oxdna_pinyi.py index bf50368..7846dde 100644 --- a/mrdna/readers/segmentmodel_from_oxdna_pinyi.py +++ b/mrdna/readers/segmentmodel_from_oxdna_pinyi.py @@ -140,7 +140,7 @@ def mrdna_model_from_oxdna(coordinate_file, topology_file,virt2nuc=None,get_nt_p basepair_pos = r + base_dir*10.0 normal_dir = -conf_data[:,6:9] perp_dir = np.cross(base_dir, normal_dir) - orientation = np.array([np.array(o).T.dot(_yrot) for o in zip(perp_dir,-base_dir,-normal_dir)]).T + orientation = np.array([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"] @@ -148,6 +148,8 @@ def mrdna_model_from_oxdna(coordinate_file, topology_file,virt2nuc=None,get_nt_p nt_prop["orientation"]=orientation nt_prop["r"]=list(r) except: + if virt2nuc is not None: + logger.info("warning: virt2nuc not read. guessing structure...") ## Reverse direction so indices run 5'-to-3' top_data = [a[::-1] for a in top_data] conf_data = conf_data[::-1,:] -- GitLab