Ejemplo n.º 1
0
def reject2(args):
    """
    原子が 0 意外を出力
    """
    path, pos = args
    strs = CVMStrs.from_str_file(path)
    tmpstr = []
    for structure in strs:
        a = structure.label.num_atoms[int(pos)]
        if a != 0:
            tmpstr.append(structure)
    outstr = CVMStrs(tmpstr)
    fname = path + "_rejcted"
    outstr.make_file(fname)
Ejemplo n.º 2
0
def reject(path, limit):
    """
    条件で構造を絞る
    """
    strs = CVMStrs.from_str_file(path)
    tmpstr = []
    for structure in strs:
        a = structure.label.num_atoms[0] / (structure.label.num_atoms[0] +
                                            structure.label.num_atoms[2] +
                                            structure.label.num_atoms[3])
        if a != 0 and a < limit:
            tmpstr.append(structure)
    outstr = CVMStrs(tmpstr)
    fname = path + "_rejcted"
    outstr.make_file(fname)
Ejemplo n.º 3
0
def reject_bin(args):
    """
    条件で構造を絞る
    二元系用
    """
    path, limit = args
    strs = CVMStrs.from_str_file(path)
    tmpstr = []
    for structure in strs:
        a = structure.label.num_atoms[0] / (structure.label.num_atoms[0] +
                                            structure.label.num_atoms[1])
        if a <= limit:
            tmpstr.append(structure)
    outstr = CVMStrs(tmpstr)
    fname = path + "_rejcted"
    outstr.make_file(fname)