schrodinger.application.desmond.gconfig module

Utilities for handling gDesmond config files.

Copyright Schrodinger, LLC. All rights reserved.


round up to the closest integer when the difference is less than 1e-7

schrodinger.application.desmond.gconfig.optimize_key(msj, cfg, box: List[float])

Optimizes the simulation parameters in ‘cfg’, where ‘cfg’ must represent a complete config file.


box – Simulation box dimensions.

schrodinger.application.desmond.gconfig.concatenate_cfgs(simulate_cfgs, base_cfg)

Create a single backend config file from a list of simulate configs created from the simulate block of a concatenate front-end config and the backend config created from the rest of the concatenate front-end config.

  • simulate_cfgs (list of sea.Map) – The list of backend config files created from the simulate block of a concatenate front-end config

  • base_cfg (sea.Map) – The backend config file created from a concatenate front-end config, with its simulate block removed.


A copy of the base concatenate config with the information from the simulate configs merged in.

Return type


schrodinger.application.desmond.gconfig.set_relative_restrain_scaling(first_restrain, previous_posre_scaling, restrain, this_integrator)

Set each integrator’s posre_scaling attribute to the ratio between the desired restraint force constant and the first force constant. This allows us to modulate the restraint force constant between concatenate stages.

  • first_restrain (sea.Map) – the restrain parameter from the first stage’s config, or None if updating the first stage

  • previous_posre_scaling (float or NoneType) – posre_scaling parameter from the previous stage’s config, or None if unknown

  • restrain (sea.Map) – this stage’s restrain parameter

  • this_integrator (sea.Map) – this stage’s integrator


the first restrain parameter and posre scaling factor

schrodinger.application.desmond.gconfig.restrain_force_constant(restraints: schrodinger.utils.sea.sea.Map) float

Get restraints force constant.


restraints – the restraints block for a given stage


the (first) restraint force constant

schrodinger.application.desmond.gconfig.extract_cfg(cpt_fname, min_size=2097152, return_raw=False)

Extracts the extended ark content from a checkpoint file. This function returns a sea.Map object or None if parsing fails.

The ark as represented by the string contains the following values:

  • argv : the argument vector

  • boot_timestamp : the boot time for the program

  • chemical_time : chemical time in pico seconds

  • config : the ark file

  • threader_size : the number of threads

  • version : the desmond version

  • world_size : the number of processors

schrodinger.application.desmond.gconfig.msj2cfg(msj, cfg, model, macro=None)