def init_log(args, mdtrajectory):
"""
DESCRIPTION
initialyse the logfile with some information
----
Args:
args (dict): dictionnary of all arguments (argparse)
"""
topo = args["top"]
traj = args["traj"]
selection_string = args["select_traj"]
select_align = args["select_alignement"]
select_rmsd = args["select_rmsd"]
logname = os.path.splitext(args["logfile"])[0]
LOGFILE.write("========================================================\n")
LOGFILE.write("==================== TTCLUST {} ===================\n"\
.format(__version__))
LOGFILE.write("========================================================\n")
LOGFILE.write("\n")
LOGFILE.write("************ General information ************\n")
LOGFILE.write("software version : {}\n".format(__version__))
LOGFILE.write("Created on : {}\n".format(datetime.datetime.now()))
write_command_line()
LOGFILE.write("DESTINATION FOLDER : {}\n".format(os.getcwd()+"/"+logname))
LOGFILE.write("ARGUMENTS : \n")
LOGFILE.write(" Selection string :\n")
LOGFILE.write(" Atoms selected in trajectory = {} \n".format(
selection_string))
LOGFILE.write(" Atoms selected for alignement = {} \n".format(
select_align))
LOGFILE.write(" Atoms selected for RMSD = {} \n".format(select_rmsd))
LOGFILE.write(" trajectory file : {} \n".format(traj))
LOGFILE.write(" Number of frames : {} \n".format(mdtrajectory.n_frames))
LOGFILE.write(" Number of atoms : {} \n".format(mdtrajectory.n_atoms))
LOGFILE.write(" topology file : {} \n".format(topo))
LOGFILE.write(" method used of clusterring : {}".format(args["method"]))
LOGFILE.write("\n\n")
if args["ngroup"]:
LOGFILE.write(" Number of cluster asked: {}\n".format(args["ngroup"]))
if args["cutoff"]:
LOGFILE.write(" cutoff for dendrogram clustering: {}\n".format("cutoff"))
评论列表
文章目录