Skip to content

Releases: liqa1024/jse

jse-release-v4.1.2

Choose a tag to compare

@liqa1024 liqa1024 released this 03 Jul 12:17

🚀 Features

  • Added setLossOut(String path) to TrainerNNAP for convenient real-time loss output, along with support for retrieving sub-losses.
  • TrainerNNAP now supports disabling neighbor caching (experimental).
  • NativeLmp now provides direct access to commRank(), commSize(), and commBarrier().

⚡ Performance Improvements

  • Optimized NNAP GPU performance: different cutoff radii now use separate neighbor lists.
  • TrainerNNAP automatically disables forward propagation caching for large atomic structures, improving parallel training speed.
  • TrainerNNAP merges neighbor list pointer storage, significantly reducing memory usage.
  • Optimized type checking for method calls in SimpleJIT, improving performance for large-scale invocations.

✨ Enhancements

  • The runtime now proactively detects and distinguishes between JRE and JDK, and throws an exception when running on an unsupported JRE.
  • parfor now strictly validates the thread count to prevent undefined behavior.
  • Added parallel initialization detection to avoid catastrophic failures.
  • Stricter type checking in DataXYZ.setParameter to prevent common misuse.

🐛 Bug Fixes

  • Fixed redundant duplicate error messages when running jse -lmp in parallel.
  • Fixed a NullPointerException in Lmpdat.of when data without mass is provided.

🧹 Removals

  • Removed the deprecated doc_agent. Related content should now be referenced at jse-skil.

Note
For other potentially critical updates, see v4.1.0.

jse-release-v4.1.1

jse-release-v4.1.1 Pre-release
Pre-release

Choose a tag to compare

@liqa1024 liqa1024 released this 05 Jun 08:15

Zero length cptr fill and other bug fixes from v4.1.0

jse-release-v4.1.0

jse-release-v4.1.0 Pre-release
Pre-release

Choose a tag to compare

@liqa1024 liqa1024 released this 01 Jun 14:12

Changelog

Breaking Changes

  • JIT method invocation API changed: IJITMethod.invoke(IPointer, IPointer) is now invoke(Object...). You no longer need to manually construct mDataIn/mDataOut parameter buffers — just pass arguments directly.
  • Trainer renamed to TrainerNNAP: some constructor parameter signatures have also changed.
  • WTypeBasis model format changed: the post_fuse mechanism has been replaced by rfuse. Legacy models are automatically converted on load. The default training wtype changed from exfull to rfuse.
  • Growable CPointer variants removed: GrowableDoubleCPointer, GrowableFloatCPointer, GrowableIntCPointer, GrowableInt64CPointer, and their GPU counterparts have been removed. Use PointerManager for unified management instead.

New Features

  • PointerManager: unified lifecycle management for CPointer / CudaPointer, implementing AutoCloseable with automatic reclamation via Java GC. NEP / NNAP internals have been fully migrated; close() is now significantly simpler.
  • JIT SourceScanner: automatically discovers exported functions in C source code via the __jsefunc__ marker, eliminating the need for manual setMethodNames calls. SimpleJIT.Engine also gains addTypeMap for C type mapping.
  • NNAP GPU support: PairNNAP_gpu is re-enabled with major performance improvements.
  • Adam AMSGrad: the Adam constructor now accepts a boolean aAMSGrad parameter, enabling the improved algorithm from "On the Convergence of Adam and Beyond".
  • Added SettableAtomData.setSymbolOrder(): element symbol order modification is now supported consistently across all atom structure classes.
  • LibVer: centralized external library version management (JEP, LAMMPS, CMake, MiMalloc, Ninja, NEP SHA).

Bug Fixes

  • FixedTimer: getNanos() / getMillis() / get() incorrectly returned the fixed value captured at construction time. They now correctly compute the actual elapsed time.
  • AseAtoms.copy(): when mType2AtomicNumber != null, the symbol collection loop missed the last element type (type < ntypestype <= ntypes), causing the copy to fail.

Improvements

  • Naming consistency: Matrices parameters aRowNum/aColNumaNumRows/aNumCols; SettableAtomData field mAtomTypeNummNumTypes; PairNEP / PairNNAP field mTypeNummNumTypes.
  • Build system: Windows build scripts now include chcp 65001; CMake path references uniformly use JNIUtil.validCmdPath().
  • Unified SF and RDF behavior in APC: both SF and RDF descriptor lengths now consistently use the input N, removing the previous N+1 discrepancy.

Deprecations

  • SP.Python.downloadPackage() / installPackage() methods are now marked @ApiStatus.Obsolete. installAse() has been removed.

Internal

  • Native static methods in CPointer subclasses now have @ApiStatus.Internal public visibility.
  • ICPointer / ICudaPointer now expose a setPtr_() method.
  • IO.Text.str2int() removed; call sites now use Integer.parseInt().
  • External LAMMPS library updated from stable_22Jul2025_update2 to stable_22Jul2025_update4.

jse-release-v4.0.1

Choose a tag to compare

@liqa1024 liqa1024 released this 04 May 16:58

Changelog

Experimental Runtime Compilation (JIT)

  • Added experimental runtime C/C++ compilation support (SimpleJIT).
  • Added experimental CUDA runtime compilation support (CudaJIT).
  • NNAP and NEP are now implemented via code generation + runtime compilation, delivering at least a 20% performance improvement and precision switching support.

CUDA Support

  • Introduced basic CUDA memory management: CudaCore, FloatCudaPointer, IntCudaPointer.

Build System

  • The build process has been unified to use CMake + Ninja.

Native LAMMPS Interface

  • Added closeAll(), closePython(), closePlugin() (and similar) to NativeLmp, matching the LAMMPS C interface.
  • All native interface commands now consistently end with 0; commands with the same base name receive an incremented numeric suffix.
  • By default, errors from LAMMPS calling jse are now only thrown on rank 0, preventing excessive duplicate error messages.

I/O, Data Formats & Strict Mode

  • Added XML read/write support (IO.xml2map, IO.map2xml).
  • Renamed confusing properties such as atomNumbernatoms; removed the old names.
  • XDATCAR now supports reading files with per-frame cell information, and writes always use this format.
  • Streaming read/write interfaces for atomic data are now public; the underscore suffix has been removed.
  • Added step(int) to multi-frame trajectory readers (Lammpstrj, XDATCAR, DumpXYZ) for interval-based dumping.
  • Reading of atomic structure data now defaults to strict mode: errors throw exceptions instead of returning null.
  • Because reads are strict, streaming consumers should now use FileEndException to distinguish end-of-file from other errors.

ASE Integration

  • Completed property support for AseAtoms (info, array, calc.results); conversion to/from ASE atoms is now essentially lossless.
  • Added special-case handling when converting between DataXYZ and AseAtoms to preserve as much data as possible (ASE standard).
  • Unified ASE support under the ase() method; atomic data can be converted to ASE Atoms (PyObject) via ase(). asAseCalculator() is deprecated and kept temporarily (emits a deprecation warning).
  • Atomic data now uniformly provides setSymbolOrder(String...) to adjust the mapping between element symbols and type indices—particularly useful for LAMMPS data files.

NNAP Refinements

  • Reordered summation: changed from post_fuse to an rfuse-style summation, which together with exfuse significantly improves efficiency.
  • Optimized force backpropagation: RnGrad is computed directly instead of RnPxyz, then gradnlj and finally graddxyz are derived in a unified manner.
  • Shared neural networks in NNAP no longer use a separate C implementation; they now reuse the non-shared implementation path.
  • Removed the noradial parameter.
  • The new NNAP JIT implementation supports second-order backpropagation, rewriting the NNAP trainer workflow.
  • The new NNAP trainer supports missing energy/force/stress data and parallel neighbor-list construction.
  • The new trainer no longer supports disabling basis-parameter training; alternative mechanisms will be introduced later.
  • The new trainer enables post_fuse and exfull by default.
  • Added non-dimensionalization of the distance unit in the new trainer, where the unit length is obtained from the neighbor list to avoid artifacts from gas-phase configurations.

Plugin Per-Atom Output

  • LmpPlugin now supports per-atom output (setPeratomFlag, setSizePeratomCols, setPeratomFreq, setVectorAtom, setArrayAtom).

Data Structures & Math Changes

  • Added single-precision floating-point data structures: FloatList, FloatVector, FloatCPointer.
  • Added LogicalMatrix.
  • Removed square-bracket indexing for matrices.
  • Merged ShiftVector (and similar) functionality into the standard Vector; RowMatrix now also supports shift operations.

Cleanup & Deprecations

  • Removed the overused shutdown() method; the standard close() interface is now used everywhere.
  • The --jniclean flag now only clears the cache by default; use --jniclean all to clean all libraries.
  • Cleaned up deprecated Torch-related code.
  • Removed deprecated opt() compatibility; only op() remains.

Bug Fixes

  • Fixed an issue where jse downloads ignored proxy settings; now respects system proxy and the HTTPS_PROXY environment variable.

jse-release-v3.99.1b

jse-release-v3.99.1b Pre-release
Pre-release

Choose a tag to compare

@liqa1024 liqa1024 released this 09 Mar 12:04

This is a pre-release version for the nnap GPU version.

Use it with:

pair_style   jse jsex.nnap.PairNNAP_gpu
pair_coeff   * * path/to/nnpot.json Cu Zr

jse-release-v3.13.7

Choose a tag to compare

@liqa1024 liqa1024 released this 15 Jan 17:02

JNI auto-install and other detail fixes from v3.13.6

jse-release-v3.13.6

Choose a tag to compare

@liqa1024 liqa1024 released this 04 Jan 09:29

Deadly bug and other detail fixes from v3.13.5

jse-release-v3.13.5

Choose a tag to compare

@liqa1024 liqa1024 released this 02 Jan 23:03
  • Added support for the latest JDK 25 and LAMMPS 2025.
  • NNAP now provides a pure Java implementation of the basis, eliminating the need to go through JNI when performing basis calculations in APC.
  • The NNAP Trainer now disables L2 regularization by default due to its limited effectiveness.
  • Removed a large number of NNAP features that showed limited practical benefit but significantly increased code complexity.
  • Added support for configuring CMAKE_SETTING via environment variables.
  • The uniqueID has been uniformly expanded to a 16-character length.
  • Added support for utilities such as json2list, list2json, and related features.
  • Significantly optimized the initialization of JNI-related libraries, making the process smarter and more automated.
  • Refactored the jse.lmp.NativeLmp structure: core functionality has been moved to jse.clib.LmpCore, with complete version isolation.
  • Added support for running the internal LAMMPS directly via jse -lmp.
  • Introduced new commands jse --jniclean and jse --jnibuild.
  • Standardized command formats.
  • Provided a fully automated installation script and updated the related documentation.

jse-release-v3.12.6

Choose a tag to compare

@liqa1024 liqa1024 released this 25 Dec 18:51
  • Added warnings for CRT conflicts in JNI libraries on Windows
  • Unified all NNAP gradient computations under barkward method
  • Refactored the NNAP JNI layer to consistently use C++ templates
  • Pre-sorted by type when handling multiple type struture in NNAP to improve cache hit rate
  • Added support for fuse and exfuse type weights in NNAP
  • Added l4max (≤ 3), extended l3max to 6, and extended lmax to 12 in NNAP
  • Added support for continued training and the Adam optimizer in NNAP
  • Added support for shared FFNNs in NNAP
  • Added post_fuse support in NNAP
  • Renamed package opt to optim
  • Added velocities and masses interfaces in LMP plugin
  • Fixed an issue where native LMP did not call MPI_Comm_f2c when obtaining comm
  • The MPI JNI interface now enables Java array copying by default to ensure compatibility

jse-release-v3.10.0

Choose a tag to compare

@liqa1024 liqa1024 released this 21 Aug 14:45
  • LmpPlugin 增加调用 ForwardComm 和 ReverseComm 通讯支持
  • MPI 接口现在默认不再进行数组拷贝,性能提高
  • MPI 接口增加数组越界检查
  • JNI 库初始化会增加更多检测和提示
  • 更新 groovy,gradle,mimalloc,jep,jsch 库,现在应该支持各种先进的 ssh 加密算法
  • 增加通用的优化器支持(GD,CG,Adam,LBFGS)
  • 纯 java 的 NNAP 训练器支持,现在不再依赖 torch,且效率更高
  • 部分数学运算增加 C 实现可选(sumproddotnorm1matmul
  • soft 势支持
  • EAM 势支持
  • toml 格式读写支持
  • 各种 bug 修复