Package: aiida-project
AiiDA-ProjectTool for managing AiiDA "projects" - Python environments tailored to AiiDA with separated project directories.❗️ This package is still in the early stages of development and we will most likely break the API regularly in new 0.X versions. Be sure to pin the version when installing this package in scripts.InstallationThe package can be installed globally withpipx:pipx install aiida-projectinstalled package aiida-project 0.4.0, installed using Python 3.9.16These apps are now globally available- aiida-projectdone! ✨ 🌟 ✨See thepipxinstallation instructionsif you haven't already installedpipx.UsageAfter installingaiida-project, run theinitcommand to get started:aiida-project init👋 Hello there! Which shell are you using? [bash/zsh/fish] (zsh):✨🚀 AiiDA-project has been initialised! 🚀✨Info: For the changes to take effect, run the following command:source /Users/mbercx/.zshrcor simply open a new terminal.This will also add thecdafunction to your shell startup file, so you can easily switch projects.
Note that you'll have to source your e.g..zshrcfile for this function to be accessible!createAfter initialising, you can create new projects with their own virtual environment and project directory using thecreatecommand.
The latest version ofaiida-corewill also be installed automatically, along with any plugins you specify with the--pluginoption:aiida-project create firstproject --plugin aiida-quantumespresso✨ Creating the project directory and environment using the Python binary:/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/bin/python3.11🔧 Adding the AiiDA environment variables to the activate script.✅ Success: Project created.💾 Installing the latest release of the AiiDA core module.💾 Installing `aiida-quantumespresso` from the PyPI.You can then activate the project using thecdacommand described above:cda firstprojectNext to activating the Python virtual environment, this will also change the directory to the one for the project.aiida-projectautomatically sets up a directory structure, which we intend to be made configurable globally:(firstproject)~/project/firstproject$ tree -a.├── .aiida│   ├── access│   ├── config.json│   └── daemon│       └── log├── code└── setup├── code├── computer└── profile9 directories, 1 fileNote:You may not have thetreecommand installed on your system.destroyProjects can be cleaned up by usingaiida-project destroy.
Firstdeactivatethe environment:deactivate firstprojectNext you can run thedestroycommand:aiida-project destroy firstproject❗️ Are you sure you want to delete the entire firstproject project? This cannot be undone! [y/N]: ySucces: Project with name firstproject has been destroyed.This will remove both the virtual environment, as well as the whole project folder:~/project$ tree -a.└── .aiida_projects├── conda└── virtualenv3 directories, 0 filesOther featuresvirtualenvwrapperintegrationIf you are already usingvirtualenvwrapper, the virtual environments will be installed in the same directory as the one used byvirtualenvwrapper(i.e.$WORKON_HOME).
So you can then also use theaiida@prnmarvelsrv3:~$workonfirstprojectEnvironment configurationAutomatically sets some typical AiiDA UNIX environment variables, like AIIDA_PATH and the shell completion (bash/zshfor now,fishsupport coming soon!):$echo$AIIDA_PATH/Users/mbercx/project/firstprojectFuture goalsFor now it just installs AiiDA and plugins, but in the future we want it to be able to also automatically set up the AiiDA database, repository and default profile.(firstproject)aiida@prnmarvelsrv3:~/project/firstproject$verdistatus✔ version:     AiiDA v2.3.0✔ config:      /home/aiida/project/firstproject/.aiida⏺ profile:     no profile configured yetReport: Configure a profile by running `verdi quicksetup` or `verdi setup`.Projects are pydantic data models, and are stored as JSON in the .aiida_projects directory. Over time it should be possible to completely regenerate a project based on this file, but that’s still a work in progress:(firstproject)aiida@prnmarvelsrv3:~/project/firstproject$cd..(firstproject)aiida@prnmarvelsrv3:~/project$tree-a.aiida_projects/.aiida_projects/├── conda└── virtualenv└── firstproject.json2 directories, 1 file