pdf optimisation

While preparing an online report for the PUT1107 project, I encountered a limit for uploaded pdf-files as low as 3 Mb. Thus, I was forced to reduce the pdf-file size to this limit as follows:

1. I merged a set of articles into one files: pdftk 1.pdf 2.pdf 3.pdf output set.pdf

2. Then I reduced the size of the resulting file: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf set.pdf

The size was reduced by more than 50% with almost the same visual quality.

Taming the equations in Libreoffice

Working on large documents with many equations in a word processor is a torture. In my case, booklets of chemistry problems require a lot of work. For certain reason I prefer to use LibreOffice. When is needed to reformat all equations in a document the following macro is very useful:

Sub FormulaFontSizeChanger

o = ThisComponent.getEmbeddedObjects()

fontSize = 12

fontFamily = “Arial”

For i = 0 to o.count-1

if (not IsNull(o(i))) and (not IsNull(o(i).Model)) then

o(i).Model.TopMargin = 0

o(i).Model.BottomMargin = 0

o(i).Model.LeftMargin = 0

o(i).Model.RightMargin = 0

o(i).Model.BaseFontHeight = fontSize

o(i).Model.FontNameVariables = fontFamily

o(i).Model.FontVariablesIsItalic = 1

o(i).Model.FontNameFunctions = fontFamily

o(i).Model.FontNameNumbers = fontFamily

o(i).Model.FontNameText = fontFamily

o(i).Component.BaseFontHeight = fontSize

o(i).ExtendedControlOverEmbeddedObject.update()

endif

Next i

End Sub

 

P.S. The script might be useful also when writing a thesis with a lot of chemistry inside and many Zotero references. LaTeX might not be so comfortable, and in Word one is still limited with few math fonts.

Travel tips

Summer is a great time for research visits, schools as well as vacations. Here is my check list for a safe trip.

  • Passport, ID card and driving license (and a secure place for these documents)
  • A bottle of water (stay hydrated)
  • Cough drops
  • Wet wipes and napkins
  • Something to read or listen (headphones)
  • A notebook or something to write on
  • A scarf or something to protect your neck from cold
  • A cap or something to close your face while sleeping
  • Sunglasses
  • Compression socks
  • Lightweight and water-resistant pair of shoes
  • Some coins and some cash
  • A universal adapter

size limits of email boxes

Email is an essential part of the work. Sometimes the box gets full, thus preventing the work. With gmail there is a trick how to find and delete large emails that occupy most of the space. To search for attachments greater than 5 Mb search “size:5000000”.

Installing Gromacs and Lammps

FFTW:

./configure –enable-float –enable-shared –enable-sse2
make -j N
make install

===

Gromacs:

$ tar xvfz gromacs-x.y.z.tar.gz
$ ls
gromacs-x.y.z
$ mkdir build
$ cd build
$ cmake ../gromacs-x.y.z -DCMAKE_INSTALL_PREFIX=/home/yourUser/opt/gromacs.x.y.z -DGMX_CPU_ACCELERATION=SSE2 -DGMX_SIMD=SSE2
$ make -j N
$ make install

===

LAMMPS:

$ git clone git://git.lammps.org/lammps-ro.git LAMMPS
$ make yes-molecule
$ make mpi

===

To the .bashrc add:

#Gromacs

source /home/yourUser/opt/gromacs.x.y.z/bin/GMXRC
#or source /your/installation/prefix/here/bin/GMXRC

#LAMMPS
export LD_LIBRARY_PATH=~/LAMMPS/src:$LD_LIBRARY_PATH
export PATH=~/LAMMPS/src:$PATH

gsissh at ubuntu

To access one of the PRACE supercomputers, I was required to use gsissh. The corresponding gsi-openssh-clients package is not in the standard Ubuntu repositories. I have downloaded it from http://toolkit.globus.org/ftppub/gt5/5.2/stable/packages/deb/ubuntu/12.04/pool/contrib/g/gsi-openssh/.Besides that also globus-proxy-utils is needed. This one was easy to install via apt-get install globus-proxy-utils. Finally, everything got working when the bundle of X509 trusted certificates was downloaded from http://software.ligo.org/gridtools/debian/pool/main/o/osg-ca-certs/. Note, for some reason .globus folder did not appear in my home directory. To use gsissh, I had to create it and then move my user certificate to it with proper correct permissions -rw-------.

P.S. Do not forget to create a proxy certificate (grid-proxy-init) before login to your supercomputer.

An article submitted

An article titled “Electrochemical investigation of 1-ethyl-3-methylimidazolium bromide and tetrafluoroborate mixture at Bi(111) electrode interface” by Enn Lust, Carolin Siimenson, Meeri Lembinen, Ove Oll, Laura Läll, Marta Tarkanovskaja, Liis Siinor, Vladislav Ivaništšev, and Karmen Lust was submitted to JES.

What is so special about this article? First, the work presented is done in a joiful collaboration. Second, the computational results were obtained within a “DFT Calculations in Electrochemistry” course (LOKT.02.048), within a student project by Meeri and Marta. Well done!

Archive at arXiv

Recently two our articles were uploaded to arXiv. Our collaborator Satish Narayana Srirama prepared the first one:

http://arxiv.org/abs/1604.02788

While submitting the other, we encountered some problems when compiling the source tex-file. It turned out that one should add \pdfoutput=1 to get everything work. As a result, the second article was successfully archived at the arXiv:

http://arxiv.org/abs/1511.08078

Writing workshop

Thesis writing and, in general, academic writing is a skill. Not everyone has that skill, but certainly most can get it. To develop an understanding of the behaviours associated with successful writing, we organized a workshop with the help of AVOK – Centre for Academic Writing and Communication. Under the supervision of Djuddah A. J. Leijen, we started this four-hour workshop with Q&A followed by sessions about time management, in particular how to avoid procrastination, and, of course, grammar.

Continue reading “Writing workshop”