Header Ads Widget

Ab initio Calculations Using Q-Espresso Code

Last Posts

10/recent/ticker-posts

How to download and install the Atomic Simulation Environment ASE

 

ASE is a set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations.

 To install ASE we need to install package manager conda 

Installing the conda package manager

To install the library we need to install the anaconda which includes conda package manager, python3.9 version and Jupyter Notebook used for scientific computing and data science.

 

* Download Anaconda installer for Linux.

 * Verify your installer hashes 

sha256sum Anaconda3-2021.11-Linux-x86_64.sh

* .Run 

/abinitio> chmod +x Anaconda3-2021.11-Linux-x86_64.sh
/abinitio> ./Anaconda3-2021.11-Linux-x86_64.sh

accept the default choices

We get the following

==> For changes to take effect, close and re-open your current shell. <==

If you'd prefer that conda's base environment not be activated on startup,
set the auto_activate_base parameter to false:

conda config --set auto_activate_base false

Thank you for installing Anaconda3!

===========================================================================

Working with Python and Jupyter notebooks is a breeze with PyCharm Pro,
designed to be used with Anaconda. Download now and have the best data
tools at your fingertips.

PyCharm Pro for Anaconda is available at: https://www.anaconda.com/pycharm


* Source the ~/.bashrc file

source ~/.bashrc

 

How to avoid conda to activate base environment?

By default conda init will add to your .bashrc file for the base environment, which will slow down your terminal.

You can remove them in your .bashrc file or answer no to that question in the last step of your anaconda installation.

And then add the following to your .bashrc file. If you changed the default installation directory, change ~/anaconda3/ to that directory.

source ~/anaconda3/etc/profile.d/conda.sh
if [[ -z ${CONDA_PREFIX+x} ]]; then
    export PATH="~/conda/bin:$PATH"
fi

To test it, open a new terminal tab or run source .bashrc. Run conda activate base, then you should see (base) in front of your Bash prompt.

Now you can create another environment and activate it using Anaconda. If you frequently use one environment, you can also add conda activate [env] to your .bashrc file.

 

NB: You can install miniconda packae which is  a minimal free Conda installer. It’s a thin, bootstrap version that contains just conda, Python, the packages they depend on, and a limited range of other helpful modules like pip, zlib, and a few others. 


Installing the  ASE

 Update conda

vasp-ase-tutorials> conda update -n base -c defaults conda


Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/algerien1970/anaconda3

  added / updated specs:
    - conda


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-4.13.0               |   py39h06a4308_0         895 KB
    conda-pack-0.7.0           |     pyh6c4a22f_0          30 KB  conda-forge
    conda-package-handling-1.8.1|   py39h7f8727e_0         889 KB
    pyjwt-2.4.0                |   py39h06a4308_0          34 KB
    xmltodict-0.13.0           |     pyhd8ed1ab_0          13 KB  conda-forge
    ------------------------------------------------------------
                                           Total:         1.8 MB

The following packages will be UPDATED:

  conda                               4.10.3-py39h06a4308_0 --> 4.13.0-py39h06a4308_0
  conda-pack         pkgs/main::conda-pack-0.6.0-pyhd3eb1b~ --> conda-forge::conda-pack-0.7.0-pyh6c4a22f_0
  conda-package-han~                   1.7.3-py39h27cfd23_1 --> 1.8.1-py39h7f8727e_0
  pyjwt                                2.1.0-py39h06a4308_0 --> 2.4.0-py39h06a4308_0
  xmltodict          pkgs/main::xmltodict-0.12.0-pyhd3eb1b~ --> conda-forge::xmltodict-0.13.0-pyhd8ed1ab_0


Proceed ([y]/n)? y


Downloading and Extracting Packages
conda-package-handli | 889 KB    | #################################################################################################################################################### | 100%
conda-4.13.0         | 895 KB    | #################################################################################################################################################### | 100%
xmltodict-0.13.0     | 13 KB     | #################################################################################################################################################### | 100%
pyjwt-2.4.0          | 34 KB     | #################################################################################################################################################### | 100%
conda-pack-0.7.0     | 30 KB     | #################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done


Create a virtual enironment independent from the root environment and name it ase

/vasp-ase-tutorials/mg-hcp> conda create --name ase    

               
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/algerien1970/anaconda3/envs/ase



Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate ase
#
# To deactivate an active environment, use
#
#     $ conda deactivate


Activate ase environment

/vasp-ase-tutorials/mg-hcp> conda activate ase
(ase) algerien1970@linux-kq57:~/abinitio/vasp-ase-tutorials>

 

Install ase package: conda will install all the necessary packages for the working of ASE interface

(ase) algerien1970/vasp-ase-tutorials> conda install -c conda-forge ase

 

Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/algerien1970/anaconda3/envs/ase

  added / updated specs:
    - ase


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pillow-9.2.0               |  py310hace64e9_1         1.2 MB
    ------------------------------------------------------------
                                           Total:         1.2 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
  _openmp_mutex      conda-forge/linux-64::_openmp_mutex-4.5-2_gnu
  ase                conda-forge/noarch::ase-3.22.1-pyhd8ed1ab_1
  brotli             conda-forge/linux-64::brotli-1.0.9-h166bdaf_7
  brotli-bin         conda-forge/linux-64::brotli-bin-1.0.9-h166bdaf_7
  bzip2              conda-forge/linux-64::bzip2-1.0.8-h7f98852_4
  ca-certificates    conda-forge/linux-64::ca-certificates-2022.6.15-ha878542_0
  certifi            conda-forge/linux-64::certifi-2022.6.15-py310hff52083_0
  click              conda-forge/linux-64::click-8.1.3-py310hff52083_0
  cycler             conda-forge/noarch::cycler-0.11.0-pyhd8ed1ab_0
  flask              conda-forge/noarch::flask-2.1.3-pyhd8ed1ab_0
  fonttools          conda-forge/linux-64::fonttools-4.34.4-py310h5764c6d_0
  freetype           pkgs/main/linux-64::freetype-2.11.0-h70c0345_0
  giflib             conda-forge/linux-64::giflib-5.2.1-h36c2ea0_2
  importlib-metadata conda-forge/linux-64::importlib-metadata-4.11.4-py310hff52083_0
  itsdangerous       conda-forge/noarch::itsdangerous-2.1.2-pyhd8ed1ab_0
  jinja2             conda-forge/noarch::jinja2-3.1.2-pyhd8ed1ab_1
  jpeg               conda-forge/linux-64::jpeg-9e-h166bdaf_2
  kiwisolver         conda-forge/linux-64::kiwisolver-1.4.4-py310hbf28c38_0
  lcms2              conda-forge/linux-64::lcms2-2.12-hddcbb42_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
  lerc               conda-forge/linux-64::lerc-3.0-h9c3ff4c_0
  libblas            conda-forge/linux-64::libblas-3.9.0-15_linux64_openblas
  libbrotlicommon    conda-forge/linux-64::libbrotlicommon-1.0.9-h166bdaf_7
  libbrotlidec       conda-forge/linux-64::libbrotlidec-1.0.9-h166bdaf_7
  libbrotlienc       conda-forge/linux-64::libbrotlienc-1.0.9-h166bdaf_7
  libcblas           conda-forge/linux-64::libcblas-3.9.0-15_linux64_openblas
  libdeflate         conda-forge/linux-64::libdeflate-1.12-h166bdaf_0
  libffi             conda-forge/linux-64::libffi-3.4.2-h7f98852_5
  libgcc-ng          conda-forge/linux-64::libgcc-ng-12.1.0-h8d9b700_16
  libgfortran-ng     conda-forge/linux-64::libgfortran-ng-12.1.0-h69a702a_16
  libgfortran5       conda-forge/linux-64::libgfortran5-12.1.0-hdcd56e2_16
  libgomp            conda-forge/linux-64::libgomp-12.1.0-h8d9b700_16
  liblapack          conda-forge/linux-64::liblapack-3.9.0-15_linux64_openblas
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
  libopenblas        conda-forge/linux-64::libopenblas-0.3.20-pthreads_h78a6416_0
  libpng             conda-forge/linux-64::libpng-1.6.37-h753d276_3
  libstdcxx-ng       conda-forge/linux-64::libstdcxx-ng-12.1.0-ha89aaad_16
  libtiff            conda-forge/linux-64::libtiff-4.4.0-hc85c160_1
  libuuid            conda-forge/linux-64::libuuid-2.32.1-h7f98852_1000
  libwebp            conda-forge/linux-64::libwebp-1.2.2-h3452ae3_0
  libwebp-base       conda-forge/linux-64::libwebp-base-1.2.2-h7f98852_1
  libzlib            conda-forge/linux-64::libzlib-1.2.12-h166bdaf_2
  lz4-c              conda-forge/linux-64::lz4-c-1.9.3-h9c3ff4c_1
  markupsafe         conda-forge/linux-64::markupsafe-2.1.1-py310h5764c6d_1
  matplotlib-base    conda-forge/linux-64::matplotlib-base-3.5.2-py310h5701ce4_0
  munkres            conda-forge/noarch::munkres-1.1.4-pyh9f0ad1d_0
  ncurses            conda-forge/linux-64::ncurses-6.3-h27087fc_1
  numpy              conda-forge/linux-64::numpy-1.23.1-py310h53a5b5f_0
  openssl            conda-forge/linux-64::openssl-3.0.5-h166bdaf_0
  packaging          conda-forge/noarch::packaging-21.3-pyhd8ed1ab_0
  pillow             pkgs/main/linux-64::pillow-9.2.0-py310hace64e9_1
  pip                conda-forge/noarch::pip-22.1.2-pyhd8ed1ab_0
  pyparsing          conda-forge/noarch::pyparsing-3.0.9-pyhd8ed1ab_0
  python             conda-forge/linux-64::python-3.10.5-ha86cf86_0_cpython
  python-dateutil    conda-forge/noarch::python-dateutil-2.8.2-pyhd8ed1ab_0
  python_abi         conda-forge/linux-64::python_abi-3.10-2_cp310
  readline           conda-forge/linux-64::readline-8.1.2-h0f457ee_0
  scipy              conda-forge/linux-64::scipy-1.8.1-py310h7612f91_0
  setuptools         conda-forge/linux-64::setuptools-63.2.0-py310hff52083_0
  six                conda-forge/noarch::six-1.16.0-pyh6c4a22f_0
  sqlite             conda-forge/linux-64::sqlite-3.39.1-h4ff8645_0
  tk                 conda-forge/linux-64::tk-8.6.12-h27826a3_0
  tzdata             conda-forge/noarch::tzdata-2022a-h191b570_0
  unicodedata2       conda-forge/linux-64::unicodedata2-14.0.0-py310h5764c6d_1
  werkzeug           conda-forge/noarch::werkzeug-2.1.2-pyhd8ed1ab_1
  wheel              conda-forge/noarch::wheel-0.37.1-pyhd8ed1ab_0
  xz                 conda-forge/linux-64::xz-5.2.5-h516909a_1
  zipp               conda-forge/noarch::zipp-3.8.0-pyhd8ed1ab_0
  zlib               conda-forge/linux-64::zlib-1.2.12-h166bdaf_2
  zstd               conda-forge/linux-64::zstd-1.5.2-h8a70e8d_2


Proceed ([y]/n)? y


Downloading and Extracting Packages
pillow-9.2.0         | 1.2 MB    | #################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done

Post a Comment

0 Comments