// calculations, we are only interested in the protein itself
// These are removed for the sake of computational speed using a boolean
// mask
protein_mask = struc.filter_amino_acids(template)
template = template[protein_mask]
// We could have loaded the trajectory also with
// "strucio.load_structure()", but in this case we only want to load
// those coordinates that belong to the already selected atoms of the
// template structure.
// Hence, we use the "XTCFile" class directly to load the trajectory
// This gives us the additional option that allows us to select the
// coordinates belonging to the amino acids.
xtc_file = xtc.XTCFile()
xtc_file.read(traj_file_path, atom_i=np.where(protein_mask)[0])
trajectory = xtc_file.get_structure(template)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Since the MD simulation used periodic boundaries, the protein might be
// segmented over the box boundary.