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_coordinates [topas wiki]

User Tools

Site Tools


get_coordinates

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
get_coordinates [2019/09/12 08:25] johnsoevansget_coordinates [2022/11/03 15:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Getting Coordinates ======
  
 +There are various macros to Get coordinates of atoms for use in other equations.  Different ones are needed for regular sites and for point_for_sites in rigid bodies.  Note that you can't use information from point_for_sites of a rigid body in regular sites.
 +
 +For regular sites use:
 +
 +<code topas>
 +{ Get(Find_Child(Get(site_recs), site_name), x) }
 +{ Get(Find_Child(Get(site_recs), site_name), y) }
 +{ Get(Find_Child(Get(site_recs), site_name), z) }
 +</code>
 +
 +If it's more convenient use the macro:
 +
 +<code topas>
 +macro Get_x(site_name) { Get(Find_Child(Get(site_recs), site_name), x) }
 +macro Get_y(site_name) { Get(Find_Child(Get(site_recs), site_name), y) }
 +macro Get_z(site_name) { Get(Find_Child(Get(site_recs), site_name), z) }
 +</code>
 +
 +For rigid body point for sites you can get the coordinates in cartesian space with the macro:
 +
 +<code topas>
 +macro & Get_x(site_name) { Point(site_name, rx) }        
 +macro & Get_y(site_name) { Point(site_name, ry) }        
 +macro & Get_z(site_name) { Point(site_name, rz) }       
 +</code> 
 +
 +In the future it might be possible to work with the fractional coordinates of other atoms in the rigid body by switching from rx to ua coordinates with topas.inc macros:
 +
 +<code topas>
 +Point_ua(site_name)
 +Point_ub(site_name)
 +Point_uc(site_name)
 +</code>
get_coordinates.txt · Last modified: 2022/11/03 15:08 by 127.0.0.1