From: Josh Vermaas (joshua.vermaas_at_gmail.com)
Date: Fri Mar 13 2020 - 16:48:59 CDT

Nope. Visualization states only save camera positions, probably to reduce
the file size. In these cases, I just save the moved coordinates to a new
file, and create a new visualization states after loading the repositioned
file.
Josh

On Fri, Mar 13, 2020, 5:43 PM Peter Mawanga <peter.mawanga.lagos_at_gmail.com>
wrote:

> Hello Josh
>
> Thanks a lot for the reply. I moved two molecules using the "Mouse > Move
> > Molecule" option and wanted to save the new coordinates. However, I was
> unable to do so, although I could save the changes as a visualization
> state.
>
> From what I understand, the visualization state doesn't represent the
> actual coordinates of the different molecules. Is there any way to save the
> positions of the molecules as observed in the visualization state? Please
> let me know if feasible.
>
> On Fri, Mar 13, 2020 at 9:06 PM Josh Vermaas <joshua.vermaas_at_gmail.com>
> wrote:
>
>> Hi Peter,
>>
>> I'm not sure what you are trying to do, but those matrices should change
>> the position of the camera, not the coordinates stored in VMD. I believe
>> that the matricies within viewpoints are meant to be applied to the
>> center_matrix, rotate_matrix, and scale_matrix accessible through molinfo
>> (see https://www.ks.uiuc.edu/Research/vmd/vmd-1.9.3/ug/node142.html).
>> Have you tried something like (operating from memory):
>>
>> molinfo top set center_matrix {{1 0 0 -119.535} {0 1 0 -144.59} {0 0 1
>> -132.454} {0 0 0 1}}
>> molinfo top set rotate_matrix {{-0.409795 -0.495426 0.765888 0} {0.679365
>> 0.394516 0.618708 0} {-0.608684 0.773872 0.174909 0} {0 0 0 1}}
>> molinfo top set scale_matrix {{0.0305694 0 0 0} {0 0.0305694 0 0} {0 0
>> 0.0305694 0} {0 0 0 1}}
>>
>> That is what the saved state uses to re-establish the camera positions.
>>
>> -Josh
>>
>> On Fri, Mar 13, 2020 at 12:32 PM Peter Mawanga <
>> peter.mawanga.lagos_at_gmail.com> wrote:
>>
>>> Hello everyone
>>>
>>> From the visualization state, I got the following matrix for changing
>>> the position of a molecule.
>>>
>>> set viewpoints([molinfo top]) {{{1 0 0 -119.535} {0 1 0 -144.59} {0 0 1
>>> -132.454} {0 0 0 1}} {{-0.409795 -0.495426 0.765888 0} {0.679365 0.394516
>>> 0.618708 0} {-0.608684 0.773872 0.174909 0} {0 0 0 1}} {{0.0305694 0 0 0}
>>> {0 0.0305694 0 0} {0 0 0.0305694 0} {0 0 0 1}} {{1 0 0 0} {0 1 0 0} {0 0 1
>>> 0} {0 0 0 1}}}
>>>
>>> However, after applying the three matrices successively (since the
>>> fourth matrix is redundant and doesn't make any difference anyway after
>>> application), all the coordinates were reduced to almost insignificant
>>> decimal values.
>>>
>>> I tried using the "Save coordinates" option to save the molecule
>>> position after loading the visualization state but it didn't make any
>>> difference. The "measure fit" command returned an identity matrix too.
>>>
>>> Please suggest how to proceed with this issue.
>>>
>>> --
>>> Thanks
>>> Peter
>>>
>>
>
> --
> Cheers
> Peter
>