abacus-stru

Generate and correct ABACUS STRU files specifying lattices, atoms, magnetism, and coordinates.

27|6|Updated Jan 18, 2023
One-click install
npx skills add https://github.com/pxlxingliang/abacus-test --skill abacus-stru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abacus-stru
Source: https://github.com/pxlxingliang/abacus-test/tree/main/skills/abacus-stru
Command: npx skills add https://github.com/pxlxingliang/abacus-test --skill abacus-stru

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The abacus-stru skill helps you write and troubleshoot ABACUS STRU structure files when lattice vectors, atomic blocks, magnetism, or coordinate types are incorrect and cause ABACUS errors or wrong physics.

Core Features & Use Cases

  • STRU section authoring and validation: Build STRU files with the correct required sections (ATOMIC_SPECIES, LATTICE_CONSTANT, LATTICE_VECTORS or latname-driven lattices, ATOMIC_POSITIONS, and optional NUMERICAL_ORBITAL).
  • Coordinate-system correctness: Choose and apply the right ATOMIC_POSITIONS coordinate type (Direct, Cartesian variants, Bohr/Angstrom conventions) to ensure positions are interpreted correctly.
  • Magnetism and constraints control: Add collinear/non-collinear magnetic moments, movement constraints for relaxation, and optional velocities for MD workflows.
  • Common format error recovery: Fix frequent issues like element label mismatches, missing orbital blocks for LCAO, conflicting latname vs LATTICE_VECTORS, and incorrect coordinate type usage.

Quick Start

Ask: “Using the structure I provide, generate a valid ABACUS STRU with correct ATOMIC_SPECIES, lattice settings, Direct coordinates, and I want Fe atoms to have specified magnetic moments and movement constraints for relaxation.”

Frequently Asked Questions about abacus-stru

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a valid ABACUS STRU file with correct lattice and atomic position settings?

To create an ABACUS STRU file, you specify required sections including ATOMIC_SPECIES, LATTICE_CONSTANT, LATTICE_VECTORS or latname, and ATOMIC_POSITIONS. The structure generator validates coordinate conventions and section mappings to prevent interpretation errors.

Why does ABACUS throw a coordinate-type mismatch error when reading my crystal structure file?

Coordinate-type mismatches in ABACUS occur when the ATOMIC_POSITIONS coordinate type (Direct or Cartesian) does not align with the provided atomic coordinates. The STRU file corrector identifies and fixes these convention errors to ensure positions are interpreted accurately.

Can I add magnetic moments and movement constraints to an ABACUS STRU file for relaxation?

Yes, you can add collinear or non-collinear magnetic moments and movement constraints to an ABACUS STRU file. This applies to relaxation workflows by specifying magnetism and constraint syntax within the ATOMIC_POSITIONS block for targeted atoms.

What is the difference between using latname and LATTICE_VECTORS in an ABACUS structure file?

Using latname drives lattice generation by predefined lattice types, while LATTICE_VECTORS explicitly defines the lattice geometry. Conflicts between the two cause ABACUS errors, so the STRU validator checks for and resolves these incompatible settings.

How do I fix missing element label or orbital block errors in an ABACUS LCAO calculation?

Missing orbital blocks or element label mismatches in ABACUS LCAO calculations stem from incorrect ATOMIC_SPECIES or NUMERICAL_ORBITAL sections. The STRU error recovery feature aligns element labels and inserts required orbital blocks for LCAO.

Does the ABACUS STRU format support Bohr and Angstrom conventions for Cartesian atomic coordinates?

Yes, the ABACUS STRU format supports Cartesian atomic coordinates using both Bohr and Angstrom conventions. The generator applies the correct coordinate type and unit convention to ensure your ATOMIC_POSITIONS are interpreted without scaling errors.