schrodinger.application.jaguar.ffld module

Utilities related to the use of FFLD functionality, OPLS version handling, etc.

schrodinger.application.jaguar.ffld.get_opls_user_name(opls_name: str) str

Get customer-facing OPLS version name from generic developer name.

For future-proofing, developers should always implement code using human-readable forcefield names from mm.opls_names. For example, “S-OPLS”. The latter is then typically intended to mean “the latest recommended forcefield version” (assuming a license is available). But all customer-facing text output should use the explicit Forcefield version names such as “OPLS4”.

Parameters:

opls_name – developer-facing version name

Returns:

customer-facing version name

Raise:

IndexError if invalid OPLS name is input

schrodinger.application.jaguar.ffld.get_opls_dev_name(opls_name: str) str

Get developer-facing OPLS version name from customer-facing name.

See docstring for get_opls_user_name for more details.

Parameters:

opls_name – customer-facing version name

Returns:

developer-facing version name

Raise:

IndexError if invalid OPLS name is input

schrodinger.application.jaguar.ffld.get_opls_license_warning(opls_name: str) str

Print message to indicate OPLS version requested and used for conformational search or minimization.

Check if requested OPLS version requires a license and whether license is available; then print message to indicate fallback to license-free OPLS version if license not available.

Parameters:

opls_name – OPLS version name (e.g., “S-OPLS”)

Returns:

user-facing message

Raise:

IndexError if invalid OPLS name is input

schrodinger.application.jaguar.ffld.check_ff_license(opls_name: str) bool

Check if requested OPLS version requires a license and whether license is available

Parameters:

opls_name – OPLS version name (e.g., “S-OPLS”)

Returns:

boolean flagging if license is available

schrodinger.application.jaguar.ffld.check_ff_license_and_fallback(forcefield: str, logger: ~typing.Callable = <built-in function print>) str

Check if requested OPLS version requires a license and whether license is available; then either return original choice if valid, or fallback forcefield version if license not available.

Parameters:
  • forcefield – FF name (e.g. “amber”) or OPLS name (e.g. “OPLS4”, “S-OPLS”)

  • logger – logging function

Returns:

forcefield version to use going forwards

Raise:

IndexError if invalid OPLS name is input

schrodinger.application.jaguar.ffld.get_valid_opls_version() OPLSVersion

Get valid OPLS version number according to available license

Returns:

OPLS forcefield version