AnalyticalStructureFactors

AnalyticalStructureFactors.jl: A Julia package for computing static structure factors using analytical solutions for various physical models. Ideal for rapid and precise calculations in condensed matter physics, chemical physics, and materials science.

https://github.com/riperedo/analyticalstructurefactors.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

AnalyticalStructureFactors.jl: A Julia package for computing static structure factors using analytical solutions for various physical models. Ideal for rapid and precise calculations in condensed matter physics, chemical physics, and materials science.

Basic Info
  • Host: GitHub
  • Owner: Riperedo
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Size: 332 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created 10 months ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

AnalyticalStructureFactors.jl

Stable Dev Build Status Coverage Aqua QA

AnalyticalStructureFactors.jl: A Julia package for computing static structure factors $S(q)$ using analytical solutions and well-established approximations for various physical models. Ideal for rapid and precise calculations in condensed matter physics, chemical physics, and materials science.

Features

  • Calculation of $S(q)$ for Monodisperse Systems:
    • Hard Spheres (HS) using Percus-Yevick (PY) approximation (S_HS_PY).
    • Verlet-Weiss (VW) correction for HS (S_HS_VW).
    • Weeks-Chandler-Andersen (WCA) approximation via Blip Function (S_WCA_blip).
    • Random Phase Approximation (RPA) for:
      • Square-Well potential (S_SW_RPA).
      • Yukawa potential (S_Yukawa_RPA).
      • SALR (Short-Range Attraction, Long-Range Repulsion) potential (S_SALR_RPA).
  • Calculation of partial structure factors $S_{ij}(k)$ for Mixture Systems:
    • Hard Sphere mixtures using Baxter's solution for Percus-Yevick (S_HS_Baxter_mixture).
    • Verlet-Weiss correction for HS mixtures (S_HS_VW_mixture).
    • RPA for mixtures with:
      • Yukawa pair potentials (S_RPA_mixture_Yukawa).
      • Square-Well pair potentials (S_RPA_mixture_SquareWell).
      • SALR pair potentials (S_RPA_mixture_SALR).
  • Helper functions for:
    • Effective diameter calculation via Blip function (blip).
    • Verlet-Weiss corrections for monodisperse systems (phi_VW, k_VW).
    • Conversions between packing fraction and number density for mixtures (phi_to_rho_mixture, rho_to_phi_mixture).
    • Fourier transforms of pair potentials (betaU_SW, betaU_Yukawa).

Validation Highlight: Monodisperse Limit of Mixtures

A key validation of the mixture formalism has been successfully performed: * The partial structure factors $S{ij}(k)$ for a binary mixture composed of two identical components were calculated using the Baxter solution (`SHSBaxtermixture). * The total structure factor $S_T(k) = x_1 S_{11}(k) + x_2 S_{22}(k) + 2 \sqrt{x_1 x_2} S_{12}(k)$ was computed from these partials. * This $S_T(k)$ was found to be **identical** to the $S(k)$ calculated for an equivalent monodisperse system using the Percus-Yevick approximation (SHSPY`) across various total packing fractions. * This confirms the consistency and correct reduction of the mixture code to the well-established monodisperse limit.

Installation

The package is registered in the Julia General Registry. You can install it from the Julia REPL: julia import Pkg Pkg.add("AnalyticalStructureFactors")

If you want to install the latest development version directly from GitHub:import Pkg julia Pkg.add(url="[https://github.com/Riperedo/AnalyticalStructureFactors.jl](https://github.com/Riperedo/AnalyticalStructureFactors.jl)") Quick StartHere's a basic example of how to calculate the static structure factor for Hard Spheres using the Percus-Yevick approximation:using AnalyticalStructureFactors

```julia

Define parameters

ϕ = 0.3 # Volume fraction k = 2.0 # Dimensionless wavevector (qσ)

Calculate S(k) for monodisperse system

sqvalue = SHSPY(ϕ, k) println("S(k) for HS-PY with ϕ=$ϕ, k=$k is: $sqvalue")

For a range of k values

karray = [0.5, 1.0, 1.5, 2.0, 2.5, 3.0] sqarray = SHSPY.(Ref(ϕ), k_array) # Using broadcasting

Example for WCA (monodisperse)

Twca = 1.0 # Temperature sqwca = SWCAblip(ϕ, Twca, k) println("S(k) for WCA with ϕ=$ϕ, T=$Twca, k=$k is: $sq_wca")

Example for a binary mixture (HS Baxter)

σmix = [1.0, 1.0] # Diameters ϕmix = [0.05, 0.05] # Packing fractions of components ρmix = phitorhomixture(ϕmix, σmix) Sijmatrix = SHSBaxtermixture(σmix, ρmix, k) println("Sij(k) matrix for HS mixture at k=$k: \n", Sijmatrix) ```

Documentation

For more detailed information on the implemented models, API reference, and examples, please refer to the documentation.How to CiteIf you use AnalyticalStructureFactors.jl in your research or software, please cite it.You can use the information in the CITATION.cff file (if available) or cite it as:Ricardo Peredo-Ortiz. (2025). AnalyticalStructureFactors.jl (Version 0.0.1) [Software]. Available at: https://github.com/Riperedo/AnalyticalStructureFactors.jl(Please update the version number and year as appropriate for new releases).ContributingContributions to AnalyticalStructureFactors.jl are welcome! If you find any issues, have suggestions for improvements, or want to add new models, please feel free to:Open an issue on the GitHub repository.

Owner

  • Name: Ricardo Peredo
  • Login: Riperedo
  • Kind: user
  • Location: San Luis Potosi

Posdoc at UASLP

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use AnalyticalStructureFactors.jl in your work, please cite it using the information below."
authors:
  - family-names: "Peredo-Ortiz"
    given-names: "Ricardo"
    orcid: "https://orcid.org/0000-0002-1878-9754"
title: "AnalyticalStructureFactors.jl"
version: "0.0.1" # Asegúrate que coincida con la versión que estás lanzando
date-released: "2025-05-14" # O la fecha de lanzamiento de esta versión
identifiers:
  - type: url
    value: "https://www.google.com/url?sa=E&source=gmail&q=https://github.com/Riperedo/AnalyticalStructureFactors.jl"
keywords:
  - "static structure factor"
  - "analytical solutions"
  - "condensed matter physics"
  - "julia"
license: MIT
type: software # Esto indica que es software

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 3
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 23
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 3
  • Delete event: 1
  • Issue comment event: 2
  • Push event: 23

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
juliahub.com: AnalyticalStructureFactors

AnalyticalStructureFactors.jl: A Julia package for computing static structure factors using analytical solutions for various physical models. Ideal for rapid and precise calculations in condensed matter physics, chemical physics, and materials science.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 8.4%
Average: 22.3%
Dependent packages count: 36.1%
Last synced: 6 months ago