schrodinger.pipeline.stages.ligprep module

Stages for running LigPrep.

LigPrepStage - runs LigPrep on input structures PostLigPrepStage - limits stereos, removes penalized states

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.pipeline.stages.ligprep.compress(origFile)

Compresses the specified file and removes the original

schrodinger.pipeline.stages.ligprep.replace_arg_value(cmd, arg, value, add=True)

Replaces value of a command line argument.

Parameters
  • cmd (list(str)) – List of command line arguments.

  • arg (str) – Argument name.

  • value (str) – Argument value.

  • add (bool) – Add the argument if not present?

class schrodinger.pipeline.stages.ligprep.LigPrepStage(*args, **kwargs)

Bases: schrodinger.pipeline.stage.Stage

Pipeline stage for running LigPrep on the input structures

__init__(*args, **kwargs)

This is the Stage class. Derive your own class from it.

Parameters
  • stagename – full name for this stage (<jobname>-<stagename>)

  • specs – ConfigObj specification for the supported keywords

  • allow_extra_keywords – Whether to allow keywords that are not in the specification.

  • cleanup – Whether to remove intermediate files

  • inpipeline – Whether the state is running within a Python Pipeline. If the stage is manually created, do NOT set this flag. Python Pipeline will set it as needed.

  • driver_dir – Directory in which the driver is running.

initNonPersistent(pipeline)

Gets called after the Stage joins pipeline. Meant to be used to initialize non-persistent context.

recombineInputLigands()

Read all input structures, while optionally skipping bad structures, and save each structure into a subjob input file. Optionally structures may be retitled where the compound ID of a structure is determined either from UNIQUEFIELD property, or each structure is assumed to be its own compound (no variants).

Structures can also be mixed within subjobs in order to make subjob lengths more uniform, if MIXLIGS is set to True.

setupJobs()

Setup LigPrep subjobs by building up a command to submit, and passing that command to JobDJ via addJob().

missingOutput(logfile)

Returns True if logfile is present and shows that no structures where returned by LigPrep.

processJobOutputs()

After all LigPrep subjobs are complete, read each output file and combined them into one file, or a few files with up to 100K structures in each file. Structures are NOT combined if COMBINEOUTS is set to False. Instead each file is renamed in order to have a Pipeline-compliant name.

checkProducts()

Overrides the checkProducts() method of Stage class. If USE_EPIK is True, adds ‘epik’ as required prodct before the actual check is performed. Will get called after the instance of this stage is created.

operate()

Run the stage on the input structure file set.

class schrodinger.pipeline.stages.ligprep.PostLigPrepStage(*args, **kwargs)

Bases: schrodinger.pipeline.stage.Stage

This stage limits the number of steroisomers, removes states penalized by Epik/Ionizer, and generates the variant codes.

PRESERVE_NJOBS

whether to write out as many output files as there are inputs. Useful to create the same number of subjobs for QikProp as were used for LigPrep. By default, a single output file is created.

__init__(*args, **kwargs)

This is the Stage class. Derive your own class from it.

Parameters
  • stagename – full name for this stage (<jobname>-<stagename>)

  • specs – ConfigObj specification for the supported keywords

  • allow_extra_keywords – Whether to allow keywords that are not in the specification.

  • cleanup – Whether to remove intermediate files

  • inpipeline – Whether the state is running within a Python Pipeline. If the stage is manually created, do NOT set this flag. Python Pipeline will set it as needed.

  • driver_dir – Directory in which the driver is running.

writeBestStereos(stereoisomers)

Given a list of Structure objects from the same ion/taut state, decices which structures (stereoisomers) need to be kept and which ones need to be removed. This is done by keeping MAXSTEREO lowest- energy stereoisomers.

The structures that are “kept” are then written to the output file.

nextOutFile()
operate()

Optionally limits the number of stereoisomers in the input_files to <maxstereo> keeping lowest energy isomers. Optionally filters on ionization penalty