Skip navigation

Harald Markus Wirth


Page Content:

How to Get more Models for Molecule

Install the Real xscreensaver

The following instructions have been tested under Ubuntu 8.10 Intrepid Ibex. Most of the information comes from the Ubuntu forums.

To configure gnome-screensaver not to function, go to System / Preferences / Screensaver and uncheck both checkboxes.

To totally stop gnome-screensaver from running, kill its process:

sudo killall gnome-screensaver

Prevent it from being launched on startup:

gconftool-2 --type boolean -s /apps/gnome_settings_daemon/screensaver/start_screensaver false

If this doesn't seem to work persistently for some reason, resort to making gnome-screensaver unexecutable:

sudo chmod -x /usr/bin/gnome-screensaver

Replace gnome-screensaver (which is a repackaging of the original Xscreensaver) with Xscreensaver:

sudo apt-get install xscreensaver

Optional: Install the extra screensavers in the repositories that don't come installed as default:

sudo apt-get install xscreensaver-data-extra xscreensaver-gl-extra

Add the xscreensaver daemon to your list of startup programs. Go to System / Preferences / Sessions / Startup Programs, click "Add" and type:

xscreensaver -no-splash

By now you should have two "Screensaver" entries in System / Preferences. Use the menu editor to hide the old one: System / Preferences / Main Menu, go to the Preferences section and look at the properties of both screen saver entries (right click them for the properties). Uncheck the checkbox of the entry, that contains "gnome-screensaver-preferences".

Optional: Locking the workstation doesn't work anymore. You have two options: Either you create a launcher to lock the screen: Right click your desktop, choose "Create Launcher", and enter the following as the command:

xscreensaver-command -lock

Recommended: or you re-enable the System / Lock Screen function by doing this:

sudo mv /usr/bin/gnome-screensaver-command /usr/bin/gnome-screensaver-command.ORIG
sudo ln /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command

The query, throttle, and unthrottle flags from gnome-screensaver-command won't work, though.

You need to create a directory for the downloaded PDB-files. I chose to use a hidden folder in my home directory, by using a dot as the first character of the folder name:

mkdir ~/.molecule

Now would be a good time to download a PDB file. If you leave the folder empty, the screen saver will show the built-in molecules.

Then configure the xscreensaver, either by clicking System / Preferences / Screensaver or by using the command:

xscreensaver-demo

Go to the "Advanced" tab and make sure, "Power Management" is disabled (This should stop xscreensaver's power saving features from conflicting with Gnome Power Manager).

The next step is to tell Molecule, where to look for the PDB files. Go back to the first tab, click "Settings" and then choose "Advanced". Change the "Command Line" entry as follows (The important part is -molecule /home/$USER/.molecule):

molecule -root -delay 0 -no-label -timeout 30 -molecule /home/$USER/.molecule
For more command line options
issue: man molecule

(I personally dislike the labeling of the atoms, because the letters are so big. That's why I also use -no-label)

How to Get Back to gnome-screensaver

I do not know for certain, what's needed for switching back, but I managed to get everything back to normal with

sudo chmod +x /usr/bin/gnome-screensaver

or

sudo cp /usr/bin/gnome-screensaver-command.ORIG /usr/bin/gnome-screensaver-command

After that,

gconftool-2 --type boolean -s /apps/gnome_settings_daemon/screensaver/start_screensaver true

and a relogin/reboot, and your'e done. If something fails, or if you want an easier solution, then

sudo apt-get install gnome-screensaver

should restore the original settings, but I did not yet try that.

Get PDB Files

Download PDB Files

Available PDB Downloads

pdb-collection.zip


Download from the Proteine Data Bank

You can download a lot of molecules from www.rcsb.org, but not every file works well with xscreensaver. Many files contain too large molecules, and xscreensaver is not fully compatible to the Protein Data Bank File Format, version 3.2, so some files will need to be adjusted.

The Advisory for the Use of the PDB Archive allows free distribution of PDB files, but:

Redistribution of modified data files using the same file name as is on the FTP server is prohibited.

Therefore all files, I am providing on this page, will have "mod4xscr." added before their original file name.

Hopefully, this archive will get really big some day. If you download and adjust files yourself, please send a copy to: harald dot wirth at gmx dot at.

Edit Seemingly Broken PDB Files

For Molecule to display a PDB file properly, you need to make sure, that:

Bad File (From the Screen Saver's Point of View)

You might need to remove some stuff:

HEADER    IMMUNE SYSTEM                           23-AUG-99   1CV9
ATOM      1  N   ASP A   1       0.850  -2.179  -0.076  1.00  0.00           N
ATOM      2  CA  ASP A   1       1.291  -2.222   1.303  1.00  0.00           C
ATOM      3  C   ASP A   1       1.578  -0.797   1.748  1.00  0.00           C
ATOM      4  O   ASP A   1       0.845   0.143   1.456  1.00  0.00           O
ATOM      5  CB  ASP A   1       2.575  -3.113   1.505  1.00  0.00           C
ATOM      6  CG  ASP A   1       2.673  -4.230   0.498  1.00  0.00           C
ATOM      7  OD1 ASP A   1       2.027  -5.287   0.697  1.00  0.00           O
ATOM      8  OD2 ASP A   1       3.423  -4.025  -0.495  1.00  0.00           O
ATOM      9  H   ASP A   1       1.432  -1.660  -0.713  1.00  0.00           H
ATOM     10  HA  ASP A   1       0.489  -2.596   1.928  1.00  0.00           H
...
Adjusted File

To get it drawn correctly in Molecule, replace the element symbol in column 3 (sometimes 2) with the one in the last column:

HEADER    IMMUNE SYSTEM: 23-AUG-99: 1CV9
ATOM      1  N   ASP A   1       0.850  -2.179  -0.076  1.00  0.00           N
ATOM      2  C   ASP A   1       1.291  -2.222   1.303  1.00  0.00           C
ATOM      3  C   ASP A   1       1.578  -0.797   1.748  1.00  0.00           C
ATOM      4  O   ASP A   1       0.845   0.143   1.456  1.00  0.00           O
ATOM      5  C   ASP A   1       2.575  -3.113   1.505  1.00  0.00           C
ATOM      6  C   ASP A   1       2.673  -4.230   0.498  1.00  0.00           C
ATOM      7  O   ASP A   1       2.027  -5.287   0.697  1.00  0.00           O
ATOM      8  O   ASP A   1       3.423  -4.025  -0.495  1.00  0.00           O
ATOM      9  H   ASP A   1       1.432  -1.660  -0.713  1.00  0.00           H
ATOM     10  H   ASP A   1       0.489  -2.596   1.928  1.00  0.00           H
...


Content Management:

μCMS α1.6