schrodinger.application.transforms.ffbuilder module

Apache Beam transforms for FFBuilder force field parameterization.

Provides transforms for generating missing torsion parameters using the ffbuilder CLI tool, and for merging multiple OPLS custom parameter directories into a single directory.

class schrodinger.application.transforms.ffbuilder.FFBuilderConfig(*, input_opls_dir: pathlib.Path | None = None, output_opls_dir: ~pathlib.Path, cli_args: list[str] = <factory>, host: str | None = None, schrodinger_path: str = <factory>)

Bases: BaseModel

Configuration for the RunFFBuilder transform.

Parameters:
  • cli_args – Additional command-line arguments passed through to the ffbuilder executable. Must not include reserved flags such as -HOST, -OPLSDIR, or -JOBNAME.

  • host – Job server host for submission (e.g. 'localhost:16'). If None, defaults to the current job’s SUBHOST at runtime, or 'localhost' when not running under job control.

  • schrodinger_path – Path to the Schrodinger installation. Defaults to the SCHRODINGER environment variable.

input_opls_dir: pathlib.Path | None
output_opls_dir: Path
cli_args: list[str]
host: str | None
schrodinger_path: str
model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class schrodinger.application.transforms.ffbuilder.RunFFBuilder(**kwargs)

Bases: PTransformWithConfig

Run FFBuilder to generate missing torsion parameters.

Submits ffbuilder as a jobcontrol job and merges any newly generated parameters into output_opls_dir. The original structures are passed through unchanged; the artifact this transform produces is the populated output_opls_dir.

Example usage:

>>> with beam.Pipeline() as p:
...     structures = (p
...         | beam.Create([st])
...         | RunFFBuilder(input_opls_dir='existing_oplsdir',
...                        output_opls_dir='merged_oplsdir',
...                        host='localhost'))
...     # 'merged_oplsdir' now holds the existing custom parameters
...     # plus any newly generated by ffbuilder.

See FFBuilderConfig for available configuration options.

config_class

alias of FFBuilderConfig

__init__(**kwargs)

Initialize the transform with configuration.

All keyword arguments are passed to the config_class constructor to create a validated configuration instance stored as self.config.

Parameters:

kwargs – Configuration parameters for the config_class

Raises:
  • AttributeError – If config_class is not defined on the subclass

  • ValidationError – If the configuration parameters are invalid