From 5fa683956a288e8a02076038fba76c16ecb62f40 Mon Sep 17 00:00:00 2001
From: Chris Maffeo <cmaffeo2@illinois.edu>
Date: Mon, 10 Dec 2018 10:43:18 -0600
Subject: [PATCH] Removed temporary code for manually optimizing initial
 azimuthal angle

---
 mrdna/segmentmodel.py | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/mrdna/segmentmodel.py b/mrdna/segmentmodel.py
index 5e698c4..e9fb792 100644
--- a/mrdna/segmentmodel.py
+++ b/mrdna/segmentmodel.py
@@ -2755,10 +2755,6 @@ class SegmentModel(ArbdModel):
                     nt1.basepair = nt2
                     nt2.basepair = nt1
 
-    def _update_orientations(self,orientation):
-        for s in self.strands:
-            s.update_atomic_orientations(orientation)
-
     def write_atomic_ENM(self, output_name, lattice_type=None):
         ## TODO: ensure atomic model was generated already
         if lattice_type is None:
@@ -2997,26 +2993,6 @@ proc calcforces {} {
         for s in self.strands:
             first_atomic_index = s.generate_atomic_model(scale,first_atomic_index)
         self._assign_basepairs()
-        return
-
-        ## Angle optimization
-        angles = np.linspace(-180,180,180)
-        score = []
-        for a in angles:
-            o = rotationAboutAxis([0,0,1], a)
-            sum2 = count = 0
-            for s in self.strands:
-                s.update_atomic_orientations(o)
-                for s1,s2 in zip(s.strand_segments[:-1],s.strand_segments[1:]):
-                    nt1 = s1.children[-1]
-                    nt2 = s2.children[0]
-                    o3 = nt1.atoms_by_name["O3'"]
-                    p = nt2.atoms_by_name["P"]
-                    sum2 += np.sum((p.collapsedPosition()-o3.collapsedPosition())**2)
-                    count += 1
-            score.append(sum2/count)
-        print(angles[np.argmin(score)])
-        print(score)
 
     def vmd_tube_tcl(self, file_name="drawTubes.tcl"):
         with open(file_name, 'w') as tclFile:
-- 
GitLab