Friday, May 3, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 9434  / 1 Year ago, tue, march 28, 2023, 9:21:17

An example of what I'm talking about is this animation from Wikipedia. I am running 32 bit 12.10 if it is relevant. Please describe step-by-step, with pictures (screenshots with the appropriate areas (that are mentioned in the text) highlighted) how I am to create these gif files with the software you name.



Methadone [wikipedia


More From » software-recommendation

 Answers
7

QuteMol


Overview


QuteMol produces some of the most beautiful molecular visualizations I have ever seen. The software is FLOSS and available from the official repositories.


Description



QuteMol is an open source (GPL), interactive, high quality molecular
visualization system. QuteMol exploits the current GPU capabilites
through OpenGL shaders to offers an array of innovative visual
effects. QuteMol visualization techniques are aimed at improving
clarity and an easier understanding of the 3D shape and structure of
large molecules or complex proteins.



  • Real Time Ambient Occlusion



  • Depth Aware Silhouette Enhancement



  • Ball and Sticks, Space-Fill and Liquorice visualization modes



  • High resolution antialiased snapshots for creating publication quality renderings



  • Automatic generation of animated gifs of rotating molecules for web pages animations



  • Real-time rendering of large molecules and protein (>100k atoms)



  • Standard PDB input



  • Support as a plugins of the NanoEngineer-1 the modeling and simulation program for nano-composites (new!)




QuteMol was developed by Marco Tarini and Paolo Cignoni of the Visual Computing Lab at ISTI - CNR.



Screenshot


enter image description here


Installation


QuteMol To install QuteMol in all currently supported versions of Ubuntu open the terminal and type:


sudo apt install qutemol

Note: The Ubuntu build appears to have a number of bugs. Some minor UI elements don't work correctly and the rendering will produce dysmorphed structures at times. The last point seems to happen mostly when working with small molecules. All of these issues can be remedied by running QuteMol under WINE or PlayOnLinux.


I tried to build QuteMol from source to see whether the issues are restricted to the version in the repositories but it turned out to be a ridiculously hard task and didn't quite work.


Usage


Basic Usage


QuteMol is very easy to use. Open a PDB file of your choice, adjust the view and hit the export button:


enter image description here


Make sure to choose the GIF format:


enter image description here


Select the rendering mode of your choice. You can set the FPS count by adjusting the rotation time of the animation and the number of frames:


enter image description here


Rendering Modes


Full rotation mode:


enter image description here


Inspection Mode:


enter image description here


Six-Sides Mode:


enter image description here


Methadone (as depicted in the question):


enter image description here


(Orientation and shader settings vary a bit but could be made to look identical with a little bit of tweaking here and there)


Finding structural data


PDB databases


QuteMol takes standard .pdb files as its input. This format is most commonly used for proteins and other macro-molecules but can be used with small molecules as well. You can find a large selection of macro-molecular .pdb files at the Protein Data Bank.


Similarly rich structural libraries for small molecules that come with .pdb downloads are hard to find, but you can try your luck on one of these:



Other databases that might or might not offer PDB files can be found here.


Just to get you started I have uploaded the PDB file I used for Methadone here. This one might work better on the WINE/PoL version.


Other ways to get PDB files


You can also attain .pdb files by converting them from other, more ubiquitous formats such as MDF .mol files. You can do so with babel, a powerful command-line tool that converts between a multitude of different chemical structural formats. Install it with


sudo apt-get install babel

babel is very straightforward to use. Simply specify the file input and desired output and let it do its magic:


babel methadone.mol methadone.pdb

Or if you want babel to add implicit hydrogens:


babel -h methadone.mol methadone.pdb

You can also change the protonation state by defining the pH:


babel -h -p 6 methadone.mol methadone.pdb

Just make sure to use files with three-dimensional structural information, otherwise your .pdb output will be nonsensical.


Good sources for 3D MOL/SDF files are Pubchem and ZINC. Make sure to choose the 3D SDF option when downloading files:


enter image description here
enter image description here


Additional export options


GIFs are fine for web publishing but because of their size and other issues they can be quite a chore when used in presentations. For this particular use case I have written a Nautilus script that quickly converts GIF files into MPEG4 videos:


#!/bin/bash

# NAME gif2mp4 0.1
# AUTHOR Glutanimate (c) 2013 (https://askubuntu.com/users/81372/glutanimate)
# LICENSE GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# DESCRIPTION Converts GIF files of a specific framerate to MP4 video files.
# DEPENDENCIES zenity,imagemagick,avconv

TMPDIR=$(mktemp -d)
FPS=$(zenity --width 200 --height 100 --entry --title "gif2mp4" --text="Please enter the frame rate.")
VIDDIR=$(dirname $1)

if [ -z "$FPS" ]
then
exit
fi

notify-send -i video-x-generic.png "gif2mp4" "Converting $(basename "$1") ..."

convert $1 $TMPDIR/frame%02d.png
avconv -r $FPS -i $TMPDIR/frame%02d.png -qscale 4 "$VIDDIR/$(basename "$1" .gif).mp4"

notify-send -i video-x-generic.png "gif2mp4" "$(basename "$1") converted"

rm -rf $TMPDIR

Output sample: https://www.youtube.com/watch?v=odLnUwj8r4g


Installation instructions can be found here: How can I install a Nautilus script?


PyMOL


Overview


QuteMol is a fantastic little program but quite restricted in terms of rendering modes and image manipulation. For more advanced handling of compound visualization you might want to check out PyMOL. A tutorial on how to create simple animations can be found here. I would have written up a tutorial here but I am not proficient enough with PyMOL to do so.


One last thing, though. If you want to achieve a similar graphical fidelity with PyMOL as with QuteMol you should check out these blog entries:


http://cupnet.net/ambient-occlusion-pymol/


http://lightnir.blogspot.de/2008/09/cute-molecules.html


Screenshot


enter image description here




I hope you found this small overview of rendering options useful. If there are any mistakes in this post please feel free to edit them.


[#31896] Thursday, March 30, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
errettas

Total Points: 160
Total Questions: 118
Total Answers: 91

Location: Laos
Member since Fri, Sep 11, 2020
4 Years ago
;