# ase-abacus **Repository Path**: wang-tx_1_0/ase-abacus ## Basic Information - **Project Name**: ase-abacus - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-20 - **Last Updated**: 2026-03-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ============ ASE-ABACUS ============ Introduction ============ ASE is a set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations. Webpage: http://wiki.fysik.dtu.dk/ase Requirements ------------ * Python_ 3.9 or later * NumPy_ (base N-dimensional array package) * SciPy_ (library for scientific computing) * Matplotlib_ (2D Plotting) Optional: * Flask_ (for ase.db web-interface) * spglib_ (for symmetry operations) Installation ============ :: git clone https://gitlab.com/1041176461/ase-abacus.git cd ase-abacus pip install . Environment variables ======================= ABACUS_ supports two types of basis sets: PW, LCAO. The path of pseudopotential and numerical orbital files can be set throught the environment variables ``ABACUS_PP_PATH`` and ``ABACUS_ORBITAL_PATH``, respectively, e.g.:: PP=${HOME}/pseudopotentials ORB=${HOME}/orbitals export ABACUS_PP_PATH=${PP} export ABACUS_ORBITAL_PATH=${ORB} For PW calculations, only ``ABACUS_PP_PATH`` is needed. For LCAO calculations, both ``ABACUS_PP_PATH`` and ``ABACUS_ORBITAL_PATH`` should be set. ABACUS Calculator ================= .. _ABACUS: http://abacus.ustc.edu.cn/ In order to run a calculation, you have to ensure that at least the following parameters are specified, either in the initialization or as environment variables: =============== ==================================================== keyword description =============== ==================================================== ``pp`` dict of pseudopotentials for involved elememts, such as ``pp={'Al':'Al_ONCV_PBE-1.0.upf',...}``. ``pseudo_dir`` directory where the pseudopotential are located, Can also be specified with the ``ABACUS_PP_PATH`` environment variable. Default: ``pseudo_dir=./``. ``basis`` dict of orbital files for involved elememts, such as ``basis={'Al':'Al_gga_10au_100Ry_4s4p1d.orb'}``. It must be set if you want to do LCAO calculations. But for pw calculations, it can be omitted. ``basis_dir`` directory where the orbital files are located, Can also be specified with the ``ABACUS_ORBITAL_PATH`` environment variable. Default: ``basis_dir=./``. ``xc`` which exchange-correlation functional is used. An alternative way to set this parameter is via seting ``dft_functional`` which is an ABACUS parameter used to specify exchange-correlation functional ``kpts`` 1. a tuple (or list) of 3 integers ``kpts=(int, int, int)``, it is interpreted as the dimensions of a Monkhorst-Pack grid, when ``kmode`` is ``Gamma`` or ``MP``. It is interpreted as k-points, when ``kmode`` is ``Direct``, ``Cartesian`` or ``Line``, and ``knumber`` should also be set in these modes to denote the number of k-points. Some other parameters for k-grid settings: including ``koffset`` and ``kspacing``. 2. dict, Parameters of ``cell.bandpath`` and ``ase.calculators.calculator.kpts2sizeandoffsets`` are supported to be keys of the dictionary ``parameters['kpts']``, and k-points will be generated by ASE. =============== ==================================================== For more information on pseudopotentials and numerical orbitals, please visit ABACUS_. The elaboration of input parameters can be found here_. .. _here: https://github.com/deepmodeling/abacus-develop/blob/develop/docs/input-main.md The input parameters can be set like:: calc = Abacus(profile=profile, ntype=1, ecutwfc=100, scf_nmax=100, smearing_method='gaussian', smearing_sigma=0.01, basis_type='pw', ks_solver='cg', calculation='scf' pp=pp, basis=basis, kpts=kpts) The command to run jobs can be set by specifying ``AbacusProfile``:: # load ASE-ABACUS from ase.calculators.abacus import AbacusProfile # for OpenMP setting import os os.environ("OMP_NUM_THREADS") = 16 # for ABACUS Profile abacus = '/usr/local/bin/abacus' profile = AbacusProfile(argv=f'mpirun -n 2 {abacus}') # directly the command for running ABACUS in which ``abacus`` sets the absolute path of the ``abacus`` executable. One can also export ``abacus`` to $PATH and use it. MD Analysis ================= After molecular dynamics calculations, the log file 'running_md.log' can be read. If the 'STRU_MD_*' files are not continuous (e.g. 'STRU_MD_0', 'STRU_MD_5', 'STRU_MD_10'...), the index parameter of read should be as a slice object. For example, when using the command ``read('running_md.log', index=slice(0, 15, 5), format='abacus-out')`` to parse 'running_md.log', 'STRU_MD_0', 'STRU_MD_5' and 'STRU_MD_10' will be read. The 'MD_dump' file is also supported to be read-in by ``read('MD_dump', format='abacus-md')'`` SPAP Analysis ================= SPAP_ (Structure Prototype Analysis Package) is written by Dr. Chuanxun Su to analyze symmetry and compare similarity of large amount of atomic structures. The coordination characterization function (CCF) is used to measure structural similarity. An unique and advanced clustering method is developed to automatically classify structures into groups. .. _SPAP: https://github.com/chuanxun/StructurePrototypeAnalysisPackage If you use this program and method in your research, please read and cite the publication: **Su C, Lv J, Li Q, Wang H, Zhang L, Wang Y, Ma Y. Construction of crystal structure prototype database: methods and applications. J Phys Condens Matter. 2017 Apr 26;29(16):165901.** and you should install it first with command ``pip install spap``.