Hi James,
This is an error in the Molecular Dynamics Viewer.  It undoubtedly does not expect the number of atoms in the trajectory to change after it is opened.  You should use the bug-reporting dialog to report these errors, not the mailing list.  Regardless, I don’t think you need to be adding hydrogens.  By default, the initial display suppresses the display of non-polar hydrogens (in both Chimera and ChimeraX) in order to simplify what’s shown.  To show those hydrogens, type “show” or “show ligand”.

—Eric

Eric Pettersen
UCSF Computer Graphics Lab



On Jul 15, 2019, at 8:51 AM, James Starlight <jmsstarlight@gmail.com> wrote:

++ some update. Today I have tested moovie making of both Chimera.
Here what I have made with Chimera using Red Fluorescent protein as a test case
https://youtu.be/_o2uCgPlmOA

I have tried to do something like this via ChimeraX (converting
trajectory to pdb using cpptraj) I have had some technical problems
1) hydrogens were not recognized in the chromophore (ligand) part
althought there were present in the multi-model pdb; when I tried to
use addh command it produce the following error:

Traceback (most recent call last):
 File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/ui/gui.py",
line 562, in customEvent
   func(*args, **kw)
 File "/home_pers/novikov/.local/share/ChimeraX/0.91/site-packages/com/kdiller/dynamics/viewer/gui.py",
line 60, in handle_scheme
   self.changeModel(frame, command[12] == 'T')
 File "/home_pers/novikov/.local/share/ChimeraX/0.91/site-packages/com/kdiller/dynamics/viewer/gui.py",
line 142, in changeModel
   atms.coords = locs
 File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/atomic/molc.py",
line 209, in set_prop
   % (len(values), n))
ValueError: Values array length 2420 does not match objects array length 1791

ValueError: Values array length 2420 does not match objects array length 1791

File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/atomic/molc.py",
line 209, in set_prop
% (len(values), n))

See log for complete Python traceback.

Traceback (most recent call last):
 File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/ui/gui.py",
line 562, in customEvent
   func(*args, **kw)
 File "/home_pers/novikov/.local/share/ChimeraX/0.91/site-packages/com/kdiller/dynamics/viewer/gui.py",
line 60, in handle_scheme
   self.changeModel(frame, command[12] == 'T')
 File "/home_pers/novikov/.local/share/ChimeraX/0.91/site-packages/com/kdiller/dynamics/viewer/gui.py",
line 142, in changeModel
   atms.coords = locs
 File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/atomic/molc.py",
line 209, in set_prop
   % (len(values), n))
ValueError: Values array length 1311 does not match objects array length 1791

ValueError: Values array length 1311 does not match objects array length 1791


2) during movie macking- at the end of the process I have got this error:

File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/atomic/molc.py",
line 209, in set_prop
% (len(values), n))

See log for complete Python traceback.

Movie saved to /netapp/lisbp/.../animations/dsRED_100ns_chimeraX.mp4

An error occurred in drawing the scene. Redrawing graphics is now
stopped to avoid a continuous stream of error messages. To restart
graphics use the command "graphics restart" after changing the
settings that caused the error.

Traceback (most recent call last):
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/updateloop.py",
line 72, in draw_new_frame
view.draw(check_for_changes = False)
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/view.py",
line 164, in draw
self._draw_scene(camera, drawings)
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/view.py",
line 194, in _draw_scene
shadow, multishadow = self._compute_shadowmaps(opaque_drawings +
transparent_drawings, camera)
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/view.py",
line 547, in _compute_shadowmaps
shadow_enabled = r.shadow.use_shadow_map(camera, drawings, self._shadow_bounds)
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/opengl.py",
line 1299, in use_shadow_map
shadow_map = self._finish_rendering_shadowmap() # Depth texture
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/opengl.py",
line 1329, in _finish_rendering_shadowmap
fb = r.pop_framebuffer()
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/opengl.py",
line 624, in pop_framebuffer
fb.activate()
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-packages/chimerax/core/graphics/opengl.py",
line 2077, in activate
GL.glDrawBuffer(self._draw_buffer)
File "src/errorchecker.pyx", line 53, in
OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glDrawBuffer,
cArguments = (GL_BACK,)
)

пн, 15 июл. 2019 г. в 11:55, James Starlight <jmsstarlight@gmail.com>:

P.S. here is an additional question about chimeraX

as I have found it is possible to execute python scrips directly in chimera-X
https://www.cgl.ucsf.edu/chimerax/docs/devel/core/scripting.html
what is the syntaxis for command line ? (e.g. load, like in Chimera,
does not work here).

пн, 15 июл. 2019 г. в 10:02, James Starlight <jmsstarlight@gmail.com>:

Hi Eric,

would it be possible to attach initial script for Chimera as well?
Actually, I have tried to access the page, which I have sent, but it
required autorisation.

сб, 13 июл. 2019 г. в 02:16, Eric Pettersen <pett@cgl.ucsf.edu>:

Hi James,
Chimera had a script for trajectory smoothing (named smoothMD.py, available here: Scripts – Chimera).  I ported it to ChimeraX and have attached it below.  You run it simply by opening it in ChimeraX.  The very first line of the script controls the “window size” (i.e. how many adjacent frames are used to compute the smoothing).  You have to get tomorrow’s daily build because it uses a ChimeraX function that I just wrote to access the coordinates a certain way in Python.

—Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Jul 12, 2019, at 9:17 AM, Elaine Meng <meng@cgl.ucsf.edu> wrote:

Hi James,
We haven’t implemented trajectory smoothing.  ChimeraX doesn’t have much trajectory analysis yet, as mentioned in the “missing features” on the download page.  The trajectory input types besides single PDB file are listed in the input formats table:

<http://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#formats>
<http://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory>

It works a little differently than in Chimera.  For these condensed trajectory formats you also have to open another file (which could be a single PDB structure) to provide the topology.  See link above for details.

There is a ChimeraX plugin that you can download from the Toolshed (ChimeraX menu Tools… More Tools..) named MolecularDynamicsViewer but I don’t know in detail what it does, other than show the trajectory opened from a multimodel PDB file.  It has a graphical interface. You could see if it makes what you’re doing any easier.

For your previous questions about Chimera:
the defattr command just opens your attribute file exactly the same as using the Define Attribute tool.  I don’t know for sure what is wrong with your using the Render dialog instead of rangecolor command, but probably you are not displaying the atoms but ribbons.  To color ribbons, you have to render by residue (not atom) attribute, average bfactor.  (the Chimera rangecolor command automatically does that, coloring atoms by the atomic values and coloring ribbons by the residue values)
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/rangecolor.html>

Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Jul 12, 2019, at 8:14 AM, James Starlight <jmsstarlight@gmail.com> wrote:

some additional (more general) questions about MD trajectory analysis
with Chimera and ChimeraX

1- is it possible to set some kind of smoothing on the trajectory
(based on the analogy with v*d - trajectory smoothing windows size) ?

2- does Chimera-X recognize any other formats for trajectories besides
pdb (in the same manner like it does Chimera)?

thanks in advance !

пт, 12 июл. 2019 г. в 11:49, James Starlight <jmsstarlight@gmail.com>:


Hi Elaine,

Thank you so much for your suggestions! It seems to me that it works
great but presently I am stacking on the step D.

Probably I have created the attribute file in a wrong way, because
normally in Chimera I can colour b-factors using
rangecolor bfactor key 1 blue 300 yellow 500 red   , which works fine
with my B-factor file.

Now, then I try to do the same using GUI window of Render/Select by
Attribute (in which I can also save the attribute file, which is gonna
to mapped onto the trajectory on the next step), nothing happens with
the coloring of atoms while clicking Apply or Done ( I select
attribute bfactor, color atoms, setting the attribute to atoms) ...

M.b. in my case it would be better to use "defattr" indeed in the same
manner how I did it via "rangecolor bfactor" ?

thank you in advane!

James

чт, 11 июл. 2019 г. в 19:51, Elaine Meng <meng@cgl.ucsf.edu>:


Hi!
Some steps would have to be done in Chimera, so you might rather use Chimera.  However, if you really want to render in ChimeraX, it may be doable by using both programs, as detailed below.

(1) We would need an example file to be able to say or do anything about this.  Sounds like the bonds are missing, but I don’t know what formatting issue would allow them to be shown in Chimera but not ChimeraX.  You could use ChimeraX menu: Help… Report a Bug and attach the file plus short description and your e-mail address if you want feedback.

(2) If the PDB with the B-factors you want has EXACTLY the same atom/residue/chain names as the trajectory PDB files, I imagine the following:

(a) in Chimera, open the PDB file with the B-factors.  Use Render by Attribute tool (Tools… Structure Analysis... Render by Attribute) menu: "File… Save Attributes” to save atomic attribute named bfactor to an assignment file.
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/render/render.html#saving>

(b) still in Chimera, close that PDB and using MD Movie (in menu under Tools.. MD/Ensemble Analysis) open the trajectory from multiple PDB files  and then assign the bfactor values from the file using Define Attribute tool (Tools… Structure Analysis… Define Attribute) or “defattr” command.
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html>
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/defattr.html>

(c) still in Chimera, save the whole trajectory as a multi-model single PDB file.  (ChimeraX cannot open a trajectory from multiple PDB files.  If you can’t make it a single file, then you would need to use Chimera.)
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/savemodel.html>

(d) in ChimeraX, open the trajectory and color by bfactor however you like, e.g. commands:

open my-multimodel-trajectory.pdb coordset true
color byattribute bfactor palette rainbow range 2,100

<http://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#local>
<http://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#byattribute>

(e) in ChimeraX, show the trajectory with the slider graphical interface or “coordset” command.

In the future more of these steps could be done in ChimeraX, but for now, you’d need to use a combination of the two programs.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Jul 11, 2019, at 1:48 AM, James Starlight <jmsstarlight@gmail.com> wrote:

Dear ChimeraX users!

I would like to make a movie of molecular dynamics trajectory that has
been pre-converted to pdb format (totally 250 frames).

1) Firstly, I have a problem with the recognition of the SS elements
of that ensemble in ChimeraX, where each snapshot looks just like a
mixture of points ( i tried to use dssp but it did not solve the
issue). At the same time the snapshots looks fine in another viewers
including UCSF Chimera (not X)

2) If I have a pdb of the same protein with mapped B-factors and then
I colored it using
color byattribute bfactor palette rainbow range 2,100

2) would it be possible to map the trajectory to that pdb in order to
see the motions (observed in MD) mapped onto the structure that has
been coloured by b-factors?

Thanks for help!





_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users



_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users