#!/bin/python3

import sys
from conformations import *

if __name__ == "__main__":
    if len(sys.argv) < 2:
        sys.exit("Error : usage '$ python3 projet8 md.pdb ncluster(int)'")
    
    # Initialization of the class, meaning loading the pdb and writing pd.df
    confs = Conformations(sys.argv[1])
    nclusters = int(sys.argv[2])
    
    # Computation of the distance matrixes
    confs.identity()
    #confs.dissimilarity()

    # Running the kmedoids algorithm on the identity distance matrix
    clusters_idt = confs.small_kmedoids('identity', nclusters)
    medoids_idt = clusters_idt[1]
    clusters_idt = clusters_idt[0]

    # Running the kmedoids algorithm on the dissimilarity distance matrix
    #clusters_diss = confs.small_kmedoids('dissimilarity', nclusters)
    #medoids_diss = clusters_diss[1]
    #clusters_diss = clusters_diss[0]
    
