Module ctoolkit.VASP.VASP
Expand source code
from toolkit.global_vars.ext_libs import *
from toolkit.VASP.POSCAR import *
from toolkit.VASP.outcar import *
# Main structure class VASP
# Subclasses POSCAAR and outcar
# handle file i/o in crystal toolkit format.
class VASP():
def __init__(self):
self.POSCAR = POSCAR(self)
self.outcar = outcar(self)
self.type = 'VASP'
@calculate_time
def getStatus(self):
return {'POSCAR' : self.POSCAR.is_filled, 'OUTCAR' : self.outcar.is_filled}
# Override to POSCAR.write
@calculate_time
def write(self, filename=None):
self.POSCAR.write(filename)
Classes
class VASP
-
Expand source code
class VASP(): def __init__(self): self.POSCAR = POSCAR(self) self.outcar = outcar(self) self.type = 'VASP' @calculate_time def getStatus(self): return {'POSCAR' : self.POSCAR.is_filled, 'OUTCAR' : self.outcar.is_filled} # Override to POSCAR.write @calculate_time def write(self, filename=None): self.POSCAR.write(filename)
Methods
def getStatus(*args, **kwargs)
-
Expand source code
def inner1(*args, **kwargs): # storing time before function execution begin = time.time() val = func(*args, **kwargs) # storing time after function execution end = time.time() timer_name = func.__name__ timer_time = end-begin if timer_name in timers_dict: timers_dict[timer_name] += timer_time else: timers_dict[timer_name] = timer_time return val
def write(*args, **kwargs)
-
Expand source code
def inner1(*args, **kwargs): # storing time before function execution begin = time.time() val = func(*args, **kwargs) # storing time after function execution end = time.time() timer_name = func.__name__ timer_time = end-begin if timer_name in timers_dict: timers_dict[timer_name] += timer_time else: timers_dict[timer_name] = timer_time return val