Intrinsic flexibility of protein molecules enables them to change their 3D structure and perform their specific task. Therefore, identifying rigid regions and consequently flexible regions of proteins has a significant role in studying protein molecules' function. In this study, we developed a kinematic model of protein molecules considering all covalent and hydrogen bonds in protein structure. Then, we used this model and developed two independent rigidity analysis methods to calculate degrees of freedom (DOF) and identify flexible and rigid regions of the proteins. The first method searches for closed loops inside the protein structure and uses Grübler–Kutzbach (GK) criterion. The second method is based on a modified 3D pebble game. Both methods are implemented in a matlab program and the step by step algorithms for both are discussed. We applied both methods on simple 3D structures to verify the methods. Also, we applied them on several protein molecules. The results show that both methods are calculating the same DOF and rigid and flexible regions. The main difference between two methods is the run time. It's shown that the first method (GK approach) is slower than the second method. The second method takes 0.29 s per amino acid versus 0.83 s for the first method to perform this rigidity analysis.