← Back to list

Simulating La₁₋ₓSrₓMnO₃ Superconductor with LAMMPS: Doping Effects and Material Analysis

La₁₋ₓSrₓMnO₃ (LSMO) is a fascinating material, known for its superconducting and magnetic properties. In this project, I use LAMMPS…

Pratik Bhanuse · 2025-05-02 18:21 · 0 claps · 3.1 min read
#materials #physics #computational-physics #lammps #python
Open on Medium ↗
Wiki topics: ⚛️ · Physics

Simulating La₁₋ₓSrₓMnO₃ Superconductor with LAMMPS: Doping Effects and Material Analysis

La₁₋ₓSrₓMnO₃ (LSMO) is a fascinating material, known for its superconducting and magnetic properties. In this project, I use LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator) to simulate the synthesis of LSMO with different doping levels of Sr, replacing La in the crystal structure. Through this, I investigate the material’s structural changes, X-ray diffraction (XRD) patterns, composition, and density as a function of doping levels.

Project Workflow

This project consists of several stages, starting from generating the LSMO structure with Sr doping, to running simulations using LAMMPS, and then analyzing the results through various visualization techniques. Specifically, I focus on XRD pattern generation, composition analysis via pie charts, and density calculation.

Key Features of the Simulation

1. Structure Generation with Sr Doping

To simulate the doping effect, I replace La atoms with Sr atoms in the crystal structure based on a specified doping fraction. The initial structure is built using the pymatgen library, which helps in generating crystal structures for materials.

def generate_lsmo_structure(x=0.3, supercell=(n, n, n)):
    # Generate La₁₋ₓSrₓMnO₃ structure
    ...

2. Running Energy Minimization with LAMMPS

After generating the structure, I export it to a LAMMPS data file and generate a corresponding LAMMPS input script for energy minimization. This minimizes the system’s potential energy to find a stable configuration before proceeding with further analysis.

def run_lammps(input_script="in.lsmo"):
    # Run LAMMPS simulation
    ...

3. XRD Pattern Generation

One of the most important analyses in material science is the X-ray diffraction (XRD), which provides information about the crystal structure. Using pymatgen’s XRDCalculator, I calculate and smooth the XRD pattern for the LAMMPS-minimized structure.

def plot_smoothed_xrd(structure, save_path="xrd_smoothed.png"):
    # Plot XRD pattern and save
    ...

4. Elemental Composition Pie Chart

Another critical aspect of this simulation is understanding the elemental composition of the material after doping. Using Python’s Counter class, I calculate the number of each type of atom in the structure and visualize it as a pie chart.

def plot_composition(structure, save_path="composition_pie.png"):
    # Create pie chart of composition
    ...

5. Density Calculation

The density of the material is another important property. The pymatgen Structure object has a built-in method to calculate the density, which I print to provide insights into how doping affects the overall density of the material.

def print_density(structure):
    # Print material density
    ...

6. Full Analysis Pipeline

The entire process is automated in the run_analysis() function, which generates the structure, runs the LAMMPS simulation, and performs all the analyses. The results are saved as high-quality images (XRD plot, composition pie chart) for further use.

def run_analysis():
    struct = generate_lsmo_structure(x=0.3)
    ...

Results and Outputs

After running the above code, the results are provided in the following forms:

  1. XRD Plot: A smoothened XRD pattern showing the diffraction behavior of the synthesized LSMO material.
  2. Elemental Composition Pie Chart: A pie chart visualizing the distribution of La, Sr, Mn, and O atoms in the doped LSMO structure.
  3. Density: The calculated density of the doped LSMO material.

Visualization Outputs

  • XRD Pattern: Shows the crystal structure and helps analyze phase purity, lattice constants, etc.
  • Composition Pie Chart: Provides insights into the elemental distribution after doping.
  • Density: Offers insights into how doping influences the material’s overall density.

Code Repository

All code for this project is available in a GitHub repository, which you can easily clone and run to reproduce the results. The repository includes the following files:

  1. lsmo.py: The main Python script to generate the LSMO structure, run the LAMMPS simulation, and analyze the results.
  2. requirements.txt: List of Python dependencies (e.g., pymatgen, matplotlib, scipy).
  3. LAMMPS input files: LAMMPS input script for energy minimization.

To run the project, follow these steps:

Clone the repository:

git clone https://github.com/Pratikbhanuse/LSMO-Synthesis-Computationally.git lsmo_simulation
cd lsmo_simulationInstall the required dependencies:

Install Python dependencies:

pip install -r requirements.txt

Run the simulation and analysis:

python lsmo.py

The plots (XRD, composition, etc.) will be saved in the working directory as .png files.

Conclusion

This project provides a detailed methodology for simulating La₁₋ₓSrₓMnO₃ with Sr doping using LAMMPS. By analyzing the XRD patterns, composition, and density of the synthesized material, we gain valuable insights into how doping affects its structural and physical properties. This simulation framework can be extended to other materials and doping variations, providing a useful tool for computational material scientists.

Feel free to contribute to the project or modify it for your own simulations. Happy coding and simulating!

Notes

  • Adjust the cloning and repository URLs in the post when you’re ready to share the actual repo link.
  • The content can be expanded with additional visualizations or findings from further experiments.

메타데이터
post_id
e514ed48adc8
slug
simulating-la₁-ₓsrₓmno₃-superconductor-with-lammps-doping-effects-and-material-analysis-e514ed48adc8
url
https://medium.com/@pratiksletters/simulating-la%E2%82%81-%E2%82%93sr%E2%82%93mno%E2%82%83-superconductor-with-lammps-doping-effects-and-material-analysis-e514ed48adc8
canonical_url
https://medium.com/@pratiksletters/simulating-la%E2%82%81-%E2%82%93sr%E2%82%93mno%E2%82%83-superconductor-with-lammps-doping-effects-and-material-analysis-e514ed48adc8
author_url
https://medium.com/@pratiksletters
status
ok
fetched_at
2026-07-20 02:25:49