there is the following line:
…Filtering lines NOT starting with one of these words: [‘ATOM’, ‘MODEL’, ‘ENDMDL’].
It is possible to retain even the HETATM lines as these can contain informations relative to
important ions present in the structure in the case they are present?
If so how to modify the previous code lines?
yes, all the info you need (for all the building blocks) can be found in the BioBB API documentation. In particular, for the pdb building block, the documentation (here) says:
filter (str) - ([“ATOM”, “MODEL”, “ENDMDL”]) Array of groups to be kept. If value is None or False no filter will be applied. All the possible values are defined in the official PDB specification).
So to keep the HETATM groups, you can either include the HETATM group in the filter property or just define it as False or None to keep all the information from the PDB file.