Skip to content

Commit

Permalink
Merge pull request #62 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Added molecule id for atoms, for LAMMPS
  • Loading branch information
seamm authored Mar 6, 2023
2 parents a047442 + ebae439 commit db7556a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
History
=======

2023.3.5 -- Added molecule numbers for LAMMPS input
* Added the molecule number for each atom for when using LAMMPS

2023.2.6 -- Added handling of OPLS-AA forcefield
* Added handling of the OPLS-AA forcefield
* Moved documentation to new MolSSI theme and diátaxis layout
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
html_theme_options = {
"github_url": "https://github.com/molssi-seamm/seamm_ff_util",
"twitter_url": "https://twitter.com/MolSSI_NSF",
"icon_links": [],
"logo": {
"image_light": "SEAMM logo.png",
"image_dark": "SEAMM Inverted 288x181.png",
Expand Down
9 changes: 8 additions & 1 deletion seamm_ff_util/forcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -2852,9 +2852,16 @@ def eex_atoms(self, eex, configuration):
x, y, z = xyz
result.append((x, y, z, index))

eex["n_atoms"] = len(result)
eex["n_atoms"] = n_atoms = len(result)
eex["n_atom_types"] = len(atom_types)

# molecule for each atom
molecule = eex["molecule"] = [1] * n_atoms
molecules = configuration.find_molecules(as_indices=True)
for molecule_id, atoms in enumerate(molecules):
for atom in atoms:
molecule[atom] = molecule_id

def eex_pair(self, eex, configuration):
"""Create the pair (non-bond) portion of the energy expression"""
logger.debug("In eex_pair")
Expand Down

0 comments on commit db7556a

Please sign in to comment.