03 August 2016

631. Small linux installation in virtualbox on windows for formchk usage

This post is for windows users (it's written for a colleague).

In https://verahill.blogspot.com.au/2016/08/630-making-mo-figures-in-gabedit-using.html I mentioned that g09w doesn't seem to handle my .chk files for linux (G09D).

If you have gaussian for linux (e.g. G09D), then you can set up a small linux installation on windows, install gaussian there and run formchk in the linux environment.

The guide assumes that you don't really know much about linux, or virtual machines. There are plenty of screenshot -- probably too many -- but if you work through them one by one it should be easy to get set up.


1. Install virtualbox
Go to https://www.virtualbox.org/wiki/Downloads

Download "VirtualBox 5.1.2 for Windows hosts"

Download the "VirtualBox 5.1.2 Oracle VM VirtualBox Extension Pack" as well.

It doesn't have to be version 5.1.2. Download whatever the latest version is.

Run the installation file for virtual box.
















2. Install linux in the virtual machine
Assuming that you have cheap and fast internet, download the netinst version of debian.
https://www.debian.org/CD/netinst/

You'll want the AMD64 iso file: http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/debian-8.5.0-amd64-netinst.iso

You can also download this via bittorrent: http://cdimage.debian.org/debian-cd/8.5.0/amd64/bt-cd/debian-8.5.0-amd64-netinst.iso.torrent

Start virtualbox and set up a new machine.












Then install linux: Note that at no point are any changes made to your Windows harddrive. All changes are made to a file that virtualbox uses as a harddrive for the virtual machine (i.e. your linux installation)









































NO changes are made to your 'real' harddrive, so don't panic.






3. Install gaussian in the linux virtual machine
For this you will need to figure out how to transfer files between the machines. The easiest, most dependable way is via sftp.

To do this you will need to download and install filezilla: https://filezilla-project.org/download.php?type=client
Do that. It's easy.

Next, configure your virtual machine to set up port forwarding.

Start your linux installation (e.g. hit the Start button in VirtualBox)
First figure out what your IP address is. Log in using the username and password you created when you installed linux.

 Then type ip addr
ip addr
The output you're looking for is the ip address for interface eth0 -- look for the value after inet, i.e. 10.0.2.15

Next configure virtualbox: (leave linux running in the background)



Now start Filezilla:
 You want to connect to sftp:/127.0.0.1 and port 2222. Use the username and password you set up for linux.
Hit connect

Sure
Yes

Create a new directory on the linux computer


It should now look like this (look at the right column)

Transfer your files (navigate to the correct directory in the left column, select files and drag them across)
Select and drag
We're only copying formchk here. That's all we need.
Copied
 In the linux computer, change to the correct directory e.g.
cd ~/g09

Then run
chmod ug+x formchk

Check




4. Transfer .chk files from windows host to linux guest

You'll transfer the files using filezilla as shown before. Connect to sftp://127.0.0.1, port 2222, and go to the g09 directory where your formchk file is.

Like so



5. Convert .chk files to .fchk files
In the linux computer, change directory to g09 and run formchk
./formchk example.chk
4. Transfer .chk files from windows host to linux guestThe ./ before formchk is important

running formchk


Then transfer the file back using filezilla:

refresh



See the files





6. Shutdown linux
E.g. by running
sudo shutdown -h now

shutdown

All in all the linux install takes about 1.1 Gb -- this could probably be cut down to 100-200 Mb, and the set up can be improved quite easily. However, this is the most straightforward set-up that I can think of without having to do customisation.

+1.1 Gb





No comments:

Post a Comment