Search NASASearch

SEARCH · Search NASA

Results for “Python Programming”

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

ROSE

Developed at Lawrence Livermore National Laboratory (LLNL), ROSE is an open source compiler infrastructure to build source-to-source program transformation and analysis tools for large-scale C (C89 to C23), C++ (C++98 to C++23), UPC, Fortran (Fortran4, 66, 77, 95, 2003), OpenMP, Java, Python, and Binary applications. ROSE users range from experienced compiler researchers to library and tool developers who may have minimal compiler experience. ROSE is particularly well suited for building custom tools for static analysis, program optimization, arbitrary program transformation, domain-specific optimizations, complex loop optimizations, performance analysis, and cyber-security. ROSE is: A library (and set of associated tools) to quickly and easily apply compiler techniques to one's code in order to improve application performance and developer productivity. A research and development compiler infrastructure for for writing custom source-to-source translators to perform source code transformations, analysis, and optimizations. Is

Pinnow, NathanT [Lawrence Livermore National Labor

PyLRO: A Python calculator for analyzing long-range structural order

We present PyLRO, an open-source Python calculator designed to detect, quantify, and display long-range order in periodic structures. The program’s design methodology, workflow, and approach to order quantification are described and demonstrated using a simple toy model. Additionally, we apply PyLRO to a series of metastable AlPO 4 structural intermediates from a prior high-pressure study, demonstrating how to compute and visualize structural order in all directions on a Miller sphere. We further highlight the program’s capabilities through a high-throughput analysis of structural patterns in the pressure-induced amorphization of AlPO 4 , revealing atomistic insights into specific energy regions of massive amorphous structures. These results suggest that PyLRO can be a valuable tool for investigating crystal–amorphous transition in materials research.

36 MATERIALS SCIENCE

Integrating Machine-learning-assisted Computer Vision with RICH System

Developments in artificial intelligence have vastly expanded the capabilities of robots. Currently, the Spallation Neutron Source (SNS) beamlines at Oak Ridge National Lab (ORNL) have robotic sample loaders to increase the efficiency of running experiments. However, they require retraining if anything about the situation changes, e.g., where the samples are, and cannot notice if errors occur. So, the viability of using computer vision and machine learning to enhance these sample loaders’ functionality was investigated. In this project, the RICH system with a Dobot CR3 6-axis robot present at the VULCAN beamline assisted by an Intel Realsense D435i camera, a unique camera that enables convenient translation of 2D pixel coordinates to 3D world points, was programmed to load ceramic crucibles into a thermogravimetric analyzer (TGA) furnace. An algorithm was constructed in Python with three major phases planned: (1) obtaining a sample, (2) moving it to the target location, and then (3) bringing the sample back to its original location once the experiment finished. In the first phase, the algorithm would dynamically detect sample locations using ArUco markers to recognize the samples’ general location and a custom-trained yolov5 object detection model to locate the crucibles’ centers. Afterward, the robot would be directed to pick up samples based on the crucibles’ calculated positions. In the second phase, the robot would move the sample to a secondary point, reorient its grip, and place the sample at the target location. In the final phase, the robot would determine whether the sample was intact and would bring it back to its original place if it was or raise an alarm. Using this algorithm, the robot was able to pick up different types of crucibles at varying positions. These results indicate that integrating machine-learning-assisted computer vision with robotic sample loaders can result in effective autonomous detection of samples.

97 MATHEMATICS AND COMPUTING

xesn: Echo state networks powered by Xarray and Dask

Xesn is a Python package that allows scientists to easily design Echo State Networks (ESNs) for forecasting problems. ESNs are a Recurrent Neural Network architecture introduced by Jaeger (2001) that are part of a class of techniques termed Reservoir Computing. One defining characteristic of these techniques is that all internal weights are determined by a handful of global, scalar parameters, thereby avoiding problems during backpropagation and reducing training time significantly. Because this architecture is conceptually simple, many scientists implement ESNs from scratch, leading to questions about computational performance. Xesn offers a straightforward, standard implementation of ESNs that operates efficiently on CPU and GPU hardware. The package leverages optimization tools to automate the parameter selection process, so that scientists can reduce the time finding a good architecture and focus on using ESNs for their domain application. Importantly, the package flexibly handles forecasting tasks for out-of-core, multi-dimensional datasets, eliminating the need to write parallel programming code. Xesn was initially developed to handle the problem of forecasting weather dynamics, and so it integrates naturally with Python packages that have become familiar to weather and climate scientists such as Xarray (Hoyer & Hamman, 2017). However, the software is ultimately general enough to be utilized in other domains where ESNs have been useful, such as in signal processing (Jaeger & Haas, 2004).

97 MATHEMATICS AND COMPUTING

Cardinal: Seismic and Geoacoustic Array Processing

Data collected via seismic and infrasound array deployments are leveraged in the geosciences to detect and characterize a myriad of natural and anthropogenic sources. These deployments consist of numerous sensors placed in a predetermined configuration to amplify signal strength and improve the efficacy of array processing techniques used to measure signal directionality and waveform coherence. High‐fidelity feature extraction is often predicated on interstation distance as well as the frequency content and wavelength of an incident signal. Numerous array processing softwares analyze data in sequential frequency bands to obtain a more detailed characterization of a signal. However, current algorithms are limited in their ability to determine optimal array configuration for each band. We introduce an open‐source Python code, called Cardinal, to process seismic and infrasound array data in discretized time–frequency space with the option of applying an adaptive array design to determine optimal subarray configuration for each frequency band. To reduce computational time, the array processing step can be run in parallel using multithreading. Furthermore, the software has the capability to aggregate array processing results from different time–frequency pixels to produce separate sets of detections, or families, with added utility via the application of an adaptive semblance threshold, which aids in isolating signals‐of‐interest from coherent background noise. Upon appropriate configuration, Cardinal exhibits the potential to combine distinct seismic and infrasound phases into separate families.

Adaptive Array

Large language model evaluation for high–performance computing software development

We apply AI-assisted large language model (LLM) capabilities of GPT-3 targeting high-performance computing (HPC) kernels for (i) code generation, and (ii) auto-parallelization of serial code in C ++, Fortran, Python and Julia. Our scope includes the following fundamental numerical kernels: AXPY, GEMV, GEMM, SpMV, Jacobi Stencil, and CG, and language/programming models: (1) C++ (e.g., OpenMP [including offload], OpenACC, Kokkos, SyCL, CUDA, and HIP), (2) Fortran (e.g., OpenMP [including offload] and OpenACC), (3) Python (e.g., numpy, Numba, cuPy, and pyCUDA), and (4) Julia (e.g., Threads, CUDA.jl, AMDGPU.jl, and KernelAbstractions.jl). Kernel implementations are generated using GitHub Copilot capabilities powered by the GPT-based OpenAI Codex available in Visual Studio Code given simple + + prompt variants. To quantify and compare the generated results, we propose a proficiency metric around the initial 10 suggestions given for each prompt. For auto-parallelization, we use ChatGPT interactively giving simple prompts as in a dialogue with another human including simple “prompt engineering” follow ups. Results suggest that correct outputs for C++ correlate with the adoption and maturity of programming models. For example, OpenMP and CUDA score really high, whereas HIP is still lacking. We found that prompts from either a targeted language such as Fortran or the more general-purpose Python can benefit from adding language keywords, while Julia prompts perform acceptably well for its Threads and CUDA.jl programming models. Finally, we expect to provide an initial quantifiable point of reference for code generation in each programming model using a state-of-the-art LLM. Overall, understanding the convergence of LLMs, AI, and HPC is crucial due to its rapidly evolving nature and how it is redefining human-computer interactions.

97 MATHEMATICS AND COMPUTING

pdas-experiments

SAND2025-04589O pdas-experiments automates computational experiments of fluid flow simulations. It uses the pressio-demoapps-schwarz package as a basis to break down complex simulations into smaller, manageable parts. This application is an extension of the Sandia Pressio software which uses domain decomposition to work with complex simulations more efficiently. Users can test different simulation setups, while keeping a detailed record of their experiments so they can be reproduced later. The software includes a C++ program that runs individual experiments based on user-defined settings in a YAML file, as well as a Python script that can manage multiple simulations at once. 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.

Tezaur, Irina [Sandia National Lab. (SNL-CA), Live

Improving Self-Driving Labs: Quantifying System-Level Experiment Repeatability and Broadening Instrument-Level Compatibility

Modular Autonomous Research System (MARS) is a self-driving laboratory (SDL) which performs wet-lab science with peptide-lanthanide combinations in an automated and, ultimately, an autonomous manner to aid in soil analysis for domestic lithium mining. Autonomous experimentation involves automated experimentation, experiment planning, and active learning. MARS consists of a 6-axis robotic arm (UR5e) on a linear rail, pipette robots (Opentrons 2), and microplate readers. These components transport, operate on, and collect data with chemical solutions in standard labware. For effective autonomy, MARS must perform system-level labware operations repeatably, plan experiments autonomously, and be portable between research-domains. Repeatability is evaluated by labware placement precision, such that future operations can properly locate labware, as well as the elapsed time, so that low variance mean estimates of experiment duration can inform high-level researcher decision making. Autonomous experiment planning is the next step to decouple experimentation from human management; however, there is a conflict between the ideal system-level experiment goals and the constraints imposed by instruments’ limitations. Sub-domain portability is a long-term goal to extend MARS’ research beyond the chemistry of peptide-lanthanide binding to other sub-domains without having to invest significant overhead to system retrofitting. To address these goals, we manually trained the robotic arm labware placement and modelled statistical failurerate and uncertainty Additionally, we benchmarked the duration and variance of each experiment sub-operation as a heuristic for research decision making. Next, we use a parameterized geometric program (PGP) approach to design experiments that optimize system-level objectives and satisfy instrument-level constraints. Lastly, we proposed a Python framework to maximize MARS’ extensibility to other scientific sub-domains through a JSON-based experiment specification.

36 MATERIALS SCIENCE

Accessible, uniform protein property prediction with a scikit-learn based toolset AIDE

Summary Protein property prediction via machine learning with and without labeled data is becoming increasingly powerful, yet methods are disparate and capabilities vary widely over applications. The software presented here, “Artificial Intelligence Driven protein Estimation (AIDE)”, enables instantiating, optimizing, and testing many zero-shot and supervised property prediction methods for variants and variable length homologs in a single, reproducible notebook or script by defining a modular, standardized application programming interface (API), i.e. drop-in compatible with scikit-learn transformers and pipelines. Availability and implementation AIDE is an installable, importable python package inheriting from scikit-learn classes and API and is installable on Windows, Mac, and Linux. Many of the wrapped models internal to AIDE will be effectively inaccessible without a GPU, and some assume CUDA. The newest stable, tested version can be found at https://github.com/beckham-lab/aide_predict and a full user guide and API reference can be found at https://beckham-lab.github.io/aide_predict/. Static versions of both at the time of writing can be found on Zenodo.

36 MATERIALS SCIENCE

Truchas Overview

Truchas and Truchas-PBF are two sister codes for part-scale multi-physics modeling of manufacturing processes. Both programs are open source and made publicly available. They’re designed for efficient use of HPC resources and can be programmatically driven from Python packages. This enables automatic execution and analysis of ensembles of simulations, in some cases allowing 1000s of simulations to be evaluated in a day on HPC. Beyond just giving engineers a window into the concealed internal state of a system, the goal of Truchas is to provide a framework for developing novel manufacturing processes by understanding how the entire space of engineering inputs affects thermal state. It often is used to explore combinations of capabilities uncommon in commercial software, or to scale up analyses beyond the capabilities of commercial software.

97 MATHEMATICS AND COMPUTING

Quasiclassical sampling and Wigner sampling of initial vibrational coordinates and momenta for polyatomic molecules in Monte Carlo molecular dynamics simulations

In a quasiclassical trajectory simulation, the vibrational modes are initialised with quantised vibrational energies, but vibrational phases are sampled by Monte Carlo. This requires an algorithm to assign coordinates and momenta to the various atoms. In this work, we present two methods for implementing this for nonrotating polyatomic molecules, namely, fixed-energy vibrational-state-selected initial conditions and thermal initial conditions. We also present a method for initiating classical trajectories with a ground-state Wigner distribution. These vibrational treatments are sufficient to initialise trajectories for unimolecular processes, and we also show how they can be applied to simulate bimolecular collision processes. The treatments of unimolecular and bimolecular collision processes are available in two Python codes called wigner_state_selected.py and bimolecular_collision.py, respectively, which will generate initial condition files that are recognisable by the SHARC and SHARC-MN computer programs for dynamics calculations. Both codes are available as standalone programs, as well as being included in SHARC-MN, and they will be included in future versions of SHARC. Here, the methods implemented in these codes are mostly also available in the ANT computer program, and those that are not available in ANT will be incorporated in future versions of ANT.

Wigner distribution

Integrase-On-Demand-Pipeline Data Set

Files needed to run the Integrase-On-Demand-Pipeline, a program designed to provide users with a list of putative attachment site and integrase pairs for a prokaryotic genome of interest. isles.pkl: Serialized python-object file, containing a dictionary of attachment site sequences and reference genomic island information extracted from the Genomic island database ints.gff: Gene format file containing annotations for all integrases referenced in isles.pkl. The source genome, gene coordinates, integrase name, protein IDs and amino acid sequence included. reps.msh: Binary file containing 1000 128-bit MurmurHash3 hashes for >80,000 genomes

McClain, Hannah Marie [Sandia National Laboratorie

MolViewSpec: a Mol* extension for describing and sharing molecular visualizations

Data visualization is a pivotal component of a structural biologist’s arsenal. The Mol* Viewer makes molecular visualizations available to broader audiences via most web browsers. While Mol* provides a wide range of functionality, it has a steep learning curve and is only available via a JavaScript interface. To enhance the accessibility and usability of web-based molecular visualization, we introduce MolViewSpec (molstar.org/mol-view-spec), a standardized approach for defining molecular visualizations that decouples the definition of complex molecular scenes from their rendering. Scene definition can include references to commonly used structural, volumetric, and annotation data formats together with a description of how the data should be visualized and paired with optional annotations specifying colors, labels, measurements, and custom 3D geometries. Developed as an open standard, this solution paves the way for broader interoperability and support across different programming languages and molecular viewers, enabling more streamlined, standardized, and reproducible visual molecular analyses. MolViewSpec is freely available as a Mol* extension and a standalone Python package.

Midlik, Adam [European Bioinformatics Institute (U

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

tether

Tether is a python module for benchmarking and assessing large language model (LLMs) performance at generic scientific tasks. The code generates benchmarks, uses the benchmark to prompt LLMs through automatic programming interfaces (APIs), and then logs the number of prompts an LLM correctly answers and presents the results as a completed benchmark.

Kaiser, Bryan [Los Alamos National Laboratory]

rcsb-api : Python Toolkit for Streamlining Access to RCSB Protein Data Bank APIs

The Protein Data Bank (PDB) was founded in 1971 as the first open-access digital data resource in biology to serve as the single global archive for three-dimensional (3D) macromolecular structure data. Current PDB holdings exceed 230,000 experimentally determined structures of proteins, nucleic acids, viruses, and macromolecular machines. The RCSB Protein Data Bank RCSB.org research-focused web portal facilitates search, analyses, and visualization of every PDB structure along with more than one million Computed Structure Models from AlphaFold DB and the ModelArchive. It is powered by a set of publicly available Application Programming Interfaces (APIs) that both support RCSB.org users and provide programmatic access to PDB data. Given the breadth and levels of granularity encompassed in this rich data collection, efficiently accessing the information programmatically may be challenging for new users. RCSB PDB has developed a Python software package, rcsb-api , that facilitates easy and efficient use of RCSB PDB APIs within a Python environment. This software tool is designed to streamline access to the extensive corpus of data housed within the PDB, enabling researchers to search, retrieve, and analyze 3D biostructure data seamlessly. Its use will accelerate research in structural biology, molecular biology and biochemistry, drug discovery, and bioinformatics by providing more efficient tools for data integration and analysis. The new toolkit is available on GitHub (github.com/rcsb/py-rcsb-api) and published to the public Python package repository (PyPI) to foster wider usage and support basic and applied research in fundamental biology, biomedicine, and the energy sciences.

FAIR principles

Web Based Beamline Control System (Bluesky Web) v0.1.0

Bluesky Web is a web based interface that provides beam line controls to the end user. It allows users to issue commands to various physical devices at a beam line end station like motors and cameras. It utilizes an open source Python library (Bluesky) as the controller. It uses Bluesky to also allow for running "plans" or a sequence of device operations that can be used when running an experiment. This program is different from other controls technologies because it is intended to be open source and can be accessed from a web browser, as opposed to other paid software that is run as a stand-alone application on a computer.

De Leon, Seij