24 June 2013

461. Briefly: setting up SHELX on linux (crystallography)

Nothing difficult, but putting up instructions won't hurt anyone.

SHELX is THE crystal structure refinement software. I'm not a crystallographer, but it never hurts familiarising yourself with the tools of  your collaborators.


Download
Register using this page (if you're an academic user): http://shelx.uni-ac.gwdg.de/SHELX/register.php
To find the answer to the xtal question, use google.

You'll then receive an email with a password. Now go to
http://shelx.uni-ac.gwdg.de/SHELX/download.php
where you'll find instructions.

Download all the files:

Several of my files became corrupted the first time I downloaded them for some reason: anode.bz2, shelx[cde].bz2, shredcif.bz2.

I'm presuming that you're downloading the files to ~/Downloads

Here are the 'good' md5sums:
219183542ada47a17e5528bf217f9261 anode.bz2 61335e6b9cf2e654242db80822f32681 ciftab.bz2 918fe0a04e59589938a81a93d8e3eaff shelxc.bz2 e65580af087989aa4958eb53dcd8a473 shelxd.bz2 bc5cad6e4129fa61bbde49207cd4d244 shelxe.bz2 5390146a4b516425fb7b326533443ba7 shelxl.bz2 95617863be917743df55bd94509504fb shelxs.bz2

While you're at it, download the testdata from http://shelx.uni-ac.gwdg.de/~gsheldr/bin/test_data/: cdetutorial_andrea.zip, ciftab_templates.zip, difficult_sad.zip, ltests.zip, pn1a.zip


Installation
sudo apt-get install bunzip2 xargs
mkdir ~/tmp/shelx-2013 -p
cd ~/Downloads
cp shredcif.bz2 shelxe.bz2 shelxd.bz2 shelxc.bz2 ciftab.bz2 anode.bz2 shelxl.bz2 shelxs.bz2 ~/tmp/shelx-2013
cd ~/tmp/shelx-2013/
ls *.bz2|xargs -I {} bunzip2 {}
chmod +x *
sudo cp * /usr/local/bin

If you downloaded the test data:

mkdir ~/tmp/shelx_examples
cd ~/Downloads
cp cdetutorial_andrea.zip ciftab_templates.zip difficult_sad.zip ltests.zip pn1a.zip ~/tmp/shelx_examples
cd ~/shelx_examples
ls *.zip |xargs -I {} unzip {}


And you're done. Now, learning how to use SHELX, and how to use it properly, is a different matter on which I am not qualified to write.

21 June 2013

460. Briefly: Crystallography software: CCSD Mercury

The Cambridge Crystallographic Data Centre (CCDC)/Crystal Structure Database (CSD) has a free structure viewer called Mercury. Downloading and installing it is pretty straightforward, but still makes for a reasonable post.

To install
Go to http://www.ccdc.cam.ac.uk/SupportandResources/Downloads/pages/ProtectedDownloadProductList.aspx and click on Mercury. It'll take you to a license agreement page, Click accept to continue. Note that it won't work if you are blocking cookies.

Download Mecury 3.1 for Linux, and the 3.1.1 patch for linux. I'll presume that you downloaded the files to ~/Downloads.

cd ~/Downloads
chmod +x mercurystandalone-3.1-linux-installer.run
./mercurystandalone-3.1-linux-installer.run





Finally, create a file called
~/.local/share/applications/mercury.desktop
[Desktop Entry] Name=Mercury GenericName=CCDC Mercury Comment=Visualization of crystal structures Exec=/home/verahill/.Mercury_3.1/bin/mercury Icon=/home/verahill/.Mercury_3.1/icons/mercury_48x48.png Terminal=false Type=Application Categories=Science Version=3.1
Update to 3.1.1
cd ~/Downloads
chmod +x csdsystempatch-5.34.2-linux-installer.run
./csdsystempatch-5.34.2-linux-installer.run




And you are done! Note that you will want to have working OpenGL for this to look ok.

20 June 2013

459. Briefly: Proxies, browsing and paranoia

It's easy to configure Chrome to use Tor to preserve a semblance of privacy online (http://verahill.blogspot.com.au/2013/06/450-tor-and-chrome-on-debian.html). There are a few, simple things you can do to make your life with a proxy easier to manage.

This post presumes that you've followed this post first: http://verahill.blogspot.com.au/2013/06/450-tor-and-chrome-on-debian.html. In particular, that you have turned off pre-fetching.

In addition, you may want to think about the following:

Incognito mode
On the lower end of the scale, you may or may not want to use incognito mode consistently. This has little bearing on privacy online, but it depends on whether you want to leave traces on your computer of your browsing history. Although that should only be an issue if someone gets physical access to your computer, you never know if the next browser bug will give someone complete access to your history. Most likely it'll only provide metadata (which is what the NSA brouhaha has been mostly about).

Anyway, if you feel this is an important issue then you should probably be encrypting your disks with encfs as well.

Search engine
It's probably more important to rethink how you are using search engines in Chrome. First of all, you should turn off instant search. Secondly, you will want to consider whether you want to use google as the default search engine for queries in the URL field. Two main search engines come to mind: duckduckgo.com, and startpage.com. While duckduckgo.com has a higher profile, startpage.com is a bit more full-featured, and that's because it takes your query, anonymizes it, and passes it on to google. It's also based in Europe, which I (probably naively) feel is safer.

Go to startpage.com, and click on 'add to chrome' under the search box. Then set Startpage HTTPS as the default in Chrome:


Also consider making sure that google.com isn't your home page in chrome.

Proxy
Even though Tor works fine in general, it can be a bit slow, and you don't want to use it for everything anyway. There are times when you don't want to use a proxy. In my case, that's when I visit journal websites or my university websites. Also, I have set up a reverse proxy via my home router, and it's faster than Tor, so for a lot of things I'm fine with using that.

Switch ProxySharp supports the creation of rule-based proxy switching. In my case, I've set it so that if I use google, I use Tor. If I go to RSC, ACS, Wiley or Elsevier journals, I use my university connection, and for everything else, I use my home router.



You then just need to click your way through to the proxyswitcher alternative:
The icon will change colour depending on which proxy is active. Pretty neat!