Skip to content
/ Pyforce Public

A custom package for LAMMPS, adding a fix command for calculating forces with Python.

Notifications You must be signed in to change notification settings

njzjz/Pyforce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyforce

Build Status

Pyforce is a custom package for LAMMPS, adding a fix command for calculating forces with Python.

Author: Jinzhe Zeng

Email: [email protected]

Complile

Download LAMMPS first, then

git clone https://github.com/njzjz/Pyforce.git
cp -r Pyforce/USER-PYFORCE/ $LAMMPS_DIR/src
cd $LAMMPS_DIR/src
make yes-user-pyforce
make serial

Usage

Add a line in LAMMPS input file:

fix 1 all pyforce C H O

where C, H and O are names of elements.

Also, a Python program force.py, which reads the XYZ format file comb.xyz and writes the forces file force.dat, should be put in the folder.

Examples: Example 1 Example 2

About

A custom package for LAMMPS, adding a fix command for calculating forces with Python.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages