# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Nudged Elastic Band Configuration
# -------------------------------------------------------------

# Setup the configuration list
configuration_list = []

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.982041715294,  0.246694062342,  0.275128400535],
                          [ 0.499232444771,  0.751898026286,  0.230531785982],
                          [ 0.017950887429,  0.753300540974,  0.724867117552],
                          [ 0.50077021535 ,  0.248099410177,  0.769464509178],
                          [-0.000000705417,  0.00000232252 , -0.000001274605],
                          [ 0.000000435241,  0.499998607917, -0.000001112076],
                          [ 0.500000391343,  0.499998658146,  0.500004272673],
                          [ 0.426563095801,  0.248011053308,  0.098924216726],
                          [ 0.934070383214,  0.746725600526,  0.400962859703],
                          [ 0.573453092508,  0.751988278932,  0.901094113177],
                          [ 0.065981060678,  0.253279499153,  0.599012866909],
                          [ 0.75683635775 ,  0.247432919907,  0.102997123442],
                          [ 0.259628877817,  0.735009579296,  0.389081843179],
                          [ 0.24315802154 ,  0.752567419257,  0.897001742099],
                          [ 0.740355659143,  0.264987365915,  0.610917451146],
                          [ 0.166751195607,  0.264900714388,  0.456232020591],
                          [ 0.690099646419,  0.753272333843,  0.043947993684],
                          [ 0.833239879416,  0.735098518905,  0.543786153138],
                          [ 0.309884518228,  0.246727551914,  0.956053133658],
                          [ 0.283516792861,  0.042085933704,  0.171213540201],
                          [ 0.795512079857,  0.947265538112,  0.320557178398],
                          [ 0.719012489213,  0.545932671755,  0.83002267256 ],
                          [ 0.229261840211,  0.457106244889,  0.673704581064],
                          [ 0.716503594202,  0.95790453104 ,  0.828787463887],
                          [ 0.204482627218,  0.052708286898,  0.679438208553],
                          [ 0.281007539981,  0.454078859388,  0.169976394731],
                          [ 0.770734143865,  0.542901029895,  0.326290615666]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.981702693028,  0.246785664319,  0.274216605472],
                          [ 0.498957199445,  0.751447374985,  0.230094684363],
                          [ 0.017887439954,  0.752244149058,  0.72514927379 ],
                          [ 0.500463082116,  0.247945596501,  0.770532468399],
                          [-0.000004434448, -0.000236569029,  0.000014605315],
                          [-0.000020885124,  0.499873295801, -0.000004601574],
                          [ 0.50369953993 ,  0.438932541685,  0.496684539506],
                          [ 0.42656338141 ,  0.248024163517,  0.098837322441],
                          [ 0.934136228505,  0.747472966294,  0.400793831505],
                          [ 0.573348793257,  0.751472562835,  0.901205201108],
                          [ 0.067207459925,  0.251088266168,  0.599885504897],
                          [ 0.756676962912,  0.247371391675,  0.102703839784],
                          [ 0.259488254469,  0.739163228219,  0.388663594117],
                          [ 0.243207755829,  0.752193749298,  0.897166529654],
                          [ 0.743459592742,  0.256216409386,  0.614383120951],
                          [ 0.158504793297,  0.256349811571,  0.455837194926],
                          [ 0.690199026164,  0.752895718808,  0.043921425933],
                          [ 0.834018345829,  0.738876554165,  0.543805439925],
                          [ 0.309636301771,  0.246744124688,  0.956171409401],
                          [ 0.283105962876,  0.042153859557,  0.170873105542],
                          [ 0.791721438597,  0.948217954818,  0.321101654933],
                          [ 0.718494759422,  0.545316389225,  0.830243106943],
                          [ 0.223500911741,  0.454861178581,  0.676567060387],
                          [ 0.716979779921,  0.957031271072,  0.829175744613],
                          [ 0.208774824267,  0.050099002605,  0.679116236252],
                          [ 0.281417009785,  0.454379702302,  0.169658302382],
                          [ 0.776913496386,  0.545198854154,  0.323199909331]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.981259861758,  0.247330104574,  0.273489349969],
                          [ 0.498626239256,  0.750933780459,  0.229960674456],
                          [ 0.017902209844,  0.751478363151,  0.725250195366],
                          [ 0.500106564141,  0.248370523822,  0.771341082673],
                          [-0.000017503202, -0.000342807901,  0.000031775442],
                          [-0.000041340284,  0.499892204736,  0.000004820223],
                          [ 0.508563822268,  0.376651727194,  0.492332987238],
                          [ 0.426483014978,  0.248203629277,  0.098794070941],
                          [ 0.934149203729,  0.747981889699,  0.400835940702],
                          [ 0.573290230008,  0.751168761314,  0.901293078569],
                          [ 0.068501086045,  0.250288020798,  0.600627271514],
                          [ 0.756497940938,  0.247493615056,  0.102498440567],
                          [ 0.259604158298,  0.74221567777 ,  0.388785474907],
                          [ 0.243256479928,  0.751965810077,  0.897247887791],
                          [ 0.746570135272,  0.251568590503,  0.617782882183],
                          [ 0.150620305433,  0.251714320296,  0.45559015393 ],
                          [ 0.690232614377,  0.752608534031,  0.043950667815],
                          [ 0.83354402812 ,  0.741832958905,  0.543807624586],
                          [ 0.309432897375,  0.246945643414,  0.956253898022],
                          [ 0.282675759353,  0.042287162362,  0.170615197907],
                          [ 0.788525061375,  0.948870797013,  0.321636920768],
                          [ 0.718124791167,  0.54502625416 ,  0.83034740347 ],
                          [ 0.22056728116 ,  0.454096433804,  0.677880244107],
                          [ 0.717393433131,  0.956477722357,  0.829462490316],
                          [ 0.212324693272,  0.048386175206,  0.678726762597],
                          [ 0.281717289621,  0.454829802282,  0.169524187548],
                          [ 0.780119581126,  0.54694771119 ,  0.321925641896]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.980809023552,  0.248115160575,  0.272870490775],
                          [ 0.498275441778,  0.750399456426,  0.229897369822],
                          [ 0.017955002623,  0.750915069287,  0.725310416529],
                          [ 0.499686112647,  0.249067354432,  0.772070925364],
                          [-0.000045190945, -0.000379318321,  0.000046309124],
                          [-0.000064825265,  0.499994243489,  0.000023709259],
                          [ 0.513287548827,  0.313461095377,  0.4880040701  ],
                          [ 0.426360048049,  0.248476451925,  0.098779993927],
                          [ 0.934096665787,  0.748386807856,  0.400900508363],
                          [ 0.573224724126,  0.750997331569,  0.901383797038],
                          [ 0.069411230478,  0.250305061937,  0.601342010804],
                          [ 0.756299086122,  0.247709714305,  0.102291179657],
                          [ 0.259660037361,  0.745012937235,  0.388929521148],
                          [ 0.243278989541,  0.751831165144,  0.897313457003],
                          [ 0.749402632814,  0.250443949719,  0.620834102928],
                          [ 0.143576280694,  0.250507965069,  0.455508003287],
                          [ 0.690251201955,  0.752384419182,  0.04399970851 ],
                          [ 0.833097557479,  0.744700784196,  0.543829050547],
                          [ 0.309197356291,  0.247233646454,  0.956343638201],
                          [ 0.28223813266 ,  0.042480953354,  0.170381721222],
                          [ 0.78589071813 ,  0.949317843697,  0.322001439082],
                          [ 0.717822438144,  0.544920612079,  0.830440274118],
                          [ 0.218894357016,  0.453860345435,  0.678716434461],
                          [ 0.717754902182,  0.956132166119,  0.829702852894],
                          [ 0.21533974972 ,  0.047248746806,  0.678386716804],
                          [ 0.281993074813,  0.455338290219,  0.169482879398],
                          [ 0.782328963247,  0.548250162443,  0.321206558346]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.980636922767,  0.249198311148,  0.27270081656 ],
                          [ 0.498133503096,  0.749955349842,  0.22987206136 ],
                          [ 0.018042503477,  0.750807627426,  0.725324576308],
                          [ 0.499634159271,  0.250054835983,  0.77228020624 ],
                          [-0.000062443003, -0.000199350202,  0.000038990941],
                          [-0.000057676573,  0.500209765929,  0.000042369993],
                          [ 0.514847532464,  0.250000703264,  0.486614598963],
                          [ 0.426300398393,  0.248909774634,  0.098776507776],
                          [ 0.934039990031,  0.748866983939,  0.400898333423],
                          [ 0.573237515727,  0.75111004485 ,  0.901403774042],
                          [ 0.069758750343,  0.25116871175 ,  0.601547029257],
                          [ 0.756207990147,  0.248093635829,  0.102247625506],
                          [ 0.259649353129,  0.747930280062,  0.388972738204],
                          [ 0.243331361158,  0.75191550128 ,  0.897323897596],
                          [ 0.750283332244,  0.252337801188,  0.621806503539],
                          [ 0.141430202641,  0.252284167164,  0.45551422046 ],
                          [ 0.690266300876,  0.752309533845,  0.044021180562],
                          [ 0.832891140216,  0.747953457131,  0.543812309417],
                          [ 0.30913428113 ,  0.247692304173,  0.956356783866],
                          [ 0.281870323574,  0.042911827495,  0.17022846433 ],
                          [ 0.783906034131,  0.949942501122,  0.322245432573],
                          [ 0.717578310342,  0.545028232074,  0.830458606695],
                          [ 0.217301267327,  0.453917824632,  0.679322309808],
                          [ 0.718016083045,  0.956198759279,  0.82977769309 ],
                          [ 0.217327532979,  0.047082664719,  0.677972458779],
                          [ 0.282309913054,  0.455896132324,  0.169561446902],
                          [ 0.783999824549,  0.549111504625,  0.320876213072]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.980663757669,  0.250282462636,  0.272879921562],
                          [ 0.498121615045,  0.749505641855,  0.229812491699],
                          [ 0.018124066452,  0.750688556022,  0.725322035013],
                          [ 0.499864143398,  0.251042483292,  0.772143056034],
                          [-0.000070095744,  0.000014615462,  0.000021099266],
                          [-0.000041615338,  0.500385544545,  0.000049478527],
                          [ 0.513239856018,  0.186546766491,  0.488067851353],
                          [ 0.426297977886,  0.249340619632,  0.098783753455],
                          [ 0.934043718069,  0.749337841232,  0.400816398034],
                          [ 0.573287773986,  0.75121639489 ,  0.901376244186],
                          [ 0.069422679232,  0.252024775214,  0.601410165995],
                          [ 0.756194513492,  0.248475756771,  0.102297325895],
                          [ 0.259617537271,  0.750844510017,  0.388893136018],
                          [ 0.243387249855,  0.751995372727,  0.897310342184],
                          [ 0.749330990194,  0.254133191312,  0.620778798095],
                          [ 0.143878397103,  0.253975145592,  0.455592538161],
                          [ 0.69029552688 ,  0.75223161682 ,  0.044010307281],
                          [ 0.833002658339,  0.751196865541,  0.543761880777],
                          [ 0.309158303502,  0.248149967951,  0.95632899884 ],
                          [ 0.281559504815,  0.043430376401,  0.170131994387],
                          [ 0.782273206641,  0.950729379114,  0.322379673943],
                          [ 0.717302812007,  0.545041574358,  0.830398142986],
                          [ 0.21523015584 ,  0.4536519252  ,  0.679941424701],
                          [ 0.718248303042,  0.956347218332,  0.829778906071],
                          [ 0.218854398938,  0.047220665656,  0.677576032083],
                          [ 0.282685329183,  0.45636153788 ,  0.169697754516],
                          [ 0.786034745825,  0.549798939243,  0.320437408818]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.980937956106,  0.251071734079,  0.273496880543],
                          [ 0.498298097669,  0.748959458362,  0.229786727494],
                          [ 0.018257186185,  0.750100741762,  0.725271202398],
                          [ 0.500461655046,  0.251740179631,  0.771501144741],
                          [-0.00004613262 ,  0.000110780258,  0.000003760317],
                          [-0.000016081208,  0.500343320989,  0.000033818574],
                          [ 0.5085202722  ,  0.123376599924,  0.492401733773],
                          [ 0.42634923496 ,  0.249606970943,  0.09880262611 ],
                          [ 0.934031858926,  0.749722153003,  0.400665395954],
                          [ 0.573422658093,  0.751030155475,  0.9012783729  ],
                          [ 0.068571175044,  0.252022617506,  0.600775766395],
                          [ 0.75627640022 ,  0.248687936996,  0.102507832145],
                          [ 0.259507916628,  0.753634423733,  0.38871599574 ],
                          [ 0.243481604969,  0.751852041797,  0.89724183037 ],
                          [ 0.746507187287,  0.25278785904 ,  0.617736114298],
                          [ 0.151075573933,  0.252591306765,  0.455754089654],
                          [ 0.690323572891,  0.752000609479,  0.04397212208 ],
                          [ 0.83335123249 ,  0.754038703386,  0.543671265355],
                          [ 0.309349875958,  0.248437869729,  0.956226403877],
                          [ 0.281282367688,  0.043895417026,  0.170154937999],
                          [ 0.780081830277,  0.951940596236,  0.322891618004],
                          [ 0.716931899257,  0.544638361823,  0.830168302809],
                          [ 0.212140976838,  0.45240610047 ,  0.680493785459],
                          [ 0.718548668205,  0.956270946966,  0.829710481012],
                          [ 0.220508725903,  0.047047846738,  0.676954650449],
                          [ 0.283124539344,  0.456588639047,  0.169914103988],
                          [ 0.788718583705,  0.550312228317,  0.319866210798]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.981173614761,  0.251627888335,  0.274212935041],
                          [ 0.498437151802,  0.748438807863,  0.229826139701],
                          [ 0.018446287956,  0.749320810466,  0.725177565014],
                          [ 0.500999541413,  0.252167362522,  0.77079327565 ],
                          [-0.000025577512,  0.00012639683 , -0.000004479953],
                          [-0.000004345193,  0.500234964797,  0.00001583714 ],
                          [ 0.503685853334,  0.061115406358,  0.49671959504 ],
                          [ 0.426348530317,  0.249783229416,  0.098851378932],
                          [ 0.933944263056,  0.750216999403,  0.400530880131],
                          [ 0.573558495118,  0.750718652342,  0.901183121699],
                          [ 0.067385063959,  0.251217148218,  0.600126574081],
                          [ 0.756327292278,  0.248809632284,  0.102715573805],
                          [ 0.259326742226,  0.756682106661,  0.388561008146],
                          [ 0.243558771316,  0.751619946679,  0.897157124095],
                          [ 0.743490677959,  0.247972260899,  0.614411824895],
                          [ 0.158959086443,  0.247825900429,  0.456068615359],
                          [ 0.69034019925 ,  0.751710558538,  0.043953814506],
                          [ 0.83372867331 ,  0.756974032972,  0.543596909277],
                          [ 0.309505327258,  0.248642072601,  0.956132128733],
                          [ 0.280976732652,  0.044304804939,  0.170270710987],
                          [ 0.776884415106,  0.953601479104,  0.323947762734],
                          [ 0.71651467088 ,  0.544034832865,  0.829895449543],
                          [ 0.208537402355,  0.450596644885,  0.681106886287],
                          [ 0.718920478169,  0.956014423838,  0.829629372239],
                          [ 0.223463516652,  0.046353757668,  0.675853524403],
                          [ 0.283551628458,  0.456760344567,  0.170153813451],
                          [ 0.791954408014,  0.551048760271,  0.319109847597]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------

# Set up lattice
vector_a = [4.74148287577, -0.000127269878148, 0.00783573590836]*Angstrom
vector_b = [-0.000164005204931, 6.08030371318, -0.00256586481387]*Angstrom
vector_c = [0.0172414754673, -0.00445585886655, 10.3479508435]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
elements = [Iron, Iron, Iron, Iron, Lithium, Lithium, Lithium, Phosphorus,
            Phosphorus, Phosphorus, Phosphorus, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen, Oxygen,
            Oxygen, Oxygen, Oxygen, Oxygen]

# Define coordinates
fractional_coordinates = [[ 0.981262380009,  0.251735943838,  0.275100744335],
                          [ 0.498505652412,  0.747987460897,  0.230158771285],
                          [ 0.018740659276,  0.748264452097,  0.724905758847],
                          [ 0.501490997043,  0.252018517615,  0.769843344217],
                          [-0.000004224171,  0.000000785311, -0.000000446222],
                          [-0.000001587584,  0.499998262675, -0.000000704863],
                          [ 0.499996398821,  0.000002595841,  0.499999501641],
                          [ 0.426256530727,  0.249794344057,  0.098944277363],
                          [ 0.933779555787,  0.750959513793,  0.400595783392],
                          [ 0.573749245668,  0.750204701463,  0.90106474866 ],
                          [ 0.06632581076 ,  0.249037899261,  0.599366257294],
                          [ 0.756344872103,  0.248749098056,  0.103009436552],
                          [ 0.259357193976,  0.760807794653,  0.388919916898],
                          [ 0.24364640676 ,  0.751249133393,  0.896989006177],
                          [ 0.740573694122,  0.239193862359,  0.611084507162],
                          [ 0.16704163927 ,  0.239289859377,  0.456511654025],
                          [ 0.690294888142,  0.751334600025,  0.043991465223],
                          [ 0.832932828572,  0.760706300514,  0.543510588742],
                          [ 0.309700266257,  0.248663851647,  0.956002772571],
                          [ 0.280555175826,  0.044568215952,  0.170570780146],
                          [ 0.770684294187,  0.955821108424,  0.326819139231],
                          [ 0.716042432329,  0.543122120301,  0.829526395877],
                          [ 0.204229533444,  0.447909292506,  0.681669561656],
                          [ 0.719447102119,  0.955437302382,  0.829429326656],
                          [ 0.229306272528,  0.044173548388,  0.67318363493 ],
                          [ 0.283953853343,  0.456870561149,  0.170472589289],
                          [ 0.795762599269,  0.552102651857,  0.318327174315]]

# Set up configuration
configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Append to the list of configurations
configuration_list.append(configuration)

# Construct the Nudged Elastic Band object
neb_configuration = NudgedElasticBand(
    configuration_list,
    generate_images=False)

# Unreference the temporary configuration variable
del configuration




# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = [
    GGABasis.Lithium_DoubleZetaPolarized,
    GGABasis.Oxygen_DoubleZetaPolarized,
    GGABasis.Phosphorus_DoubleZetaPolarized,
    GGABasis.Iron_DoubleZetaPolarized,
    ]

#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = GGA.PBE

k_point_sampling = MonkhorstPackGrid(
    na=7,
    nb=5,
    nc=3,
    )
numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=k_point_sampling,
    )

calculator = LCAOCalculator(
    basis_set=basis_set,
    exchange_correlation=exchange_correlation,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    )

neb_configuration.setCalculator(calculator)
neb_configuration.update()
nlsave('neb_B.nc', neb_configuration)

# -------------------------------------------------------------
# Optimize Geometry
# -------------------------------------------------------------
neb_configuration = OptimizeNudgedElasticBand(
    neb_configuration,
    max_forces=0.05*eV/Ang,
    max_steps=200,
    max_step_length=0.2*Ang,
    trajectory_filename='neb_B.nc',
    optimizer_method=LBFGS(),
    preoptimization=False,
    climbing_image=True,
)
nlsave('neb_B.nc', neb_configuration)
nlprint(neb_configuration)