File: README.fix_python_move

package info (click to toggle)
lammps 20251210%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 465,808 kB
  • sloc: cpp: 1,031,565; python: 26,771; ansic: 8,808; f90: 7,302; sh: 5,316; perl: 4,171; fortran: 2,442; xml: 1,613; makefile: 1,119; objc: 238; lisp: 188; yacc: 58; csh: 16; awk: 14; tcl: 6; javascript: 2
file content (21 lines) | stat: -rw-r--r-- 1,085 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
This folder contains several LAMMPS input scripts and a python module
file py_nve.py to demonstrate the use of the fix style python/move
to reimplement NVE using Python.

in.fix_python_move_nve_melt:
This is a version of the melt example which replaces the default NVE integrator
with a Python implementation. Fix python/move is used to create an
instance of the py_nve.NVE class which implements the required interface.
It demonstrates how to access LAMMPS data as numpy arrays. This gives direct
access to memory owned by the C++ code, allows easy manipulation through numpy
operations and avoids unnecessary copies.

in.fix_python_move_nve_melt_opt:
This version of the melt example uses NVE_Opt instead of NVE. While this Python
implementation is still much slower than the native version, it shows that
simple code transformations can lead to speedups.

in.fix_python_move_nve_melt_group:
This version of the melt example uses NVE_Group instead of NVE. In this case
the nve time integration is supposed to be only applied to a subset of the
system determined by the group "half".