schrodinger.utils.platform module

schrodinger.utils.platform.validate_localhost_platform_compatibility(compatible_platforms: Iterable[str]) Tuple[bool, str]
Parameters

compatible_platforms – Compatible platforms. Use LINUX, WINDOWS or DARWIN as values for platforms.

Raises

ValueError – If a value in compatible_platforms is not LINUX, WINDOWS or DARWIN.

Returns

Whether the localhost’s platform is in compatible_platforms. Also returns a non empty message if platform is incompatible. The return value can be used directly with af2 validators and task preprocessors.

schrodinger.utils.platform.is_localhost_platform_compatible(compatible_platforms: Iterable[str]) bool
Parameters

compatible_platforms – Compatible platforms. Use LINUX, WINDOWS or DARWIN as values for platforms.

Raises

ValueError – If a value in compatible_platforms is not LINUX, WINDOWS or DARWIN.

Returns

Whether the localhost’s platform is compatible.

schrodinger.utils.platform.is_host_platform_compatible(host: str, compatible_platforms: Iterable[str]) bool
Parameters
  • host – Host name.

  • compatible_platforms – Compatible platforms. Use LINUX, WINDOWS or DARWIN as values for platforms.

Raises

ValueError – If a value in compatible_platforms is not LINUX, WINDOWS or DARWIN.

Returns

True if the host is not localhost. If the host is localhost, returns whether the localhost’s platform is in compatible_platforms. Also returns a non empty message if platform is incompatible. The return value can be used directly with af2 validators and task preprocessors.

schrodinger.utils.platform.get_platform_incompatibility_message(compatible_platforms: Iterable[str]) str
Parameters

compatible_platforms – Compatible platforms.

Returns

Platform incompatibility message.