Save PDB and Map before fitting

Hi all, Hope everything is going fine! In my plugin, it is necessary to save the PDB and the map (ccp4) to disk before the exhaustive fitting process is executed. Is there any simple and efficient way of doing this? I've checked the scripts and haven't found anything about this and I wouldn't like to have to replicate the code from the Chimera source (OpenSave and the relative to maps). This question is quite related to the previous one I made about copying a molecule. Thank you all in advance and kind regards from Spain.

Here is Python code to save a PDB and a density map, also available on the Chimera Python scripts web page: http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts <http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts> Tom
On Apr 20, 2017, at 2:09 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hi all,
Hope everything is going fine!
In my plugin, it is necessary to save the PDB and the map (ccp4) to disk before the exhaustive fitting process is executed. Is there any simple and efficient way of doing this? I've checked the scripts and haven't found anything about this and I wouldn't like to have to replicate the code from the Chimera source (OpenSave and the relative to maps).
This question is quite related to the previous one I made about copying a molecule.
Thank you all in advance and kind regards from Spain.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule. My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process. So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo. El 20-04-2017 22:04, Tom Goddard escribió:
Here is Python code to save a PDB and a density map, also available on the Chimera Python scripts web page:
http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts [1]
Tom
On Apr 20, 2017, at 2:09 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hi all,
Hope everything is going fine!
In my plugin, it is necessary to save the PDB and the map (ccp4) to disk before the exhaustive fitting process is executed. Is there any simple and efficient way of doing this? I've checked the scripts and haven't found anything about this and I wouldn't like to have to replicate the code from the Chimera source (OpenSave and the relative to maps).
This question is quite related to the previous one I made about copying a molecule.
Thank you all in advance and kind regards from Spain. _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
Links: ------ [1] http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts

Hi Pablo, The map format doesn’t include rotation information. You would have to resample it on a new grid to create a new map, such as with command “vop resample”… details here on saving maps after fitting (bottom of the page): <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting> I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.

Hello Elaine, Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly. Thank you! El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting [1]>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
Links: ------ [1] http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting

Hi Pablo, Every model has an ‘openState’ attribute which in turn has a ‘xform’ attribute which holds the model’s transformation matrix. A newly opened model, if it’s the only model, will have the identity matrix as it’s initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a “best effort” attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model’s transformation matrix changes — the ‘OpenState’ trigger will fire in the chimera.triggers trigger set, with the trigger data ‘.reasons’ attribute containing ‘transformation change’. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren’t familiar with triggers, there is a programmer example about them: https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main... <https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main_AtomTrigger.html> —Eric Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting>>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hello Eric, Thank you for the response. I will check it!! Kind regards! 2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, Every model has an ‘openState’ attribute which in turn has a ‘xform’ attribute which holds the model’s transformation matrix. A newly opened model, if it’s the only model, will have the identity matrix as it’s initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a “best effort” attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model’s transformation matrix changes — the ‘OpenState’ trigger will fire in the chimera.triggers trigger set, with the trigger data ‘.reasons’ attribute containing ‘transformation change’. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren’t familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/ Main_AtomTrigger.html
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/ savemodel.html#afterfitting>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
-- *Pablo Solar Rodríguez* *pablosolar.r@gmail.com <pablosolar.r@gmail.com>*

Hello again! Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong. The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates. I'm gonna explain it with the example. 1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel): 2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine. 3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine. Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening... I hope to have explained myself correctly. Thank you so much in advance Pablo Solar Rodríguez pablo.solar@delogica.com Delógica - www.delogica.com [3] España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302 ------------------------- _ POR FAVOR, ANTES DE IMPRIMIR ESTE MENSAJE, ASEGÚRATE DE QUE ES NECESARIO. AYUDEMOS A CUIDAR EL MEDIO AMBIENTE. _ _Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. _ _This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice._ El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes -- the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main... [1]
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió: Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting [2]>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev [4] _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev [4] -- PABLO SOLAR RODRÍGUEZ PABLOSOLAR.R@GMAIL.COM _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev [4] Links: ------ [1] https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main... [2] http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting [3] http://www.delogica.com [4] http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hi Pablo, I couldn’t quite puzzle out what you were saying below. In particular, I didn’t understand: "Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.” So instead of trying to answer directly, I’ll just try to outline the principles involved and see if that helps. You open your map and your original PDB. Then you fit your PDB into the map. If you want to save the fitted PDB in the same coordinate reference frame as the map, then you need to take the transformed coordinates of the PDB, apply the inverse of the map’s transformation matrix, and use those coordinates. You don’t really say what API you use to save the PDB file, but you could just use the “write” command with the “relative” keyword to save the PDB file. Also, Midas.write(pdb_model, map_model, file_name) would do it. If you then open the map and new PDB file together they will be in their fitted orientation. Hope this helps, Eric Pettersen UCSF Computer Graphics Lab
On Apr 28, 2017, at 12:32 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com> wrote:
Hello again!
Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong.
The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates.
I'm gonna explain it with the example.
1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel):
2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.
3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine.
Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening...
I hope to have explained myself correctly.
Thank you so much in advance
<e3596d50.png> Pablo Solar Rodríguez pablo.solar@delogica.com Delógica - www.delogica.com <http://www.delogica.com/> España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302
<2057ace7.png> Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente. Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice.
El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>>: Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes — the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main... <https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main_AtomTrigger.html>
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting>>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo. _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
--
Pablo Solar Rodríguez
pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Hello Eric, I'm sorry fornot explaining myself correctly. I'm gonna try it again with two example situations: 1) Simple situation: I open the PDB and the Map and apply my exhaustive fitting plugin. After it is finished, I can move the molecule to the different fitted coordinates solutions and even I give the chance to copy a solution into a new molecule in the model panel (there is a question in this forum about this I posted some weeks ago) Now the second example and the problem of this post: 2) Advanced situations: I open the PDB and the Map and, before fitting, I move them unchecking de 'A' checkbox in the model panel. Let's suppose that I move only the PDB. Well, with this, I need to save the moved PDB to disk (temp.pdb with the python scrip save.py you told me) before fitting to have the new coordinates and execute the fitting algorithm with the map and this saved molecule (fitting Map and temp.pdb). When the fitting is finished, I should move the original molecule to the different fitted coordinates solutions but it doesnt work properly. Related with 2, if I save the original moved molecule to disk (temp.pdb) and I open this new copy in Chimera and I fit it with the map directly, it works fine. There's something wrong between the acts of opening the molecule, moving it, writing it to disk, fitting, and trying to move the original one with the fitted coordinates (between the copy and the map) and I don't know why. Hope it is more clear now. If not, let me know and I try to explain it better. Thank you in advance and regards from Spain. 2017-05-01 23:12 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, I couldn’t quite puzzle out what you were saying below. In particular, I didn’t understand:
"Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.”
So instead of trying to answer directly, I’ll just try to outline the principles involved and see if that helps. You open your map and your original PDB. Then you fit your PDB into the map. If you want to save the fitted PDB in the same coordinate reference frame as the map, then you need to take the transformed coordinates of the PDB, apply the *inverse* of the map’s transformation matrix, and use those coordinates. You don’t really say what API you use to save the PDB file, but you could just use the “write” command with the “relative” keyword to save the PDB file. Also, Midas.write(pdb_model, map_model, file_name) would do it. If you then open the map and new PDB file together they will be in their fitted orientation.
Hope this helps,
Eric Pettersen UCSF Computer Graphics Lab
On Apr 28, 2017, at 12:32 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello again!
Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong.
The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates.
I'm gonna explain it with the example.
1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel):
2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.
3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine.
Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening...
I hope to have explained myself correctly.
Thank you so much in advance
*<e3596d50.png> Pablo Solar Rodríguez *pablo.solar@delogica.com * Delógica - *www.delogica.com
España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 <914%2031%2031%2009> Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302
------------------------------
*<2057ace7.png> Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente. * *Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. * *This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice.*
El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes — the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGui de/Examples/Main_AtomTrigger.html
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel. html#afterfitting>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
--
*Pablo Solar Rodríguez* *pablosolar.r@gmail.com* <pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
-- *Pablo Solar Rodríguez* *pablosolar.r@gmail.com <pablosolar.r@gmail.com>*

Maybe I understand. You: 1) Open the original PDB and map 2) Move the PDB relative to the map 3) Save a new PDB relative to the map (i.e. opening the new PDB and map would put the PDB in its moved position relative to the map) 4) Perform an exhaustive fitting of the new PDB with the map 5) Open the old PDB and try to position it in the fittings using the transforms computed with the new PDB If all you are using are the transforms from the new PDB position to its fitted position, then of course that won’t work with the old PDB. You need to also apply the transform that took the old PDB position to its new (first saved) position. That transform is, at the time the new PDB is saved: pdb_model.openState.xform * map.openState.xform.inverse() so to get the old PDB to the fitted position, you would need to replace its openState.xform with: fitted_xform * pdb_model_when_saved.openState.xform * map_when_saved.openState.xform —Eric
On May 2, 2017, at 2:19 AM, Pablo Solar Rodríguez <pablosolar.r@gmail.com> wrote:
Hello Eric,
I'm sorry fornot explaining myself correctly. I'm gonna try it again with two example situations:
1) Simple situation: I open the PDB and the Map and apply my exhaustive fitting plugin. After it is finished, I can move the molecule to the different fitted coordinates solutions and even I give the chance to copy a solution into a new molecule in the model panel (there is a question in this forum about this I posted some weeks ago)
Now the second example and the problem of this post:
2) Advanced situations: I open the PDB and the Map and, before fitting, I move them unchecking de 'A' checkbox in the model panel. Let's suppose that I move only the PDB. Well, with this, I need to save the moved PDB to disk (temp.pdb with the python scrip save.py you told me) before fitting to have the new coordinates and execute the fitting algorithm with the map and this saved molecule (fitting Map and temp.pdb). When the fitting is finished, I should move the original molecule to the different fitted coordinates solutions but it doesnt work properly.
Related with 2, if I save the original moved molecule to disk (temp.pdb) and I open this new copy in Chimera and I fit it with the map directly, it works fine. There's something wrong between the acts of opening the molecule, moving it, writing it to disk, fitting, and trying to move the original one with the fitted coordinates (between the copy and the map) and I don't know why.
Hope it is more clear now. If not, let me know and I try to explain it better.
Thank you in advance and regards from Spain.
2017-05-01 23:12 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>>: Hi Pablo, I couldn’t quite puzzle out what you were saying below. In particular, I didn’t understand:
"Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.”
So instead of trying to answer directly, I’ll just try to outline the principles involved and see if that helps. You open your map and your original PDB. Then you fit your PDB into the map. If you want to save the fitted PDB in the same coordinate reference frame as the map, then you need to take the transformed coordinates of the PDB, apply the inverse of the map’s transformation matrix, and use those coordinates. You don’t really say what API you use to save the PDB file, but you could just use the “write” command with the “relative” keyword to save the PDB file. Also, Midas.write(pdb_model, map_model, file_name) would do it. If you then open the map and new PDB file together they will be in their fitted orientation.
Hope this helps,
Eric Pettersen UCSF Computer Graphics Lab
On Apr 28, 2017, at 12:32 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello again!
Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong.
The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates.
I'm gonna explain it with the example.
1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel):
2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.
3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine.
Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening...
I hope to have explained myself correctly.
Thank you so much in advance
<e3596d50.png> Pablo Solar Rodríguez pablo.solar@delogica.com <mailto:pablo.solar@delogica.com> Delógica - www.delogica.com <http://www.delogica.com/> España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 <tel:914%2031%2031%2009> Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302
<2057ace7.png> Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente.
Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice.
El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>>: Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes — the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main... <https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main_AtomTrigger.html>
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting>>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo. _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
--
Pablo Solar Rodríguez
pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
--
Pablo Solar Rodríguez
pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>

On May 2, 2017, at 3:50 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
so to get the old PDB to the fitted position, you would need to replace its openState.xform with:
fitted_xform * pdb_model_when_saved.openState.xform * map_when_saved.openState.xform
forgot to add the “.inverse()” to the end of that… —Eric

Hello Eric, The 1,2, 3 and 4 points are correct. In 5, there is something wrong; we don't open the old pdb, it's already open from the start. We tried to apply the transform: pdb_model.openState.xform * map.openState.xform.inverse() Without succes results. Do we have to premultiply pdb xform with map inverse xform? When we move the pdb to the fittings positions, we do something similar to what "Transform coordinates" in the "Movement" menu does ( http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/ libs/MoleculeTransform/gui.py): - Reset: get the applied_xform inverse from the old pdb, transform atom coordinates with pdb atoms and this xform and record xform*. (similar to "Transform coordinates" Reset) - Move to center of mass: get euler xform with (0, 0, 0) euler angles and old pdb center coordinates, transform atom coordinates with old pdb atoms and this xform and record xform*. - For each solution, get euler xform with euler angles of the solution and solution fitting coordinates, transform atom coordinates with old pdb atoms and this xform and record xform* - *Record xform is similar to "Transform coordinates" record xform. Maybe we have wrong concepts at the time we are trying to move the molecule in this advanced situation (remember that the basic situation without moving is working fine) Thank you so much for your help. Kind regards! 2017-05-03 0:51 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
On May 2, 2017, at 3:50 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
so to get the old PDB to the fitted position, you would need to replace its openState.xform with:
fitted_xform * pdb_model_when_saved.openState.xform * map_when_saved.openState.xform
forgot to add the “.inverse()” to the end of that…
—Eric
-- *Pablo Solar Rodríguez* *pablosolar.r@gmail.com <pablosolar.r@gmail.com>*

Hi Eric, Or even better, would it be possible to update the old pdb xform and coordinates to the new ones that Midas write command already does? I think that would work, wouldn't it? Regards! 2017-05-02 11:19 GMT+02:00 Pablo Solar Rodríguez <pablosolar.r@gmail.com>:
Hello Eric,
I'm sorry fornot explaining myself correctly. I'm gonna try it again with two example situations:
1) Simple situation: I open the PDB and the Map and apply my exhaustive fitting plugin. After it is finished, I can move the molecule to the different fitted coordinates solutions and even I give the chance to copy a solution into a new molecule in the model panel (there is a question in this forum about this I posted some weeks ago)
Now the second example and the problem of this post:
2) Advanced situations: I open the PDB and the Map and, before fitting, I move them unchecking de 'A' checkbox in the model panel. Let's suppose that I move only the PDB. Well, with this, I need to save the moved PDB to disk (temp.pdb with the python scrip save.py you told me) before fitting to have the new coordinates and execute the fitting algorithm with the map and this saved molecule (fitting Map and temp.pdb). When the fitting is finished, I should move the original molecule to the different fitted coordinates solutions but it doesnt work properly.
Related with 2, if I save the original moved molecule to disk (temp.pdb) and I open this new copy in Chimera and I fit it with the map directly, it works fine. There's something wrong between the acts of opening the molecule, moving it, writing it to disk, fitting, and trying to move the original one with the fitted coordinates (between the copy and the map) and I don't know why.
Hope it is more clear now. If not, let me know and I try to explain it better.
Thank you in advance and regards from Spain.
2017-05-01 23:12 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, I couldn’t quite puzzle out what you were saying below. In particular, I didn’t understand:
"Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.”
So instead of trying to answer directly, I’ll just try to outline the principles involved and see if that helps. You open your map and your original PDB. Then you fit your PDB into the map. If you want to save the fitted PDB in the same coordinate reference frame as the map, then you need to take the transformed coordinates of the PDB, apply the *inverse* of the map’s transformation matrix, and use those coordinates. You don’t really say what API you use to save the PDB file, but you could just use the “write” command with the “relative” keyword to save the PDB file. Also, Midas.write(pdb_model, map_model, file_name) would do it. If you then open the map and new PDB file together they will be in their fitted orientation.
Hope this helps,
Eric Pettersen UCSF Computer Graphics Lab
On Apr 28, 2017, at 12:32 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello again!
Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong.
The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates.
I'm gonna explain it with the example.
1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel):
2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.
3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine.
Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening...
I hope to have explained myself correctly.
Thank you so much in advance
*<e3596d50.png> Pablo Solar Rodríguez *pablo.solar@delogica.com * Delógica - *www.delogica.com
España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 <914%2031%2031%2009> Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302 ------------------------------
*<2057ace7.png> Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente. * *Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. * *This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice.*
El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes — the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGui de/Examples/Main_AtomTrigger.html
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel. html#afterfitting>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
--
*Pablo Solar Rodríguez* *pablosolar.r@gmail.com* <pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
--
*Pablo Solar Rodríguez*
*pablosolar.r@gmail.com <pablosolar.r@gmail.com>*
-- *Pablo Solar Rodríguez* *pablosolar.r@gmail.com <pablosolar.r@gmail.com>*

Okay, I think this will do it (it assumes that the PDB and map are not moved moved relative to each other by hand once the fitting is done): Apply your first solution to the PDB (i.e. multiply its current xform by the solution xform). That should put it in the correct place in the map. To put it in the second solution position you would multiply by the inverse of the first solution (to get back to the previous position) and then by the second solution xform. Etc. Your latter idea doesn’t really simplify anything since you will still have to multiply by a solution matrix to put it in a fitted position, and then by the inverse of the solution to then apply the next solution matrix because the user may move the models (in tandem) which will add translation and rotation components to their matrices, and you need to retain those changes. —Eric
On May 7, 2017, at 10:28 AM, Pablo Solar Rodríguez <pablosolar.r@gmail.com> wrote:
Hi Eric,
Or even better, would it be possible to update the old pdb xform and coordinates to the new ones that Midas write command already does? I think that would work, wouldn't it?
Regards!
2017-05-02 11:19 GMT+02:00 Pablo Solar Rodríguez <pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>>: Hello Eric,
I'm sorry fornot explaining myself correctly. I'm gonna try it again with two example situations:
1) Simple situation: I open the PDB and the Map and apply my exhaustive fitting plugin. After it is finished, I can move the molecule to the different fitted coordinates solutions and even I give the chance to copy a solution into a new molecule in the model panel (there is a question in this forum about this I posted some weeks ago)
Now the second example and the problem of this post:
2) Advanced situations: I open the PDB and the Map and, before fitting, I move them unchecking de 'A' checkbox in the model panel. Let's suppose that I move only the PDB. Well, with this, I need to save the moved PDB to disk (temp.pdb with the python scrip save.py you told me) before fitting to have the new coordinates and execute the fitting algorithm with the map and this saved molecule (fitting Map and temp.pdb). When the fitting is finished, I should move the original molecule to the different fitted coordinates solutions but it doesnt work properly.
Related with 2, if I save the original moved molecule to disk (temp.pdb) and I open this new copy in Chimera and I fit it with the map directly, it works fine. There's something wrong between the acts of opening the molecule, moving it, writing it to disk, fitting, and trying to move the original one with the fitted coordinates (between the copy and the map) and I don't know why.
Hope it is more clear now. If not, let me know and I try to explain it better.
Thank you in advance and regards from Spain.
2017-05-01 23:12 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>>: Hi Pablo, I couldn’t quite puzzle out what you were saying below. In particular, I didn’t understand:
"Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.”
So instead of trying to answer directly, I’ll just try to outline the principles involved and see if that helps. You open your map and your original PDB. Then you fit your PDB into the map. If you want to save the fitted PDB in the same coordinate reference frame as the map, then you need to take the transformed coordinates of the PDB, apply the inverse of the map’s transformation matrix, and use those coordinates. You don’t really say what API you use to save the PDB file, but you could just use the “write” command with the “relative” keyword to save the PDB file. Also, Midas.write(pdb_model, map_model, file_name) would do it. If you then open the map and new PDB file together they will be in their fitted orientation.
Hope this helps,
Eric Pettersen UCSF Computer Graphics Lab
On Apr 28, 2017, at 12:32 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello again!
Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong.
The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates.
I'm gonna explain it with the example.
1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel):
2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.
3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine.
Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening...
I hope to have explained myself correctly.
Thank you so much in advance
<e3596d50.png> Pablo Solar Rodríguez pablo.solar@delogica.com <mailto:pablo.solar@delogica.com> Delógica - www.delogica.com <http://www.delogica.com/> España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 <tel:914%2031%2031%2009> Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302
<2057ace7.png> Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente.
Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice.
El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>>: Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes — the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main... <https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGuide/Examples/Main_AtomTrigger.html>
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting>>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez <pablo.solar@delogica.com <mailto:pablo.solar@delogica.com>> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo. _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
--
Pablo Solar Rodríguez
pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
--
Pablo Solar Rodríguez
pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>
--
Pablo Solar Rodríguez
pablosolar.r@gmail.com <mailto:pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Thank you Eric. I have not been able to get it yet, but I tell you something in the next days! Regards 2017-05-09 21:53 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Okay, I think this will do it (it assumes that the PDB and map are not moved moved relative to each other by hand once the fitting is done):
Apply your first solution to the PDB (i.e. multiply its current xform by the solution xform). That should put it in the correct place in the map. To put it in the second solution position you would multiply by the inverse of the first solution (to get back to the previous position) and then by the second solution xform. Etc.
Your latter idea doesn’t really simplify anything since you will still have to multiply by a solution matrix to put it in a fitted position, and then by the inverse of the solution to then apply the next solution matrix because the user may move the models (in tandem) which will add translation and rotation components to their matrices, and you need to retain those changes.
—Eric
On May 7, 2017, at 10:28 AM, Pablo Solar Rodríguez <pablosolar.r@gmail.com> wrote:
Hi Eric,
Or even better, would it be possible to update the old pdb xform and coordinates to the new ones that Midas write command already does? I think that would work, wouldn't it?
Regards!
2017-05-02 11:19 GMT+02:00 Pablo Solar Rodríguez <pablosolar.r@gmail.com>:
Hello Eric,
I'm sorry fornot explaining myself correctly. I'm gonna try it again with two example situations:
1) Simple situation: I open the PDB and the Map and apply my exhaustive fitting plugin. After it is finished, I can move the molecule to the different fitted coordinates solutions and even I give the chance to copy a solution into a new molecule in the model panel (there is a question in this forum about this I posted some weeks ago)
Now the second example and the problem of this post:
2) Advanced situations: I open the PDB and the Map and, before fitting, I move them unchecking de 'A' checkbox in the model panel. Let's suppose that I move only the PDB. Well, with this, I need to save the moved PDB to disk (temp.pdb with the python scrip save.py you told me) before fitting to have the new coordinates and execute the fitting algorithm with the map and this saved molecule (fitting Map and temp.pdb). When the fitting is finished, I should move the original molecule to the different fitted coordinates solutions but it doesnt work properly.
Related with 2, if I save the original moved molecule to disk (temp.pdb) and I open this new copy in Chimera and I fit it with the map directly, it works fine. There's something wrong between the acts of opening the molecule, moving it, writing it to disk, fitting, and trying to move the original one with the fitted coordinates (between the copy and the map) and I don't know why.
Hope it is more clear now. If not, let me know and I try to explain it better.
Thank you in advance and regards from Spain.
2017-05-01 23:12 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, I couldn’t quite puzzle out what you were saying below. In particular, I didn’t understand:
"Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.”
So instead of trying to answer directly, I’ll just try to outline the principles involved and see if that helps. You open your map and your original PDB. Then you fit your PDB into the map. If you want to save the fitted PDB in the same coordinate reference frame as the map, then you need to take the transformed coordinates of the PDB, apply the *inverse* of the map’s transformation matrix, and use those coordinates. You don’t really say what API you use to save the PDB file, but you could just use the “write” command with the “relative” keyword to save the PDB file. Also, Midas.write(pdb_model, map_model, file_name) would do it. If you then open the map and new PDB file together they will be in their fitted orientation.
Hope this helps,
Eric Pettersen UCSF Computer Graphics Lab
On Apr 28, 2017, at 12:32 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello again!
Well, I've been testing the PDB saving in my plugin and it doesn't work as I expected. I'm gonna try to explain the best I know because maybe my theoretical concepts are wrong.
The aim of saving PDB is beacuse if I move (rotate and translate) my molecule on Chimera I need to save it before executing the exhaustive fitting to have the correct coordinates on disk. But when the process is finished and I move the molecule on Chimera to the fitting coordinates, it doesn't work properly. This not happens if I open the saved PDB and I execute the exhaustive fitting; in that case, the molecule moves correctly to the fitting coordinates.
I'm gonna explain it with the example.
1. Suppouse I have opened "chainX.pdb" and "mapY.ccp4" in Chimera and I move the molecule (uncheckin the 'A' in the model panel):
2. If I execute the exhaustive fitting in Chimera, the process will save "temporal.pdb" from "chainX.pdb" on disk. Then, I get the coordinates that are result from fitting "temporal.pdb" -- "mapY.ccp4" and move "chainX.pdb" opened in Chimera to these coordinates. But does not work fine.
3. However, If I open "temporal.pdb" in Chimera and I execute the process, it works fine.
Could be a desynchronization between the opened "chainX.pdb" in Chimera, the "temporal.pdb" saved on disk and the "mapY.ccp4"? I cannot see what could be happening...
I hope to have explained myself correctly.
Thank you so much in advance
*<e3596d50.png> Pablo Solar Rodríguez *pablo.solar@delogica.com * Delógica - *www.delogica.com
España: C/Nuñez de Balboa 31, 2ª Planta - 2, 28001 Madrid, Tel.: (34) 91 431 31 09 <914%2031%2031%2009> Colombia: Edificio Torre Zimma - Carrera 15 88-70 Bogotá, PBX (571) 3000302 ------------------------------
*<2057ace7.png> Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente. * *Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal. * *This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. See legal notice.*
El 27-04-2017 20:04, Pablo Solar Rodríguez escribió:
Hello Eric,
Thank you for the response. I will check it!!
Kind regards!
2017-04-26 19:28 GMT+02:00 Eric Pettersen <pett@cgl.ucsf.edu>:
Hi Pablo, Every model has an 'openState' attribute which in turn has a 'xform' attribute which holds the model's transformation matrix. A newly opened model, if it's the only model, will have the identity matrix as it's initial xform. If there are other models open, then its initial xform will be the same as that of the currently open model with the lowest ID number, in a "best effort" attempt to keep the newly opened model in the same frame of reference as the other models. So to see if you need to resave it you should compare the current xform to the one it had the last time you saved it. There is a trigger that fires when a model's transformation matrix changes — the 'OpenState' trigger will fire in the chimera.triggers trigger set, with the trigger data '.reasons' attribute containing 'transformation change'. However, there is a convenience trigger, chimera.MOTION_STOP, that you probably want to register for instead, that will collate all the many OpenState trigger firings that will occur during a mouse motion. That trigger is also in the chimera.triggers trigger set. If you aren't familiar with triggers, there is a programmer example about them:
https://www.cgl.ucsf.edu/chimera/current/docs/ProgrammersGui de/Examples/Main_AtomTrigger.html
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On Apr 26, 2017, at 12:41 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Elaine,
Thank you for the quick response. I'll check the info to find a way to do it. Just one more thing. Is there a manner to know when the map has been moved? Just to not resampling it each time needlessly.
Thank you!
El 25-04-2017 18:21, Elaine Meng escribió:
Hi Pablo, The map format doesn't include rotation information. You would have to resample it on a new grid to create a new map, such as with command "vop resample"... details here on saving maps after fitting (bottom of the page):
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel. html#afterfitting>
I hope this helps, Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 25, 2017, at 2:24 AM, Pablo Solar Rodríguez < pablo.solar@delogica.com> wrote:
Hello Tom, Thank you for your quick response. I've checked the code in my plugin and the PDB saving works fine as I expected, even if I move the molecule.
My question is about saving the map. I tried to move it (rotate&translate unchecking the 'A' in the ModelPanel) and then save it with this code, but when I open the saved map, it is similar to the original one and does not keep the new coordinates. This could be a problem in my plugin, because I need to save them case of moving to get correct results in the fitting process.
So, how can I handle this situation? Is there any other way for saving the new map coordinates in the same way the PDB saving does? Hope I have explained myself correctly. Thank you in advance and kind regards, Pablo.
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
--
*Pablo Solar Rodríguez* *pablosolar.r@gmail.com* <pablosolar.r@gmail.com>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
--
*Pablo Solar Rodríguez*
*pablosolar.r@gmail.com <pablosolar.r@gmail.com>*
--
*Pablo Solar Rodríguez*
*pablosolar.r@gmail.com <pablosolar.r@gmail.com>*
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
-- *Pablo Solar Rodríguez* *pablosolar.r@gmail.com <pablosolar.r@gmail.com>*
participants (5)
-
Elaine Meng
-
Eric Pettersen
-
Pablo Solar Rodríguez
-
Pablo Solar Rodríguez
-
Tom Goddard