This is an old revision of the document!


Get_Distance

Description: Get the distance 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
}

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

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