File: appa.py

package info (click to toggle)
abinit 9.10.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 518,712 kB
  • sloc: xml: 877,568; f90: 577,240; python: 80,760; perl: 7,019; ansic: 4,585; sh: 1,925; javascript: 601; fortran: 557; cpp: 454; objc: 323; makefile: 77; csh: 42; pascal: 31
file content (36 lines) | stat: -rwxr-xr-x 869 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Abinit Post Process Application
author: Martin Alexandre
last edited: April 2013
"""

import sys,os
from PyQt4 import Qt,QtGui,QtCore

def main():

    import gui.main_frame as mf  # GUI

    app = QtGui.QApplication(sys.argv)
    ex = mf.MainFrame()
    try:
        sys.exit(app.exec_())
    except SystemExit:
        import os, signal
        os.kill(os.getpid(), signal.SIGQUIT)
        pass


if __name__ == '__main__':
    try:
        import fortran.math
        main()
    except:
        print('To use APPA, you first need to compile a FORTRAN file:')
        print('   cd ~appa/fortran')
        print('f2py -c math.f90 --fcompiler=\'gfortran\' -m math')
        print('f2py -c topology.f90 --fcompiler=\'gfortran\' -m topology')
        print('f2py -c positions.f90 --fcompiler=\'gfortran\' -m positions')