schrodinger.application.transforms.epikx module

EpikX transform for enumerating protonation and tautomeric states.

This module provides Apache Beam transforms for running EpikX on molecular structures to enumerate their protonation and tautomeric states at a given pH.

class schrodinger.application.transforms.epikx.EpikXResult(*, source_id: ~schrodinger.seam.io.sourceid.SourceID, input_structure: ~schrodinger.structure._structure.Structure, success: bool, output_structures: list[schrodinger.structure._structure.Structure] = <factory>, error_message: str | None = None)

Bases: BaseModel

Result of running EpikX on a single structure.

Parameters:
  • source_id – Source ID for tracking the input structure.

  • input_structure – The input structure (preserved for downstream use).

  • success – Whether EpikX processing succeeded.

  • output_structures – List of enumerated protonation/tautomeric states.

  • error_message – Error message if processing failed.

source_id: SourceID
input_structure: Structure
success: bool
output_structures: list[Structure]
error_message: str | None
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}

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

class schrodinger.application.transforms.epikx.EpikXConfig(*, legacy_arg_string: str | None = None, ph: float = 7.4, pht: float = 2.0, population_cutoff: float | None = None, max_structures: int = 16, max_tautomers: int = 8, max_atoms: int = 200, max_atoms_pka: int = 500, charge_low: int = -2, charge_high: int = 2, highest_pka: float = 14.0, lowest_pka: float = 0.0, query_only: bool = False, taut_only: bool = False, no_tautomerize: bool = False, best_neutral: bool = False, best_neutral_zwit: bool = False, metal_binding: bool = False, racemize: bool = False, retain_input_state: bool = False, refine: bool = True, add_hydrogen_coords: bool = False, single_model: bool = False, custom_model: str | None = None, cpu_only: bool = False, match_exp: str | None = None, report: bool = False)

Bases: BaseModel

Configuration for EpikX transforms.

Parameters:
  • legacy_arg_string – Legacy CLI argument string (mutually exclusive with other parameters).

  • ph – Query pH for protonation state prediction.

  • pht – pH tolerance for generated structures (mutually exclusive with population_cutoff).

  • population_cutoff – State population cutoff (mutually exclusive with pht).

  • max_structures – Maximum number of returned structures per input.

  • max_tautomers – Maximum number of tautomers to enumerate.

  • max_atoms – Max atoms for state enumeration.

  • max_atoms_pka – Max atoms for pKa prediction.

  • charge_low – Lower bound for the charge level window.

  • charge_high – Upper bound for the charge level window.

  • highest_pka – Highest pKa value to display.

  • lowest_pka – Lowest pKa value to display.

  • query_only – Query pKas only, do not predict states.

  • taut_only – Tautomerize only, do not evaluate pKas.

  • no_tautomerize – Do not tautomerize.

  • best_neutral – Provide the most populated neutral tautomer.

  • best_neutral_zwit – Provide neutral tautomer and optionally a zwitterion.

  • metal_binding – Generate states appropriate for metal ion binding.

  • racemize – Enumerate and score individual racemers.

  • retain_input_state – Retain input ionization/tautomerization state.

  • refine – Refine prioritization step to remove unwanted states.

  • add_hydrogen_coords – Add coordinates to non-polar hydrogens.

  • single_model – Use single best model instead of ensemble.

  • custom_model – Path to custom model.

  • cpu_only – Run on CPU only (no GPU acceleration).

  • match_exp – Property label of experimental pKa value for matching.

  • report – Generate pKa report (single structure only).

legacy_arg_string: str | None
ph: float
pht: float
population_cutoff: float | None
max_structures: int
max_tautomers: int
max_atoms: int
max_atoms_pka: int
charge_low: int
charge_high: int
highest_pka: float
lowest_pka: float
query_only: bool
taut_only: bool
no_tautomerize: bool
best_neutral: bool
best_neutral_zwit: bool
metal_binding: bool
racemize: bool
retain_input_state: bool
refine: bool
add_hydrogen_coords: bool
single_model: bool
custom_model: str | None
cpu_only: bool
match_exp: str | None
report: bool
model_config: ClassVar[ConfigDict] = {'frozen': True}

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

toArgList() list[str]

Convert the config to a list of command line arguments.

Returns:

List of command line argument strings.

class schrodinger.application.transforms.epikx.RunEpikX(**kwargs)

Bases: PTransformWithConfig

Run EpikX on input structures.

Example usage:

>>> from schrodinger import adapter
>>> st1 = adapter.to_structure('CC(=O)O')
>>> st1.title = "acetic_acid"
>>> with beam.Pipeline() as p:
...     results = (p
...         | beam.Create([st1])
...         | RunEpikX(ph=7.0)
...         | beam.Map(lambda r: (r.source_id, r.success, len(r.output_structures)))
...         | beam.LogElements())

See EpikXConfig for available configuration options.

config_class

alias of EpikXConfig

class schrodinger.application.transforms.epikx.ProtonateLigands(**kwargs)

Bases: PTransformWithConfig

Enumerate protonation states and return output structures.

Example usage:

>>> from schrodinger import adapter
>>> st1 = adapter.to_structure('CC(=O)O')
>>> st1.title = "acetic_acid"
>>> with beam.Pipeline() as p:
...     structures = (p
...         | beam.Create([st1])
...         | ProtonateLigands(ph=7.0)
...         | beam.Map(lambda st: st.title)
...         | beam.LogElements())

See EpikXConfig for available configuration options.

config_class

alias of EpikXConfig

class schrodinger.application.transforms.epikx.EpikXWithProps(**kwargs)

Bases: PTransformWithConfig

Enumerate protonation states and annotate with derived pKa properties.

Example usage:

>>> from schrodinger import adapter
>>> st = adapter.to_structure('CC(=O)O')
>>> st.title = "acetic_acid"
>>> with beam.Pipeline() as p:
...     structures = (p
...         | beam.Create([st])
...         | EpikXWithProps(ph=7.0)
...         | beam.Map(lambda st: st.property.get('r_epik_Most_acidic_pKa'))
...         | beam.LogElements())

See EpikXConfig for available configuration options.

config_class

alias of EpikXConfig

class schrodinger.application.transforms.epikx.Neutralize(**kwargs)

Bases: PTransformWithConfig

Return the best neutral tautomer with state penalty annotated.

Raises RuntimeError if EpikX fails for any input structure.

Example usage:

>>> from schrodinger import adapter
>>> st = adapter.to_structure('CC(=O)O')
>>> with beam.Pipeline() as p:
...     structures = (p
...         | beam.Create([st])
...         | Neutralize())

See EpikXConfig for available configuration options.

config_class

alias of _NeutralizeConfig