src/budeff/force_field.py
def _make_ff_params_dict(self):
        """Makes a dictionary containing PyAtomData for the force field.

        Returns
        -------
        ff_params_struct_dict: dict
            Dictionary containing PyAtomData structs for the force field
            parameters for each atom in the force field.
        """
        try:
            ff_params_struct_dict = {}
            for res in self.keys():
                if res == 'KEY':
                    continue
                if res not in ff_params_struct_dict:
                    ff_params_struct_dict[res] = {}
                for atom, params in self[res].items():
                    ff_params_struct_dict[res][atom] = PyAtomData(
                        atom.encode(), params[0].encode(), *params[1:])
        except TypeError:
            raise ForceFieldParameterError(
                'Badly formatted force field parameters: {}'.format(params))
        return ff_params_struct_dict
def _make_ff_params_dict(self):
        try:
            ff_params_struct_dict = {}
            for res in self.keys():
                if res == 'KEY':
                    continue
                if res not in ff_params_struct_dict:
                    ff_params_struct_dict[res] = {}
                for atom, params in self[res].items():
                    ff_params_struct_dict[res][atom] = PyAtomData(
                        atom.encode(), params[0].encode(), *params[1:])
        except TypeError:
            raise ForceFieldParameterError(
                'Badly formatted force field parameters: {}'.format(params))
        return ff_params_struct_dict
def _make_ff_params_dict ( self ) : try : ff_params_struct_dict = { } for res in self . keys ( ) : if res == 'KEY' : continue if res not in ff_params_struct_dict : ff_params_struct_dict [ res ] = { } for atom , params in self [ res ] . items ( ) : ff_params_struct_dict [ res ] [ atom ] = PyAtomData ( atom . encode ( ) , params [ 0 ] . encode ( ) , * params [ 1 : ] ) except TypeError : raise ForceFieldParameterError ( 'Badly formatted force field parameters: {}' . format ( params ) ) return ff_params_struct_dict
Makes a dictionary containing PyAtomData for the force field.

        Returns
        -------
        ff_params_struct_dict: dict
            Dictionary containing PyAtomData structs for the force field
            parameters for each atom in the force field.
Makes a dictionary containing PyAtomData for the force field .