Esempio n. 1
0
# ==============================================================================

from __future__ import absolute_import, division, print_function, unicode_literals
import os
import argparse
import glob
import multiprocessing as mp
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.widgets import LassoSelector
from matplotlib.path import Path
from AdaptivePELE.atomset import atomset
import AdaptivePELE.utilities.utilities as adapt_tools

avail_backend = adapt_tools.get_available_backend()
if avail_backend is not None:
    plt.switch_backend(avail_backend)

try:
    FileExistsError
except NameError:
    FileExistsError = OSError


def parseArguments():
    """
        Parse command line arguments
        :returns: str, str str, str, str, bool, int, str, str, str,    -- path to adaptive's results,
            column to plot in the X axis, column to plot in the Y axis, column to plot in the Z axis,
            path to the output's folder, whether to use a summary.csv already created, number of
Esempio n. 2
0
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import argparse
import matplotlib.pyplot as plt
from AdaptivePELE.utilities import utilities
plt.style.use("ggplot")
avail_backend = utilities.get_available_backend()
if avail_backend is not None:
    plt.switch_backend(avail_backend)


def parseArguments():
    """
        Parse command line arguments

        :returns: argparse.Namespace -- Namespace with the input parameters
    """
    desc = "Plot relevant information from a simulation's report files.\n"\
           "It MUST be run from the root epoch folder (i.e., where it can find the folders 0/, 1/, 2/, ... lastEpoch/"
    parser = argparse.ArgumentParser(description=desc)
    parser.add_argument("steps",
                        type=int,
                        default=4,
                        help="Pele steps per run")
    parser.add_argument("xcol", type=int, default=2, help="xcol")
    parser.add_argument("ycol", type=int, default=4, help="ycol")
    parser.add_argument("filename",
                        type=str,
                        default="report_",
                        help="Report filename")
    parser.add_argument("-points",
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import os
import collections
import argparse
import matplotlib.pyplot as plt
from AdaptivePELE.utilities.utilities import get_available_backend

avail_backend = get_available_backend()
if avail_backend is not None:
    plt.switch_backend(avail_backend)
try:
    # This might fail for older versions of matplotlib (e.g in life cluster)
    plt.style.use("ggplot")
except NameError:
    pass


def printHelp():
    """
        Create command line interface

        :returns: str -- Output filename ( if specified )
    """
    desc = "Program that prints the number of clusters throughout an adaptive sampling simulation. "\
           "It must be run in the root folder. "
    parser = argparse.ArgumentParser(description=desc)
    parser.add_argument("-f",
                        "--filename",
                        type=str,
                        default="",