Warning: Trying to access array offset on value of type null in /home/site/wwwroot/lib/plugins/move/action/rename.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/lib/plugins/move/action/rename.php:42) in /home/site/wwwroot/inc/actions.php on line 38
get_distance [topas wiki]

User Tools

Site Tools


get_distance

Get_Distance Get_Angle

Description: Get the distance or angle between two sites and report it in the .inp file

Conributed by: John Evans

macro Get_Distance(sites, c, d_calc)
{
   #m_ifarg c ""
      #m_unique_not_refine c
   #m_endif
	sites_distance c 
		load site_to_restrain { sites }
	prm = c; : d_calc
}
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
      }

Typical useage would be:

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`)     

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:

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  

====== 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“)

get_distance.txt · Last modified: 2024/01/23 08:03 by 127.0.0.1