コード例 #1
0
class BandStructure:
    """
    Want to be able to initialise with
    """
    def __init__(self, labels, coords, steps=100):
        """

        :param labels: List of lists or tuples
        :param coords:
        :param steps:
        """
        self.labels = labels
        self.coords = coords
        self.steps = steps
        return


    def check_labels(self):
        return

    def check_labels_and_coords(self):

    def band_structure_to_tree(self):
        """
        Convert BandStructure object into tree that can be parsed into Exciting input XML
        :return:
        """




calculator = Exciting(
    dir='excitingtestfiles',
    speciespath=os.environ['EXCITINGROOT']+'/species',
    paramdict={'title':{'text()':'N3O'},
               'groundstate':{'ngridk':'1 2 3','tforce':'true'},
               'relax':{},
               'properties':{'dos':{},
                             'bandstructure':
                                 {'plot1d':{'path':{'steps':'100',
                                                    'point':
                        [{'coord':'0.75000   0.50000   0.25000', 'label':'W'},
                         {'coord':'0.50000   0.50000   0.50000', 'label':'L'},
                         {'coord':'0.00000   0.00000   0.00000', 'label':'G'},
                         {'coord':'0.50000   0.50000   0.00000', 'label':'X'},
                         {'coord':'0.75000   0.50000   0.25000', 'label':'W'},
                         {'coord':'0.75000   0.37500   0.37500', 'label':'K'}]
                                                    }}}}})

calculator.write(a)
コード例 #2
0
def test_exciting():
    from ase import Atoms
    from ase.io import read, write
    from ase.calculators.exciting import Exciting


    a = Atoms('N3O',
              [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0.5, 0.5, 0.5)],
              pbc=True)

    write('input.xml', a)
    b = read('input.xml')

    print(a)
    print(a.get_positions())
    print(b)
    print(b.get_positions())

    Exciting(dir='excitingtestfiles',
             kpts=(4, 4, 3),
             # bin='/fshome/chm/git/exciting/bin/excitingser',
             maxscl=3)
コード例 #3
0
ファイル: factories.py プロジェクト: YanJordan/ase
 def calc(self, **kwargs):
     from ase.calculators.exciting import Exciting
     return Exciting(bin=self.executable, **kwargs)
コード例 #4
0
ファイル: exciting.py プロジェクト: vorwerkc/excitingscripts
          [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0.5, 0.5, 0.5)],
          pbc=True)
a.new_array("rmt",np.array([-1.,-1.,2.3,2]))
print "rmt repeated cell",a.repeat((1,1,2)).get_array("rmt")
print "rmt ",a.get_array("rmt")
write('geo.exi', a)
b = read('geo.exi')

print "a atoms:",a
print "a pos:",a.get_positions()
print "b atoms:",b
print "b pos:",b.get_positions()

calculator1 = Exciting(dir='excitingtestfiles1',
                      kpts=(4, 4, 3),
                      maxscl=3,
                      title="N3O"
                      #bin='/fshome/chm/git/exciting/bin/excitingser'
                      )
 
calculator3 = Exciting(dir='excitingtestfiles3',
                       paramdict={ "title":{"text()":"N3O"},
                                   "groundstate":{"ngridk":"1 2 3","tforce":"true"},
                                   "structureoptimization":{},
                                   "properties":{"dos":{},
                                   "bandstructure":{"plot1d":{
                                      "path":{ "steps":"100", 
                                        "point":[{"coord":"0.75000   0.50000   0.25000", "label":"W"},    
                                                 {"coord":"0.50000   0.50000   0.50000","label":"L" },   
                                                 {"coord":"0.00000   0.00000   0.00000", "label":"GAMMA"},  
                                                 {"coord":"0.50000   0.50000   0.00000", "label":"X"   },  
                                                 {"coord":"0.75000   0.50000   0.25000", "label":"W"  },  
コード例 #5
0
from ase import Atoms
from ase.io import read, write
from ase.calculators.exciting import Exciting

a = Atoms('N3O', [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0.5, 0.5, 0.5)], pbc=True)

write('input.xml', a)
b = read('input.xml')

print(a)
print(a.get_positions())
print(b)
print(b.get_positions())

calculator = Exciting(
    dir='excitingtestfiles',
    kpts=(4, 4, 3),
    # bin='/fshome/chm/git/exciting/bin/excitingser',
    maxscl=3)
コード例 #6
0
import os
from ase import Atoms
from ase.calculators.exciting import Exciting

# test structure, not real
a = Atoms('N3O', [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0.5, 0.5, 0.5)], pbc=True)

calculator = Exciting(
    dir='excitingtestfiles',
    speciespath=os.environ['EXCITINGROOT']+'/species',
    paramdict={'title': {'text()': 'N3O'},
               'groundstate': {'ngridk': '1 2 3', 'tforce': 'true'},
               'relax': {},
               'properties': {'dos': {},
                             'bandstructure':
                                 {'plot1d': {'path': {'steps': '100',
                                                    'point':
                        [{'coord': '0.75000   0.50000   0.25000', 'label': 'W'},
                         {'coord': '0.50000   0.50000   0.50000', 'label': 'L'},
                         {'coord': '0.00000   0.00000   0.00000', 'label': 'G'},  
                         {'coord': '0.50000   0.50000   0.00000', 'label': 'X'},  
                         {'coord': '0.75000   0.50000   0.25000', 'label': 'W'},  
                         {'coord': '0.75000   0.37500   0.37500', 'label': 'K'}]
                                                    }}}}})

calculator.write(a)
コード例 #7
0
ファイル: exciting.py プロジェクト: PHOTOX/fuase
import os
from ase import Atoms
from ase.calculators.exciting import Exciting

# test structure, not real
a = Atoms('N3O', [(0, 0, 0), (1, 0, 0), (0, 0, 1), (0.5, 0.5, 0.5)], pbc=True)

calculator = Exciting(
    dir='excitingtestfiles',
    speciespath=os.environ['EXCITINGROOT']+'/species',
    paramdict={'title':{'text()':'N3O'},
               'groundstate':{'ngridk':'1 2 3','tforce':'true'},
               'relax':{},
               'properties':{'dos':{},
                             'bandstructure':
                                 {'plot1d':{'path':{'steps':'100',
                                                    'point':
                        [{'coord':'0.75000   0.50000   0.25000', 'label':'W'},
                         {'coord':'0.50000   0.50000   0.50000', 'label':'L'},
                         {'coord':'0.00000   0.00000   0.00000', 'label':'G'},  
                         {'coord':'0.50000   0.50000   0.00000', 'label':'X'},  
                         {'coord':'0.75000   0.50000   0.25000', 'label':'W'},  
                         {'coord':'0.75000   0.37500   0.37500', 'label':'K'}]
                                                    }}}}})

calculator.write(a)