User Tools

Site Tools


soft:siman:structure

Structure() object contains information about crystal structure and include numerous useful methods to manipulate the structure. See class description for full functionality. Here the most important methods and properties are given

Methods

  1. Calculate total number of electrons for given structure and calculation set:
from siman import header
from siman.inout import smart_structure_read
header.PATH2POTENTIALS = '/ssd2/scientific_projects/vasp_potentials/POT_GGA_PAW_PBE' # usually provided in simanrc.py or project_conf.py
st = smart_structure_read('my/NaCl.cif')
nelectrons = st.get_total_number_electrons(header.varset['static']) # static is the name of the input set used by user

Nearest neihgbours

st.nn(1, 4, from_one = 0) # show four closest atoms around atom 1, numbering is from one

Shift atoms

st_shifted = st.shift_atoms([0.25,0.25,0.25]) #here reduced coordinates are used

Properties

We use Abinit keywords to store information about structure

  • name
  • natom
  • typat
  • ntypat
  • rprimd
  • xred
  • xcart
  • vel
  • znucl
  • nznucl
  • magmom
  • select

Convert to pymatgen and back

To convert from siman to pymatgen:

stpmg = st.convert2pymatgen() # st is siman structure

To convert from pymatgen to siman:

from siman.core.structure import Structure
st = Structure()
st.update_from_pymatgen(stpmg) #stpmg is pymatgen structure
soft/siman/structure.txt · Last modified: 2025/07/21 15:25 by d.aksenov

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki