Exemple #1
0
 def bond_tra(self,bond_tup,bond_tra_val):
     assert len(bond_tup)==2
     t1,t2=bond_tup        
     u=norm_vec(self._rl[t1],self._rl[t2])
     bsl=self.calc_bsplit(t1,t2)
     self._rl[t2]=tra(self._rl[t2],u,bond_tra_val)
     for ai in bsl:
         self._rl[ai]=tra(self._rl[ai],u,bond_tra_val)
Exemple #2
0
 def bond_tra(self,bond_tup,bond_tra_val):
     assert len(bond_tup)==2
     t1,t2=bond_tup        
     u=norm_vec(self._rl[t1],self._rl[t2])
     bsl=self.calc_bsplit(t1,t2)
     self._rl[t2]=tra(self._rl[t2],u,bond_tra_val)
     for ai in bsl:
         self._rl[ai]=tra(self._rl[ai],u,bond_tra_val)
Exemple #3
0
 def diha_rot(self,diha_tup,diha_rot_val):
     assert len(diha_tup)==4
     #self.set_conn()
     t1,t2,t3,t4=diha_tup
     u=norm_vec(self._rl[t2],self._rl[t3])
     bsl=self.calc_bsplit(t2,t3)
     for ai in bsl:
         delr=rotu(self._rl[ai]-self._rl[t2],u,diha_rot_val)
         self._rl[ai]=self._rl[t2]+delr
Exemple #4
0
 def diha_rot(self,diha_tup,diha_rot_val):
     assert len(diha_tup)==4
     #self.set_conn()
     t1,t2,t3,t4=diha_tup
     u=norm_vec(self._rl[t2],self._rl[t3])
     bsl=self.calc_bsplit(t2,t3)
     for ai in bsl:
         delr=rotu(self._rl[ai]-self._rl[t2],u,diha_rot_val)
         self._rl[ai]=self._rl[t2]+delr