schrodinger.application.mlff.utils module¶
MLFF utils.
Copyright Schrodinger, LLC. All rights reserved.
- schrodinger.application.mlff.utils.get_env_mlff_data()¶
Get MLFF data from the environment.
- Return type:
str
- Returns:
SCHRODINGER_MLFF_DATA env value
- schrodinger.application.mlff.utils.get_model_name_from_path(model_dir)¶
Get model name from model directory path.
- Parameters:
model_dir (str) – Root directory for MLFF models
- Return type:
str
- Returns:
MLFF model name from directory
- schrodinger.application.mlff.utils.create_mlff_model_type(model_name=None, model_dir=None)¶
Create MlffModelType object from model name.
- Parameters:
model_name (str) – MLFF model name
model_dir (str or None) – Root directory for MLFF models. If None, default directory will be used.
- Return type:
bool, MlffModelType or str
- Returns:
True and created MlffModelType object if successful, False and error message on failure
- schrodinger.application.mlff.utils.get_jaguar_no_pbc_models()¶
Get list of MLFF Jaguar models that are not compatible with PBC.
- Return type:
list[str]
- Returns:
Sorted list of MLFF Jaguar models not compatible with PBC
- schrodinger.application.mlff.utils.set_pytorch_threads(num_threads)¶
Context manager to set PyTorch thread count, preventing CPU oversubscription.
- Parameters:
num_threads (int) – Number of threads to use