Skip to content

Example in README.md misses default argument #21

@marcelmbn

Description

@marcelmbn

This example leads to the following error as of now:

from irmsd import read_structures, sorter_irmsd_molecule

# read an xyz file with multiple frames and return a list of irmsd.Molecule objects
molecules = read_structures('/PATH/TO/YOUR/input.xyz')

# Analyze the structure list and assign each molecule to a group (simple list of integers)
# as well as the aligned molecules
groups,aligned_molecules = sorter_irmsd_molecule(molecules)
Traceback (most recent call last):
  File "/Users/marcelmueller/projects/irmsd/script.py", line 8, in <module>
    groups,aligned_molecules = sorter_irmsd_molecule(molecules)
                               ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: sorter_irmsd_molecule() missing 1 required positional argument: 'rthr'

I suggest giving a sensible default here:

def sorter_irmsd_molecule(
    molecule_list: Sequence[Molecule],
    rthr: float,
    iinversion: int = 0,
    allcanon: bool = True,
    printlvl: int = 0,
    ethr: float | None = None,
    ewin: float | None = None,
) -> Tuple[np.ndarray, List[Molecule]]:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions