Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/superstar54/xaims


https://github.com/superstar54/xaims

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

=xaims= is an extension module for ase.calculators.aims. Its primary purpose is smarter restarting capability, and job management/workflow, but it also has some enhanced capability too.

1. xaims automatically changes into the calculation directory to run jobs, and automatically changes back out when it is done.
2. xaims automatically submits jobs to the queue, and supports parallel and multiprocessing jobs.
3. xaims supports a lot more data extraction than ase.calculators.aims.

xaims requires python 2.6+ to work, and the latest svn version of ase.

* Installing xaims
** stable
2. Installation requirement:
You need to install FHI-aims
and ASE

Make sure you can run FHI-aims from the command line, make sure the ase tests pass.

Python modules that xaims depends on:
ase
numpy
matplotlib

Optional:
scipy (for thermodynamics)

3. Installation :

** Configuring xaims
Create an executable script named runaims.py on your executable path. This script is typically located in $HOME/bin

The script simply needs to run your aims executable in the current directory.
Here is an example file that chooses between serial and parallel executables depending on environment variables that are present in the TORQUE queue system:

#+BEGIN_SRC python
#!/usr/bin/env python
import os

serial_aims = '/home/xingwang/src/aims/bin/aims_serial_intel_mkl'
parallel_aims = '/home/xingwang/src/aims/bin/aims_openmpi_intel_mkl'

if 'PBS_NODEFILE' in os.environ:
NPROCS = len(open(os.environ['PBS_NODEFILE']).readlines())

if NPROCS == 1:
print 'NPROCS = ',NPROCS
exitcode = os.system(serial_aims)
else:
print 'NPROCS = ',NPROCS
parcmd = 'mpirun -np %i %s' % (NPROCS,parallel_aims)
exitcode = os.system(parcmd)
else:
exitcode = os.system(serial_aims)
#end
#+END_SRC

Add to your $HOME/.bashrc these commands:

#+BEGIN_SRC sh
export AIMS_SCRIPT=/your path to runaims.py/runaims.py # example $HOME/bin/runaims.py

#+END_SRC

Create $HOME/.xaimsrc file. This hidden file contains the following informtation:

#+BEGIN_EXAMPLE
# xaims configuration file
# adjust these for the your system
aims.executable.serial = /opt/xingwang/aims-5.2.12/build/bin/aims-vtst
aims.executable.parallel = /home/xingwang/src/aims/bin/aims_openmpi_intel_mkl

user.name = xingwang
user.email = [email protected]

mode = queue # run|queue|None

multiprocessing.cores_per_process = None

# these are only needed if you run in a queue
queue.command = qsub
queue.options = -joe
queue.walltime = 168:00:00
queue.nodes = 1
queue.ppn = 1
queue.mem = 2GB
queue.jobname = None
#+END_EXAMPLE

* Uninstalling xaims
#+BEGIN_SRC sh
pip uninstall xaims
#+END_SRC

* Long-term plans for Xaims

* Files

[[./__init__.py]] - just imports everything from xaims

[[./xaims.py]]
Contains the xaims class and xaims context manager. Code to see if calculation finished ok. Code to see if you are in a aims directory. Is also an executable script that runs xaims

[[./xaimsrc.py]] - configuration for xaims

[[./xaims_extensions.py]] - monkey patches to ase.calculators.aims, hook functions, run and calculate function, pretty print functions. some additional get functions.