Plugins: Difference between revisions

From VASP Wiki
No edit summary
Line 2: Line 2:


==Installation==
==Installation==
* Create a new [https://conda.io/projects/conda/en/latest/user-guide/getting-started.html conda] environment.
Create a new [https://conda.io/projects/conda/en/latest/user-guide/getting-started.html conda] environment.
     conda create -n vasp_plugin python=3.10
     conda create -n vasp_plugin python=3.10
* Enter the create <code>vasp_plugin</code> conda environment
Enter the create <code>vasp_plugin</code> conda environment
     conda activate vasp_plugin
     conda activate vasp_plugin
* Navigate to the <code>plugins</code> directory within VASP source code,
Navigate to the <code>plugins</code> directory within VASP source code,
     cd </path/to/vasp/source/code>/src/plugins
     cd </path/to/vasp/source/code>/src/plugins
* Install the VASP Python package through [https://pip.pypa.io/en/stable/installation pip]
Install the VASP Python package through [https://pip.pypa.io/en/stable/installation pip]
     pip install .
     pip install .

Revision as of 08:28, 11 June 2024

Implementing features over VASP carries a somewhat significant overhead, both in term of code development and maintenance. An alternative approach is to use our Plugin infrastructure. Simply write Python functions in a pre-defined format and VASP will recognize and execute your code while it is running. This page describes the steps that you will need to write your first Python script and link it with VASP.

Installation

Create a new conda environment.

   conda create -n vasp_plugin python=3.10

Enter the create vasp_plugin conda environment

   conda activate vasp_plugin

Navigate to the plugins directory within VASP source code,

   cd </path/to/vasp/source/code>/src/plugins

Install the VASP Python package through pip

   pip install .