예제 #1
0
                    curses.endwin()

                # SUB OPT 8 : # Frequency range
                if x2 == ord('8'):
                    frequency_limits = np.array([float(Fraction(s)) for s in
                                                 get_param(screen, "Insert frequency range (min, max)").split(',')])
                    print(frequency_limits)
                    calculation.set_frequency_limits(frequency_limits)
                    curses.endwin()

    curses.endwin()

# Testing
if __name__ == 'test_gui.py':
    import dynaphopy as controller
    import dynaphopy.functions.iofunctions as reading

    # Get data from input file
    input_parameters = reading.read_parameters_from_input_file(sys.argv[1])

    structure = reading.read_from_file_structure_outcar(input_parameters['structure_file_name'])
    structure.set_force_set( file_IO.parse_FORCE_SETS(filename=input_parameters['force_constants_file_name']))
    structure.set_primitive_matrix(input_parameters['primitive_matrix'])
    structure.set_supercell_phonon(input_parameters['supercell_matrix'])

    trajectory_file_name = sys.argv[2]

    trajectory = reading.read_from_file_trajectory(trajectory_file_name,structure,last_steps=5000)

    calculation = controller.Quasiparticle(trajectory)
    calculation.set_band_ranges(input_parameters['bands'])
예제 #2
0
                    curses.endwin()

                if x2 == ord('3'):
                    calculation.set_number_of_mem_coefficients(
                        int(get_param(screen, "Insert number of coefficients")))
                    curses.endwin()


    curses.endwin()



#Just for testing
if __name__ == 'test_gui.py':
    import dynaphopy.classes.controller as controller
    import dynaphopy.functions.iofunctions as reading
    #Get data from input file
    input_parameters = reading.read_parameters_from_input_file(sys.argv[1])

    structure = reading.read_from_file_structure_outcar(input_parameters['structure_file_name'])
    structure.set_force_set( file_IO.parse_FORCE_SETS(filename=input_parameters['force_constants_file_name']))
    structure.set_primitive_matrix(input_parameters['primitive_matrix'])
    structure.set_super_cell_phonon(input_parameters['super_cell_matrix'])

    trajectory_file_name = sys.argv[2]

    trajectory = reading.read_from_file_trajectory(trajectory_file_name,structure,last_steps=5000)

    calculation = controller.Calculation(trajectory)
    calculation.set_band_ranges(input_parameters['bands'])
예제 #3
0


# 3. Set super cell phonon, this matrix denotes the super cell used in PHONOPY for creating
# the finite displacements

structure.set_super_cell_phonon([[4, 0, 0],
                                 [0, 4, 0],
                                 [0, 0, 4]])



################################### TRAJECTORY FILES ##########################################
# 4. Set the location of OUTCAR file containing the Molecular Dynamics trajectory

trajectory = reading.read_from_file_trajectory('/home/abel/VASP/Si-dynamic_300/RUN1/OUTCAR',structure)
calculation = controller.Calculation(trajectory)




############################## DEFINE CALCULATION REQUESTS #####################################
# All this options are totally optional and independent, just comment or uncomment the desired ones
# Other option not yet shown in this example script may be available (take a look at controller,py)
# The requests will be satisfied by request order
# Python scripting features may be used for more complex requests

# 5a. Set wave vector into which is going to be projected the velocity (default: gamma point)
calculation.set_reduced_q_vector([0.5, 0.0, 0.0]) # X Point

# 5b. Define range of frequency to analyze (default: 0-20THz)