Skip to content

Commit

Permalink
in process
Browse files Browse the repository at this point in the history
  • Loading branch information
dprada committed Oct 19, 2023
1 parent d05d554 commit eafcb0f
Show file tree
Hide file tree
Showing 10 changed files with 46,702 additions and 302 deletions.
3 changes: 3 additions & 0 deletions molsysmt/_private/digestion/argument/kinetic_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def digest_kinetic_energy(kinetic_energy, caller=None):
if isinstance(kinetic_energy, bool):
return kinetic_energy

if kinetic_energy is None:
return None

value, unit = puw.get_value_and_unit(kinetic_energy)

if not puw.check(unit, dimensionality={'[L]': 2, '[M]': 1, '[T]': -2, '[mol]': -1}):
Expand Down
3 changes: 3 additions & 0 deletions molsysmt/_private/digestion/argument/potential_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def digest_potential_energy(potential_energy, caller=None):
if isinstance(potential_energy, bool):
return potential_energy

if potential_energy is None:
return None

value, unit = puw.get_value_and_unit(potential_energy)

if not puw.check(unit, dimensionality={'[L]': 2, '[M]': 1, '[T]': -2, '[mol]': -1}):
Expand Down
3 changes: 3 additions & 0 deletions molsysmt/_private/digestion/argument/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def digest_temperature(temperature, caller=None):
if isinstance(temperature, bool):
return temperature

if temperature is None:
return temperature

value, unit = puw.get_value_and_unit(temperature)

if not puw.check(unit, dimensionality={'[K]':1}):
Expand Down
2 changes: 1 addition & 1 deletion molsysmt/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.2+41.g5d7312be.dirty"
__version__ = "0.8.3+3.gd05d554b1.dirty"
9 changes: 8 additions & 1 deletion molsysmt/form/molsysmt_Structures/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
@digest(form='molsysmt.Structures', to_form='molsysmt.Structures')
def add(to_item, item, atom_indices='all', structure_indices='all'):

to_item.add(item)
to_item.append_structures(structure_id = item.structure_id,
time = item.time,
coordinates = item.coordinates,
velocities = item.velocities,
box = box,
temperature = temperature,
potential_energy = potential_energy,
kinetic_energy = kinetic_energy)

pass

7 changes: 5 additions & 2 deletions molsysmt/form/molsysmt_Structures/append_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
from molsysmt._private.digestion import digest

@digest(form='molsysmt.Structures')
def append_structures(item, structure_id=None, time=None, coordinates=None, box=None):
def append_structures(item, structure_id=None, time=None, coordinates=None, velocities=None,
box=None, temperature=None, potential_energy=None, kinetic_energy=None):

item.append_structures(structure_id=structure_id, time=time, coordinates=coordinates, box=box)
item.append_structures(structure_id=structure_id, time=time, coordinates=coordinates,
velocities=velocities, box=box, temperature=temperature,
potential_energy=potential_energy, kinetic_energy=kinetic_energy)

pass

Loading

0 comments on commit eafcb0f

Please sign in to comment.