def calcPCA(self, ensemble, logger):
        '''
        calcPCA:
        #ensemble: prody ensmeble with structure information
        
        calculate PCA for a set of structures    
        
        return: prody.pca object
        '''
        logger.info("Calculate PCA")
             
        PCAname = ensemble.getTitle()
        pca = prody.PCA(PCAname)
        pca.buildCovariance(ensemble)

        logger.info("PCA")
        pca.calcModes()
        logger.info(repr(pca))
        
        outputname = PCAname + "_pca_modes.nmd"
                    
        prody.writeNMD(outputname, pca[:10], self.selection_ref_structure)
        
        if self.vmd == True:
            prody.viewNMDinVMD(outputname)
        logger.info(f"PCA is saved in: {outputname}")
        return pca, outputname
 def calcANM(self, structure, logger):
     '''
     calcANM:
     #structure: prody PDB-structure
     
     calculate ANM for one specific structure    
     
     return: prody.anm object
     '''
     logger.info("Calculate ANM")
     ANMname = structure.getLabel()
     anm = prody.ANM(ANMname)
     anm.buildHessian(structure, cutoff=15.0)
     anm.calcModes()
     # write out the three lowest modes as NMD file (visualize with NMWizard in VMD
     outputname = ANMname + "_anm_modes.nmd"
     prody.writeNMD(outputname, anm[:10], self.selection_ref_structure)
     if self.vmd == True:
         prody.viewNMDinVMD(outputname)
     logger.info(f"ANM is saved in: {outputname}")
     return anm