Skip to content

[BUG] Error when providing a lambda array to sire.Dynamics.current_potential_energy() #391

@tom-potter-cresset

Description

@tom-potter-cresset

The lambda_array argument to sire.Dynamics.current_potential_energy() doesn't seem to be working. For example:

mol = sr.load("merged.bss")[0] # Load any perturbable system
mol = mol.perturbation().link_to_reference()
d = mol.dynamics()

# This works fine:
d.current_potential_energy()

# This gives an error message:
d.current_potential_energy(lambda_values=[0.0,0.5,1.0])

gives this error message:

sire/mol/_dynamics.py:1929 in │
│ get_rest2_scale                                                                                  │
│                                                                                                  │
│   1926 │   │   """                                                                               │
│   1927 │   │   Return the current REST2 scaling factor.                                          │
│   1928 │   │   """                                                                               │
│ ❱ 1929 │   │   if self.is_null():                                                                │
│   1930 │   │   │   return None                                                                   │
│   1931 │   │   return self._d.get_rest2_scale()                                                  │
│   1932                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'Dynamics' object has no attribute 'is_null'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions