Search NASASearch

SEARCH · Search NASA

Results for “Python”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 73 records · Page 4

MontePy: a Python library for reading, editing, and writing MCNP input files.

The Monte Carlo N-Particle (MCNP) radiation transport code is a highly capable and accurate code with a long legacy. MCNP uses the Monte Carlo simulation process to simulate the path of particles (e.g., neutrons, photons, charged particles, etc.), and their interaction with materials. It is widely used in nuclear engineering, high-energy physics, and other fields. Its origins in the mid-twentieth century predate many modern software conventions. MCNP users provide an input file to MCNP, which it then uses to create an internal representation of the simulation problem. These input files originally had to be stored as punchcard decks, and the user manual still uses the terminology of cards and decks, despite moving beyond punchcards. MCNP predates nearly all modern human readable markup or data serialization languages, such as the extensible Markup Language (XML), the Standard Generalized Markup Language (SGML), YAML (YAML Ain’t Markup Language), and Javascript Object Notation (JSON). Due to this, MCNP uses an entirely custom defined syntax language for its input, making off-the-shelf libraries for XML, YAML, and JSON impossible to use for scripting various operations on MCNP input files (Kulesza et al., 2022).

97 - MATHEMATICS AND COMPUTING

Integration of a grey-box refrigerated case model in EnergyPlus via Python plugin

Commercial buildings, in particular grocery stores (due mainly to their large refrigeration load), provide opportunities for energy cost reductions. Grocery stores could offer substantial load flexibility to the power grid through participation in demand response programs because of their usage patterns and relatively high energy intensity. This load flexibility could come from modifying the control of heating, ventilation, and air conditioning (HVAC) systems, refrigeration systems, or both. Although estimation of the HVAC system’s load flexibility potential is relatively targeted in the literature, estimating load flexibility of refrigeration systems is nascent and has been a challenge, in part because of the lack of proper simulation tools that capture the dynamics in the refrigeration cases. The existing refrigerated case model within EnergyPlus, a whole building energy simulation program, assumes a constant case temperature throughout the simulation period and does not explicitly model the cycling of the compressor serving the refrigerated case. In addition, it does not encompass modeling of temperatures of the product inside the refrigerated case. This difference between modeled and actual operation can be a barrier to the development of demand control algorithm and accurate analysis of load flexibility potential. In this paper, we present a grey-box model for modeling refrigerated cases in grocery stores, which include medium temperature and low temperature. Four cases are modeled; two are low-temperature closed cases and two are medium-temperature cases with one closed and one open. Data from an experimental facility are used to train and test the models. Results demonstrate the efficacy of the grey-box models in predicting the temperatures. This model is integrated into EnergyPlus to capture the dynamic effects of case temperature on the environment and enhance the calculation of sensible and latent heat exchange with the environment (case credits). These enhancements can be leveraged more broadly to model advanced refrigeration controls such as defrost, develop and test unique algorithms that could affect refrigeration interactions with HVAC, and refine store design for any commercial building with refrigeration.

29 ENERGY PLANNING, POLICY, AND ECONOMY

HydroEcoLSTM: A Python package with graphical user interface for hydro-ecological modeling with long short-term memory neural network

Machine learning (ML) is emerging as a promising tool for modeling hydro-ecological processes due to the increasing availability of large environmental data. However, the use of ML requires sufficient programming knowledge due to a lack of a graphical user interface (GUI). In this study, we introduced a GUI package, named HydroEcoLSTM, with the long short-term memory network (LSTM) as the core model, that allows non-ML experts to utilize their domain knowledge to construct complex ML models. We demonstrated the functionalities of HydroEcoLSTM with two practical examples, including (1) predictions of streamflow in both gauged and ungauged catchments and (2) predictions of multiple outputs (i.e., streamflow and isotope transport from two catchments). The simulation results obtained in both case experiments are satisfactory. In the first example, the average Nash–Sutcliffe Efficiency (NSE) for streamflow simulation during the testing period is 0.79 while the application of the trained model in two assumed ungauged catchments also achieves the average NSE of 0.68. In the second example, the average NSE for streamflow and instream isotope simulation during the testing period is 0.71. Ultimately, applications of HydroEcoLSTM with real-world examples demonstrate its potential use for practical applications and research without requiring extensive coding skills.

54 ENVIRONMENTAL SCIENCES

UQpy Version 4.2: Uncertainty quantification with Python

We introduce a new module for the UQpy software package which extends its capabilities into the field of Scientific Machine Learning. This module builds on PyTorch to create a flexible and robust platform for uncertainty quantification in machine learning. The scientific machine learning module of UQpy introduces custom layers, neural networks, and neural network trainers that are compatible with torch version 2.2.2 and allow for “plug and play” integration into existing torch code.

Neural networks

pyEF: A Python Framework for QM and QM/MM Atom-Wise Electric Field Analysis

We introduce pyEF, a software package for computing molecular electric fields, electrostatic interaction energies, and electrostatic potentials from quantum mechanical (QM) atom-centered multipole expansions with atom-wise decomposable contributions. We demonstrate the computational efficiency and accuracy of this QM-derived electric field evaluation tool through several tests. To assess the influence of the underlying QM method and charge partitioning scheme on these electrostatic quantities, we analyze over 250 configurations of an acetone solute molecule in five solvents of variable polarity. We find that electric field calculations are highly sensitive to the choice of charge partitioning method. Even among real-space charge schemes, acetone Stark tuning rates differ by up to a factor of 2. Benchmarking computed solvent dipole moments against experimental bulk values, we conclude that the CM5, ADCH, and Hirshfeld-I charge schemes most reliably capture solvent electrostatics and therefore provide a more faithful foundation for computing electric fields. When constructed from these real-space charges, electric fields are nearly insensitive to basis set size and monotonically increase in magnitude with higher Fock exchange. We also demonstrate efficient convergence of QM electrostatics when more distant molecules are represented solely by MM point charges, reducing computational overhead. Leveraging these findings, we demonstrate the use of pyEF to deduce environmental effects on a transition metal complex from a Ga 4 L 6 12– nanocage and quantify the dominant role of organic linkers in orchestrating electrostatic preorganization.

electric fields

Introducing GPU Acceleration into the Python-Based Simulations of Chemistry Framework

We introduce the first version of GPU4P Y SCF, a module that provides GPU acceleration of methods in P Y SCF. As a core functionality, this provides a GPU implementation of two-electron repulsion integrals (ERIs) for contracted basis sets comprising up to g functions using the Rys quadrature. As an illustration of how this can accelerate a quantum chemistry workflow, we describe how to use the ERIs efficiently in the integral-direct Hartree–Fock build and nuclear gradient construction. Benchmark calculations show a significant speedup of 2 orders of magnitude with respect to the multithreaded CPU Hartree–Fock code of P Y SCF and the performance comparable to other open-source GPU-accelerated quantum chemical packages, including GAMESS and QUICK, on a single NVIDIA A100 GPU.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

NGPINT V3: a containerized orchestration Python software for discovery of next-generation protein–protein interactions

Abstract Summary Batch yeast two-hybrid (Y2H) assays, leveraged with next-generation sequencing, have afforded successful innovations for the analysis of protein–protein interactions. NGPINT is a Conda-based software designed to process the millions of raw sequencing reads resulting from Y2H–next-generation interaction screens. Over time, increasing compatibility and dependency issues have prevented clean NGPINT installation and operation. A system-wide update was essential to continue effective use with its companion software, Y2H-SCORES. We present NGPINT V3, a containerized implementation built with both Singularity and Docker, allowing accessibility across virtually any operating system and computing environment. Availability and implementation This update includes streamlined dependencies and container images hosted on Sylabs (https://cloud.sylabs.io/library/schuyler/ngpint/ngpint) and Dockerhub (https://hub.docker.com/r/schuylerds/ngpint), facilitating easier adoption and integration into high-throughput and cloud-computing workflows. Full instructions and software can be also found in the GitHub repository https://github.com/Wiselab2/NGPINT_V3 and Zenodo https://doi.org/10.5281/zenodo.15256036.

Biochemistry & Molecular Biology

ampworks: Battery analysis tools in Python [SWR-25-39]

Ampworks is a collection of tools designed to process experimental battery data with a focus on model-relevant analyses. It currently provides functions for incremental capacity analysis and GITT data processing, helping extract key properties for life and physics-based models (e.g., SPM and P2D). Some tools, like the incremental capacity analysis module, also include graphical user interfaces for ease of use. https://github.com/NREL/ampworks/ https://pypi.org/project/ampworks/

Randall, Corey [National Renewable Energy Laborato

PyTUQ: Python Toolkit for Uncertainty Quantification

SAND2025-03661O PyTUQ is a user-friendly software toolkit designed to help researchers and professionals understand and manage uncertainty in several scientific fields. By providing tools for analyzing how uncertainties affect outcomes, PyTUQ can be applied in areas such as energy production, and biology. Its unique approach allows users to make more informed decisions by assessing risks and improving predictions. Whether you're studying combustion processes or exploring complex biological systems, PyTUQ empowers you to gain deeper insights and enhance the reliability of your results. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

SciDAC

EVI-EnSitePy (Electric Vehicle Infrastructure – Energy Estimation and Site Optimization Tool in Python) [EVI-X Modeling Suite] [SWR-25-07]

EVI-EnSitePy is a comprehensive agent-based tool designed for the analysis and design of high-power charging sites, encompassing a wide array of site agents including Electric Vehicles (EVs), chargers, energy storage units (ESS), renewable energy resources (DER), and loads. This versatile tool offers diverse functionalities and a modular modeling approach, allowing detailed configuration of agents based on power ratings, port numbers, energy capacities, demand requirements, charger interfaces, and flexibility to customize the tool for project specific goals. By simulating agent interactions and employing various metrics, EVI-EnSitePy enables the assessment of site performance, exploration of energy management systems (EMS), and implementation of innovative EV charging policies. Utilizing EV charge schedules and arrival states, the tool performs thorough charging site simulations, with outputs consisting of agent and site-level power profiles and statistical metrics. Employing a tree graph structure, EVI-EnSitePy supports nested site structures and power distribution modeling. The tool's ability to generate charging schedules deterministically or via stochastic analysis further enhances its versatility. Through its features and capabilities, EVI-EnSitePy offers a powerful platform for informed decision-making in the realm of high-power charging site design and operation.

Jackson, Derek [National Renewable Energy Laborato

Python STXM Control (pystxmcontrol) v0.1

The software is a complete solution for controlling scanning microscopes. It provides a low level interface to device hardware via drivers, communication and coordination layers for managing scan execution and data acquisition, a graphical interface and scripting interface for user interaction. With optimized hardware drivers and low software overhead this software is 10 times faster than the legacy software it is replacing.

Shapiro, David [Lawrence Berkeley National Laborat

WFSUITE: A PYTHON SOFTWARE SUITE FOR X-RAY WAVEFRONT SENDING AND AT-WAVELENGTH METROLOGY

SF-26-025 WFSuite is a graphical and command-line toolkit for coded-mask-based X-ray wavefront sensing and phase reconstruction at synchrotron beamlines. It integrates analysis tools for both relative and absolute speckle-based measurements. In the relative metrology module, WFSuite implements Wavelet-transform-based X-ray Speckle Tracking (WXST) and Wavelet-transform-based Speckle Vector Tracking (WSVT) methods to retrieve differential phase and wavefront distortions by comparing speckle patterns recorded with and without the test sample. In the absolute phase module, WFSuite uses coded-mask speckle patterns and replaces the measured reference with a numerically simulated one, enablingsingle-shot wavefront reconstruction using either WXST or a neural-network-based method (SPINNet).

Rebuffi, Luca [Argonne National Laboratory (ANL),