# Construct reference if available try: reference = MDAnalysis.Universe(options.topology_filename, options.topology_filename) except: reference = None # Construct ensemble ensemble = Ensemble(topology=options.topology_filename, trajectory=options.trajectory_filename, atom_selection_string=options.atom_selection_string, frame_interval=options.frame_interval) # Align ensemble to reference if not options.no_align: ensemble.align(reference) # Select covariance estimator estimator = EstimatorML() if options.covariance_estimator == "shrinkage": estimator = EstimatorShrinkage() # Disable reference unless use_distance_to_reference is set if not options.use_distance_to_reference: reference = None # Calculate covariance matrix cov_matrix = covariance_matrix( ensemble, estimator=estimator, mass_weighted=options.mass_weighted_analysis,
# Construct reference if available try: reference = MDAnalysis.Universe(options.topology_filename, options.topology_filename) except: reference = None # Construct ensemble ensemble = Ensemble(topology=options.topology_filename, trajectory=options.trajectory_filename, atom_selection_string=options.atom_selection_string, frame_interval=options.frame_interval) # Align ensemble to reference if not options.no_align: ensemble.align(reference) # Select covariance estimator estimator = EstimatorML() if options.covariance_estimator == "shrinkage": estimator = EstimatorShrinkage() # Disable reference unless use_distance_to_reference is set if not options.use_distance_to_reference: reference = None # Calculate covariance matrix cov_matrix = covariance_matrix(ensemble, estimator = estimator, mass_weighted=options.mass_weighted_analysis, reference=reference)