Skip to content

TIP5P multiple virtual-types #899

@CalCraven

Description

@CalCraven

Bug summary
Issue with handling multiple virtual-types in a forcefield. Essentially, since we're just loading based on the types connected with a "~", then we can't handle the TIP5P forcefield, which has two virtual types with parent atoms HW-OW-HW.

I would suggest we append the virtual_type.name as part of the key dictionary, which will allow for multiple types.

Code to reproduce the behavior

import gmso
ff = gmso.ForceField("gmso/utils/files/gmso_xmls/test_ffstyles/tip5p_2018.xml")
print(ff.virtual_types.keys())
dict_keys(['HW~OW~HW'])

Suggest Change

dict_keys(['HW~OW~HW-VirtualSiteType-3-sitea', 'HW~OW~HW-VirtualSiteType-3-siteb'])

Software versions

  • Which version of GMSO are you using? (0.12.4`)
  • Which version of Python (3.11)?
  • Which operating system? (arm-64

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions