Loading multi-frame pdb using open command
Dear Chimera-X users! I have a question regarding the handling of a trajectory saved in multiple-pdb format. Loading such ensemble using dedicated open command typically load all frames at once: open ./my_trajectory.pdb coordset true Would it be possible to specify the range of the loaded frames to reduce the time for data loading e.g. i) to load first 3000 frames or ii) to load from 50 to 5000 frames? Many thanks in advance ! Best wishes, Enrico
Hi Enrico, PDB format, being ASCII, isn’t a particularly efficient format for storing trajectories. Is that really the original format of your data, or are you converting it from some other format? If you had your data in one of the dedicated trajectory formats that ChimeraX supports (https://www.cgl.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory), then you would be able to specify start and end frames and/or reading every Nth frame. To answer your question directly, ChimeraX’s PDB reader does not support restricting the frames it reads. I’m not strongly motivated to add such controls since PDB trajectory reading will always be inefficient due to its larger file size and the slowness of converting ASCII floating point representations into binary. I’d be more interested in adding support for whatever the native format of your trajectory is, assuming it’s at least somewhat widely used. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 4, 2024, at 6:15 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear Chimera-X users!
I have a question regarding the handling of a trajectory saved in multiple-pdb format. Loading such ensemble using dedicated open command typically load all frames at once:
open ./my_trajectory.pdb coordset true
Would it be possible to specify the range of the loaded frames to reduce the time for data loading e.g. i) to load first 3000 frames or ii) to load from 50 to 5000 frames?
Many thanks in advance !
Best wishes,
Enrico _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
Right, thank you very much Eric ! Could you please precise how I could load properly the netcdf trajectory in chimerax in the same way like i did it with multiframe pdb using open ./my_trajectory.pdb coordset true Do I need to load at the same time a pdb file (with 1 snapshot) and the netcdf (.nc) file with the frames ? Will the coordset option be mandatory for such case? Many thanks in advance Enrico Il giorno mar 5 mar 2024 alle ore 03:09 Eric Pettersen <pett@cgl.ucsf.edu> ha scritto:
Hi Enrico, PDB format, being ASCII, isn’t a particularly efficient format for storing trajectories. Is that really the original format of your data, or are you converting it from some other format? If you had your data in one of the dedicated trajectory formats that ChimeraX supports ( https://www.cgl.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory), then you would be able to specify start and end frames and/or reading every Nth frame. To answer your question directly, ChimeraX’s PDB reader does not support restricting the frames it reads. I’m not strongly motivated to add such controls since PDB trajectory reading will always be inefficient due to its larger file size and the slowness of converting ASCII floating point representations into binary. I’d be more interested in adding support for whatever the native format of your trajectory is, assuming it’s at least somewhat widely used.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Mar 4, 2024, at 6:15 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Dear Chimera-X users!
I have a question regarding the handling of a trajectory saved in multiple-pdb format. Loading such ensemble using dedicated open command typically load all frames at once:
open ./my_trajectory.pdb coordset true
Would it be possible to specify the range of the loaded frames to reduce the time for data loading e.g. i) to load first 3000 frames or ii) to load from 50 to 5000 frames?
Many thanks in advance !
Best wishes,
Enrico _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
As explained in the help, <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory> ... for loading a netcdf trajectory you can either (1) open the netcdf file and a psf file in the same open command (2) ... or if you don't have a psf file, first you open a structure (like a single PDB) that has the correct topology and then in a second open command, you open the netcdf file specifying the already-open model with the "structureModel" option See the "open" help page for examples of the commands to use in either of these situations. The examples show opening a trr file or a dcd file instead of netcdf, but it would be the same situation for netcdf. <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#traj-options> Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 7, 2024, at 2:30 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Right, thank you very much Eric !
Could you please precise how I could load properly the netcdf trajectory in chimerax in the same way like i did it with multiframe pdb using open ./my_trajectory.pdb coordset true
Do I need to load at the same time a pdb file (with 1 snapshot) and the netcdf (.nc) file with the frames ? Will the coordset option be mandatory for such case?
Many thanks in advance
Enrico
Okay, thank you very much Elaine ! So basically I could load my netcdf trajectory using the following commands: open ./perfetto.pdb open ./stripped.nc structureModel #1 This loaded trajectory VERY fast compared to the multiple pdb method. Do we have any limitations working with the netcdf trajectories (compared to multiple pdb) ? Does the coordset command work during recording movies e.g. movie record size 3840,2160 # play movie from beginning to the end coordset #1 250,1250,1 wait 1000 I also tried to smooth the trajectory using smooth_md.py script that always works fine with the multiple PDB trajectory and got a crash (probably because of too many frames in the loaded trajectory ... ) Many thanks in advance ! Enrico Il giorno gio 7 mar 2024 alle ore 17:09 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
As explained in the help, <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory>
... for loading a netcdf trajectory you can either
(1) open the netcdf file and a psf file in the same open command
(2) ... or if you don't have a psf file, first you open a structure (like a single PDB) that has the correct topology and then in a second open command, you open the netcdf file specifying the already-open model with the "structureModel" option
See the "open" help page for examples of the commands to use in either of these situations. The examples show opening a trr file or a dcd file instead of netcdf, but it would be the same situation for netcdf.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#traj-options>
Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 7, 2024, at 2:30 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Right, thank you very much Eric !
Could you please precise how I could load properly the netcdf trajectory in chimerax in the same way like i did it with multiframe pdb using open ./my_trajectory.pdb coordset true
Do I need to load at the same time a pdb file (with 1 snapshot) and the netcdf (.nc) file with the frames ? Will the coordset option be mandatory for such case?
Many thanks in advance
Enrico
You could just try these commands faster than to ask me, but yes, "coordset" is how you play an atomic trajectory, whether from input files or from morphing, etc. as described in the "trajectories" help: <https://rbvi.ucsf.edu/chimerax/docs/user/trajectories.html> I'm not aware of any specific netcdf limitations compared to other formats. Elaine
On Mar 7, 2024, at 9:28 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Okay, thank you very much Elaine !
So basically I could load my netcdf trajectory using the following commands: open ./perfetto.pdb open ./stripped.nc structureModel #1
This loaded trajectory VERY fast compared to the multiple pdb method.
Do we have any limitations working with the netcdf trajectories (compared to multiple pdb) ? Does the coordset command work during recording movies e.g.
movie record size 3840,2160 # play movie from beginning to the end coordset #1 250,1250,1 wait 1000
I also tried to smooth the trajectory using smooth_md.py script that always works fine with the multiple PDB trajectory and got a crash (probably because of too many frames in the loaded trajectory ... )
Many thanks in advance !
Enrico
Il giorno gio 7 mar 2024 alle ore 17:09 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: As explained in the help, <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory>
... for loading a netcdf trajectory you can either
(1) open the netcdf file and a psf file in the same open command
(2) ... or if you don't have a psf file, first you open a structure (like a single PDB) that has the correct topology and then in a second open command, you open the netcdf file specifying the already-open model with the "structureModel" option
See the "open" help page for examples of the commands to use in either of these situations. The examples show opening a trr file or a dcd file instead of netcdf, but it would be the same situation for netcdf.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#traj-options>
Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 7, 2024, at 2:30 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Right, thank you very much Eric !
Could you please precise how I could load properly the netcdf trajectory in chimerax in the same way like i did it with multiframe pdb using open ./my_trajectory.pdb coordset true
Do I need to load at the same time a pdb file (with 1 snapshot) and the netcdf (.nc) file with the frames ? Will the coordset option be mandatory for such case?
Many thanks in advance
Enrico
Okay thank you very much Elaine ! It seems that the problem with the smooth scripts was related to the number of the frames since it works OK on my mac.. Have a great weekend! Cheers Enrico Il giorno gio 7 mar 2024 alle ore 19:27 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
You could just try these commands faster than to ask me, but yes, "coordset" is how you play an atomic trajectory, whether from input files or from morphing, etc. as described in the "trajectories" help:
<https://rbvi.ucsf.edu/chimerax/docs/user/trajectories.html>
I'm not aware of any specific netcdf limitations compared to other formats.
Elaine
On Mar 7, 2024, at 9:28 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Okay, thank you very much Elaine !
So basically I could load my netcdf trajectory using the following commands: open ./perfetto.pdb open ./stripped.nc structureModel #1
This loaded trajectory VERY fast compared to the multiple pdb method.
Do we have any limitations working with the netcdf trajectories (compared to multiple pdb) ? Does the coordset command work during recording movies e.g.
movie record size 3840,2160 # play movie from beginning to the end coordset #1 250,1250,1 wait 1000
I also tried to smooth the trajectory using smooth_md.py script that always works fine with the multiple PDB trajectory and got a crash (probably because of too many frames in the loaded trajectory ... )
Many thanks in advance !
Enrico
Il giorno gio 7 mar 2024 alle ore 17:09 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: As explained in the help, <https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#trajectory>
... for loading a netcdf trajectory you can either
(1) open the netcdf file and a psf file in the same open command
(2) ... or if you don't have a psf file, first you open a structure (like a single PDB) that has the correct topology and then in a second open command, you open the netcdf file specifying the already-open model with the "structureModel" option
See the "open" help page for examples of the commands to use in either of these situations. The examples show opening a trr file or a dcd file instead of netcdf, but it would be the same situation for netcdf.
< https://rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#traj-options>
Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 7, 2024, at 2:30 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Right, thank you very much Eric !
Could you please precise how I could load properly the netcdf trajectory in chimerax in the same way like i did it with multiframe pdb using open ./my_trajectory.pdb coordset true
Do I need to load at the same time a pdb file (with 1 snapshot) and the netcdf (.nc) file with the frames ? Will the coordset option be mandatory for such case?
Many thanks in advance
Enrico
participants (3)
-
Elaine Meng
-
Enrico Martinez
-
Eric Pettersen