Archive | crystallography RSS for this section

My ORCID QR code

Never used one myself, but here it is! ORCID is what it says here.

QR code for my ORCID account

Whatever.

QR code for my ORCID account

Whatever, thumbnail size.

 

 

Me there

The ZMC page from RSC

My ZMC software used to be (might still be) hosted on the computers at ANU (http://rsc.anu.edu.au/~goossens/ZMC.html). But I don’t know how long that will last!

Therefore, this is a copy of that page, with the files linked to the RSC for now. If the links don’t work, let me know. Could also try here.

Overview

Conventional crystal structure refinement and solution relies on an analysis of the Bragg peaks, the sharp, well-defined scattering in a diffraction pattern. In doing this, the structure can be considered as an array of identical unit cells, and this reduces the ‘solution’ of the crystal structure to the determination of the unit cell contents.

In a disordered material, while the average unit cell does indeed obey the space group symmetry of the crystal structure, such that solving the asymmetric unit within the cell ‘solves’ the structure, this is not the case for a disordered material — or even for what would generally be considered as an ordered material if considering instantaneous molecular and atomic motions.

Even an ordered crystal will show thermally induced vibrations of the atoms. If we could ‘freeze’ the crystal and look at the atoms, we would find that the space group symmetry is not obeyed. It is obeyed on average. In a disordered material it could be that the average occupation of a given site is 50% one type of atom and 50% another, in which case no site obeys the average symmetry.

What does this mean for analysis of diffuse scattering? It means that you can no longer consider all unit cells as identical. It means that you have to now work with an ensemble of unit cells big enough that averaging across it recovers the average and big enough that it can contain a statistically valid population of the local (short-range order) structures present in the crystal.

This means that analysis of diffuse scattering requires different tools from analysis of conventional Bragg scattering. ZMC is an attempt at a program to allow relatively ready implementation of a simulation of diffuse scattering from (particularly but not solely) molecular crystals. Eric Chan has prepared this flyer to show some of the details of the program, and I am very grateful to him. Further, he has developed a tutorial, available here, and it is really worth a look. His webpage is at https://sites.google.com/site/echanj/ and contains modified ZMC versions that can do some great stuff, including modulated structures. He has also done some work on a graphical interface! He’s an amazing guy.

Obtaining ZMC

ZMC is alpha software at best, and always will be; nothing about its performance is guaranteed nor promised. The code and binaries are licensed under the Academic Free License version 3.0; details in the files DISCLAIMER.txt and COPYRIGHT.txt (http://opensource.org/licenses/AFL-3.0).

Here is a bundle of statically-linked binaries for Linux, from April 2016 — the real current version:

Static binaries for Linux.

Here is a bundle of statically-linked binaries for Windows (compiled using g95 on Win 7; I don’t even know if it is 32 or 64 bit), from April 2016 — the real current version, but not much tested:

Static binaries for Win.

Here is the current source code plus a simple Linux compile script — package has transitioned to gfortran, and all the most important binaries seem to work (thanks to Aidan Heerdegen as always):

Source.

Refer to the older packages below for documentation, examples, and so on. Please also refer to this article and its associated deposited material, because it provides a complete working simulation.

Please note that this article was specifically published as Open Access in order to allow for anyone to make use of it.


Here are packages, older versions compiled for different systems. Comments about g95 are not current.

Despite my better judgement, I am putting it up here for download. You can download the current 2014 ZMC in the following formats:
Windows
Linux
Mac OS X
source.

The README file for Windows is here. Be aware that there are many versions of Linux (and OS X is not known for its long term user support or version-to-version compatibility), so your best bet might well be to contact me about the source code. If you can get g95 working (www.g95.org, version 0.92 I suggest) then the compile is pretty trivial (he says hopefully…).


While ZMC is relatively straightforward to use, and a great deal of work has been undertaken to give it a usable (if text file-based) interface, it is not yet ‘production’ software (and never will be). It is written in Fortran90 and uses a module library developed by Dr Aidan Heerdegen, and some components of the system have not been tested on various combinations of hardware and operating system. Currently, As of 2014, binaries exist for g95 on Intel Macintosh (Mac OS X 10.6), Intel Fortran Compiler on Debian stable on Intel i7 (ie, most Intel-compatible) and Windows xp, and that is about it. So far, once the modules are ported, the main program seems to compile without problems, but I am not in a position to make a general distribution.

Further, there is no comprehensive manual, though it comes with an in-progress version of what will one day, time permitting, be a manual (unlikely). The program contains some basic help options, and the distribution packages contain a (simple) simulation that should work out of the box, and the adumbral manual contains some code that might be useful also.

Some things to note: ZMC is essentially a program for displacive relaxation/equilibration of the model crystal. Any occupancy ordering needs to be done externally. The software needs a suite of toolbox programs, which also need to be bundled with any distribution. These include programs for working with crystal geometry, calculating diffraction patterns (DIFFUSE, Butler, B. D. & Welberry, T. R. (1992). J. Appl. Cryst. 25, 391–399), performing any occupancy simulations and so on.

References

ZMC is used and the method described in the following publications, amongst others. Apologies for the rough layout.

E.J. Chan and D. J. Goossens, ‘A method to perform modulated structure studies using the program ZMC’, J. Appl. Cryst., 2017 50 1834–1843.

This article and its associated deposited material contain a working simulation with occupancy and displacive elements — a good place to start: ‘A Process for Modelling Diffuse Scattering from Disordered Molecular Crystals, Illustrated by Application to Monoclinic 9-Chloro-10-methylanthracene’, Advances in Condensed Matter Physics, 2015 (2015), Article ID 878463, 7 pages, DOI: http://dx.doi.org/10.1155/2015/878463

D.J.Goossens, A.P.Heerdegen, E.J.Chan and T.R.Welberry, ‘Monte Carlo Modelling of Diffuse Scattering from Single Crystals: The Program ZMC‘, Metallurgical and Materials Transactions A, 42A (2011) 23-31. DOI: 10.1007/s11661-010-0199-1.
(PDF)

D.J.Goossens and T.R.Welberry, ‘Diffuse Scattering from Molecular Crystals’, chapter in Diffuse Scattering and the Fundamental Properties of Materials, edited by Rozaliya I. Barabash, Gene E. Ice and Patrice E.A. Turchi. Momentum Press, 2009. Print ISBN: 978-1-60650-000-2. E-book ISBN: 978-1-60650-002-6

E.J.Chan, T.R.Welberry, D.J.Goossens, A.P.Heerdegen, A.G.Beasley and P.J.Chupas, ‘Single-crystal diffuse scattering studies on polymorphs of molecular crystals. I. The room-temperature polymorphs of the drug benzocaine’, Acta Cryst. B65 (2009) 382-392.

D.J.Goossens, A.G.Beasley, T.R.Welberry, M. J. Gutmann and R.O.Piltz, ‘Neutron diffuse scattering in deuterated para-terphenyl, C18D14‘, J. Phys.: Condens. Matt., 21 (2009) 124204.

D.J.Goossens and M.J.Gutmann, ‘Revealing how interactions lead to ordering in para-terphenyl’, Physical Review Letters, 102 (2009) 015505-1-4.

D.J.Goossens, A.P.Heerdegen, T.R.Welberry and A.G.Beasley, ‘The Molecular Conformation of Ibuprofen, C13H18O2, Through X-ray Diffuse Scattering’, International Journal of Pharmaceutics 343 (2007) 59-68.

D.J.Goossens, T.R.Welberry, A.P. Heerdegen and M.J. Gutmann, ‘Simultaneous Fitting of X-ray and Neutron Diffuse Scattering Data’, Acta Crystallographica A A63 (2007) 30-35.

————————-
Updated May 12, 2016
————————-

Installing ZMC on Windows

ZMC is a suite of code for modelling diffuse scattering. If you don’t know what any of that means, there’s nothing to see here.

Binary distribution

Downloaded http://rsc.anu.edu.au/~goossens/ZMC_files/ZMC_Nov2015_Win_g95.zip OR http://djg.altervista.org/downloads/ZMC_files/ZMC_Nov2015_Win_g95.zip into an install directory and unzipped.

Opened a commandline window and cd’d to the directory where files were unpacked.

C:\WHATEVERTHEPATHIS> cd ZMCWin_g95
C:\WHATEVERTHEPATHIS> ZMC.exe --help2

Seems to run.

That’s it. Could have added the directory to my path.

Downloaded http://rsc.anu.edu.au/~goossens/ZMC_files/ZMC_source_package_Mar20_2014.tar.gz OR http://djg.altervista.org/downloads/ZMC_files/ZMC_source_package_Mar20_2014.tar.gz and explored the documentation and the sample simulation included, but used the more current binaries.

Also, went to http://dx.doi.org/10.1155/2015/878463 and downloaded the paper and the simulation hosted there. It is a complete working example. The simulation is also hosted at http://djg.altervista.org/downloads/ZMC_files/878463.f2.zip.

That’s the easy part done…

Installing from source — Cygwin

(1) Install gfortran

Ran Cygwin setup-XXX.exe (x86-64 in my case) and installed gcc-fortran package and any dependencies.

(2) Opened a Cygwin terminal and made an install directory

$ cd installs

$ mkdir ZMC

$ cd ZMC

$ wget http://djg.altervista.org/downloads/ZMC_files/ZMC_toolbox_source_April_2016.tar.gz

$ tar x -vzf ZMC_toolbox_source_April_2016.tar.gz

$ cd ZMC_toolbox_source_April_2016

(3) Run the compile script

$ bash compile_all_Linux_gfortran.sh

Errors!

(4) OK, try 32-bit toolchain.

install cygwin32-gcc-fortran

(5) Copy the script and change the compiler name to i686-pc-cygwin-gfortran.exe

$ bash compile_all_Linux_gfortran_32bit.sh

Mostly works, but bin2gray does not compile, and it is essential.

(6) Try using djgpp fortran (install via Setup.exe)

Change compiler to i586-pc-msdosdjgpp-gfortran.exe

$ bash compile_all_Linux_gfortran_djgpp.sh

Much like 32-bit compile– no bin2gray.

(7) What’s the error? We’ll fix it for the 32-bit gcc compile, rather than djgpp.

$ i686-pc-cygwin-gfortran.exe -w -static -O2 -o bin2gray_static bin2gray.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
bin2gray.f90:15:40:

bin2gray.f90:6:6:

use cmdline_arguments
2
bin2gray.f90:15:40:

character(len=*), parameter :: version = "$Id: bin2gray.f90,v 1.6 2007/06/04 05:23:11 aidan Exp $"
1
Error: Symbol ‘version’ at (1) conflicts with symbol from module ‘cmdline_arguments’, use-associated at (2)

OK, some kind of scope thing. I’ll just change ‘version’ in bin2gray.f90 to ‘versionbg’.

Works!

OK, download new bin2gray from:

$ wget http://djg.altervista.org/downloads/ZMC_files/bin2graybg.f90

And modify the script to the the 32-bit compiler and to compile this file instead of the other one.

(8) Make some links

$ ln -s /home/darren/installs/ZMC/ZMC_toolbox_source_April_2016/ZMCLinux_gfortran_static_32bit/ZMC_static.exe /home/darren/bin/ZMC

and so on.

(9) Testing finds that the binary ‘runs’ in that it throws no errors, but it does nothing. OK. We have a problem.

(10) Add ‘.exe.’ to end of each output file from the compile commands. Does not help.

(11) Retry 64-bit compile. It’s the native one, after all. See what the errors are.

Says: undefined symbol `strtoflt128′
But the relevant library is installed. Adding an explicit call to it -lquadmath does not seem to help.

Oh dear.

Installing from source — MinGW

What if we try for a Windows compile outside of Cygwin?

https://gcc.gnu.org/wiki/GFortranBinaries#Windows

Installed the MinGW bunch of stuff. Went to start menu and opened the MinGW terminal.

H:\Other\ZMC\ZMC_toolbox_source_April_2016>which gfortran
C:\Program Files (x86)\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin\gfortran.EXE

Used the version of bin2gray.f90 modified to replace the ‘version’ variable with, say, ‘versionbg’, (bin2graybg.f90 as noted above, though copied over the top of bin2gray.f90) then…

Created a new install batch file that looks like this:

H:\Other\ZMC\ZMC_toolbox_source_April_2016>type compile_all_Win_gfortran.bat
@echo off
REM Manual compile of ZMC, DZMC and toolbox programs.
REM
REM Note: I have gnuwin32 installed, so I hve access to pwd etc
REM Dependencies are accounted for by the order of the
REM compilations -- some modules depend on others.
REM This means that this could be broken by upstream changes
REM to the modules by Aidan Heerdegen (aidan@rsc.anu.edu.au)
REM
REM However, if this does not happen, compilation is simple.
REM
REM NOTE!!: Some manual customisation of this file will
REM probably be needed, but it is very simple:
REM
REM Namely the -I and -L flags to gfortran need to point
REM to the directory where the compilation is happening,
REM and that it is easiest for a relatively simple project
REM like this to use the flat structure, then just copy out
REM the executables to a directory in the path.
REM
REM No guarantees/warranties are given or implied. Use at
REM your own risk. Caveat emptor. Buyer beware.
REM
REM And you get what you pay for...
REM
REM darren.goossens@gmail.com Jul 2018
REM
echo ---------------------------
echo on
del *.o *.O *.mod *.MOD
set bindir=ZMCWin_gfortran_static
echo ---------------------------
mkdir %bindir%
echo ---------------------------
gfortran -static -O2 -ffree-line-length-0 -c precision.f90
gfortran -static -O2 -ffree-line-length-0 -c fundamental_constants.f90
gfortran -static -O2 -ffree-line-length-0 -c varying_string.f90
gfortran -static -O2 -ffree-line-length-0 -c globals.f90
gfortran -static -O2 -ffree-line-length-0 -c cartesian_class.f90
gfortran -static -O2 -ffree-line-length-0 -c array_functions.f90

gfortran -static -O2 -ffree-line-length-0 -c sort_functions.f90
gfortran -static -O2 -ffree-line-length-0 -c variable_array.f90
gfortran -static -O2 -ffree-line-length-0 -c binary.f90

gfortran -static -O2 -ffree-line-length-0 -c string_functions.f90
gfortran -static -O2 -ffree-line-length-0 -c statistics.f90

gfortran -static -O2 -ffree-line-length-0 -c binary_io.f90

gfortran -static -O2 -ffree-line-length-0 -c file_functions.f90

gfortran -static -O2 -ffree-line-length-0 -c hash_table.f90
gfortran -static -O2 -ffree-line-length-0 -c polysample.f90
gfortran -static -O2 -ffree-line-length-0 -c vector_class.f90

gfortran -static -O2 -ffree-line-length-0 -c mol2_class.f90
gfortran -static -O2 -ffree-line-length-0 -c cmdline_arguments.f90
gfortran -static -O2 -ffree-line-length-0 -c keyword_class.f90
gfortran -static -O2 -ffree-line-length-0 -c rotmatrix_class.f90

gfortran -static -O2 -ffree-line-length-0 -c crystallography_class.f90
gfortran -static -O2 -ffree-line-length-0 -c image_transforms.f90
gfortran -static -O2 -ffree-line-length-0 -c quaternion_class.f90
gfortran -static -O2 -ffree-line-length-0 -c zmatrix_class.f90

gfortran -static -O2 -ffree-line-length-0 -c pnm_class.f90
gfortran -static -O2 -ffree-line-length-0 -c superimpose.f90

gfortran -w -static -O2 -o ZMC_static zmc_Nov03_2015.f90 rannum.f ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o DZMC_static readat_zmc_Aug29_2014.f90 diffuse_allocatable_March20_2014.f90 rannum.f ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o bin2gray_static bin2gray.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o zmat_maker_static zmat_maker.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o zmat2xyz_static zmat2xyz.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o zmatchk_static zmatchk.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o zmat_anim_static zmat_anim.f90 rannum.f ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o zmat2mol2_static zmat2mol2.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o pgmave_static pgmave.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o pgmcombine_static pgmcombine.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o make_random_occ_static make_random_occ.f90 rannum.f ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o mol2xyz_static mol2xyz.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o catmol2_static catmol2.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o chkmol2_static chkmol2.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o pgm2mask_static pgm2mask.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o pgm2ni_static pgm2ni.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o ni2pgm_static ni2pgm.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
gfortran -w -static -O2 -o raw2pgm_static raw2pgm.f90 ps_routines.f fundamental_constants.o varying_string.o globals.o precision.o cartesian_class.o array_functions.o sort_functions.o variable_array.o binary.o binary_io.o string_functions.o statistics.o file_functions.o hash_table.o polysample.o vector_class.o mol2_class.o cmdline_arguments.o keyword_class.o rotmatrix_class.o crystallography_class.o image_transforms.o quaternion_class.o zmatrix_class.o superimpose.o pnm_class.o
move *.exe %bindir%
copy *.txt %bindir%
copy READ* %bindir%

Opened a Windows command prompt, went to the directory where the files are. Ran the batch file and all was well.

Done!

After this, it’s a case of actually putting together a simulation, putting ZMC binaries where they need to be, and so on.

 

Just for completeness.

Mercury (CCDC) on 64-bit Debian

Tried Mercury 3.6 on 32-bit Debian and the -mesa option got it to work. On 64-bit Debian (9.4), no such luck.

Eventually, tried the Windows version installed through wine. Note that I am running 64-bit Debian but wine is providing 32-bit Windows.

$ echo $WINEARCH
win32

$ wine mercurystandalone-3.6-windows-installer.exe

Nope.

ran winecfg; added the installer to the list of applications and set it to run as Windows 7.

Screenshot of the wine winecfg main window, showing the Mercury installer file added as an application.

winecfg main window

Then installer ran, but barfed.

Something about “ntlm_auth version”.

Search for “ntlm_auth” at https://www.debian.org/distrib/packages. Is it even installed? Well, can make sure easily enough.

sudo apt-get install winbind libnss-winbind libpam-winbind

Tried again with wine set to mimic (“wine is not an emulator”) Windows 10. Nope. OK, Win 7.

ntlm_auth error was now gone but got another complaint.

Screen shot of the error box. It says The visual C redistributable package failed to install. Software may not work. You should run C:\Program Files\CCDC\Mercury 3.6\vcredist_x86_2010.exe as administrator once installation is finished.

Error message on installing Mercury. Install finished after clicking OK and is seems to work…

But Mercury did launch. Guess I’ll use it till I have a problem …

Screen shot showing Meruryworking. Seems OK as far as I can tell.

Mercury 3.6 with a structure in the window.

YMMVW (your mileage may vary wildly)

Mercury (CCDC) on my NetBook; mesa is the answer

I run Debian (currently 32-bit 9.4) on my getting-to-be-ancient Acer Aspire One Netbook (1 GB RAM, 250 GB HD).

I wanted to install Mercury.

(1) For a version that does not need a CCDC subscription, I went to Legacy Downloads and version 3.6.

(2) Opened terminal, went to downloads folder:

$ chmod +x mercury*

and…

(3) Ran it:

$ ./mercurystandalone-3.6-linux-installer.run

And it installed (locally, no sudo) but when I ran it, it complained about i915_dri.so and swrast_dri.so and libc.

(4) These files are on the system:

find / -iname i915_dri.so

/usr/lib/i386-linux-gnu/dri/i915_dri.so

as expected. So where is Mercury expecting to find them? Or is there a versioning issue?

(6) Found the directory with the binary in it and ran it directly from command line —

$ ./mercury

Warning: mercury requires /lib/libc.so.6 but not found
libGL error: unable to load driver: i915_dri.so
libGL error: unable to load driver: swrast_dri.so

Why is it looking for libc in /lib? It’s on the machine, just not in there. Is there a way to tell Mercury where to look for files?

(7) Ahh, stuff it; use a command line flag:

$ mercury -mesa

Still wants libc.so.6 to be in /lib; locate it and copy it into there; at least it gets rid of that error message.

(8) Works.

Good enough, anyway.

 

 

Mesa

Predatory or legit? I dunno, but … GBP1500?

Predatory publishers or legit? It’s not always easy to spot. What about this one?

screeenshot of email asking me to contrinute to a book chapter; text extracts below.

Email from InTechOpen asking for a contribution to a book chapter.

Note how the list of institutions is empty!

Dear Dr. Goossens,

Due to your involvement in the field, and the research you published in your paper, “Synchrotron X-ray diffuse scattering from a stable polymorphic material: Terephthalic acid, C8H6O4,” IntechOpen invites you to extend your work and offer a more comprehensive overview of your studies. Contribute a chapter to “Synchrotron Radiation,” an upcoming Open Access book edited by Dr. Name Name.

Work with an internationally recognized peer group and gain increased visibility for your published work. Please visit the book project page to register your interest.

We look forward to hearing from you.

Kind Regards,

Marija Gojevic-Zrnic, from IntechOpen
Author Service Manager

It’s correctly written, their website looks more or less professional, their books do certainly get printed and distributed — I’ve seen them in proper libraries. They’re open about their (high in my opinion) fees — £1500 for a 16 to 20 page chapter. So are they predatory or just expensive? I guess they’re just expensive.

I still would not publish with them.

Why?

Something like IUCrJ (fee of USD1300, or about £1000, so quite a bit cheaper) covers similar topics, is also open access, is part of a society publisher of high standing, has a reliable archiving policy and is embedded in all the major search engines and databases. I have no experience with the editorial process at InTech, and it may be very good, I can’t say, but I do know that the IUCr process is superb, with their editors doing more than just farming out the material to review — they genuinely interrogate it themselves.

The issue? IUCrJ might bounce the work! Also, book chapters are often more review-y and may not be publishable as papers.

But … if you are career-conscious, ask; will the book chapter collect citations anyway? Will it fall through the cracks of whatever research metric engine your bosses want to see quoted? Sadly, this is the reality. Monographs and book chapters might be excellent and important, but will they be noticed? I suggest finding a good-looking chapter or two from an InTech or similar volume and then checking its stats in whatever database you use for citation and impact metrics — Web of Science or whatever. Is it there? Are the numbers reasonable? And so on.

In the end, if you want to go open access, there are reputable journals that will take your money, and £1500 is enough to get into some pretty reputable ones. And conventional publication still exists. InTech might be OK, but check it out first and be aware of the options!

It’s all about due diligence.

 

 

StrucFact or whatever it is called

Wrote a crude program to calculate X-ray, neutron and neutron magnetic diffraction scattering factors.

Introduction

StrucFact or StrucFact.exe is a crude program to calculate expected intensities for neutron diffraction (magnetic and nuclear) and X-ray diffraction (in the version from 2013). It is distributed as source code because any serious user will likely need to modify the source to make sensible use of it. It’s mathematics is essentially taken from Neutron Diffraction by George Bacon and H. M. Rietveld J. Appl. Cryst. (1969) 2 65-71 (see also here), and its mandate is limited; its job is to calculate F2 for neutron scattering for arbitrary cells, magnetic or nuclear, and more recently for X-ray diffraction.

It is `developed’ solely on an `as needed’ basis, which means I add `features’ when I need them to solve some problem I am working on. The inverted commas may seem gratuitous, but they are not!

I am sure there are better tools out there for everything that this program does, and I advise against using it. There should be a README.TXT and the code itself distributed with this file.

Please Note

1. It does not work for incommensurates (unless you want to define an enormous cell).

2. It treats every cell as P1 (i.e. you have to give it all atoms explicitly).

3. The nuclear and magnetic cells must be the same size, which means that if one is bigger than the other (usually magnetic bigger than nuclear) you have to put the atoms from the smaller cell into the bigger, including inserting all redundant copies of atoms.

4. No corrections for intensities (e.g. not even Lorentz), no B-factors beyond the isotropic.

In other words, it is remarkably limited. Why anyone would want to use it I do not know when FullProf and GSAS and the like are around. Having said that, it is quite simple (in the sense that everything has to be done explicitly, so it is laborious but not as conceptually demanding) compared to such programs, and the (minimally tested) code is here available.

2 Compiling

This is Fortran90 code that does not need any extra libraries. gfortran is to be preferred.

Non-static binary:

gfortran -o StrucFact.exe strucfact.f90

Please report errors in the code to /dev/null, although if desperate you can email me.

Download from http://djg.altervista.org/downloads/StrucFact_Files.tar.gz or http://djg.altervista.org/downloads/StrucFact_Files.zip. There’s a PDF inside the archive that gives more info.

Meh.

Modulated molecular crystal structures — well done, Eric!

A new scientific paper. A tribute to the residual momentum of my scientific career, and in particular to Eric Chan, who has built on my work to come up with a way of exploring modulated molecular crystals. https://doi.org/10.1107/S1600576717015023

It’s pretty subtle stuff, but basically a crystal structure can show a periodic variation from cell to cell — for example, a displacement or substitution of an atom or molecule. If this variation is periodic, then it can be described using a periodic function. Such a function will have a Fourier transform that requires (relatively) few Fourier terms, and each strong term will give rise to a bright spot in the diffraction pattern. These spots will occur in a motif centred on (some) Bragg peaks, potentially adding many new spots to the diffraction pattern.

So where these bright spots occur tells you about the modulation. However, in something like molecular crystal, the molecular structure factor may be relatively complicated, and so may the nature of the modulation. This may mean that it is not easy to predict where the modulation spots are likely to be intense.

Eric figured out a way to use my program ZMC to generate modulated molecular structures and then calculate their diffraction patterns.

An example of a diffraction pattern calculated using <tt>ZMC</tt> with Eric Chan's modulation wave addon.

An example of a diffraction pattern calculated using ZMC with Eric Chan’s modulation wave addon.

It is pretty heavy and specific stuff, but it also is a capability that I’ve not seen elsewhere. Eric’s webpage is at https://sites.google.com/site/echanj/, and that is the best place to go to have a look for the code.

Other ZMC.

Journal self-archiving policies

One of the most-viewed pages here (it’s all relative; still not very many hits really) is the list of dodgy publishers. It’s a drop in the ocean, but it gets a few hits. Something else I’d like to bring all into one place, even though it’s been done elsewhere, is to summarise self-archiving polices. I’ll focus on the journals I’ve published in, preparatory to putting together a web archive of all my papers that I am allowed to self-archive (on my website and maybe on ResearchGate). It’s really just a resource for me, but I might as well make it public.

Some journals are open access; you don’t need to self-archive those, but usually you can.

Some allow you to archive a proper reprint, processed and edited by the journal — like the IUCr, as shown below.

Some suggest you archive the ‘author’s final version’ but don’t want you to put up anything with the journal’s imprimatur.

Some say ‘mine mine mine’ and don’t let you host it at all. I hope to make this clear.

The page lives at https://darrengoossens.wordpress.com/journal-self-archiving-policies, and so far has exactly one (1) entry, the good old IUCr, which has a very enlightened policy. They allow self-archiving as long as you use the official e-reprint, rather than just the downloaded PDF, and they request that you provide a link to the journal. Seems very reasonable. The official e-reprint is easy to recognise; it has a distinctive front page with some official words on it, something like this (colours may vary):

Front page of IUCr reprint, showing it is dfferent from download from journal.

Note the box with the notice near the bottom of the page.

 

I think their policy is very reasonable because the IUCr has a very professional publication and editorial team who need to be paid and ought to be paid. Subscriptions are part of the mix, yet they allow authors to house their own work and to distribute copies to colleagues freely. It seems a very sensible mix.

More updates as they come to hand.

The last domino falls: A little bit of science.

This paper and its deposited material explore clustering of 2 × 1 dimers (dominoes) subject to simple interactions and temperature. Much of the work in domino tilings has been statistical, combinatorial and thermodynamic in nature. Instead, here, the domino is used as a simple model of a non-spherical molecule to explore aggregation, rather as if the molecules were interacting in solution. As a result, the work does not look at how many ways there are to tile a plane, but at how the cluster evolves with different parameters in the potential that governs the clustering. These parameters include the rules used to select which of the many possible dominoes will be added to the cluster, and temperature. It is shown that qualitative changes in clustering behaviour occur with temperature, including affects on the shape of the cluster, vacancies and the domain structure.

The paper is on the web, open access, at http://dx.doi.org/10.3390/condmat2020015 and http://www.mdpi.com/2410-3896/2/2/15. It comes with a bundle of software anyone can use to play with the model, modify it, whatever. Please do!

It’s basically a toy model, but it shows some nice behaviour. Apologies to the red/green colour-blind.

 

<i>T</i>=0.

T=0. At low temperature, the model gives strongly structured domains.

 

<i>T</i>=0.16.

T=0.16. At intermediate temperatures, the ordering begins to break down, though remains apparent. If temperature continues to increase, vacancies appear.

 

<i>T</i>=10

T=10. Vacancies, no domains, really. Addition of new dominoes is almost random.

 

Movies.