Saturday, March 17, 2012

How to install xcrysden on mac vs 10.6.8

======= How to install xcrysden on mac 10.8.6 =========
(I assume that you have already installed Quantum Espresso)

I spent some time trying to install xcrysden on my mac.
Finally, I got it to work. This is the approach I ended up taking:
First, download fink then make sure fink is up to date because from 2012 xcrysden is included in fink, which is really good news. After installation you want to update fink using self-update and update-all. I have provided the description of these two methods at the end of this post taken from the fink user guide:

For the hasty: 
after installation of fink type:
fink selfupdate 
and then
fink update-all

Then, we are ready to install xcrysden now. Type:
fink install xcrysden 
and it will install all the required dependencies and everything for us!

BUT THIS IS NOT IT: 
Okay, now this worked for me and after the installation I just typed "xcrysden" in my bash and it opened up. I was happy. Then, I went into file->"open pwscf"->(open input file). I searched for the file on my drive and found it. Great.

It opened the file and I got a dialog revealing the content of the file, I quickly skimmed over it making sure all the required cards were there and the data looked like I had entered it. It was okay so I closed it and now I had another dialog (which simultaneously had popped up in the first place) where I could pick the dimensionality of the display I believe. This comes in handy for displaying surfaces, molecules, etc.

I picked the first option which is not to do anything.
OUCH! I received an error. I clicked the "errorinfo" button in the error dialog and I was told that there was an error in the pwi2xsf.f fortran file. It was an "end of file" error. Sure.
I assumed that the pwi2xsf file which came with xcrysden was somehow damaged or linked to incorrectly. Please let me know if you have a better explanation.
So, the way I fixed it was to copy the pwi2xsf file from my Quantum Espresso installation (located in (installation folder)/pwtools/). I sudo copied it into the xcrysden folder: "/sw/lib/xcrysden/bin/pwi2xsf" and thereby replacing the file already there.
 Then, I tried running xcrysden again and it worked!!

If you have any explanation as to why this caused me troubles please comment or if there's a better way of installing it or anything.


======= Appendix =========

Snippet from fink user-guide:
selfupdate:
This command automates the process of upgrading to a new Fink release. It checks the Fink website to see if a new version is available. It then downloads the package descriptions and updates the core packages, including fink itself. This command can upgrade to regular releases, but it can also setup your /sw/fink/dists directory tree for direct CVS or rsync updates, if you select one of those options the first time this command is run. This means that you then will be able to access the very latest revisions of all packages.
If the --use-binary-dist option is enabled, the list of available packages in the binary distribution is also updated.

update-all:
"This command updates all installed packages to the latest version. It does not need a package list, so you just type:
fink update-all"
 

1 comment:

  1. mine is 10.12.4 Sierra and I'm first time installing fink; which version should I go for?

    ReplyDelete