supercell icon indicating copy to clipboard operation
supercell copied to clipboard

[WIP] Add script for automating delithiated LiFePO4 structure generation

Open Copilot opened this issue 3 months ago • 0 comments

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Problem Statement

Create a script that automates the generation of delithiated Li₁₋₋ₓFePO₄ structures using the supercell program.

Requirements

The script should:

  1. Input: Accept a CIF file containing LiFePO₄ structure
  2. Supercell Generation: Create supercells of two types:
    • 1x2x1 (expansion along b-axis)
    • 1x1x2 (expansion along c-axis)
  3. Delithiation: Generate Li₁₋ₓFePO₄ structures by removing Li atoms at various concentrations (x values)
  4. Output: Produce CIF files for each delithiated structure using the supercell program

Implementation Details

The script should:

  • Use the supercell program's capabilities for creating supercells and generating derivative structures
  • Support multiple delithiation levels (e.g., x = 0.25, 0.5, 0.75, 1.0)
  • Generate all symmetrically unique configurations for each composition
  • Name output files systematically (e.g., LiFePO4_1x2x1_Li0.75FePO4_config1.cif)
  • Provide clear usage instructions and command-line options

Suggested Approach

  1. Parse the input CIF file
  2. Use supercell program to create the specified supercell (1x2x1 or 1x1x2)
  3. Use supercell's charge balancing or substitution features to remove Li atoms
  4. Generate all unique configurations for each composition
  5. Output results with descriptive filenames

Language

The script can be written in Python, bash, or another appropriate scripting language that can interface with the supercell program.

Testing

Include example usage with a sample LiFePO₄ CIF file if possible, or provide clear documentation on how to test the script.

This pull request was created as a result of the following prompt from Copilot chat.

Problem Statement

Create a script that automates the generation of delithiated Li₁₋₋ₓFePO₄ structures using the supercell program.

Requirements

The script should:

  1. Input: Accept a CIF file containing LiFePO₄ structure
  2. Supercell Generation: Create supercells of two types:
    • 1x2x1 (expansion along b-axis)
    • 1x1x2 (expansion along c-axis)
  3. Delithiation: Generate Li₁₋ₓFePO₄ structures by removing Li atoms at various concentrations (x values)
  4. Output: Produce CIF files for each delithiated structure using the supercell program

Implementation Details

The script should:

  • Use the supercell program's capabilities for creating supercells and generating derivative structures
  • Support multiple delithiation levels (e.g., x = 0.25, 0.5, 0.75, 1.0)
  • Generate all symmetrically unique configurations for each composition
  • Name output files systematically (e.g., LiFePO4_1x2x1_Li0.75FePO4_config1.cif)
  • Provide clear usage instructions and command-line options

Suggested Approach

  1. Parse the input CIF file
  2. Use supercell program to create the specified supercell (1x2x1 or 1x1x2)
  3. Use supercell's charge balancing or substitution features to remove Li atoms
  4. Generate all unique configurations for each composition
  5. Output results with descriptive filenames

Language

The script can be written in Python, bash, or another appropriate scripting language that can interface with the supercell program.

Testing

Include example usage with a sample LiFePO₄ CIF file if possible, or provide clear documentation on how to test the script.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Nov 18 '25 13:11 Copilot