Git Product home page Git Product logo

buqeye / scattering-emulators Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 10.93 MB

A repository used to compare the KVP and NVP emulators for two-body scattering in momentum space. This code was used to generate results for the paper ''Wave-function-based emulation for nucleon-nucleon scattering in momentum space'' by Garcia, Drischler, Furnstahl, Melendez, and Zhang.

License: MIT License

Python 10.89% Jupyter Notebook 89.11%
emulators eigenvector-continuation nuclear-physics reduced-order-models scattering-physics

scattering-emulators's Introduction

Scattering Emulators

This repository contains all code and data necessary to generate the results in Wave function-based emulation for nucleon-nucleon scattering in momentum space (arXiv:2301.05093). It extends the coordinate-space Kohn variational principle (KVP) emulator to momentum-space (including coupled channels) with arbitrary boundary conditions, which enable the mitigation of spurious singularities known as Kohn anomalies. It also provides comparisons with the Newton's variational principle (NVP) emulator for selected partial waves and NN observables using the semilocal momentum-space (SMS) regularized chiral potential at N4LO+.

For potential data files see the following link: https://zenodo.org/record/8066491

Getting Started

  • This project relies on python=3.9. It was not tested with different versions. To view the entire list of required packages, see environment.yml.
  • Clone the repository to your local machine.
  • Once you have cd into this repo, create a virtual environment (assuming you have conda installed) via
conda env create -f environment.yml
  • Enter the virtual environment with conda activate scattering-emulators-env
  • Install the emulate_kvp and emulate_nvp packages in the repo root directory using pip install -e . (you only need the -e option if you intend to edit the source code in emulate/).

Example

The main class for the KVP-based emulator is KVP_emulator, which implements both the standard Lippmann-Schwinger solver and the KVP emulator. The code snippet below shows how it should be used:

from emulate import KVP_emulator

# Setup
V0, V1 = ...  # The parameter independent piece, and the linear piece of the potential
ps, ws = ...   # The momentum and integration measure in units of inverse fm, corresponding to the potential mesh
E = ...   # The lab energy in MeV

# Initialize object. Only handles linear potentials: V = V0 + V1 @ lecs
emu = KVP_emulator(k=k, ps=ps, ws=ws, V0=V0, 
                   V1=V1, wave=wave, is_coupled=False) 
# The argument wave controls the partial wave being trained.
# For coupled channels, is_coupled=True.

# Train the emulator
emu.train(train_params=basis, glockle=True, method=emu_method)  # basis = (n_b, n_a)
# If glockle=True, the Glockle spline method is used in the calculation. 
# If glockle=False, the Standard method is used.
# The method argument controls the boundary conditions used by the emulator.
# Boundary conditions for emulator: 'K', '1/K', 'T', 'all'

# Predict phase shifts at validation parameter values using the simulator and the emulator
emu_pred = emu.prediction(test_params=lecs, glockle=False, sol=solver, h=nugget)  # Emulator
sim = emu.high_fidelity(params=lecs)  # No emulator

The main class for the NVP-based emulator is NVP_emulator, which implements both the standard Lippmann-Schwinger solver and the NVP emulator. The code snippet below shows how it should be used (with the same setup as above):

from emulate import TwoBodyScattering as NVP_emulator

# Initialize object. Only handles linear potentials: V = V0 + V1 @ p
scatt = NVP_emulator(V0=V0, V1=V1, k=ps, dk=ws,
                     t_lab=E, system="np")

# Train the emulator
scatt.fit(basis)  # basis = (n_b, n_a)

# Predict phase shifts at validation parameter values using the simulator and the emulator
phase_pred_valid = scatt.predict(lecs, return_phase=True)                   # Emulator
phase_full_valid = scatt.predict(lecs, return_phase=True, full_space=True)  # No emulator
# If full_space=True, the simulator is used.
# If full_space=False, the emulator is used.

Citing this work

Please cite this work as follows:

@article{Garcia:2023slj,
    author = "Garcia, A. J. and Drischler, C. and Furnstahl, R. J. and Melendez, J. A. and Zhang, Xilin",
    title = "{Wave-function-based emulation for nucleon-nucleon scattering in momentum space}",
    eprint = "2301.05093",
    archivePrefix = "arXiv",
    primaryClass = "nucl-th",
    doi = "10.1103/PhysRevC.107.054001",
    journal = "Phys. Rev. C",
    volume = "107",
    number = "5",
    pages = "054001",
    year = "2023"
}

scattering-emulators's People

Contributors

ajg91 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.