Comparing structures with pymol and babel

To align structures using babel, the command is:

babel -ixyz structure1.xyz structure2.xyz -opdb out.pdb --align

Of course, you can change the output format to something else, e.g., xyz, and you can output to multiple files.

babel -ixyz structure1.xyz structure2.xyz -oxyz align.xyz --align -m

Then, you could, for example, load the structures into pymol and view the aligned structures.

chemistry, crystallography, platon, programs, Uncategorized

Platon on macOS Sierra

A while ago, I wrote a post on installing Platon on a Mac. I have just reinstalled Platon on my MacBook Pro, running macOS Sierra, and it works just fine. Check out my earlier post for a more in-depth run down of how to install Platon, but, in brief, the process is this:

  1. Download a copy of XQuartz. (I did this using Homebrew, using ‘brew install Caskroom/cask/xquartz’).
  2. Install gfortran, which is included in gcc. (Again, using Homebrew this is ‘brew install gcc’).
  3. Download the platon.f.gz and xvrdr.c.gz files and (g)unzip them if Safari hasn’t already done so.
  4. In the terminal, go to the folder containing the two previously mentioned files (probably ~/Downloads).
  5. Then, type ‘gfortran -o platon platon.f xdrvr.c -I/opt/X11/include -L/opt/X11/lib -lX11’. Hopefully, this should do its thing and produce an executable file named ‘Platon’.
  6. Move the file somewhere useful, such as /opt.
  7. To make Platon run from anywhere, you have two options: add the folder you have just placed the Platon executable in to the path or make an alias to the executable. To do the first, open up your shell profile or create (i.e., vi .bash_profile or you can open a copy in Textedit, making sure that its in plain text mode, the filename is preceded by a point (.), and the file is saved to your home (i.e., /Users/[your_username])) a profile file (I am using bash) and add ‘PATH=’$PATH:/opt’. To do the second, open up your shell profile and write alias platon=”~/Users/[your_username]/[location_of_platon]”.
  8. Then, quit and reopen terminal and type ‘Platon’ and the program should run.
latex, thesis writing, writing

LaTeX commands for chemistry

LaTeX is great for writing theses, although collaboration with other authors on LaTeX files can be a pain.* Below I have listed a few LaTeX commands that I used when I was writing up my thesis. They are very basic, but they are useful because they save some typing and ensure that the same formatting is used each time. In particular, the \moles command and the \micro command for formatting moles and microanalysis** in standard notation, respectively. There are many more that I could write about, but I am short of time at the moment. Hopefully, at some point, I will update with a more substantial (and useful) list.

\newcommand{\celsius}{$^{\circ}$C} %a degrees Celcius symbol (to avoid use of superscript 'o', the bane of my life
\newcommand{\gs}[4]{$#1^#2_#3(#4)$} %Etter's graph-set notation, for hydrogen-bonded systems
\newcommand*{\moles}[2]{#1 $\times$ 10$^{#2}$ mol} formats number of moles in standard form
\newcommand*{\Moles}[2]{#1 $\times$ 10$^{#2}$ \textsc{m}} %formats molar quantities in standard form
\newcommand{\Molar}{\textsc{m}} %formats a small-caps M
\newcommand{\micro}[7]{\textbf{Microanalysis:} Calculated for \textbf{\ce{#1}} (\%) C, #2; H, #3; N, #4; Found (\%) C, #5; H, #6; N, #7.} %formatting of microanalysis results
\newcommand{\melt}[2]{m.p. #1--#2 \celsius} %melting point ranges

\newcommand{\yield}[2]{\textbf{Yield:} #1, #2 \%} %yields formatted as Yield: quantity (write number and quantity symbol, e.g., \yield{2 g}{94}

Below is the output of a few of these commands.

Example of the pdfLaTeX output

These were output by using the commands at the head of the page according to the following usage:

...forming a hydrogen-bonded \gs{R}{1}{2}{5} ring.\\

A 10 \Molar{} sodium hydroxide solution.\\

An aqueous solution of \textbf{1} (\moles{1.1}{-5}).\\

\micro{C14H30}{14}{14}{14}{14}{14}{14} \yield{2 g}{94}, \melt{100}{103}

I hope you find them useful.

*However, nowadays, many collaborative, cloud-based LaTeX services are available. e.g., Overleaf.

**Requires the mhchem package to format chemical formulae.

Computational Chemistry, orca, programs

Calculations with Orca

This is a very quick post on how to run a calculation in Orca. In this case, it is an optimization of the iridium pentachloronitrosyl anion. This was a post that I wrote for my research group to encourage the use of Orca for quantum mechanical calculations. I will write this up further in due course.

For more detailed information, check out the Orca manual and the Orca Input Library.

Continue reading

English, writing

Fig., Figs., and Figs – and not a fig in sight!

How do you abbreviate ‘figure’ and ‘figures’ when used in a scientific paper?

In general, the rule is that when an abbreviation ends with the same letter as the word written out in full, a period (full stop) is not used. For example, Dr. Smith, but Drs Dupont and Dupond. However, in the case of Figures, both Fig., Figs., and Figs are acceptable and used. Therefore, you should follow the example used in the journal, i.e., check the formatting guidelines or look at other articles published recently in that journal. If in doubt, choose one style and use it consistently!

P.S. Perhaps a more day-to-day example is that (in British English) we write Mr Smith and Mrs Jones as opposed to Mr. Smith and Mrs. Jones because both of these words end with the same letter as the abbreviated form; that is, Mister and Mistress. However, in American English, a period is used after both Mr. and Mrs., so perhaps the most important lesson is that consistency and clarity are the most important factors.

argentina, English, writing

We shall do this, but you will do that.

A diversion into English grammar today. My husband, who is Argentinian, asked me about the usage of ‘shall’ and ‘will’.

Generally, shall and will are used to express something that happens in the future. For example,

I shall go to the cinema.

She will go to the cinema.

We shall go to the cinema.

They will go to the cinema.

So, the rule is that I and we take shall; whereas, she/he/it and they take will. Conversely, when you want to be forceful, i.e., use the imperative, reverse the usage. For example,

I will not kill!

She shall not kill!

We will not kill!

They shall not kill!

Furthermore, when using the negative, the following contractions are used.

‘Shan’t’ for ‘shall not’.

‘Won’t’ for ‘will not’.

Moreover, for the conditional, the same rules are used for ‘would’ and ‘should’.

However, in modern usage, will (and would), are pretty consistently used in speech rather than shall (and should). I imagine that this is because, in speech, the British use the contracted forms ‘I’ll’, ‘she’ll’, and ‘we’ll’, leading to a loss in distinction between shall and will.

In conclusion, will people understand you if you mix will and shall? Certainly, they will!