How to use the smact.lattice.Site function in SMACT

To help you get started, we’ve selected a few SMACT examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WMD-group / SMACT / examples / PerovskiteSpace / Perovskites_Notebook2.py View on Github external
# get_ipython().magic(u'matplotlib inline')
import smact.lattice as lattice
import smact
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from os import path


# In[3]:

site_A = lattice.Site([0,0,0],[+1,+2,+3])
site_B = lattice.Site([0.5,0.5,0.5],[+5,+4,+3,+2])
site_C = lattice.Site([0.5,0.5,0.5],[-2,-1])
perovskite = lattice.Lattice([site_A,site_B,site_C],space_group=221)


# In[4]:

search = smact.ordered_elements(3,87)


# In[5]:

A_list = []
B_list = []
C_list = [['O',-2,1.35],['S',-2,1.84],['Se',-2,1.98],['F',-1,1.285],['Br',-1,1.96],['I',-1,2.2]]
for element in search:
    with open(path.join(smact.data_directory, 'shannon_radii.csv'), 'rU') as f:
        reader = csv.reader(f)
github WMD-group / SMACT / smact / builder.py View on Github external
repetitions (list): Three floats specifying the expansion of the cell in x,y,z directions.
    Returns:
        SMACT Lattice object of the unit cell,
        ASE crystal system of the unit cell.

    """
    system = crystal((species),
                     basis=[(0, 0, 0), (0.5, 0.5, 0.5), (0.5, 0.5, 0)],
                     spacegroup=221,
                     size=repetitions,
                     cellpar=cell_par)

    sites_list = []
    oxidation_states = [[2]] + [[4]] + [[-2]] * 3
    for site in zip(system.get_scaled_positions(), oxidation_states):
        sites_list.append(Site(site[0], site[1]))

    return Lattice(sites_list, oxidation_states), system
github WMD-group / SMACT / examples / PerovskiteSpace / Perovskites_Notebook2.py View on Github external
# In[22]:

# get_ipython().magic(u'matplotlib inline')
import smact.lattice as lattice
import smact
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from os import path


# In[3]:

site_A = lattice.Site([0,0,0],[+1,+2,+3])
site_B = lattice.Site([0.5,0.5,0.5],[+5,+4,+3,+2])
site_C = lattice.Site([0.5,0.5,0.5],[-2,-1])
perovskite = lattice.Lattice([site_A,site_B,site_C],space_group=221)


# In[4]:

search = smact.ordered_elements(3,87)


# In[5]:

A_list = []
B_list = []
C_list = [['O',-2,1.35],['S',-2,1.84],['Se',-2,1.98],['F',-1,1.285],['Br',-1,1.96],['I',-1,2.2]]
for element in search:
    with open(path.join(smact.data_directory, 'shannon_radii.csv'), 'rU') as f:
github WMD-group / SMACT / smact / builder.py View on Github external
Returns:
        SMACT Lattice object of the unit cell,
        ASE crystal system of the unit cell.

    """
    system = crystal((species),
                     basis=[(2. / 3., 1. / 3., 0), (2. / 3., 1. / 3., 5. / 8.)],
                     spacegroup=186,
                     size=repetitions,
                     cellpar=[3, 3, 6, 90, 90, 120])

    sites_list = []
    oxidation_states = [[1], [2], [3], [4]] + [[-1], [-2], [-3], [-4]]

    for site in zip(system.get_scaled_positions(), oxidation_states):
        sites_list.append(Site(site[0], site[1]))
    return Lattice(sites_list, oxidation_states), system
github WMD-group / SMACT / examples / PerovskiteSpace / Perovskites_Notebook2.py View on Github external
# In[22]:

# get_ipython().magic(u'matplotlib inline')
import smact.lattice as lattice
import smact
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
from os import path


# In[3]:

site_A = lattice.Site([0,0,0],[+1,+2,+3])
site_B = lattice.Site([0.5,0.5,0.5],[+5,+4,+3,+2])
site_C = lattice.Site([0.5,0.5,0.5],[-2,-1])
perovskite = lattice.Lattice([site_A,site_B,site_C],space_group=221)


# In[4]:

search = smact.ordered_elements(3,87)


# In[5]:

A_list = []
B_list = []
C_list = [['O',-2,1.35],['S',-2,1.84],['Se',-2,1.98],['F',-1,1.285],['Br',-1,1.96],['I',-1,2.2]]
for element in search: