A NanoEngineer-1 Note (DNA Conversion Site, Recent Article, Related Links)

Above: A six-stranded triple-crossover (TX) DNA Junction. See Ned Seeman's ACS interview for more background.

Having just mentioned it in the context of making publication-quality pretty pictures, another brief note thanks to a citation request on the NanoEngineer Development/User Group (groups.google.com/group/nanoengineer-dev).

There's a website hosted at bionano.physics.illinois.edu for the conversion of NE-1 DNA mmp files to all-atom pdb ("Molecular Dynamics Simulation of Custom DNA Nanostructures Created by NanoEngineer-1") and NE-1's FNANO08 proceedings article ("NanoEngineer-1 – A CAD-based molecular modeling program for structural DNA nanotechnology") was included (with thanks to its use by German Barcenas) in the recent International Journal Of Molecular Sciences article "Molecular Dynamic Studies of Dye–Dye and Dye–DNA Interactions Governing Excitonic Coupling in Squaraine Aggregates Templated by DNA Holliday Junctions."

The bionano site is a dramatic improvement from the NAMOT + sed'ing I worked up many years ago while getting something DNA-related stood up.

As a still-not-irregular user myself, I can appreciate the small hurdles needed to keep the program upright in modern OSs (or the need to just run VirtualBox and be done with it) – therefore noting both Bryan Bishop's dev page (worth the visit to github for the preserved gallery alone!) and Bruce Allen's Molecular Dynamics Studio effort and sourceforge-available download.

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.

GROMACS 5.0.1, nVidia CUDA Toolkit, And FFTW3 Under Ubuntu 14.04 LTS (64-bit); The Virtues Of VirtualBox

Summarized below are the catches and fixes from a recent effort to build GROMACS 5.0.1 with FFTW3 (single- and double-precision) and GPU support (so, single-precision). Also, a trick I've been doing with great success lately, using a virtual machine to keep my real machine as clean as possible.

0. The Virtues Of VirtualBox

Open source means never having to say you're sorry.

I've made the above proclamation to anyone who'd listen lately who has any interest in using Linux software (because, regardless of what anyone says on the matter, it ain't there yet as an operating system for general scientific users with general computing know-how). You will very likely find yourself stuck at a configure or make step in one or more prerequisite codes to some final build you're trying to do, leaving yourself to google error messages to try to come up with some kind of solution. Invariably, you'll try something that seems to work, only to find it doesn't, potentially leaving a trail of orphaned files, version-breaking changes, and random downgrading only to find something else stupid (or not) fixed your build problems.

I've an install I'm quite happy with that has all of the working code I want on it working – and I've no interest in having to perform re-installs to get back to a working state again.

My solution, which I've used to great success with GAMESS-US, GROMACS, NWChem, and Amber (so far), is to break a virtual instance in VirtualBox first. For those who don't know (and briefly), VirtualBox lets you install a fully-working OS inside of your own OS that simply sits as a file in a Virtual VM folder in your user directory. My procedure has been to install a 60 GB VirtualBox instance of (currently) Ubuntu 14.04 (which I will refer to here as PROTOTYPE), fully update it to the current state of my RealBox (updates, upgrades, program installs, etc.), then copy PROTOTYPE somewhere else on the machine. The only limitation of this approach is that VirtualBox doesn't give you access to the GPU if you're testing CUDA-specific calculations. That said, it does let you install the CUDA Development Toolkit and compile code just fine, so you can at least work your way through a full build to make sure you don't run into problems.

When you're done trashing your VirtualBox after a particularly heinous build, just delete PROTOTYPE from Virtual VM and re-copy your copy back into Virtual VM – voila! You're ready for another build operation (or to make sure your "final" build actually works flawlessly before committing the build to your RealBox.

That's all I have to say on the matter. Consider it as your default procedure (at this point, I won't touch my RealBox with new installs until I know it's safe in VirtualBox).

1. The State Of My Machine Pre-GROMACS And All Other apt-get's Used Below

What follows below is pretty straightforward. Errors you might get that don't appear below might be related to the lack of certain installs on your machine that I installed on VirtualBox. That is, my standard PROTOTYPE comes standard with Intel's Fortran and C Compilers (for code optimization). Those installs required a few installs above the base Ubuntu install. These are (and are pretty standard anyway, so I say install them anyway):

sudo apt-get install build-essential gcc-multilib rpm openjdk-7-jre-headless 

I could have just installed a fresh version of 14.04 onto a machine to try this myself, but I'm not that motivated. Also, note this list does not include the all-important cmake. We'll get to that.

And for the rest of GROMACS (at least for older versions), there were lots of mesa/gnuplot/motif-specific dependencies in older versions of GROMACS to build all of the files included in the GROMACS package. Regardless of GPU builds or not, I tend to default to install all the packages below just to have them (which all, for 14.04, currently apt-get properly).

sudo apt-get install openmpi-bin openmpi-common gfortran csh grace menu x11proto-print-dev motif-clients freeglut3-dev libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libgl1-mesa-dri libcurl-ocaml-dev libcurl4-gnutls-dev gnuplot

If you don't install the libblas3gf libblas-doc libblas-dev liblapack3gf liblapack-doc liblapack-dev series, you'll see the following note from your cmake steps in GROMACS.

— A library with BLAS API not found. Please specify library location.
— Using GROMACS built-in BLAS.
— LAPACK requires BLAS
— A library with LAPACK API not found. Please specify library location.
— Using GROMACS built-in LAPACK.

My own preference is to use the (assumedly newer) Ubuntu-specific libraries from apt-get.

sudo apt-get install libblas3gf libblas-doc libblas-dev liblapack3gf liblapack-doc liblapack-dev

GPU-Specific? One More apt-get

My first passes at proper GPU compilation involved several steps for the nVidia Developer Toolkit install. That's now taken care of with apt-get, so perform the final apt-get to complete the component/dependency installations.

sudo apt-get install nvidia-cuda-dev nvidia-cuda-toolkit

With luck, your first attempt at a GPU-based installation will look like the following:

[0%] Building NVCC (Device) object src/gromacs/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir//./cuda_tools_generated_copyrite_gpu.cu.o

[100%] Building CXX object src/programs/CMakeFiles/gmx.dir/legacymodules.cpp.o
Linking CXX executable https://www.somewhereville.com/bin/gmx
[100%] Built target gmx

2. Nothing Happens Without cmake

Install cmake! Reproducing the output below to make sure you're using the same versions for everything (in the event something breaks in the future).

sudo apt-get install cmake

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
linux-image-3.13.0-32-generic linux-image-extra-3.13.0-32-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
cmake-data
Suggested packages:
codeblocks eclipse
The following NEW packages will be installed:
cmake cmake-data
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,294 kB of archives.
After this operation, 16.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main cmake-data all 2.8.12.2-0ubuntu3 [676 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main cmake amd64 2.8.12.2-0ubuntu3 [2,618 kB]
Fetched 3,294 kB in 30s (106 kB/s)
Selecting previously unselected package cmake-data.
(Reading database … 258157 files and directories currently installed.)
Preparing to unpack …/cmake-data_2.8.12.2-0ubuntu3_all.deb …
Unpacking cmake-data (2.8.12.2-0ubuntu3) …
Selecting previously unselected package cmake.
Preparing to unpack …/cmake_2.8.12.2-0ubuntu3_amd64.deb …
Unpacking cmake (2.8.12.2-0ubuntu3) …
Processing triggers for man-db (2.6.7.1-1) …
Setting up cmake-data (2.8.12.2-0ubuntu3) …
Setting up cmake (2.8.12.2-0ubuntu3) …

3. First Pass At GROMACS

The make install step will place GROMACS where you want it on your machine, so you're just as good building in $HOME/Downloads as you are anywhere else. I will be performing all operations from $HOME/Downloads unless otherwise stated.

According to the GROMACS Installation Manual, your quick-and-dirty install need only involve the following:

$ tar xvfz gromacs-src.tar.gz
$ ls
gromacs-src
$ mkdir build
$ cd build
$ cmake ../gromacs-src
$ make

This allows you build "out-of-source" as they put it. Frankly, I just dive right into the GROMACS folder and have at it.

CMake Error: The source directory "/home/user/Downloads/gromacs-5.0.1/build" does not appear to contain CMakeLists.txt.
Specify –help for usage, or press the help button on the CMake GUI.

And did you see the above error? If so, you read the GROMACS quick-and-dirty procedure backwards. I'm not running it this way, so doesn't matter to what follows.

My first attempt at building GROMACS produced the following output from PROTOTYPE (reproducing all the text below).

user@PROTOTYPE:~$ cd Downloads/
user@PROTOTYPE:~/Downloads$ gunzip gromacs-5.0.1.tar.gz 
user@PROTOTYPE:~/Downloads$ tar xvf gromacs-5.0.1.tar 

gromacs-5.0.1/README
gromacs-5.0.1/INSTALL

gromacs-5.0.1/tests/CppCheck.cmake
gromacs-5.0.1/tests/CMakeLists.txt

user@PROTOTYPE:~/Downloads$ cd gromacs-5.0.1/
user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=OFF

NOTE: If you just run cmake, you'll get the following…

cmake version 2.8.12.2
Usage

cmake [options] cmake [options]

… which is to say, cmake requires at least one option be specified. Above, I'm just using -DGMX_GPU=OFF to start the process.

The C compiler identification is GNU 4.8.2
— The CXX compiler identification is GNU 4.8.2
— Check for working C compiler: /usr/bin/cc
— Check for working C compiler: /usr/bin/cc — works
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working CXX compiler: /usr/bin/c++
— Check for working CXX compiler: /usr/bin/c++ — works
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
— Checking for GCC x86 inline asm
— Checking for GCC x86 inline asm – supported
— Detecting best SIMD instructions for this CPU
— Detected best SIMD instructions for this CPU – SSE2
— Try OpenMP C flag = [-fopenmp]
— Performing Test OpenMP_FLAG_DETECTED
— Performing Test OpenMP_FLAG_DETECTED – Success
— Try OpenMP CXX flag = [-fopenmp]
— Performing Test OpenMP_FLAG_DETECTED
— Performing Test OpenMP_FLAG_DETECTED – Success
— Found OpenMP: -fopenmp
— Performing Test CFLAGS_WARN
— Performing Test CFLAGS_WARN – Success
— Performing Test CFLAGS_WARN_EXTRA
— Performing Test CFLAGS_WARN_EXTRA – Success
— Performing Test CFLAGS_WARN_REL
— Performing Test CFLAGS_WARN_REL – Success
— Performing Test CFLAGS_WARN_UNINIT
— Performing Test CFLAGS_WARN_UNINIT – Success
— Performing Test CFLAGS_EXCESS_PREC
— Performing Test CFLAGS_EXCESS_PREC – Success
— Performing Test CFLAGS_COPT
— Performing Test CFLAGS_COPT – Success
— Performing Test CFLAGS_NOINLINE
— Performing Test CFLAGS_NOINLINE – Success
— Performing Test CXXFLAGS_WARN
— Performing Test CXXFLAGS_WARN – Success
— Performing Test CXXFLAGS_WARN_EXTRA
— Performing Test CXXFLAGS_WARN_EXTRA – Success
— Performing Test CXXFLAGS_WARN_REL
— Performing Test CXXFLAGS_WARN_REL – Success
— Performing Test CXXFLAGS_EXCESS_PREC
— Performing Test CXXFLAGS_EXCESS_PREC – Success
— Performing Test CXXFLAGS_COPT
— Performing Test CXXFLAGS_COPT – Success
— Performing Test CXXFLAGS_NOINLINE
— Performing Test CXXFLAGS_NOINLINE – Success
— Looking for include file unistd.h
— Looking for include file unistd.h – found
— Looking for include file pwd.h
— Looking for include file pwd.h – found
— Looking for include file dirent.h
— Looking for include file dirent.h – found
— Looking for include file time.h
— Looking for include file time.h – found
— Looking for include file sys/time.h
— Looking for include file sys/time.h – found
— Looking for include file io.h
— Looking for include file io.h – not found
— Looking for include file sched.h
— Looking for include file sched.h – found
— Looking for include file regex.h
— Looking for include file regex.h – found
— Looking for C++ include regex
— Looking for C++ include regex – not found
— Looking for posix_memalign
— Looking for posix_memalign – found
— Looking for memalign
— Looking for memalign – found
— Looking for _aligned_malloc
— Looking for _aligned_malloc – not found
— Looking for gettimeofday
— Looking for gettimeofday – found
— Looking for fsync
— Looking for fsync – found
— Looking for _fileno
— Looking for _fileno – not found
— Looking for fileno
— Looking for fileno – found
— Looking for _commit
— Looking for _commit – not found
— Looking for sigaction
— Looking for sigaction – found
— Looking for sysconf
— Looking for sysconf – found
— Looking for rsqrt
— Looking for rsqrt – not found
— Looking for rsqrtf
— Looking for rsqrtf – not found
— Looking for sqrtf
— Looking for sqrtf – not found
— Looking for sqrt in m
— Looking for sqrt in m – found
— Looking for clock_gettime in rt
— Looking for clock_gettime in rt – found
— Checking for sched.h GNU affinity API
— Performing Test sched_affinity_compile
— Performing Test sched_affinity_compile – Success
— Check if the system is big endian
— Searching 16 bit integer
— Looking for sys/types.h
— Looking for sys/types.h – found
— Looking for stdint.h
— Looking for stdint.h – found
— Looking for stddef.h
— Looking for stddef.h – found
— Check size of unsigned short
— Check size of unsigned short – done
— Using unsigned short
— Check if the system is big endian – little endian
— Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.1")
— Looking for xmlTextWriterEndAttribute in /usr/lib/x86_64-linux-gnu/libxml2.so
— Looking for xmlTextWriterEndAttribute in /usr/lib/x86_64-linux-gnu/libxml2.so – found
— Looking for include file libxml/parser.h
— Looking for include file libxml/parser.h – found
— Looking for include file pthread.h
— Looking for include file pthread.h – found
— Looking for pthread_create
— Looking for pthread_create – not found
— Looking for pthread_create in pthreads
— Looking for pthread_create in pthreads – not found
— Looking for pthread_create in pthread
— Looking for pthread_create in pthread – found
— Found Threads: TRUE
— Looking for include file pthread.h
— Looking for include file pthread.h – found
— Atomic operations found
— Performing Test PTHREAD_SETAFFINITY
— Performing Test PTHREAD_SETAFFINITY – Success
— Could NOT find Boost
Boost >= 1.44 not found. Using minimal internal version. This may cause trouble if you plan on compiling/linking other software that uses Boost against Gromacs.
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so – found
— Setting build user/date/host/cpu information
— Setting build user & time – OK
— Checking floating point format
— Checking floating point format – IEEE754 (LE byte, LE word)
— Checking for 64-bit off_t
— Checking for 64-bit off_t – present
— Checking for fseeko/ftello
— Checking for fseeko/ftello – present
— Checking for SIGUSR1
— Checking for SIGUSR1 – found
— Checking for pipe support
— Checking for isfinite
— Performing Test isfinite_compile_ok
— Performing Test isfinite_compile_ok – Success
— Checking for isfinite – yes
— Checking for _isfinite
— Performing Test _isfinite_compile_ok
— Performing Test _isfinite_compile_ok – Failed
— Checking for _isfinite – no
— Checking for _finite
— Performing Test _finite_compile_ok
— Performing Test _finite_compile_ok – Failed
— Checking for _finite – no
— Performing Test CXXFLAG_STD_CXX0X
— Performing Test CXXFLAG_STD_CXX0X – Success
— Performing Test GMX_CXX11_SUPPORTED
— Performing Test GMX_CXX11_SUPPORTED – Success
— Checking for system XDR support
— Checking for system XDR support – present
— Try C compiler SSE2 flag = [-msse2]
— Performing Test C_FLAG_msse2
— Performing Test C_FLAG_msse2 – Success
— Performing Test C_SIMD_COMPILES_FLAG_msse2
— Performing Test C_SIMD_COMPILES_FLAG_msse2 – Success
— Try C++ compiler SSE2 flag = [-msse2]
— Performing Test CXX_FLAG_msse2
— Performing Test CXX_FLAG_msse2 – Success
— Performing Test CXX_SIMD_COMPILES_FLAG_msse2
— Performing Test CXX_SIMD_COMPILES_FLAG_msse2 – Success
— Enabling SSE2 SIMD instructions
— Performing Test _callconv___vectorcall
— Performing Test _callconv___vectorcall – Failed
— Performing Test _callconv___regcall
— Performing Test _callconv___regcall – Failed
— Performing Test _callconv_
— Performing Test _callconv_ – Success
— checking for module 'fftw3f'
— package 'fftw3f' not found
— pkg-config could not detect fftw3f, trying generic detection
Could not find fftw3f library named libfftw3f, please specify its location in CMAKE_PREFIX_PATH or FFTWF_LIBRARY by hand (e.g. -DFFTWF_LIBRARY='/path/to/libfftw3f.so')
CMake Error at cmake/gmxManageFFTLibraries.cmake:76 (MESSAGE):
Cannot find FFTW 3 (with correct precision – libfftw3f for mixed-precision
GROMACS or libfftw3 for double-precision GROMACS). Either choose the right
precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the
advanced option to let GROMACS build FFTW 3 for you
(-GMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack
library (-DGMX_FFT_LIBRARY=fftpack).
Call Stack (most recent call first):
CMakeLists.txt:733 (include)

— Configuring incomplete, errors occurred!
See also "/home/user/Downloads/gromacs-5.0.1/CMakeFiles/CMakeOutput.log".
See also "/home/user/Downloads/gromacs-5.0.1/CMakeFiles/CMakeError.log".

Lots of little things to address here. We'll get to the Boost problem later. Meantime, you can see the critical error is in (1) the lack of FFTW3 and (2) the lack of my specifically asking for -DGMX_BUILD_OWN_FFTW=ON in the cmake process.

NOTE: If you try to fix the FFTW3 problem as described above, you'll get the following error:

-GMX_BUILD_OWN_FFTW=ON

CMake Error: Could not create named generator MX_BUILD_OWN_FFTW=ON

Make sure to put the "D" in:

-DGMX_BUILD_OWN_FFTW=ON

4. If You Don't Use DGMX_BUILD_OWN_FFTW=ON To Build FFTW3…

This is a skip-able section if you're letting cmake do the dirty work (and letting cmake do it is preferred, at least for getting GROMACS built). In trying sudo apt-get install fftw*, you see (currently) the following: fftw2 fftw-dev fftw-docs

No good. So, the procedure is to build FFTW3 from source (which is just as easy as installing from .deb or .rpm files if you installed everything I mentioned above). That said, your attempts to build FFTW3 and build GROMACS may have run into several errors because of how you built FFTW3. Beginning with your extracting and prep for make:

user@PROTOTYPE:~/Downloads$ tar xvf fftw-3.3.4.tar 
user@PROTOTYPE:~/Downloads$ cd fftw-3.3.4/

Any of the combinations below produce the same error:

user@PROTOTYPE:~/Downloads/fftw-3.3.4$ ./configure 
user@PROTOTYPE:~/Downloads/fftw-3.3.4$ ./configure -enable-shared=yes
user@PROTOTYPE:~/Downloads/fftw-3.3.4$ ./configure --enable-threads --enable-float

checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes

config.status: executing depfiles commands
config.status: executing libtool commands

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=OFF
user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=OFF -DFFTWF_LIBRARY='/usr/local/lib/libfftw3.a'

— The C compiler identification is GNU 4.8.2
— The CXX compiler identification is GNU 4.8.2
— Check for working C compiler: /usr/bin/cc

— Performing Test PTHREAD_SETAFFINITY
— Performing Test PTHREAD_SETAFFINITY – Success
— Could NOT find Boost
Boost >= 1.44 not found. Using minimal internal version. This may cause trouble if you plan on compiling/linking other software that uses Boost against Gromacs.
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so – found

— checking for module 'fftw3f'
— package 'fftw3f' not found
— pkg-config could not detect fftw3f, trying generic detection
Could not find fftw3f library named libfftw3f, please specify its location in CMAKE_PREFIX_PATH or FFTWF_LIBRARY by hand (e.g. -DFFTWF_LIBRARY='/path/to/libfftw3f.so')
CMake Error at cmake/gmxManageFFTLibraries.cmake:76 (MESSAGE):
Cannot find FFTW 3 (with correct precision – libfftw3f for mixed-precision
GROMACS or libfftw3 for double-precision GROMACS). Either choose the right
precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the
advanced option to let GROMACS build FFTW 3 for you
(-GMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack
library (-DGMX_FFT_LIBRARY=fftpack).
Call Stack (most recent call first):
CMakeLists.txt:733 (include)

— Configuring incomplete, errors occurred!
See also "/home/user/Downloads/gromacs-5.0.1/CMakeFiles/CMakeOutput.log".
See also "/home/user/Downloads/gromacs-5.0.1/CMakeFiles/CMakeError.log".

Including –enable-shared takes care of this error and gets you to a successful GROMACS build.

user@PROTOTYPE:~/Downloads/fftw-3.3.4$ ./configure --enable-threads --enable-float --enable-shared

— The C compiler identification is GNU 4.8.2
— The CXX compiler identification is GNU 4.8.2
— Check for working C compiler: /usr/bin/cc

— Performing Test PTHREAD_SETAFFINITY
— Performing Test PTHREAD_SETAFFINITY – Success
— Could NOT find Boost
Boost >= 1.44 not found. Using minimal internal version. This may cause trouble if you plan on compiling/linking other software that uses Boost against Gromacs.
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so – found

— checking for module 'fftw3f'
— found fftw3f, version 3.3.4
— Looking for fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.so
— Looking for fftwf_plan_r2r_1d in /usr/local/lib/libfftw3f.so – found
— Looking for fftwf_have_simd_avx in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_simd_avx in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_simd_sse2 in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_simd_sse2 in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_simd_avx in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_simd_avx in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_simd_altivec in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_simd_altivec in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_simd_neon in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_simd_neon in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_sse2 in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_sse2 in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_sse in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_sse in /usr/local/lib/libfftw3f.so – not found
— Looking for fftwf_have_altivec in /usr/local/lib/libfftw3f.so
— Looking for fftwf_have_altivec in /usr/local/lib/libfftw3f.so – not found
CMake Warning at cmake/gmxManageFFTLibraries.cmake:89 (message):
The fftw library found is compiled without SIMD support, which makes it
slow. Consider recompiling it or contact your admin
Call Stack (most recent call first):
CMakeLists.txt:733 (include)

— Using external FFT library – FFTW3
— Looking for sgemm_

— Configuring done
— Generating done
— Build files have been written to: /home/user/Downloads/gromacs-5.0.1

And out of a first-pass GROMACS build…

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=OFF

Scanning dependencies of target libgromacs
[0%] Building C object src/gromacs/CMakeFiles/libgromacs.dir/__/external/tng_io/src/compression/bwlzh.c.o
[0%] Building C object src/gromacs/CMakeFiles/libgromacs.dir/__/external/tng_io/src/compression/bwt.c.o

[100%] Building CXX object src/programs/CMakeFiles/gmx.dir/legacymodules.cpp.o
Linking CXX executable https://www.somewhereville.com/bin/gmx
[100%] Built target gmx

5. But You Let cmake Build FFTW3. So, Continuing The Build Process

With all of the dependencies above installed, the one note I wanted to address was that for Boost:


— Performing Test PTHREAD_SETAFFINITY – Success
— Could NOT find Boost
Boost >= 1.44 not found. Using minimal internal version. This may cause trouble if you plan on compiling/linking other software that uses Boost against Gromacs.
— Looking for zlibVersion in /usr/lib/x86_64-linux-gnu/libz.so

It certainly isn't a major issue, but I wanted to try to get an warning-free build. Installing Boost 1.56 produced the following negative result:

user@PROTOTYPE:~/Downloads/boost_1_56_0$ ./bootstrap.sh 

Building Boost.Build engine with toolset gcc… tools/build/src/engine/bin.linuxx86_64/b2
Detecting Python version… 2.7
Detecting Python root… /usr
Unicode/ICU support for Boost.Regex?… not found.
Generating Boost.Build configuration in project-config.jam…

Bootstrapping is done. To build, run:

./b2

To adjust configuration, edit 'project-config.jam'.
Further information:

– Command line help:
./b2 –help

– Getting started guide:
http://www.boost.org/more/getting_started/unix-variants.html

– Boost.Build documentation:
http://www.boost.org/boost-build2/doc/html/index.html

user@PROTOTYPE:~/Downloads/boost_1_56_0$ sudo ./b2 install

Performing configuration checks

– 32-bit : no (cached)
– 64-bit : yes (cached)
– arm : no (cached)

…failed updating 58 targets…
…skipped 12 targets…
…updated 11322 targets…

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=ON -DGMX_DOUBLE=OFF
user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ make

[0%] Building NVCC (Device) object src/gromacs/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir//./cuda_tools_generated_copyrite_gpu.cu.o
[0%] Building NVCC (Device) object src/gromacs/gmxlib/cuda_tools/CMakeFiles/cuda_tools.dir//./cuda_tools_generated_pmalloc_cuda.cu.o

[7%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/commandline/cmdlinehelpwriter.cpp.o
In file included from /home/user/Downloads/gromacs-5.0.1/src/gromacs/options/basicoptions.h:52:0,
from /home/user/Downloads/gromacs-5.0.1/src/gromacs/commandline/cmdlinehelpwriter.cpp:55:
/home/user/Downloads/gromacs-5.0.1/src/gromacs/options/../utility/gmxassert.h:47:57: fatal error: boost/exception/detail/attribute_noreturn.hpp: No such file or directory
#include
^
compilation terminated.
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/commandline/cmdlinehelpwriter.cpp.o] Error 1
make[1]: *** [src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [all] Error 2

Sadly, the solution is to then include -DGMX_EXTERNAL_BOOST=off and stick with the internal boost, which then "makes" just fine. One page references the use of -DGMX_INTERNAL_BOOST=on, but that produced the following:

CMake Warning:
Manually-specified variables were not used by the project:

GMX_INTERNAL_BOOST

— Build files have been written to: /home/user/Downloads/gromacs-5.0.1

There's more on this issue at: gerrit.gromacs.org/#/c/1232/ and t24960.science-biology-gromacs-development.biotalk.us/compiling-boost-problem-and-error-with-icc-t24960.html, but I've opted not to worry about it.

So, with Boost installed, I simply ignore it (and have not installed Boost on my RealBox).

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=ON -DGMX_EXTERNAL_BOOST=off

6. Finishing Step If All Above Goes Well: CUDA-Based GROMACS Build

If everything else above has gone smoothly (and if you ignored the Boost install. If you didn't, remember to add -DGMX_EXTERNAL_BOOST=off to the cmake below), you should be able to cleanly run a cmake for a GPU version of GROMACS (below, with the final result to be placed into /opt/gromacs_gpu. You then specify the $PATH after and run with it).

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ cmake -DGMX_GPU=ON -DCMAKE_INSTALL_PREFIX=/opt/gromacs_gpu -DGMX_BUILD_OWN_FFTW=ON

— The C compiler identification is GNU 4.8.2
— The CXX compiler identification is GNU 4.8.2

— Generating done
— Build files have been written to: /home/damianallis/Downloads/gromacs-5.0.1

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ make

The make starts with the FFTW3 download and build…

Scanning dependencies of target fftwBuild
[ 0%] Performing pre-download step for 'fftwBuild'
— downloading…
src='http://www.fftw.org/fftw-3.3.3.tar.gz'
dest='/home/damianallis/Downloads/gromacs-5.0.1/src/contrib/fftw/fftw.tar.gz'
— [download 0% complete]

[100%] Building CXX object src/programs/CMakeFiles/gmx.dir/legacymodules.cpp.o
Linking CXX executable https://www.somewhereville.com/bin/gmx
[100%] Built target gmx

Finally, your (sudo) make install places everything into /opt/gromacs_gpu.

user@PROTOTYPE:~/Downloads/gromacs-5.0.1$ sudo make install

— The GROMACS-managed build of FFTW 3 will configure with the following optimizations: –enable-sse2
— Configuring done
— Generating done
— Build files have been written to: /home/damianallis/Downloads/gromacs-5.0.1
[1%] Built target fftwBuild

[100%] Building CXX object src/programs/CMakeFiles/gmx.dir/legacymodules.cpp.o
Linking CXX executable https://www.somewhereville.com/bin/gmx
[100%] Built target gmx