Skip to content

Running Orca MM #185

@MattBurn

Description

@MattBurn

It would be nice to be able to run the orca_mm program from opi.

orca_mm has many sub-commands, the main one I am currently using is convff but a solution should be to run any of the orca_mm sub-commands. I can see two methods of implementing this, the first is having all the commands behind a single method, the other is to split up each sub-command into an individual method.

Single Method

OrcaMMCommand = Literal["convff", "splitff", "mergeff", "repeatff", "splitpdb", "mergepdb", "makeff", "getHDist"]
OrcaFFType = Literal["amber", "charmm", "openmm"]

class Runner:
    ...
    def run_orca_mm_convff(
        self,
        command: OrcaMMCommand,
        /,
        *,
        fftype:  OrcaFFType | None = None,
        ffinput: Path | list[Path] | None = None,
        // etc.
        silent: bool = True,
        timeout: int = -1,
    ): ...

Multiple Methods

class Runner:
    ...
    def run_orca_mm_convff(self, fftype:  OrcaFFType, ffinput: Path | list[Path]): ...
    def run_orca_mm_splitff(self, ffinput: Path, atoms: list[int]): ...
    def run_orca_mm_splitff(self, ffinputs: list[Path]): ...

Another option is to subclass Runner into OrcaMmRunner so that having multiple methods for each sub-command does not clutter the main Runner class.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions