Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
get_distance [2015/11/25 08:41]
lks
get_distance [2016/10/15 15:19]
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 13: Line 13:
  prm = c; : d_calc  prm = c; : d_calc
 }</​code>​ }</​code>​
 +
 +
 +<code topas>​macro Get_Angle(sites,​ c, ang_calc)
 +{
 +   #​m_ifarg c ""​
 +      #​m_unique_not_refine c
 +   #​m_endif
 + sites_geometry s3
 + load site_to_restrain { sites }
 + prm   c = Sites_Geometry_Angle(s3);​ : 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 s2
 + load site_to_restrain { O5 0 0 0 0 O5 5 -1 1 0 }
 +prm diag_short = Sites_Geometry_Distance(s2);​ :  5.07701`_0.00402
 +           
 +sites_geometry s3
 + 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(s3);​ :  137.38670`_0.14381  ​
 +</​code>​
  
 ====== Get_Distance ====== Topas v5 reporting bug ====== Get_Distance ====== Topas v5 reporting bug

Personal Tools