schrodinger.application.transforms.ligprep.neutralizer module¶
Apache Beam transform for neutralizing structures.
A thin Beam adapter around the legacy ligprep3 neutralizer driver
(schrodinger.application.macromodel.packages.ligprep3.neutralizer._run), which
converts charged groups to their neutral protonation state. The legacy chemistry
is reused verbatim (LIGPREP-2231).
- class schrodinger.application.transforms.ligprep.neutralizer.NeutralizerConfig(*, max_atom: int = 500, retain: bool = False, retain_lab: bool = False)¶
Bases:
BaseModelConfiguration for the neutralizer transform.
Defaults match the legacy ligprep workflow’s invocation, which coincide with the standalone CLI defaults.
- max_atom: int¶
- retain: bool¶
- retain_lab: bool¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- class schrodinger.application.transforms.ligprep.neutralizer.Neutralizer(*, _config: pydantic.main.BaseModel | None = None, **kwargs)¶
Bases:
PTransformWithConfigNeutralize structures, wrapping the legacy ligprep3
neutralizerlogic.Structures that fail neutralization (e.g. exceeding the atom limit) are dropped. See
NeutralizerConfigfor the parameters.Example usage:
>>> from schrodinger import adapter >>> import apache_beam as beam >>> st = adapter.to_structure('CC(=O)[O-]') >>> with beam.Pipeline() as p: ... neutralized = (p ... | beam.Create([st]) ... | Neutralizer())
- config_class¶
alias of
NeutralizerConfig
- expand(pcoll) OutcomePCollections¶
Neutralize a PCollection of structures.
- Parameters:
pcoll – PCollection of Structure objects
- Returns:
OutcomePCollections with the neutralized structures (
.main) andDroppedRecordobjects for those that failed (.dropped)