How To Convert A Simulation Trajectory To A Animation
3
0
Entering edit mode
11.4 years ago

I have simulated a protein(Lysozyme) for 5ns using gromacs. I want to visually see the simulation trajectoryin the form of a movie starting from initial PDB structure to final 5ns structure. I have taken snapshot of the simulation every 2ps. I have tried searching on internet but I have not found any tutorial. Please let me know how to create a animation(movie) of the trajectory using VMD or any tool.

Thanks in advance

simulation • 8.3k views
ADD COMMENT
0
Entering edit mode

Sorry for misunderstanding. I don't have any images, what I just have is a trajectory file with snapshots(atomic coordinates) every 2ps of the PDB. I want to convert that into a movie or a animation.

ADD REPLY
2
Entering edit mode
11.4 years ago
KCC ★ 4.1k

You can use ffmpeg to convert a collection of images into an animation. Here is an example of how to use the ffmpeg command to do something like this.

ADD COMMENT
0
Entering edit mode

Sorry for misunderstanding. I don't have any images, what I just have is a trajectory file with snapshots(atomic coordinates) every 2ps of the PDB. I want to convert that into a movie or a animation.

ADD REPLY
2
Entering edit mode
11.4 years ago
Pappu ★ 2.1k

VMD has option to make movies directly from trajectory.

ADD COMMENT
0
Entering edit mode
11.4 years ago

If you have GIF files, another option is gifsicle. Animated GIFs can be much smaller files than MPEG movies and easier to distribute and embed in electronic documents.

Let's say your snapshots are named frame000.gif through frame123.gif, the following command makes a single-shot animated GIF file called animation.gif:

$ gifsicle --delay 10 --no-loopcount --colors 256 frame*.gif > animation.gif

Add the --loopcount option if you wanted an infinitely-repeating animation. Use --loopcount=n for n loops.

MPEG files can require certain codecs and plug-ins. Animated GIFs work nicely with web browsers without any extra work. There have been patent issues with GIF, but broad browser support is not one of them. (APNG might be an option one day, but practically no browsers support that format and I'm not aware of any tools that make them easily.)

Update - Looks like some developers are making open source C++ tools for creating APNG over at Kickstarter.

ADD COMMENT
0
Entering edit mode

Sorry for misunderstanding. I don't have any images, what I just have is a trajectory file with snapshots(atomic coordinates) every 2ps of the PDB. I want to convert that into a movie or a animation.

ADD REPLY

Login before adding your answer.

Traffic: 2644 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6