Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
get_distance [2009/11/18 16:02]
dch3sl created
get_distance [2018/11/23 13:41] (current)
johnsoevans
Line 1: Line 1:
-====== Get_Distance ====== +====== Get_Distance ​Get_Angle====== 
-Description:​ Get the distance between two sites and report it in the .inp file+Description:​ Get the distance ​or angle between two sites and report it in the .inp file
  
 Conributed by: John Evans Conributed by: John Evans
Line 15: Line 15:
  
  
 +<code topas>
 +macro Get_Angle(sites,​ c, ang_calc)
 +      {
 +         #​m_ifarg c ""​
 +            #​m_unique_not_refine c
 +         #​m_endif
 +         ​sites_geometry c 
 +            load site_to_restrain { sites }
 +         prm = Sites_Geometry_Angle(c);​ : ang_calc
 +      }
 +</​code>​
 +  ​
 +Typical useage would be:
 +
 +<code topas>
 +Get_Distance(Mo1 0 0 0 0 Mo2 0 0 0 0, mo1mo2, 4.03803`)
 +Get_Angle(O2 10 -1 -1 0 Sn1 0 0 0 0 O2 9 -1 0 1, ang1, 110.02336`) ​    
 +</​code>  ​
 +
 +These distance/​angles could then be used in other equations or written out after each refinement.
 +
 +You may need to include the whole atom name if your distance is not between the sites in the asymmetric unit.  This has the form "Si 0 1 1 0" where the first digit is the symmetry operator used to generate that site (0 is always the x,y,z which is the site you list). ​ The other numbers tell you which cell the atom is relative to the origin cell (0 0 0).  You can usually find this information from append_bond_lengths listing.
 +
 +More fundamental language for distances and angles is:
 +
 +<code topas>​sites_geometry s1
 + load site_to_restrain { O5 0 0 0 0 O5 5 -1 1 0 }
 +prm diag_short = Sites_Geometry_Distance(s1);​ :  5.07701`_0.00402
 +           
 +sites_geometry s2
 + load site_to_restrain { Si2 0 0 0 0  O3 0 0 0 0 Si1 0 0 0 0 }
 +prm Si1_O3_Si2 = Sites_Geometry_Angle(s2);​ :  137.38670`_0.14381  ​
 +</​code>​
 +
 +====== Get_Distance ====== Topas v5 reporting bug
 +
 +Contributed by: Lucy Saunders
 +
 +The Get_distance does not update in the inp file but does refine. To access refined Get_Distance,​ output to a .out file.
 +
 +out "​temp_res.out"​ append
 +Out(c, " %11.5f","​ %11.5f"​\n"​)
  

Personal Tools