Skip to content

Commit

Permalink
Check atom and unit styles
Browse files Browse the repository at this point in the history
  • Loading branch information
rmatsum836 committed Mar 12, 2020
1 parent 86e086b commit b872a62
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions gmso/formats/lammpsdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,27 @@ def read_lammpsdata(filename, atom_style='full', unit_style='real', potential='l
# TODO: Add argument to ask if user wants to infer bond type
top = Topology()

# Validate 'atom_style'
if atom_style not in ['full']:
raise ValueError('Atom Style "{}" is invalid or is not currently supported'.format
atom_style)

# Validate 'unit_style'
if unit_style not in ['real']:
raiseValueError('Unit Style "{}" is invalid or is not currently supported'.format(
unit_style)

# Parse box information
_get_box_coordinates(filename, unit_style, top)
# Parse atom type information
top, type_list = _get_ff_information(filename, unit_style, top)
# Parse atom information
_get_atoms(filename, top, unit_style, type_list)
# Parse connection (bonds, angles, dihedrals) information
_get_connection(filename, top, unit_style, connection_type='bond')
_get_connection(filename, top, unit_style, connection_type='angle')
import pdb; pdb.set_trace()
# TODO: Add more atom styles
if atom_style in ['full']:
_get_connection(filename, top, unit_style, connection_type='bond')
_get_connection(filename, top, unit_style, connection_type='angle')

return top

Expand Down

0 comments on commit b872a62

Please sign in to comment.