Thank you, Paul! I will see if it works. Apply() could be replaced with
map(function, list) in python.
Best wishes,
Andrea.
On 28/08/2018 18:24, Paul Emsley wrote:
On 28/08/2018 16:20, Andrea Thorn wrote:
I would like to mark a box in an .mrc file (ccp4 format map); I know
the xyz coordinates of the corners.
Can I do something similar to "show unit cell" or draw 24 lines with
some script command in Coot?
coords = [
[0,0,0], [0,0,1], [0,1,0], [0,1,1],
[1,0,0], [1,0,1], [1,1,0], [1,1,1]]
idx_list = [
[0,1], [0,2], [0,4], [1,3], [1,5], [2,3],
[2,6], [3,7], [4,5], [4,6], [5,7], [6,7]]
a = new_generic_object_number("My Green Box")
for idx_pair in idx_list:
print idx_pair
# the following is inelegant, what is the python equivalent of apply?
to_generic_object_add_line(a, "green", 2,
coords[idx_pair[0]][0],
coords[idx_pair[0]][1],
coords[idx_pair[0]][2],
coords[idx_pair[1]][0],
coords[idx_pair[1]][1],
coords[idx_pair[1]][2])
set_display_generic_object(a,1)
# this green box will in part intersect the origin box.
Paul.
########################################################################
To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=COOT&A=1
--
Dr. Andrea Thorn
Rudolf Virchow Center for Experimental Biomedicine
University of Wuerzburg
Josef-Schneider-Str. 2
97080 Wuerzburg
Germany
andrea.th...@web.de
http://shelx.uni-ac.gwdg.de/~athorn
########################################################################
To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=COOT&A=1