vermouth.pdb.cif module¶
Provides functionality to read CIF files.
- vermouth.pdb.cif.casting(value, typeto)[source]¶
Cast a value to its correct type with an exception value: value to cast type: the expected output type of the value
- vermouth.pdb.cif.cif_entry_reader(cf, entry, cif_categories_all, cif_category_names, cif_category_types, essential_properties, modelidx, exclude, ignh)[source]¶
Read a single entry of a parsed cif file
- Parameters:
cf – CIF file object parsed by PyCifRW
entry (str) – Key of the cf dict
cif_categories_all (list) – List of valid category keys contained within a cif file entry
cif_category_names (list) – Common name for category entries
cif_category_types (list) – Type to cast CIF data to
essential_properties (list) – List of properties which must be contained
modelidx (int) – If the cif file contains multiple models, which one to select.
exclude (collections.abc.Container[str]) – Atoms that have one of these residue names will not be included.
ignh (bool) – Whether hydrogen atoms should be ignored.
- Returns:
A parsed molecule. Will not contain edges
- Return type:
- vermouth.pdb.cif.read_cif_file(file_name, exclude=('SOL', 'HOH'), ignh=False, modelidx=1)[source]¶
Parse a CIF file to create a list of molecules using the PyCIFRW library
- Parameters:
file_name (str) – The file to read.
exclude (collections.abc.Container[str]) – Atoms that have one of these residue names will not be included.
ignh (bool) – Whether hydrogen atoms should be ignored.
modelidx (int) – If the cif file contains multiple models, which one to select.
- Returns:
The parsed molecules. Will not contain edges
- Return type: