abacustest-stru-class

Read and write ABACUS STRU files using AbacusSTRU and AbacusATOM classes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Editing ABACUS structure (STRU) files by hand is error-prone and slow, especially when you need batch conversions, coordinate/constraint updates, or consistent magnetic moment setup.

Core Features & Use Cases

  • Read/write ABACUS structures in Python using the AbacusSTRU and AbacusATOM classes for reliable STRU I/O.
  • Convert between formats (STRU, POSCAR, CIF/ASE, and more) to integrate existing materials workflows into ABACUS.
  • Modify structures programmatically for common tasks such as fixing atoms in slab relaxations, setting collinear/non-collinear magnetic moments, and building supercells for systematic studies.
  • Batch operations and safety in structure logic including supercell replication that preserves per-atom properties, and coordinate/cell manipulations in consistent units.

Quick Start

Use the abacustest-stru-class skill to read a STRU file, update magnetic moments for selected atoms in code, and write out a new STRU file.

Frequently Asked Questions about abacustest-stru-class

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

FAQPage Schema
How do I convert a POSCAR or CIF file into an ABACUS STRU file?

Batch perturbing an ABACUS structure involves using the AbacusSTRU class to programmatically apply structural modifications. This approach ensures consistent unit-aware coordinate handling and preserves per-atom properties across multiple perturbed configurations.

How do I set collinear and non-collinear magnetic moments in an ABACUS STRU file?

You can set collinear or non-collinear magnetic moments in an ABACUS STRU file by programmatically updating per-atom properties using the AbacusATOM class. This allows precise control over magnetic configurations for downstream ABACUS workflows.

Can I generate a supercell for ABACUS while preserving per-atom constraints like move flags?

Generating an ABACUS supercell preserves per-atom properties like move flags and velocities when using the programmatic structure editing capabilities. This ensures supercell replication maintains all original constraints required for relaxations.

What is the best way to fix specific atomic layers in an ABACUS slab relaxation?

Fixing specific atomic layers in an ABACUS slab relaxation is best handled by programmatically modifying per-atom move constraints in the STRU file. This allows you to freeze selected slab layers while letting others relax during calculations.

Does programmatic STRU editing support per-atom velocity and pseudopotential assignments?

Programmatic STRU editing supports per-atom property control including velocity, pseudopotential, and orbital assignments via the AbacusATOM class. This enables detailed configuration of individual atom parameters within the structure file.