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.
Computational Chemistry, orca, programs

Calculations with Orca


Update 8 July 2017: Please note that the latest version of Orca (4.0) uses a slightly different format for basis set and ECP assignment. Check the Orca Forum, Orca Input Library, or the Orca 4.0 manual for more information. 

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

chemistry, crystallography, platon, programs

Platon on Mac OS X Yosemite (10.10)

UPDATE (16 March, 2017): This also works on macOS Sierra (10.12.3).
UPDATE: This also works on Mac OS X El Capitan (10.11.5).

One of the most popular pages here (well, there is little else) is the page about Platon for Mac OS X.

I mainly use a computer running Ubuntu for crystallography at work so I haven’t had to compile Platon, the essential crystallographic program, for my Mac. I have seen that some people have had problems compiling the program (remember you do need Xquartz, and a compiler for Fortran and C). I compiled platon, but I also had some difficulty doing so, although I have compiled previous versions without a problem. So, if you have a problem compiling using the standard instructions on the platon website, try this, and you should be able to compile it, without sudo, using:

gfortran -o platon platon.f xdrvr.c -I/opt/X11/include -L/opt/X11/lib -lX11

If you don’t use -I/opt/X11/include then it won’t find the X11 libraries that are above /opt/X11/lib.

Afterwards, copy it into somewhere like sudo cp platon /opt/platon2015 (check that it has run privileges (i.e., ls -g) and, if not, run chmod u+x platon). You can then add the folder that contains the executable to your path and add an alias if in you profile script (.bashrc/.bash_profile etc.) e.g., alias platon="/opt/platon2015/platon“.

You can then run it with, for example, on a shelx res file:

platon file.res

References: A.L.Spek, Acta Cryst. 2009, D65, 148-155.

iPhone, programs

Deleting ‘Other’ on your iDevice

Recently, I have been getting a lot of messages on my iPhone telling me that I am running out of space. Because I primarily use my phone for taking photos, storing voice notes (because I’m terribly forgetful) and messaging, I knew that I could not possibly be using all of the space on my phone.

After some searching, I read on the internet that this memory problem can be due to cached messages and internet settings, but even after deleting these I still had almost 6 gigabytes of data consumed by the mysterious ‘Other’ category (viewed through iTunes).

The source of the problem appears to be that when I ‘stream’ video from my iTunes Match account these data are stored, rather than deleted. It’s easy to imagine how quickly memory can be consumed. The most popular solution for this problem that I found seems to be to wipe your iPhone and restore from backup. This seems a little drastic and also rather silly.

I didn’t want to delete the contents of my phone, so, here is an alternative idea that worked for me:

  • Plug your iPhone into the USB port of a computer running Ubuntu (or an instance of Ubuntu in Virtualbox).
  • Mount the phone (your iPhone will ask if you Trust this computer).
  • Go to the iPhone icon in the dock and open the folder named ‘CloudAssets’.
  • Inside there will be many .plist files, but also iTunes videos files, .m4v, which you can safely delete.
  • Unmount the device, plug it into iTunes and check what happened to the ‘Other’ category. You can see from the photo below that I suddenly gained 7.25 gb of space. 🙂