ai2_kit.domain.vasp module#

class ai2_kit.domain.vasp.CllVaspContext(path_prefix: str, resource_manager: ai2_kit.core.resource_manager.ResourceManager, config: ai2_kit.domain.vasp.CllVaspContextConfig)[source]#

Bases: BaseCllContext

config: CllVaspContextConfig#
pydantic model ai2_kit.domain.vasp.CllVaspContextConfig[source]#

Bases: BaseModel

Show JSON schema
{
   "title": "CllVaspContextConfig",
   "type": "object",
   "properties": {
      "script_template": {
         "$ref": "#/$defs/BashTemplate"
      },
      "vasp_cmd": {
         "default": "vasp_std",
         "title": "Vasp Cmd",
         "type": "string"
      },
      "post_vasp_cmd": {
         "default": "echo \"no post_vasp_cmd\"",
         "title": "Post Vasp Cmd",
         "type": "string"
      },
      "concurrency": {
         "default": 5,
         "title": "Concurrency",
         "type": "integer"
      }
   },
   "$defs": {
      "BashTemplate": {
         "additionalProperties": false,
         "properties": {
            "shebang": {
               "default": "#!/bin/bash",
               "title": "Shebang",
               "type": "string"
            },
            "header": {
               "default": "",
               "title": "Header",
               "type": "string"
            },
            "setup": {
               "default": "",
               "title": "Setup",
               "type": "string"
            },
            "teardown": {
               "default": "",
               "title": "Teardown",
               "type": "string"
            }
         },
         "title": "BashTemplate",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "script_template"
   ]
}

Config:
  • extra: str = forbid

Fields:
field concurrency: int = 5#
field post_vasp_cmd: str = 'echo "no post_vasp_cmd"'#
field script_template: BashTemplate [Required]#
field vasp_cmd: str = 'vasp_std'#
class ai2_kit.domain.vasp.CllVaspInput(config: ai2_kit.domain.vasp.CllVaspInputConfig, system_files: List[ai2_kit.core.artifact.Artifact], type_map: List[str], initiated: bool = False)[source]#

Bases: object

config: CllVaspInputConfig#
initiated: bool = False#
system_files: List[Artifact]#
type_map: List[str]#
pydantic model ai2_kit.domain.vasp.CllVaspInputConfig[source]#

Bases: BaseModel

Show JSON schema
{
   "title": "CllVaspInputConfig",
   "type": "object",
   "properties": {
      "init_system_files": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Init System Files",
         "type": "array"
      },
      "input_template": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Input Template"
      },
      "potcar_source": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": {},
         "title": "Potcar Source"
      },
      "kpoints_template": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Kpoints Template"
      },
      "limit": {
         "default": 50,
         "title": "Limit",
         "type": "integer"
      },
      "limit_method": {
         "default": "even",
         "enum": [
            "even",
            "random",
            "truncate"
         ],
         "title": "Limit Method",
         "type": "string"
      },
      "ignore_error": {
         "default": false,
         "title": "Ignore Error",
         "type": "boolean"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
field ignore_error: bool = False#

Ignore error when running VASP.

field init_system_files: List[str] = []#
field input_template: dict | str | None = None#

INCAR template for VASP. Could be a dict or content of a VASP input file.

field kpoints_template: dict | str | None = None#

KPOINTS template for VASP. Could be a dict or content of a VASP input file.

field limit: int = 50#

Limit of the number of systems to be labeled.

field limit_method: Literal['even', 'random', 'truncate'] = 'even'#
field potcar_source: dict | None = {}#

POTCAR source for VASP. Could be a dict or list of paths.

class ai2_kit.domain.vasp.GenericVaspOutput(vasp_outputs: List[ai2_kit.core.artifact.Artifact])[source]#

Bases: ICllLabelOutput

get_labeled_system_dataset()[source]#
vasp_outputs: List[Artifact]#
async ai2_kit.domain.vasp.cll_vasp(input: CllVaspInput, ctx: CllVaspContext) GenericVaspOutput[source]#
ai2_kit.domain.vasp.make_vasp_task_dirs(system_files: List[ArtifactDict], type_map: List[str], input_template: dict | str | None, potcar_source: dict | None, base_dir: str, kpoints_template: dict | str | None = None, limit: int = 0, limit_method: Literal['even', 'random', 'truncate'] = 'even') List[ArtifactDict][source]#

Generate VASP input files from LAMMPS dump files or XYZ files.