def test_get_common_features_2():
    yaml_file = load_yaml_file(os.path.join(base_dir,"mdl_dir","project.yaml"))
    aligned_dict={}
    for protein in yaml_file["protein_list"]:
        t = load_random_traj(yaml_file, protein)
        aligned_dict[protein] = t.top.to_fasta(chain=0)

    f= DihedralFeaturizer(types=['phi','psi','chi1'])
    common_feature_dic,_ = _get_common_features(yaml_file,f, aligned_dict, False)
    assert(len(set([len(common_feature_dic[i]) for i in yaml_file["protein_list"]]))==1)
    return
def test_get_common_features():
    yaml_file = load_yaml_file(os.path.join(base_dir,"mdl_dir","project.yaml"))
    aligned_dict={}
    for protein in yaml_file["protein_list"]:
        t = load_random_traj(yaml_file, protein)
        aligned_dict[protein] = t.top.to_fasta(chain=0)

    f= DihedralFeaturizer()
    common_feature_dic,_ = _get_common_features(yaml_file,f, aligned_dict, False)
    for protein in yaml_file["protein_list"]:
        t = load_random_traj(yaml_file, protein)
        assert(len(common_feature_dic[protein])==f.transform(t)[0].shape[1])

    return