fr ?Doc file from AP MD? ;<1> docapmd fr ? name of input particles? ;<2> original particles _1 fr ? name of prealigned particles? ;<3> rotated particles _2 fr ? Reference images?<7> fr ?Previous transformation parameters doc file?<4> fr ?New transformation parameters doc file?<5> ; ; Format of the transformation parameters doc file is: ; angle, Sx, Sy, 0-1 flag for Y-mirror (0-no mirror; 1-mirror) ud n,x19 <1> DO LB5 x55=1,x19 ud s,x55,x91,x92,x93 <1> ; Rotate the image cp <3>x55 _3 RT SQ _3 _1 x93 (0,0) ; get corresponding projection, number is stored in apmd if(x91.lt.0) then ; image has to be mirrored x94=1 x91=-x91 MR _1 _2 Y cp _2 _1 ; else x94=0 endif ; CC N _1 <7>x91 _2 PK x10,x11,x12,x13,x31,x32,x33 _2 (0) x31=-x31 x32=-x32 ; combine rotation, mirror, and shift and use RT SQ if(x94.eq.1) then x31=-x31 endif ; combine with the previous transformation ud ic,x55,x23,x24,x25,x29 <4> @combat[x23,x24,x25,x29,x93,x31,x32,x94,x51,x52,x53,x54] sd x55,x51,x52,x53,x54 <5> if(x54.eq.0) then rt sq <2>x55 <3>x55 x51 x52,x53 else rt sq <2>x55 _1 x51 x52,x53 mr _1 <3>x55 Y endif LB5 ud ice <1> ud ice <4> sd e <5> re