QMzymeModel
- class QMzyme.QMzymeModel.QMzymeModel(*args, name, universe, select_atoms='all', frame=0, pickle_file=None, **kwargs)
Base class for
QMzyme.GenerateModel. Contains methods to create and modify aQMzymeModelinstance. A QMzymeModel an be instantiated with an MDAnalysis Universe directly, or any combination of parameters that MDAnalysis.core.universe.Universe accepts to create a Universe i.e., (example.prmtop, example.dcd, dt=5). See https://userguide.mdanalysis.org/stable/universe.html for details.- Parameters:
name (str, default=None) -- Name to give to the QMzymeModel. This is used for default file naming purposes throughout the QMzyme package. If not provided, it will default to the base name of the universe filename attribute.
universe (MDAnalysis.Universe, default=None) -- MDAnalysis Universe object.
name -- Name of QMzymeModel
universe -- MDAnalysis Universe object
frame (int, default=0) -- If trajectory was provided, specify a frame to base coordinates on
pickle_file (str, default=None) -- Provide name/path+file of previously pickled QMzymeModel object to inialize
- property n_regions
- add_region(region)
Add a QMzymeRegion to the model.
Registers the region as an attribute on the model instance and appends it to the tracked regions list.
- Parameters:
region (
QMzymeRegion) -- The QMzymeRegion instance to add to the model.
- get_region_names()
Get the names of all regions currently registered to the model.
- Returns:
A list of region names.
- Return type:
list of str
- get_region(region_name=None)
Retrieve a specific QMzymeRegion by its name.
- Parameters:
region_name (str, default=None) -- The name of the region to fetch.
- Returns:
The requested QMzyme region object.
- Return type:
- has_region(region_name)
Check if a region name is already registered as an attribute on the model.
- Parameters:
region_name (str) -- The name of the region to look for.
- Returns:
True if the model has an attribute matching region_name, False otherwise.
- Return type:
bool
- remove_region(region_name)
Removes a QMzymeRegion from the QMzymeModel.
- Parameters:
region_name (str, required) -- Name of the region to be removed.
- import_region(region_file, name)
Loads a new structure file to the existing universe, shifts its atom IDs to prevent overlapping with the current model's universe.
- Parameters:
lig_file (str) -- Path to the structure file (e.g., PDB).
name (str) -- Name of the returned region.
- Returns:
The built replacement ligand region.
- Return type:
- pymol_visualize(filename: str = None, model_surface: bool = True, output_dir=None)
Creates a QMzymeModel_visualize.py script that you can load into PyMol.
- Parameters:
filename (str, optional) -- Name of PyMol .py file. If not specified, the name attribute of the QMzymeModel will be used.
- Model_surface:
Turning this into False will reduce the GPU load for PyMOL, sometimes preventing GL error.
- Output_dir:
Name of the output directory. If not specified. the python sript and pdb files generated from pymol_visualize() will be placed at the base directory.
- print_overview()
Prints a formatted overview of the model and its regions, including atom/residue counts, designated methods, and creation parameters.
- store_pickle(filename=None)
The pickle file will by default be named after the QMzymeModel.name attribute, which by default is the base name of the file originally used to initialize the model. You can also specify a filename by passing the argument 'filename'.
- Parameters:
filename -- Name of the pickle file generated. If no extension
is provided the '.pkl' extension will be added to the str :type filename: str