<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Lukas,<div class=""><br class=""></div><div class=""> You matrix values are in the wrong order. As it says in the documentation for "view matrix"</div><div class=""><br class=""></div><div class=""><span style="font-family: "Times New Roman"; font-size: medium; orphans: 2; widows: 2;" class="">"Each matrix is reported as 12 comma-separated numbers, corresponding to a 3x3 rotation matrix and a translation vector in the fourth column. Ordering is row-by-row, such that the translation vector is given as the fourth, eighth, and twelfth numbers."</span></div><div class=""><span style="font-family: "Times New Roman"; font-size: medium; orphans: 2; widows: 2;" class=""><br class=""></span></div><div class=""><span style="orphans: 2; widows: 2;" class=""><font face="Times New Roman" size="3" class=""><a href="https://www.cgl.ucsf.edu/chimerax/docs/user/commands/view.html#matrix" class="">https://www.cgl.ucsf.edu/chimerax/docs/user/commands/view.html#matrix</a></font></span></div><div class=""><span style="orphans: 2; widows: 2;" class=""><font face="Times New Roman" size="3" class=""><br class=""></font></span></div><div class="">You instead have the translation as the tenth, eleventh and twelfth values. This is why your models are skewed.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 23, 2021, at 2:51 PM, Frey, Lukas via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Dear Elaine,
<div class=""><br class="">
</div>
<div class="">I have an external file with a transformation matrix (orientation and translation) for a .pdb structure and I would like to apply the transformation in ChimeraX to a .pdb file. I’m aware that ChimeraX needs a matrix like [[1,1,1],[2,2,2],[3,3,3],[x,y,z]],
where the first 3 columns are the orientation the last column the x,y,z translation positions. One can load a new orientation/translation into chimeraX with the „open“ command:</div>
<div class="">
<div class=""><br class="">
</div>
<div class=""><a href="https://rbvi.ucsf.edu/chimerax/docs/user/formats/positions.html" class="">https://rbvi.ucsf.edu/chimerax/docs/user/formats/positions.html</a></div>
<div class=""><br class="">
</div>
<div class="">in the command line of chimeraX I had to type in:</div>
<div class=""><br class="">
</div>
<div class="">open path-to-file/test.positions models #1 childModels true matchNames true </div>
<div class=""><br class="">
</div>
<div class="">my test.positions file is a .txt file containing the name of the .pdb structure and transformation matrix and I already loaded the .pdb structure before I applied the transformation matrix. Below you can find the input of the transformation matrix
file, called text.positions:</div>
<div class=""><br class="">
</div>
<div class="">6y2l.pdb,-0.6515591636522021,-0.6041757901381976,-0.45873987277293393,0.09148867345316551,-0.662890582358989,0.7431055769199559,-0.7530607405054541,0.44220774578318395,0.48718767500700594,30.0,20.0,30.0</div>
<div class=""><br class="">
</div>
<div class="">If I apply the open command in chimera somehow it leads to a distortion of the .pdb protein structure. If I check the transformation position of the model with „view matrix“, then I have the following output:</div>
</div>
<div class=""><br class="">
</div>
<div class="">view matrix</div>
<div class="">camera position: 0.94464,-0.25925,-0.20113,-578.87,-0.29451,-0.94014,-0.17144,1242.4,-0.14464,0.22118,-0.96445,-8143.8</div>
<div class="">
<div class="">model positions: #1,-0.65156,-0.60418,-0.45874,0.091489,-0.66289,0.74311,-0.75306,0.44221,0.48719,30,20,30,#1.1,1,0,0,0,0,1,0,0,0,0,1,0,#1.2,1,0,0,0,0,1,0,0,0,0,1,0</div>
</div>
<div class=""><br class="">
</div>
<div class="">Somehow the transformation matrix is only applied to #1 but not to #1.1 and #1.2, do you have an idea what I have to change?</div>
<div class=""><br class="">
</div>
<div class="">If I save the transformation matrix of the distorted .pdb structure via the save command: </div>
<div class=""><br class="">
</div>
<div class="">save path-to-file/test_2.positions models #1 childModels true</div>
<div class=""><br class="">
</div>
<div class="">I have the following output:</div>
<div class="">6y2l.pdb,-0.651559163652,-0.604175790138,-0.458739872773,0.0914886734532,-0.662890582359,0.74310557692,-0.753060740505,0.442207745783,0.487187675007,30,20,30</div>
<div class="">metal coordination bonds,1,0,0,0,0,1,0,0,0,0,1,0</div>
<div class="">missing structure,1,0,0,0,0,1,0,0,0,0,1,0</div>
<div class=""><br class="">
</div>
<div class="">The goal in the future is to load several positions (1 … 100) of the same .pdb structures.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class=""><br class="">
</div>
<div class="">Lukas</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Lukas Frey</div>
<div class="">Visiting Postdoctoral Associate</div>
<div class="">UMASS Medical School Worcester<br class="">
Grigorieff Laboratory </div>
<div class=""><br class="">
</div>
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>