schrodinger.application.desmond.mapper_msj_generator module

class schrodinger.application.desmond.mapper_msj_generator.BaseMsjGenerator(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

Bases: object

Base class.

__init__(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

# TODO consider renaming cpus to gpus or more generic slots :param jobname: The jobname. :param cd_params: A dictionary with cpus,

set to the number of gpu slots to use, and ‘mps_factor’ set to the number of processes per GPU.

Parameters
  • forcefield (str) – The name of the forcefield to use.

  • sim_time (int) – The simulation time for the production stage in ps.

  • sim_time_complex (int) – The simulation time for the complex leg in ps

  • sim_time_solvent (int) – The simulation time for the solvent leg in ps

  • rand_seed (int) – The random seed.

  • ensemble (str) – The ensemble, NPT or NVT.

  • buffer_width (float) – The buffer width in Angstrom determines how much solvent is added to the solute. This is only used if it is larger than the default buffer width.

  • lambda_windows (int) – Number of lambda replicas to use for the FEP stages.

  • custom_charge_mode (CUSTOM_CHARGE_MODE) – Set to CUSTOM_CHARGE_MODE.ASSIGN to assign custom charges. Set to CUSTOM_CHARGE_MODE.CLEAR to clear custom charges if present, without reassigning. Set to CUSTOM_CHARGE_MODE.KEEP to keep existing custom charges if present.

  • h_mass (bool) – Set to True to enable hydrogen mass repartitioning and False to disable it. Default is True.

  • concatenate (bool) – Set to True to concatenate the equilibration FEP stages. Default is True.

  • max_walltime – Maximum walltime in seconds before the subjobs are automatically checkpointed and restarted. The default of 0 means to not set a maximum walltime.

class schrodinger.application.desmond.mapper_msj_generator.BaseFepMsjGenerator(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.BaseMsjGenerator

__init__(jobname: str, cd_params: Dict[str, object], **kwargs)

# TODO consider renaming cpus to gpus or more generic slots :param jobname: The jobname. :param cd_params: A dictionary with cpus,

set to the number of gpu slots to use, and ‘mps_factor’ set to the number of processes per GPU.

Parameters
  • forcefield (str) – The name of the forcefield to use.

  • sim_time (int) – The simulation time for the production stage in ps.

  • sim_time_complex (int) – The simulation time for the complex leg in ps

  • sim_time_solvent (int) – The simulation time for the solvent leg in ps

  • rand_seed (int) – The random seed.

  • ensemble (str) – The ensemble, NPT or NVT.

  • buffer_width (float) – The buffer width in Angstrom determines how much solvent is added to the solute. This is only used if it is larger than the default buffer width.

  • lambda_windows (int) – Number of lambda replicas to use for the FEP stages.

  • custom_charge_mode (CUSTOM_CHARGE_MODE) – Set to CUSTOM_CHARGE_MODE.ASSIGN to assign custom charges. Set to CUSTOM_CHARGE_MODE.CLEAR to clear custom charges if present, without reassigning. Set to CUSTOM_CHARGE_MODE.KEEP to keep existing custom charges if present.

  • h_mass (bool) – Set to True to enable hydrogen mass repartitioning and False to disable it. Default is True.

  • concatenate (bool) – Set to True to concatenate the equilibration FEP stages. Default is True.

  • max_walltime – Maximum walltime in seconds before the subjobs are automatically checkpointed and restarted. The default of 0 means to not set a maximum walltime.

class schrodinger.application.desmond.mapper_msj_generator.MapperMsjGenerator(jobname, cd_params, **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.BaseFepMsjGenerator

__init__(jobname, cd_params, **kwargs)[source]

In addition to the parameters passed to BaseMsjGenerator, the MapperMsjGenerator supports the following.

Parameters
  • atom_mapping – The SMARTS string used to determine the core for atom mapping. Default is to determine the atom mapping automatically.

  • align_core_only – Do not adjust the non-core atoms when aligning the core atoms. Default is False.

  • ats – (deprecated) Set to True to enable automated torsion scaling. Default is False.

  • charged_lambda_windows – Set the number of lambda windows used for charged perturbations. Default is 24.

  • core_hopping_lambda_windows – Set the number of lambda windows used for core-hopping perturbations. Default is 16.

  • fep_convergence – (deprecated) Adaptive sampling, tolerance value for statistical error on dG. Default is 0.0, which means no adaptive sampling.

  • membrane – Set to the filename containing the membrane structures. Default is None, there is no membrane.

  • salt_concentration – Concentration of ions to add in M. Default is 0.15 M.

  • modify_dihe – Set to True to modify retained dihedral angle interactions for customized core. Default is False.

  • minimize_volume – Set to True to turn on volume minimization during the system_builder or build_geometry stages. Default is False.

patch_ensemble()[source]

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

generate_master_msj()[source]
generate_complex_msj(net_charge, ch=False, **kwargs)[source]
generate_solvent_msj(net_charge, ch=False, **kwargs)[source]
generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None, treat_solvent_like_complex=False, **kwargs)[source]
Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

generate_membrane_msj()[source]
write_master_msj()[source]
write_subjob_msjs()[source]

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

write_complex_msj()[source]
write_solvent_msj()[source]
write_membrane_msj()[source]
modify_fep_launcher_stage(raw)[source]
modify_graph_stage(raw)[source]
class schrodinger.application.desmond.mapper_msj_generator.SmallMoleculeMsjGenerator(jobname, cd_params, **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.MapperMsjGenerator

__init__(jobname, cd_params, **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

modify_fep_launcher_stage(raw)[source]
write_complex_msj()[source]

Write the complex subjob msjs.

write_solvent_msj()[source]

Write the solvent subjob msjs.

generate_complex_msj(net_charge, ch=False, **kwargs)
generate_master_msj()
generate_membrane_msj()
generate_solvent_msj(net_charge, ch=False, **kwargs)
generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None, treat_solvent_like_complex=False, **kwargs)
Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

modify_graph_stage(raw)
patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_master_msj()
write_membrane_msj()
write_subjob_msjs()

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

class schrodinger.application.desmond.mapper_msj_generator.VacuumMsjGenerator(jobname, cd_params, **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.MapperMsjGenerator

__init__(jobname, cd_params, **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

generate_vacuum_msj(net_charge=False, core_hopping=False)[source]
write_vacuum_msj(concatenate=False)[source]
modify_fep_launcher_stage(raw)[source]
modify_graph_stage(raw)[source]
generate_complex_msj(net_charge, ch=False, **kwargs)
generate_master_msj()
generate_membrane_msj()
generate_solvent_msj(net_charge, ch=False, **kwargs)
generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None, treat_solvent_like_complex=False, **kwargs)
Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_complex_msj()
write_master_msj()
write_membrane_msj()
write_solvent_msj()
write_subjob_msjs()

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

class schrodinger.application.desmond.mapper_msj_generator.SmallMoleculeWithVacuumMsjGenerator(*args, **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.SmallMoleculeMsjGenerator

__init__(*args, **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

generate_master_msj()[source]
write_subjob_msjs()[source]

Write the vacuum msj in addition to the complex+solvent msjs

write_vacuum_msj()[source]
generate_complex_msj(net_charge, ch=False, **kwargs)
generate_membrane_msj()
generate_solvent_msj(net_charge, ch=False, **kwargs)
generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None, treat_solvent_like_complex=False, **kwargs)
Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

modify_fep_launcher_stage(raw)
modify_graph_stage(raw)
patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_complex_msj()

Write the complex subjob msjs.

write_master_msj()
write_membrane_msj()
write_solvent_msj()

Write the solvent subjob msjs.

class schrodinger.application.desmond.mapper_msj_generator.CovalentMsjGenerator(jobname: str, cd_params: Dict[str, object], fmp_fname: str, **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.MapperMsjGenerator

__init__(jobname: str, cd_params: Dict[str, object], fmp_fname: str, **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

In addition to these parameters, the following are supported.

Parameters

fmp_fname – Name of the fmp file to use for covalent fep.

generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None, treat_solvent_like_complex=False)[source]
Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

modify_graph_stage(raw)[source]

Not support custom .pkl file for now

generate_complex_msj(net_charge, ch=False, **kwargs)
generate_master_msj()
generate_membrane_msj()
generate_solvent_msj(net_charge, ch=False, **kwargs)
modify_fep_launcher_stage(raw)
patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_complex_msj()
write_master_msj()
write_membrane_msj()
write_solvent_msj()
write_subjob_msjs()

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

class schrodinger.application.desmond.mapper_msj_generator.MetalMsjGenerator(jobname: str, cd_params: Dict[str, object], mp: List[str], **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.MapperMsjGenerator

__init__(jobname: str, cd_params: Dict[str, object], mp: List[str], **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

In addition to these parameters, the following are supported.

Parameters

mp – List of metalloprotein ct properties.

generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None, treat_solvent_like_complex=False)[source]
Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

modify_graph_stage(raw)[source]
generate_complex_msj(net_charge, ch=False, **kwargs)
generate_master_msj()
generate_membrane_msj()
generate_solvent_msj(net_charge, ch=False, **kwargs)
modify_fep_launcher_stage(raw)
patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_complex_msj()
write_master_msj()
write_membrane_msj()
write_solvent_msj()
write_subjob_msjs()

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

class schrodinger.application.desmond.mapper_msj_generator.ProteinMapperMsjGenerator(jobname: str, cd_params: Dict[str, object], fep_type: str, solvent_asl: Optional[str] = None, mutation_filename: str = 'mutations.txt', residue_file: str = '', neighbor: Optional[int] = None, structure_file: str = '', **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.CovalentMsjGenerator

__init__(jobname: str, cd_params: Dict[str, object], fep_type: str, solvent_asl: Optional[str] = None, mutation_filename: str = 'mutations.txt', residue_file: str = '', neighbor: Optional[int] = None, structure_file: str = '', **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

In addition to these parameters, the following are supported.

Parameters
  • fep_type – Type of protein fep.

  • neighbor – Number of residues to flank the mutated residue when creating the mutant peptides. Its default value will be set based on fep_type.

  • solvent_asl – Specify ASL to put in solvent leg for protein residue mutation.

  • mutation_filename – Filename containing the list of mutations.

  • residue_file – Mae filename which contains the non-standard amino-acids structures.

  • structure_file – If present, the filename for the input structure. This is used to expand a previous run, where additional mutations are added to the graph and run.

generate_solvent_msj(net_charge, ch=False)[source]
generate_subjob_msj(buffer_width, is_complex_leg=False, net_charge=False, ch=False, keep_struc_tags=None)[source]

The subjob msj file will be similar to the covalent bond workflow. For protein/ligand selectivity calculations, both complex and solvent legs contain the receptor, so they will be treated like the complex leg.

Parameters

keep_struc_tags – List of structure tags for structures to keep. Structure tags are as defined by FEP_STRUC_TAG. None means to use the default set of tags for this fep type.

modify_graph_stage(raw)[source]
generate_complex_msj(net_charge, ch=False, **kwargs)
generate_master_msj()
generate_membrane_msj()
modify_fep_launcher_stage(raw)
patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_complex_msj()
write_master_msj()
write_membrane_msj()
write_solvent_msj()
write_subjob_msjs()

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

class schrodinger.application.desmond.mapper_msj_generator.SolubilityMsjGenerator(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.BaseFepMsjGenerator

Generates the msj files needed to run the Solubility FEP workflow.

__init__(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

See BaseMsjGenerator for a description of the input parameters.

In addition to these parameters, the following are supported.

Parameters
  • hydration_fep_sim_time – The simulation time for the Hydration FEP production stage.

  • sublimation_fep_sim_time – The simulation time for the Sublimation FEP production stage.

generate_master_msj()schrodinger.utils.sea.sea.Map[source]

Generate the master msj.

generate_subjob_msj(is_fep: bool = True, hydration: bool = False)schrodinger.utils.sea.sea.Map[source]

Generate the fep msj and return as a sea.Map.

Parameters
  • is_fep – Set to True for FEP subjob, False for MD.

  • hydration – Set to True to for hydration FEP and False for sublimation FEP. Ignored if not FEP.

write_master_msj() → str[source]

Write out the master msj and return the filename.

write_md_msj() → str[source]

Write out the md msj and return the filename.

write_fep_msj()[source]

Write out the fep msj files.

class schrodinger.application.desmond.mapper_msj_generator.MixedSolventMsjGenerator(jobname: str, cd_params: Dict[str, object], builder_params: Dict[str, object], **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.BaseMsjGenerator

__init__(jobname: str, cd_params: Dict[str, object], builder_params: Dict[str, object], **kwargs)[source]

# TODO consider renaming cpus to gpus or more generic slots :param jobname: The jobname. :param cd_params: A dictionary with cpus,

set to the number of gpu slots to use, and ‘mps_factor’ set to the number of processes per GPU.

Parameters
  • forcefield (str) – The name of the forcefield to use.

  • sim_time (int) – The simulation time for the production stage in ps.

  • sim_time_complex (int) – The simulation time for the complex leg in ps

  • sim_time_solvent (int) – The simulation time for the solvent leg in ps

  • rand_seed (int) – The random seed.

  • ensemble (str) – The ensemble, NPT or NVT.

  • buffer_width (float) – The buffer width in Angstrom determines how much solvent is added to the solute. This is only used if it is larger than the default buffer width.

  • lambda_windows (int) – Number of lambda replicas to use for the FEP stages.

  • custom_charge_mode (CUSTOM_CHARGE_MODE) – Set to CUSTOM_CHARGE_MODE.ASSIGN to assign custom charges. Set to CUSTOM_CHARGE_MODE.CLEAR to clear custom charges if present, without reassigning. Set to CUSTOM_CHARGE_MODE.KEEP to keep existing custom charges if present.

  • h_mass (bool) – Set to True to enable hydrogen mass repartitioning and False to disable it. Default is True.

  • concatenate (bool) – Set to True to concatenate the equilibration FEP stages. Default is True.

  • max_walltime – Maximum walltime in seconds before the subjobs are automatically checkpointed and restarted. The default of 0 means to not set a maximum walltime.

write_master_msj() → str[source]
write_md_msj() → str[source]
generate_master_msj() → List[schrodinger.utils.sea.sea.Map][source]
generate_subjob_msj() → List[schrodinger.utils.sea.sea.Map][source]
class schrodinger.application.desmond.mapper_msj_generator.AbsoluteBindingMsjGenerator(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.MapperMsjGenerator

Generates the msj files needed to run the Absolute FEP workflow.

__init__(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

See MapperMsjGenerator for a description of the input parameters.

In addition to these parameters, the following are supported.

Parameters
  • md_sim_time – The simulation time for the md production stage.

  • ligand_asl – Set the ASL used to identify the ligand.

  • ligand_restraint (Dictionary with the keys: 'enable', 'name', 'sigma', 'alpha', 'fc'.) – Set to the parameters for the ligand restraints.

  • adaptive_ligand_restraint (Dictionary with the keys: 'enable', 'name', 'sigma', 'alpha', 'fc'.) – Set to the parameters for the adaptive ligand restraints.

  • use_representative_structure – Set to True to use the representative structure from MD to prepare the FEP simulations. The default of False means to use the last frame from MD.

property restraint_enabled
generate_master_msj()schrodinger.utils.sea.sea.Map[source]
generate_subjob_msj(leg: <schrodinger.application.desmond.constants._MaePropertyValue object at 0x7f803f4e1340>, protocol: schrodinger.application.desmond.constants.SIMULATION_PROTOCOL)schrodinger.utils.sea.sea.Map[source]
Parameters

leg – Generate the msj for the given leg.

generate_md_msj(protocol: schrodinger.application.desmond.constants.SIMULATION_PROTOCOL)schrodinger.utils.sea.sea.Map[source]
write_master_msj() → str[source]

Write out the master msj and return the filename.

write_md_msj()[source]

Write out the md msjs.

write_complex_msj()[source]

Write out the complex msjs

write_solvent_msj()[source]

Write out the solvent msjs

generate_complex_msj(net_charge, ch=False, **kwargs)
generate_membrane_msj()
generate_solvent_msj(net_charge, ch=False, **kwargs)
modify_fep_launcher_stage(raw)
modify_graph_stage(raw)
patch_ensemble()

A context manager to temporarily change the ensemble and subjob_msj template for this instance to ‘NPT’ if the ensemble is ‘muVT’. NOTE: This is useful to allow the complex and solvent legs to have different ensembles, but in the future this should be replaced with code that natively supports different ensembles for the complex and solvent leg.

write_membrane_msj()
write_subjob_msjs()

Write the msjs for each leg type. Subclasses which run additional legs should override and write the additional msjs

class schrodinger.application.desmond.mapper_msj_generator.ConstantpHMsjGenerator(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

Bases: schrodinger.application.desmond.mapper_msj_generator.BaseFepMsjGenerator

__init__(jobname: str, cd_params: Dict[str, object], **kwargs)[source]

# TODO consider renaming cpus to gpus or more generic slots :param jobname: The jobname. :param cd_params: A dictionary with cpus,

set to the number of gpu slots to use, and ‘mps_factor’ set to the number of processes per GPU.

Parameters
  • forcefield (str) – The name of the forcefield to use.

  • sim_time (int) – The simulation time for the production stage in ps.

  • sim_time_complex (int) – The simulation time for the complex leg in ps

  • sim_time_solvent (int) – The simulation time for the solvent leg in ps

  • rand_seed (int) – The random seed.

  • ensemble (str) – The ensemble, NPT or NVT.

  • buffer_width (float) – The buffer width in Angstrom determines how much solvent is added to the solute. This is only used if it is larger than the default buffer width.

  • lambda_windows (int) – Number of lambda replicas to use for the FEP stages.

  • custom_charge_mode (CUSTOM_CHARGE_MODE) – Set to CUSTOM_CHARGE_MODE.ASSIGN to assign custom charges. Set to CUSTOM_CHARGE_MODE.CLEAR to clear custom charges if present, without reassigning. Set to CUSTOM_CHARGE_MODE.KEEP to keep existing custom charges if present.

  • h_mass (bool) – Set to True to enable hydrogen mass repartitioning and False to disable it. Default is True.

  • concatenate (bool) – Set to True to concatenate the equilibration FEP stages. Default is True.

  • max_walltime – Maximum walltime in seconds before the subjobs are automatically checkpointed and restarted. The default of 0 means to not set a maximum walltime.

write_msj() → str[source]
write_cfg() → str[source]
generate_msj() → List[schrodinger.utils.sea.sea.Map][source]
generate_cfg() → List[schrodinger.utils.sea.sea.Map][source]