Esempio n. 1
0
if __name__ == '__main__':
    print('+-------------------------------------------------------+\n'
          '| Development script of the ChemEnv utility of pymatgen |\n'
          '| Visualization of the model coordination environments  |\n'
          '+-------------------------------------------------------+\n')
    allcg = AllCoordinationGeometries()
    vis = None
    while True:
        cg_symbol = raw_input(
            'Enter symbol of the geometry you want to see, "l" to see the list '
            'of existing geometries or "q" to quit : ')
        if cg_symbol == 'q':
            break
        if cg_symbol == 'l':
            print(
                allcg.pretty_print(maxcn=13,
                                   additional_info={'nb_hints': True}))
            continue
        try:
            cg = allcg[cg_symbol]
        except LookupError:
            print('Wrong geometry, try again ...')
            continue
        print(cg.name)
        for ipoint, point in enumerate(cg.points):
            print('Point #{:d} : {} {} {}'.format(ipoint, repr(point[0]),
                                                  repr(point[1]),
                                                  repr(point[2])))
        print('Algorithms used :')
        for ialgo, algo in enumerate(cg.algorithms):
            print('Algorithm #{:d} :'.format(ialgo))
            print(algo)
Esempio n. 2
0

if __name__ == '__main__':
    print('+-------------------------------------------------------+\n'
          '| Development script of the ChemEnv utility of pymatgen |\n'
          '| Visualization of the model coordination environments  |\n'
          '+-------------------------------------------------------+\n')
    allcg = AllCoordinationGeometries()
    vis = None
    while True:
        cg_symbol = input('Enter symbol of the geometry you want to see, "l" to see the list '
                              'of existing geometries or "q" to quit : ')
        if cg_symbol == 'q':
            break
        if cg_symbol == 'l':
            print(allcg.pretty_print(maxcn=13, additional_info={'nb_hints': True}))
            continue
        try:
            cg = allcg[cg_symbol]
        except LookupError:
            print('Wrong geometry, try again ...')
            continue
        print(cg.name)
        for ipoint, point in enumerate(cg.points):
            print('Point #{:d} : {} {} {}'.format(ipoint, repr(point[0]), repr(point[1]), repr(point[2])))
        print('Algorithms used :')
        for ialgo, algo in enumerate(cg.algorithms):
            print('Algorithm #{:d} :'.format(ialgo))
            print(algo)
            print('')
        # Visualize the separation plane of a given algorithm
Esempio n. 3
0

if __name__ == '__main__':
    print('+-------------------------------------------------------+\n'
          '| Development script of the ChemEnv utility of pymatgen |\n'
          '| Visualization of the model coordination environments  |\n'
          '+-------------------------------------------------------+\n')
    allcg = AllCoordinationGeometries()
    vis = None
    while True:
        cg_symbol = raw_input('Enter symbol of the geometry you want to see, "l" to see the list '
                              'of existing geometries or "q" to quit : ')
        if cg_symbol == 'q':
            break
        if cg_symbol == 'l':
            print(allcg.pretty_print(maxcn=12))
            continue
        try:
            cg = allcg[cg_symbol]
        except LookupError:
            print('Wrong geometry, try again ...')
            continue
        print(cg.name)
        for ipoint, point in enumerate(cg.points):
            print('Point #{:d} : {} {} {}'.format(ipoint, repr(point[0]), repr(point[1]), repr(point[2])))
        print('Algorithms used :')
        for ialgo, algo in enumerate(cg.algorithms):
            print('Algorithm #{:d} :'.format(ialgo))
            print(algo)
            print('')
        # Visualize the separation plane of a given algorithm
Esempio n. 4
0
if __name__ == "__main__":
    print("+-------------------------------------------------------+\n"
          "| Development script of the ChemEnv utility of pymatgen |\n"
          "| Visualization of the model coordination environments  |\n"
          "+-------------------------------------------------------+\n")
    allcg = AllCoordinationGeometries()
    vis = None
    while True:
        cg_symbol = input(
            'Enter symbol of the geometry you want to see, "l" to see the list '
            'of existing geometries or "q" to quit : ')
        if cg_symbol == "q":
            break
        if cg_symbol == "l":
            print(
                allcg.pretty_print(maxcn=20,
                                   additional_info={"nb_hints": True}))
            continue
        try:
            cg = allcg[cg_symbol]
        except LookupError:
            print("Wrong geometry, try again ...")
            continue
        print(cg.name)
        for ipoint, point in enumerate(cg.points):
            print("Point #{:d} : {} {} {}".format(ipoint, repr(point[0]),
                                                  repr(point[1]),
                                                  repr(point[2])))
        print("Algorithms used :")
        for ialgo, algo in enumerate(cg.algorithms):
            print("Algorithm #{:d} :".format(ialgo))
            print(algo)
Esempio n. 5
0
     "+-------------------------------------------------------+\n"
     "| Development script of the ChemEnv utility of pymatgen |\n"
     "| Visualization of the model coordination environments  |\n"
     "+-------------------------------------------------------+\n"
 )
 allcg = AllCoordinationGeometries()
 vis = None
 while True:
     cg_symbol = raw_input(
         'Enter symbol of the geometry you want to see, "l" to see the list '
         'of existing geometries or "q" to quit : '
     )
     if cg_symbol == "q":
         break
     if cg_symbol == "l":
         print(allcg.pretty_print(maxcn=12))
         continue
     try:
         cg = allcg[cg_symbol]
     except LookupError:
         print("Wrong geometry, try again ...")
         continue
     print(cg.name)
     for ipoint, point in enumerate(cg.points):
         print("Point #{:d} : {} {} {}".format(ipoint, repr(point[0]), repr(point[1]), repr(point[2])))
     print("Algorithms used :")
     for ialgo, algo in enumerate(cg.algorithms):
         print("Algorithm #{:d} :".format(ialgo))
         print(algo)
         print("")
     # Visualize the separation plane of a given algorithm