More On The Virtues Of VirtualBox – ACID (or AICD) Under Ubuntu 14.04 (By Way Of OpenSuse 11.2)

“Stop that!” – George Carlin

If you’ve obtained source code from an academic lab that was last developed some time ago and you spent a whole day installing libraries and symbolic links and redefining variables in your .bashrc and downgrading libraries and redefining paths and have 20 tabs open in your browser that all go to 20 different obscure error discussions on Stack Overflow and it’s late and you’re tired and you think you might not need the program after all if you do a bunch of other workaround things instead – what’s below is for you.

Academics have been developing small code for (nearly) millions of years to make their lives easier – and we all benefit when that code is made available to others (esp. when it helps in data analysis). When that code is a series of perl or python scripts, there’s generally little reason why you should have any run issues. When they call on external libraries or specific tools, generally that information is available in the README somewhere. Generally speaking, there’s no reason why a code shouldn’t work in a straightforward manner when the developer doesn’t make it known that something else needs be installed to make it work.

So, why doesn’t code A work on your linux box? A few possibilities.

0. You didn’t read the README right.

1. The developer skipped some documentation and you’re missing a library or program that they installed months earlier but forgot about (and they forgot to acknowledge that that was a needed item to run their program).

2. Your linux distro is too new, they developed it on something much older, have never updated their own machine, and something fundamental changed between, for instance, Ubuntu 8.04 and 14.04 (I’ve run into a few in that category – depending on the code, this can sometimes just be chalked up to a compiler difference issue that went unnoticed by the developers).

3. The one you learn the harder way – Ubuntu is not Fedora is not OpenSuse is not [insert distro here]. Half of the Ubuntu posts on this website stem from my having needed to do something under Ubuntu to make it look a little tiny bit more like whatever distro a developer developed their code with.

Let’s hammer on point 3 for a minute – I know precious few academics who use computers as part of research who are both (1) experts in coding and (2) experts in interpreting the output of some code. A properly working code in the hands of a productive researcher can mean the difference between an OK interpretation of data and a very descriptive interpretation of data that anyone else could follow (which, let’s not lie to ourselves, may also mean the difference between a journal with an impact factor of 0.5 and one of 5.0). Disregarding any “it was hard to code, it should be hard to use!” mentality, finding out that a program runs painlessly on distro A with NO effort after trying in vain on distro B with CONSIDERABLE effort is a rather important piece of information.

For the record – this isn’t about a user’s ability to program, install, admin their machine, etc. It’s simply about ease-of-use for ALL users regardless of their computational aptitude (which is why many of the Ubuntu posts on this website are exhaustive in their reporting of errors as well as work-arounds).

Which brings me to one of the most versatile (and storage-consuming) programs on my Ubuntu 14.04 machine – VirtualBox. VirtualBox (and related) are absolutely awesome for their abilities to let you try – very quickly – the quick fix that is the building or running of a strange code “somewhere else.” For the record, I ALWAYS try something new using a clean Ubuntu 14.04 image under VirtualBox before I ever let it touch my main machine – and that’s because I’ve had more than one instance in the past of trying to build a piece of software that then destroyed (well, sort of) my machine. When you destroy an image with a bad installation attempt – all you have to do is trash the image and copy a fresh one over from some “clean image” folder. Could not be easier. Furthermore, I’ve still ONE app that works in Windows XP that doesn’t work anywhere else. And I’ve two or three under Windows that I use generally – all ready for use under VirtualBox without having to reboot anything.

Additionally importantly – Virtual Machines allow you to “sample in time” – working around new & improved features and functionality in new compilers and libraries by instead building code on what was available at the time of the code’s release.

Anisotropy of the Current (Induced) Density – ACID

2016mar29_benzol.nmr_40000_0.050_1_0_0_Aniso_4

Sample output (from a successful Gaussian09 benzene tutorial run).

From the website of Prof. Dr. Rainer Herges

The “density of delocalized electrons” is a concept that is intuitively used to explain the electronic structure of conjugated systems. Unfortunately, however, there is no rigorous way to separate the total electron density in a density of localized and delocalized electrons. Like aromaticity, bond order, point charge, and other important concepts of chemistry, a definition for the density of delocalized electrons has to be derived from more fundamental quantum theoretical parameters.

As observables, magnetic properties are a suitable starting point for a general description of of delocalization and conjugation. In analogy to the anisotropy of the magnetic susceptibility, which is a powerful measure of aromaticity, we investigate the anisotropy of the current (induced) density (ACID). Similar to the square of the wavefunction which defines the total electron density, the ACID scalar field defines the density of delocalized electrons.

The ACID method proved to be an extremely versatile and descriptive tool to analyze delocalization in ground-state molecules, excited states, transition states, organometallics, hyperconjugation and other through-bond and through-space interactions.

Having spent quite some time determining the best way to account for electron delocalization in an upcoming project, the ACID method (“Delocalization of Electrons in Molecules,” J. Phys. Chem. A 2001, 105, 3214-3220. dx.doi.org/10.1021/jp0034426) struck me as near-ideal, leading to my request for the code from the developers.

With the code graciously provided, my first run attempt under Ubuntu 14.04 (and Cygwin, and Ubuntu 10.04 because it was waaaaay back when) went less-than successfully after the successful Gaussian run.

Ubuntu 14.04 make Results (Note: Using gcc 4.8)

user@hostname:~/AICD-2.0.0/$ make

sh modify_shellpath_in_scripts.sh AICD AICD-extract.pl ModifyPov.pl AICD-convert.pl
wd=`pwd` ; \
	sed -i -e "2s+^AICD_BaseDir=.*+AICD_BaseDir=$wd+" AICD
g++ -O2 -ffast-math -march=native -o AICD-smooth_isosurface.o -c AICD-smooth_isosurface.cpp
g++ AICD-smooth_isosurface.o -Wl,-s -o AICD-smooth_isosurface
g++ -O2 -ffast-math -march=native -o AICD-isosurface.o -c AICD-isosurface.cpp
g++ AICD-isosurface.o -Wl,-s -o AICD-isosurface
g++ -O2 -ffast-math -march=native -o AICD-extract.o -c AICD-extract.cpp
g++ AICD-extract.o -Wl,-s -o AICD-extract
g++ -O2 -ffast-math -march=native -o AICD-cube.o -c AICD-cube.cpp
g++ AICD-cube.o -Wl,-s -o AICD-cube
g++ -O2 -ffast-math -march=native -o AICD-remap.o -c AICD-remap.cpp
g++ AICD-remap.o -Wl,-s -o AICD-remap
g++ -O2 -ffast-math -march=native -o AICD-opt_remap.o -c AICD-opt_remap.cpp
g++ AICD-opt_remap.o -Wl,-s -o AICD-opt_remap
g++ -O2 -ffast-math -march=native -o AICD-rotate_mol.o -c AICD-rotate_mol.cpp
g++ AICD-rotate_mol.o -Wl,-s -o AICD-rotate_mol
g++ -O2 -ffast-math -march=native -o AICD-isocut.o -c AICD-isocut.cpp
g++ AICD-isocut.o -Wl,-s -o AICD-isocut
cc -O2 -ffast-math -march=native -o povchem/povchem.o -c povchem/povchem.c
povchem/povchem.c: In function ‘Get_User_Input’:
povchem/povchem.c:1173:10: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%c",&string[i]);
          ^
povchem/povchem.c: In function ‘main’:
povchem/povchem.c:2958:13: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
       system(tmp);
             ^
povchem/povchem.c:2965:17: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
           system(tmp);
                 ^
povchem/povchem.c:2985:15: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
         system(tmp);
               ^
povchem/povchem.c:2989:15: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
         system(tmp);
               ^
povchem/povchem.c:2994:15: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
         system(tmp);
               ^
povchem/povchem.c:3003:15: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
         system(tmp);
               ^
g++ povchem/povchem.o -Wl,-s -o povchem/povchem

Warnings are not errors, so meh. Google searching indicated a code issue (version issue) that someone on Stack Overflow proposed fixing by turning off optimization (removing -O2 from the Makefile). The error goes away.

sh modify_shellpath_in_scripts.sh AICD AICD-extract.pl ModifyPov.pl AICD-convert.pl
wd=`pwd` ; \
	sed -i -e "2s+^AICD_BaseDir=.*+AICD_BaseDir=$wd+" AICD
g++ -O2 -ffast-math -march=native -o AICD-smooth_isosurface.o -c AICD-smooth_isosurface.cpp
g++ AICD-smooth_isosurface.o -Wl,-s -o AICD-smooth_isosurface
g++ -O2 -ffast-math -march=native -o AICD-isosurface.o -c AICD-isosurface.cpp
g++ AICD-isosurface.o -Wl,-s -o AICD-isosurface
g++ -O2 -ffast-math -march=native -o AICD-extract.o -c AICD-extract.cpp
g++ AICD-extract.o -Wl,-s -o AICD-extract
g++ -O2 -ffast-math -march=native -o AICD-cube.o -c AICD-cube.cpp
g++ AICD-cube.o -Wl,-s -o AICD-cube
g++ -O2 -ffast-math -march=native -o AICD-remap.o -c AICD-remap.cpp
g++ AICD-remap.o -Wl,-s -o AICD-remap
g++ -O2 -ffast-math -march=native -o AICD-opt_remap.o -c AICD-opt_remap.cpp
g++ AICD-opt_remap.o -Wl,-s -o AICD-opt_remap
g++ -O2 -ffast-math -march=native -o AICD-rotate_mol.o -c AICD-rotate_mol.cpp
g++ AICD-rotate_mol.o -Wl,-s -o AICD-rotate_mol
g++ -O2 -ffast-math -march=native -o AICD-isocut.o -c AICD-isocut.cpp
g++ AICD-isocut.o -Wl,-s -o AICD-isocut
cc -O2 -ffast-math -march=native -o povchem/povchem.o -c povchem/povchem.c
g++ povchem/povchem.o -Wl,-s -o povchem/povchem

And the tutorial run output itself is below – complete with error.

$ AICD -m 2 -rot 90 0 0 -b 1 0 0 -runpov benzol.nmr.log

Datei benzol.nmr.log wird bearbeitet.
rufe jetzt AICDcube auf

1. Dateienpaar: benzol.nmr.icd40000 und benzol.nmr.pdb

Molek?linformationen:
6 0 0 0 2.6192
6 0 0 2.2677 1.3096
6 0 0 2.2677 -1.3096
6 0 0 0 -2.6192
6 0 0 -2.2677 -1.3096
6 0 0 -2.2677 1.3096
1 0 0 0 4.6525
1 0 0 4.0289 2.3263
1 0 0 4.0289 -2.3263
1 0 0 0 -4.6525
1 0 0 -4.0289 -2.3263
1 0 0 -4.0289 2.3263

40128 = 19 * 44 * 48
Grenzen:
-0.066811 < = Isotropie <= 0.066811
0 <= Anisotropie <= 1.1042
-2.0667 <= X <= 2.0667
-4.7203 <= Y <= 4.7203
-5.1407 <= Z <= 5.1407

Cube-file wird geschrieben. Bitte warten.

1. Input-file: benzol.nmr.icd40000
40128 = 19 * 44 * 48
Grenzen:
-0.0668113 <= Isotropie <= 0.0668113
0 <= Anisotropie <= 1.10423
-2.06672 <= X <= 2.06672
-4.72031 <= Y <= 4.72032
-5.14072 <= Z <= 5.14072

Punkte auf der Isooberfl?che
Z = 0
...................
...................
[…]
...................
...................

Es wurden 2604 Pfeile generiert.
Davon zeigen 1302 in die Isooberfl?che hinein (50%).

Mittelwert der Pfeill?nge: 3.65747
Pfeilstatistik:
0  0  0  0  0  0  0  0  0  0  0  2604  
Dreiecke werden generiert. Bitte warten.
Povray-input wird geschrieben. Bitte warten.
Bildgrenzen:
0 <= Isotropie <= 0
0.05 <= Anisotropie <= 0.05
-1.4586 <= X <= 1.4586
-4.29131 <= Y <= 4.29131
-4.64666 <= Z <= 4.64666

producing benzol.nmr.pov

Welcome to PovChem! This is version 1.00. For general
instructions see http://ludwig.scs.uiuc.edu/~paul/Manual.html

Read configuration file "/home/damianallis/AICD-2.0.0/povray-AICD-templates/povchem.cfg".
Read periodic table "/home/damianallis/AICD-2.0.0/povray-AICD-templates/periodic.tab".

Found 12 atoms...
...loaded into memory.
Wrote 12 spheres...
...and read 24 bonds into memory.

Wrote 0 single, 12 double, 0 triple, 0 higher order, and 0 hydrogen bonds.

benzol.nmr.inc created.
Writing color and atom definitions...
Writing bond definitions...
Pov header benzol.nmr.pov created.


modifying benzol.nmr.pov to benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov
*** Error in `AICD-rotate_mol': free(): invalid next size (fast): 0x0000000001f22160 ***
/opt/AICD-2.0.0/AICD: line 656: 17519 Aborted                 (core dumped) $Animation $inputbasename.pdb 
$Atom1 $Atom2 $Atom3 < "$RenderMich" > $Pov_RenderMich_pov
Replacing Camera Postion to \<0, 0, -250\>
Inserting #version directive in RenderMich.pov
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.inc
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.RenderMich.pov
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Rotate.inc
calling AICD-isocut -m -1 -M -1 -r 10000000 < benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc.noncut > benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc
This is AICD-isocut....
 arrow_maxlength = -1
 arrow_minlength = -1
 Point of origin:  0 0 0
 Maximum distance: 1e+07
Number of deleted arrows: 0
povray: cannot open the user configuration file /home/damianallis/.povray/3.7/povray.conf: No such file or directory
Persistence of Vision(tm) Ray Tracer Version 3.7.0.unofficial (g++ 4.8 @
x86_64-pc-linux-gnu)
This is an unofficial version compiled by:
Felix Geyer  for Debian 
The POV-Ray Team is not responsible for supporting this version.

POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2013 Persistence of Vision Raytracer Pty. Ltd.

Primary POV-Ray 3.7 Architects/Developers: (Alphabetically)
 Chris Cason         Thorsten Froehlich  Christoph Lipka   

...

Support libraries used by POV-Ray:
 ZLib 1.2.8, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
 LibPNG 1.2.50, Copyright 1998-2012 Glenn Randers-Pehrson
 LibJPEG 80, Copyright 1991-2013 Thomas G. Lane, Guido Vollbeding
 LibTIFF 4.0.3, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
 Boost 1.54, http://www.boost.org/
 OpenEXR, Copyright (c) 2004-2007, Industrial Light & Magic.

Parser Options
 Input file: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.RenderMich.pov
 Remove bounds........On 
 Split unions.........Off
 Library paths:
   /usr/share/povray-3.7
   /usr/share/povray-3.7/ini
   /usr/share/povray-3.7/include
   /usr/lib/povray3
   /usr/lib/povray3/include
 Clock value:    0.000  (Animation off)
Image Output Options
 Image resolution.....1024 by 768 (rows 1 to 768, columns 1 to 1024).
 Output file..........benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.png, 24 bpp PNG
 Dithering............Off
 Graphic display......Off
 Mosaic preview.......Off
 Continued trace......Off
Information Output Options
 All Streams to console..........On 
 Debug Stream to console.........On 
 Fatal Stream to console.........On 
 Render Stream to console........On 
 Statistics Stream to console....On 
 Warning Stream to console.......On 
==== [Parsing...] ==========================================================
Parse Warning: No objects in scene.
Parse Warning: assumed_gamma not specified, so gamma_correction is turned off
for compatibility with this pre POV-Ray 3.7 scene. See the documentation for
more details.
Parse Warning: This scene did not contain a #version directive. Please be aware
that as of POV-Ray 3.7, unless already specified via an INI option, a #version
is expected as the first declaration in a scene file. POV-Ray may apply
settings to some features that are intended to maintain compatibility with
pre-3.7 scenes. You are strongly encouraged to add a #version statement to the
scene to make your intent clear. Future versions of POV-Ray may make the
presence of a #version statement mandatory.
----------------------------------------------------------------------------
Parser Statistics
----------------------------------------------------------------------------
Finite Objects:            0
Infinite Objects:          0
Light Sources:             0
Total:                     0
----------------------------------------------------------------------------
Parser Time
 Parse Time:       0 hours  0 minutes  0 seconds (0.000 seconds)
             using 1 thread(s) with 0.000 CPU-seconds total
 Bounding Time:    0 hours  0 minutes  0 seconds (0.000 seconds)
             using 1 thread(s) with 0.000 CPU-seconds total
----------------------------------------------------------------------------
Render Options
 Quality:  9
 Bounding boxes.......On   Bounding threshold: 3
 Antialiasing.........Off
==== [Rendering...] ========================================================
Rendered 786432 of 786432 pixels (100%)
----------------------------------------------------------------------------
Render Statistics
Image Resolution 1024 x 768
----------------------------------------------------------------------------
Pixels:           786432   Samples:               0   Smpls/Pxl: 0.00
Rays:             786432   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Render Time:
 Photon Time:      No photons
 Radiosity Time:   No radiosity
 Trace Time:       0 hours  0 minutes  0 seconds (0.031 seconds)
             using 12 thread(s) with 0.143 CPU-seconds total
POV-Ray finished

*******************************************************************************************************
*******************************************************************************************************

Not a particularly Ubuntu-looking problem, and not one for which anything online was available that helped at all. The .pov file is written, but the file is empty. Googling the error above…

*** Error in `AICD-rotate_mol’: free(): invalid next size (fast): 0x0000000001f22160 ***
/opt/AICD-2.0.0/AICD: line 656: 17519 Aborted … (core dumped) $Animation $inputbasename.pdb

… sends you to, among other pages, one Stack Overflow discussion that starts with the error and ends with recommendations of finding a good debugger – not something I’d any interest in pursuing as part of getting this code to work.

I did not find any version-dependence discussion with the errors above, but opted to try using an older gcc – that I wasn’t about to install on my new Ubuntu box. Ergo, find an older distro that installs an older gcc. I threw it on an OpenSUSE 11.2 image because the developer group is in Germany – that’s basically why – and because I couldn’t find an old enough Ubuntu distro that would update/upgrade/install apps from the current repositories.

OpenSUSE 11.2 make Results (Note: Using gcc 4.5)

From a fresh OpenSUSE 11.2 install, I added the appropriate developer tools to get the ACID code made (note the specific request for gcc 4.5):

sudo zypper install autoconf automake binutils-gold gcc gcc45 glibc-devel kernel-desktop-devel kernel-devel kernel-source linux-glibc-devel m4 make gcc-c++

Then added povray (and nano, but that’s because I hate vi)

sudo zypper install povray nano

The build process then goes as follows – with no issues.

sh modify_shellpath_in_scripts.sh AICD AICD-extract.pl ModifyPov.pl AICD-convert.pl
wd=`pwd` ; \
	sed -i -e "2s+^AICD_BaseDir=.*+AICD_BaseDir=$wd+" AICD
g++ -O2 -ffast-math -march=native -o AICD-smooth_isosurface.o -c AICD-smooth_isosurface.cpp
g++ AICD-smooth_isosurface.o -Wl,-s -o AICD-smooth_isosurface
g++ -O2 -ffast-math -march=native -o AICD-isosurface.o -c AICD-isosurface.cpp
g++ AICD-isosurface.o -Wl,-s -o AICD-isosurface
g++ -O2 -ffast-math -march=native -o AICD-extract.o -c AICD-extract.cpp
g++ AICD-extract.o -Wl,-s -o AICD-extract
g++ -O2 -ffast-math -march=native -o AICD-cube.o -c AICD-cube.cpp
g++ AICD-cube.o -Wl,-s -o AICD-cube
g++ -O2 -ffast-math -march=native -o AICD-remap.o -c AICD-remap.cpp
g++ AICD-remap.o -Wl,-s -o AICD-remap
g++ -O2 -ffast-math -march=native -o AICD-opt_remap.o -c AICD-opt_remap.cpp
g++ AICD-opt_remap.o -Wl,-s -o AICD-opt_remap
g++ -O2 -ffast-math -march=native -o AICD-rotate_mol.o -c AICD-rotate_mol.cpp
g++ AICD-rotate_mol.o -Wl,-s -o AICD-rotate_mol
g++ -O2 -ffast-math -march=native -o AICD-isocut.o -c AICD-isocut.cpp
g++ AICD-isocut.o -Wl,-s -o AICD-isocut
cc -O2 -ffast-math -march=native -o povchem/povchem.o -c povchem/povchem.c
g++ povchem/povchem.o -Wl,-s -o povchem/povchem

And then there’s the run through the tutorial again…

Datei benzol.nmr.log wird bearbeitet.
Weder benzol.nmr.icd40000 noch benzol.nmr.icd40000.gz existiert.
Weder benzol.nmr.icd noch benzol.nmr.icd.gz existieren.
Starting AICDextractsh
Separate AICD-output in file: test.txt
Extrahiere_Gitterpunkte

1. Input-file: benzol.nmr.icd-raw
Es wurden 84726 Stromdichtetensoren eingelesen.

Grenzen:
-0.0668113 < = Isotropie <= 0.0668113
0 <= Anisotropie <= 1.10423
-20.3137 <= X <= 20.3137
-23.6411 <= Y <= 23.6411
-24.2643 <= Z <= 24.2643

Atomposition:
0.0214824  
0  
2.61948  

Radius: 26.8838
Datei benzol.nmr wird bearbeitet.
Weder benzol.nmr.icd40000 noch benzol.nmr.icd40000.gz existiert.

Input-file: benzol.nmr.icd

Output-file: benzol.nmr.icd40000
========================
 1. Iteration
========================
AICD-remap 40000 1 - benzol.nmr.icd40000 benzol.nmr.icd 

Input-file: benzol.nmr.icd
Anzahl der Stromdichtetensoren: 84726
Grenzen:
-0.0668113 <= Isotropie <= 0.0668113
0 <= Anisotropie <= 1.10423
-10.3137 <= X <= 10.3137
-13.6411 <= Y <= 13.6411
-14.2643 <= Z <= 14.2643


Grenzen des kartesischen Netzes:
-0.0668113 <= Isotropie <= 0.0668113
0 <= Anisotropie <= 1.10423
-10.3137 <= X <= 10.3137
-13.6411 <= Y <= 13.6411
-14.2643 <= Z <= 14.2643

Globales Netz: 40404 = 28 * 37 * 39

Input-file: benzol.nmr.icd

1 %
2 %
3 %

...

Z = 47
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................

Es wurden 2604 Pfeile generiert.
Davon zeigen 1302 in die Isooberfl‰che hinein (50%).

Mittelwert der Pfeill‰nge: 0.0642683
Pfeilstatistik:
0  32  80  52  124  268  476  716  412  260  144  40  
Dreiecke werden generiert. Bitte warten.
Povray-input wird geschrieben. Bitte warten.
Bildgrenzen:
0 <= Isotropie <= 0
0.05 <= Anisotropie <= 0.05
-1.4586 <= X <= 1.4586
-4.29131 <= Y <= 4.29131
-4.64666 <= Z <= 4.64666

producing benzol.nmr.pov

Welcome to PovChem! This is version 1.00. For general
instructions see http://ludwig.scs.uiuc.edu/~paul/Manual.html

Read configuration file "/home/damianallis/ACID/AICD-2.0.0/povray-AICD-templates/povchem.cfg".
Read periodic table "/home/damianallis/ACID/AICD-2.0.0/povray-AICD-templates/periodic.tab".

Found 12 atoms...
 ...loaded into memory.
Wrote 12 spheres...
 ...and read 24 bonds into memory.

Wrote 0 single, 12 double, 0 triple, 0 higher order, and 0 hydrogen bonds.

benzol.nmr.inc created.
Writing color and atom definitions...
Writing bond definitions...
Pov header benzol.nmr.pov created.


modifying benzol.nmr.pov to benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov
Replacing Camera Postion to \<0, 0, -250\>
Inserting #version directive in RenderMich.pov
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.inc
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.RenderMich.pov
calling Replace_Pov_Filenames benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Rotate.inc
calling AICD-isocut -m -1 -M -1 -r 10000000 < benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc.noncut > benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc
This is AICD-isocut....
  arrow_maxlength = -1
  arrow_minlength = -1
  Point of origin:  0 0 0
  Maximum distance: 1e+07
Number of deleted arrows: 0
povray: cannot open the user configuration file /home/damianallis/.povray/3.6/povray.conf: No such file or directory
Persistence of Vision(tm) Ray Tracer Version 3.6.1 (g++ @ x86_64-unknown-linux-g
nu)
This is an unofficial version compiled by:
 SUSE LINUX Products GmbH, Nuernberg, Germany
 The POV-Ray Team(tm) is not responsible for supporting this version.
POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.

...

Support libraries used by POV-Ray:
  ZLib 1.2.5, Copyright 1995-1998 Jean-loup Gailly and Mark Adler
  LibPNG 1.4.4, Copyright 1998-2002 Glenn Randers-Pehrson
  LibJPEG 6b, Copyright 1998 Thomas G. Lane
  LibTIFF 3.9.4, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
Redirecting Options
  All Streams to console..........On 
  Debug Stream to console.........On 
  Fatal Stream to console.........On 
  Render Stream to console........On 
  Statistics Stream to console....On 
  Warning Stream to console.......On 
Parsing Options
  Input file: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.RenderMich.pov (compatible
 to version 3.61)
  Remove bounds........On 
  Split unions.........Off
  Library paths:
    /usr/share/povray-3.6
    /usr/share/povray-3.6/ini
    /usr/share/povray-3.6/include
    /usr/lib/povray3
    /usr/lib/povray3/include
Output Options
  Image resolution 1024 by 768 (rows 1 to 768, columns 1 to 1024).
  Output file: /home/damianallis/ACID/AICD-2.0.0/tutorial-data/benzol.nmr_40000_
0.050_1_0_0_Aniso_4.2.png, 24 bpp PNG
  Graphic display......Off
  Mosaic preview.......Off
  CPU usage histogram..Off
  Continued trace......Off
Tracing Options
  Quality:  9
  Bounding boxes.......On   Bounding threshold: 3
  Light Buffer.........On 
  Vista Buffer.........On   Draw Vista Buffer....Off
  Antialiasing.........Off
  Clock value:    0.000  (Animation off)

  0:00:00 Parsing
File: /usr/share/povray-3.6/include/glass_old.inc  Line: 18
Parse Warning:  Due to changes in version 3.1, you must add interior {I_Glass}
 to all objects calling glass_old.inc textures and finishes... 
File: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov  Line: 1
Possible Parse Error: All #version and #declares of float, vector, and color
 require semi-colon ';' at end.
File: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov  Line: 2
Possible Parse Error: All #version and #declares of float, vector, and color
 require semi-colon ';' at end.
File: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Molekuel.pov  Line: 21
Possible Parse Error: All #version and #declares of float, vector, and color
 require semi-colon ';' at end.
File: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc  Line: 9
Possible Parse Error: Text may not be displayed as expected. Please refer to the
 user manual regarding changes in POV-Ray 3.5 and later.
File: benzol.nmr_40000_0.050_1_0_0_Aniso_4.2.Isoober.inc  Line: 17
Possible Parse Error: Text may not be displayed as expected. Please refer to the
 user manual regarding changes in POV-Ray 3.5 and later.

  0:00:01 Creating bounding slabs
  0:00:01 Creating vista buffer
  0:00:01 Creating light buffers
  0:00:01 Creating light buffers
  0:00:01 Creating light buffers 508K tokens
Scene Statistics
  Finite objects:         5233
  Infinite objects:          0
  Light sources:             4
  Total:                  5237

  0:00:00 Rendering line 1 of 768
  0:00:01 Rendering line 237 of 768
  0:00:02 Rendering line 292 of 768
  0:00:03 Rendering line 383 of 768
  0:00:04 Rendering line 479 of 768
  0:00:05 Rendering line 538 of 768
  0:00:05 Done Tracing
Render Statistics
Image Resolution 1024 x 768
----------------------------------------------------------------------------
Pixels:           786432   Samples:          786432   Smpls/Pxl: 1.00
Rays:             786432   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Cone/Cylinder                  1927296          164391      8.53
Mesh                            862314          164798     19.11
Sphere                           21764            5562     25.56
Bounding Box                  39215172        13715953     34.98
Light Buffer                  60713588        16726656     27.55
Vista Buffer                  11930298         6504493     54.52
----------------------------------------------------------------------------
Calls to Noise:                   0   Calls to DNoise:              10
----------------------------------------------------------------------------
Shadow Ray Tests:           1215156   Succeeded:                109903
----------------------------------------------------------------------------
Smallest Alloc:                   9 bytes
Largest  Alloc:             2097160 bytes
Peak memory used:          24172005 bytes
Total Scene Processing Times
  Parse Time:    0 hours  0 minutes  1 seconds (1 seconds)
  Photon Time:   0 hours  0 minutes  0 seconds (0 seconds)
  Render Time:   0 hours  0 minutes  5 seconds (5 seconds)
  Total Time:    0 hours  0 minutes  6 seconds (6 seconds)

Producing the beautiful and informative image shown above (despite the Parse Warning and Possible Parse Errors above).

For the record, compiler version differences can be subtle beasts – and my whole discussion above is not directly related to getting ACID to work. The above is a mix of brute force and resource consumption that provided a much faster turnaround in positive results than any amount of work spent in Ubuntu itself to make ACID run successfully – and does not require modifying anyone’s code (an added bonus for those who might have to ask questions of the developers).

So, I would posit that the issue turns out to be a 4.5 vs. 4.8 thing, but I’ve not explored the issue further (frankly, no time – and it’s working – so I don’t know at what point in gcc development that the make process began to produce errors in the ACID code). This isn’t technically the way to run it natively in Ubuntu, but is a way to get it to run in Ubuntu, which still counts in my book. In theory, a VirtualBox install and some book work on finding the dates of certain distros provides yet another way of getting stuff to just work.

That said, getting OpenSUSE to play with the Networking in VirtualBox appears to be a real pain. My solution for that for getting files back-and-forth to process?

DropBox.

“OrtVc1 failed #1.” Workaround In Gaussian09; Warning About (Pre-)Resonance Raman Spectra In GaussView 4/5

And Happy New Year.

Two issues (one easily addressable, one only by external workaround) related to the prediction of Raman intensities in Gaussian09 – for which there’s next-to-nothing online to address either of them (likely because they don’t come up that often).

OrtVc1 failed #1.

In simulating the Raman spectra of very long (> C60) polyenes as a continuance of work related to the infinite polyacetylene case (see this post for details: Bond Alternation In Infinite Periodic Polyacetylene: Dynamical Treatment Of The Anharmonic Potential), I reached a length and basis set for which Gaussian provides the following output and error:

...
 Minotr:  UHF open shell wavefunction.
          Direct CPHF calculation.
          Differentiating once with respect to electric field.
                with respect to dipole field.
          Electric field/nuclear overlap derivatives assumed to be zero.
          Using symmetry in CPHF.
          Requested convergence is 1.0D-08 RMS, and 1.0D-07 maximum.
          Secondary convergence is 1.0D-12 RMS, and 1.0D-12 maximum.
          NewPWx=F KeepS1=T KeepF1=T KeepIn=T MapXYZ=F SortEE=F KeepMc=T.
          MDV=    3932153962 using IRadAn=       1.
 Generate precomputed XC quadrature information.
          Solving linear equations simultaneously, MaxMat=      72.
          There are     3 degrees of freedom in the 1st order CPHF.  IDoFFX=0 NUNeed=     3.
      3 vectors produced by pass  0 Test12= 3.94D-11 3.33D-08 XBig12= 2.15D+05 2.71D+02.
 AX will form     3 AO Fock derivatives at one time.
 FoFJK:  IHMeth= 1 ICntrl=       0 DoSepK=F KAlg= 0 I1Cent=   0 FoldK=F
 IRaf= 160000000 NMat=   3 IRICut=       1 DoRegI=T DoRafI=F ISym2E=-1.
 FoFCou: FMM=T IPFlag=           0 FMFlag=      100000 FMFlg1=        2001
         NFxFlg=           0 DoJE=F BraDBF=F KetDBF=F FulRan=T
         wScrn=  0.000000 ICntrl=       0 IOpCl=  1 I1Cent=           0 NGrid=           0
         NMat0=    3 NMatS0=      3 NMatT0=    0 NMatD0=    3 NMtDS0=    0 NMtDT0=    0
 Petite list used in FoFCou.
 FMM levels:  10  Number of levels for PrismC:   9
      3 vectors produced by pass  1 Test12= 3.94D-11 3.33D-08 XBig12= 1.52D+04 3.94D+01.
      3 vectors produced by pass  2 Test12= 3.94D-11 3.33D-08 XBig12= 1.29D+04 3.31D+01.
      3 vectors produced by pass  3 Test12= 3.94D-11 3.33D-08 XBig12= 1.65D+06 4.27D+01.
      3 vectors produced by pass  4 Test12= 3.94D-11 3.33D-08 XBig12= 1.92D+08 6.96D+02.
      3 vectors produced by pass  5 Test12= 3.94D-11 3.33D-08 XBig12= 4.40D+10 7.74D+03.
      3 vectors produced by pass  6 Test12= 3.94D-11 3.33D-08 XBig12= 4.42D+12 1.70D+05.
      3 vectors produced by pass  7 Test12= 3.94D-11 3.33D-08 XBig12= 3.50D+14 1.14D+06.
      3 vectors produced by pass  8 Test12= 3.94D-11 3.33D-08 XBig12= 3.13D+16 1.34D+07.
      3 vectors produced by pass  9 Test12= 3.94D-11 3.33D-08 XBig12= 1.75D+18 4.02D+07.
      3 vectors produced by pass 10 Test12= 3.94D-11 3.33D-08 XBig12= 1.28D+20 7.81D+08.
      3 vectors produced by pass 11 Test12= 3.94D-11 3.33D-08 XBig12= 1.50D+22 7.70D+09.
      3 vectors produced by pass 12 Test12= 3.94D-11 3.33D-08 XBig12= 1.12D+24 5.57D+10.
      3 vectors produced by pass 13 Test12= 3.94D-11 3.33D-08 XBig12= 2.86D+25 5.87D+11.
 OrtVc1:  Ph=1 IOff=     0 IPass=20 DotMx1= 2.08D-06
 OrtVc1:  Ph=1 M=  1181528 NPass=20 Test1= 3.94D-11 Small= 1.18D-06 VSmall= 1.00D-12
 OrtVc1 failed #1.
 Error termination via Lnk1e in /opt/g09/l1002.exe at Sat Oct 11 01:10:22 2014.

What little there is available online for the “OrtVc1 failed #1.” error (from CCL – here and here) is less than helpful in addressing the problem. The problem is also coordinate system-independent (Cartesian and z-matrix formats both provide the same error), but is sensitive to the choice of basis set (6-31G(d,p) would work fine through the Raman intensity predictions, 6-311G(2d,p) would fail at the stage above).

Directing the issue to Gaussian, the provided workaround is straightforward.

The prediction of Raman intensities requires using Coupled Perturbed Hartree-Fock (CPHF), for which a special sensitivity in the code (currently) exits when using both molecular symmetry and the fast multipole method, the use of which (FMM, that is) is governed by Gaussian09 based on the atom count.

The workaround, provided by Dr. Fernando Clemente at Gaussian, Inc., is to divide the calculation into two steps. My input for the first successful run is shown below. A few details:

1. The first stage contains no Raman keywords (just the plain “freq” call).

2. In the second stage, the cphf=rdfreq is reading an incident light frequency of 0 (cm-1 or nm) at the bottom of the input file (“0”). You can run the static or dynamic cases as you like at this stage.

3. Also in the second stage, FMM is turned off (nofmm).

4. Also still in the second stage, the option to calculate Raman intensities is turned on (polar=raman). This is, as it happens, a recommended way to perform Raman intensity calculations – run a typical normal mode analysis, then import the force constants (and geometry) from this calculation into a Link1 step while increasing the basis set size (for better intensity prediction).

%chk=checkpoint.chk
%nprocshared=12
%mem=50000MB
#p integral(grid=ultrafine) freq=hpmodes b3lyp/6-311++g(3df,3pd) scf=novaracc symm=loose

Part 1 - just the frequency calculation

0 1
 C                  0.00000000   48.56668920   -0.34496298
 C                  0.00000000   47.35252242    0.35603740
...
 H                  0.00000000  -49.50718415    0.19804614
 H                 -0.00000000   49.50718415    0.19804614
[blank line 1]
[blank line 2]
--link1--
%chk=checkpoint.chk
%nprocshared=12
%mem=50000MB
#p integral(grid=ultrafine) polar=raman cphf=rdfreq nofmm b3lyp/6-311++g(3df,3pd) geom=checkpoint

Part 2 - Raman intensities

0 1

0
[blank line 1]
[blank line 2]

In theory, your calculation should run just fine.

Raman Intensities And GaussView – Check Your .log File For Resonance

The next problem is GaussView-specific – one that only comes up when you’ve a system with dynamic polarizability (incredibly long polyenes being a prototypical example) or when you perform frequency-dependent Raman calculations and you slip near resonance.

When running a series of Raman intensity calculations with increasing incident light frequency (cphf=rdfreq, then an array of energies), Mode 17 of this particular molecule either has a really large activity (cannot be printed out) or we’re approaching resonance (also a case of really large activity and it can’t be printed out). This isn’t a problem with the code, it’s your molecule.

                     16                     17                     18
                     BG                     AG                     BG
 Frequencies --    218.8851               257.7857               266.9993
 Red. masses --      3.5318                 5.1372                 2.2022
 Frc consts  --      0.0997                 0.2011                 0.0925
 IR Inten    --      0.0000                 0.0000                 0.0000
 Raman Activ --      0.2046                 0.7412                 0.2871
 Depolar (P) --      0.7500                 0.3044                 0.7500
 Depolar (U) --      0.8571                 0.4667                 0.8571
 RamAct Fr= 1--      0.2046                 0.7412                 0.2871
  Dep-P Fr= 1--      0.7500                 0.3044                 0.7500
  Dep-U Fr= 1--      0.8571                 0.4667                 0.8571
...
 RamAct Fr=12--     90.1095           ************                 0.3406
  Dep-P Fr=12--      0.7500                 0.3333                 0.7500
  Dep-U Fr=12--      0.8571                 0.4999                 0.8571

This is all well-and-good if you only rely on the .log file. If you skip the .log file inspection and only ever use GaussView, the result of inspecting the Raman intensities is below.

2015jan1_Mode17_Wrong_Raman_Activity

Note that Mode 17 has the intensity of Mode 18, and Mode 18 has zero intensity. Something is afoot! If you know what to expect out of your system, the missing intensities should be obvious. If not, you’re missing some very important information about your molecule.

The GaussView developers are aware of the problem. In the meantime, you can get around this problem by globally replacing all of the ” ************ ” (note the spaces on either side!) with a huge number (at which point the Raman intensity issue will become obvious – careful to preserve the spacing in the .log file).

Commensurate Urea Inclusion Crystals With The Guest (E,E)‐1,4-Diiodo-1,3-Butadiene

Published in Crystal Growth & Design (Cryst. Growth Des., 2013, 13 (9), pp. 3852–3855) earlier this year. The theory work is less impressive than the successful crystal growth, with initial solid-state efforts in Crystal09 only very recently now producing good results (leaving the molecular calculations to Gaussian09 in this paper). The procedure leading to the observed crystal structure of this inclusion complex is a significant step in the direction of testing the theory proposed in Bond Alternation In Infinite Periodic Polyacetylene: Dynamical Treatment Of The Anharmonic Potential published earlier this year in J. Mol. Struct.

2013dec20_DIBD_UIC

Caption: Two views along the ba and ca crystal axes of the (E,E)‐1,4-Diiodo-1,3-Butadiene : Urea Inclusion Complex.

Amanda F. Lashua, Tiffany M. Smith, Hegui Hu, Lihui Wei, Damian G. Allis, Michael B. Sponsler, and Bruce S. Hudson

Abstract: The urea inclusion compound (UIC) with (E,E)-1,4-diiodo-1,3-butadiene (DIBD) as a guest (DIBD:UIC) has been prepared and crystallographically characterized at 90 and 298 K as a rare example of a commensurate, fully ordered UIC. The crystal shows nearly hexagonal channels in the monoclinic space group P21/n. The DIBD guest molecules are arranged end-to-end with the nonbonding iodine atoms in the van der Waals contact. The guest structure is compared with that for DIBD at 90 K and with computations for the periodic UIC and isolated DIBD molecule.