schrodinger.application.transforms.ligprep.guard module¶
Apache Beam transform for guarding against undesired atom types.
Drops structures containing atoms of undesired MacroModel atom types (metals and other unusual atoms historically eliminated by premin). The legacy ligprep3 chemistry is reused verbatim (LIGPREP-2233).
- class schrodinger.application.transforms.ligprep.guard.Guard(label: Optional[str] = None)¶
Bases:
PTransformDrop structures containing undesired atom types, wrapping the legacy ligprep3
guardlogic.Structures with metals or other unusual atom types (historically eliminated by premin) are dropped. Guard takes no parameters.
Example usage:
>>> from schrodinger import adapter >>> import apache_beam as beam >>> st = adapter.to_structure('CC(C)C') >>> with beam.Pipeline() as p: ... guarded = (p ... | beam.Create([st]) ... | Guard())
- expand(pcoll) OutcomePCollections¶
Apply the guard check to a PCollection of structures.
- Parameters:
pcoll – PCollection of Structure objects
- Returns:
OutcomePCollections with the passing structures (
.main) andDroppedRecordobjects for those rejected (.dropped)