=========================
Download and Installation
=========================

.. contents::
.. section-numbering::

------------
Requirements
------------

1) CamposASE2 is required,
   http://www.fysik.dtu.dk/campos/ASE

------------
Installation
------------

The next section describes how the fortran program, pseudopotentials and 
python interface can be installed. 

If you have a installation using the old CamposASE, 
it is enough just installing the new python interface, 
see `dacapo python interface`_.


dacapo fortran program and pseudopotentials
-------------------------------------------

This section describes how the fortran program and 
pseudopotential are installed. 
Current version of the fortran program is 2.7.7.

From RPM
````````

A `binary RPM`_ (tested and builded using Pentium 4) 
can be used to install dacapo on a Pentium 4 system.

.. _binary RPM: ../download/Dacapo-2.7.7-0.1.i386.rpm

This will install pseudopotentials in /usr/share/dacapo/psp and
binary executable in /usr/bin. 

From Tarfile
````````````

A `Dacapo tar file`_ containing fortran source code and pseudopotentials
can be used to install dacapo on a non rpm system. 

Use gunzip Dacapo-2.7.7.tar.gz. 


```````````````````````````````````````
Dacapo binaries for different platforms
```````````````````````````````````````

The page `dacapo binaries`_ list dacapo binaries for 
different platforms.

.. _dacapo binaries: binaries.html


````````````````````````````````
Compling the fortran source code
````````````````````````````````

use:: 
   cd src
   gmake <arch> [MP=mpi]

here <arch> is one of:

        * sun_ss10              
             Sun sparcstation 10/20)
        * ibm_power3             
             RS/6000 power3 node
        * ibm_power2_wide        
             RS/6000 wide power2 node
        * ibm_power2_thin        
             RS/6000 thin/thin2 power2 node
        * sgi                    
             Silicon Graphics n32 ABI
        * alpha                  
             Digital Alpha
        * pglinux                
             Portland Group pgf90 compiler on linux
        * intellinux             
             Intel ifc Fortran compiler version >=6.0 on Linux


.. _Dacapo tar file: ../download/Dacapo-2.7.7.tar.gz

More details will follow here shortly.

```````````````````````````````
Installing the pseudopotentials
```````````````````````````````

The dacapo fortran program adds the enviroment 
variable `DACAPOPATH` to the pseudopotential 
filename (if the file is not found in the currebt 
working directiory). 
Copy all pseudopotentials to a directory and set the 
`DACAPOPATH` environment variable to this directory:: 

    cp psp/*/*/*.pseudo /some/directory/
    setenv DACAPOPATH /some/directory/


dacapo python interface
-----------------------

1) Get the latest version of the dacapo python interface.

   a) From tar file_ 

   b) cvs: 
       cvs checkout dacapo/Python

   c) RPM
       There are two rpms: src_ and noarch_ 

.. _src: ../download//Dacapo-python-0.6-1.src.rpm
.. _noarch: ../download/Dacapo-python-0.6-1.noarch.rpm
.. _file: ../download/Dacapo-python-0.6.tar.gz


2) for case a and b go to the ``dacapo/Python`` directory::

       [home] $ cd dacapo/Python

3) and install with the standard setup.py script (if you have root permission)::

       [Python] $ python setup.py install

   If you do not have root permission use:: 

       [Python] $ python setup.py install  --prefix=/some/where/in/your/path

   In this latter case you must set your ``PYTHONPATH`` environment variable, 
   as directed by the setup.py script. 

4) Alternative to step 3 simply set the ``PYTHONPATH`` environment variable to 
   your cvs directory. 


----------
CVS access 
----------

You can access the code from CVS. 
See the `Campos CVS Page`_.

After the CVS login, get the dacapo fortran source using: 

      cvs -d :pserver:USERID@cvs.fysik.dtu.dk:/home/camp/CVSROOT checkout dacapo/src

Get the pseudopotentials using: 

      cvs -d :pserver:USERID@cvs.fysik.dtu.dk:/home/camp/CVSROOT checkout dacapo/psp

Get the Python interface using: 

      cvs -d :pserver:USERID@cvs.fysik.dtu.dk:/home/camp/CVSROOT checkout dacapo/Python


.. _Campos CVS Page: http://www.fysik.dtu.dk/campos/ASE/cvs.html

