Atom Class

This module contains the Atom class and all the helper functions associated with atoms.

class atom_class.Atom(atomID, molID, atomType, charge=0.0, position=[0.0, 0.0, 0.0])[source]

The Atom class represents an atom described by the LAMMPS full atom style.

Parameters
  • atomID (int) – The unique integer identifier of the atom as specified in the LAMMPS input file.

  • molID (int) – The unique integer identifier of the molecule associated with this atom as specified in the LAMMPS input file.

  • atomType (int) – The integer that identifies the atom type as specified in the LAMMPS input file.

  • charge (float, optional) – The charge on the atom defaults to 0.

  • position (float vector, optional) – A three element vector which represent the X,Y,Z coordinates of the atom. It defaults to a vector of [X=0,Y=0,Z=0].

atom_class.loadAtoms(filename)[source]

Loads the atoms from a LAMMPS input file and returns a list of Atom object which represent those atoms.

Parameters

filename (str) – The name of the LAMMPS input file which contain the atoms

Returns

A list of Atom objects which contains the atom info in the given LAMMPS input file.

Return type

Atom List