get_coordinates
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| get_coordinates [2019/09/12 08:25] – johnsoevans | get_coordinates [2025/09/19 15:18] (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. | ||
| + | |||
| + | For regular sites use: | ||
| + | |||
| + | <code topas> | ||
| + | { Get(Find_Child(Get(site_recs), | ||
| + | { Get(Find_Child(Get(site_recs), | ||
| + | { Get(Find_Child(Get(site_recs), | ||
| + | </ | ||
| + | |||
| + | If it's more convenient use the macro: | ||
| + | |||
| + | <code topas> | ||
| + | macro Get_x(site_name) { Get(Find_Child(Get(site_recs), | ||
| + | macro Get_y(site_name) { Get(Find_Child(Get(site_recs), | ||
| + | macro Get_z(site_name) { Get(Find_Child(Get(site_recs), | ||
| + | </ | ||
| + | |||
| + | 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, | ||
| + | macro & Get_y(site_name) { Point(site_name, | ||
| + | macro & Get_z(site_name) { Point(site_name, | ||
| + | </ | ||
| + | |||
| + | 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) | ||
| + | </ | ||