[docs]@dataclasses.dataclassclassTBLiteModel:"""A model for the TBLite calculator [1]_. Parameters ---------- method : str The method to use for the calculator. verbosity : int The verbosity level of the calculator. charge : int The charge of the structure multiplicity : int The spin multiplicity of the structure .. [1] https://tblite.readthedocs.io/en/latest/ Examples -------- >> import ipsuite as ips >> project = ips.Project() >> tblite = ips.TBLiteModel(method="GFN2-xTB") >> with project: .. water = ips.Smiles2Conformers(smiles="O", numConfs=100) .. box = ips.MultiPackmol( .. data=[water.frames], count=[16], density=1000, n_configurations=11, .. ) .. ips.ApplyCalculator( .. data=box.frames, .. model=tblite, .. ) >> project.build() """method:str="GFN2-xTB"verbosity:int=0charge:int=0multiplicity:int=1
[docs]defget_calculator(self,**kwargs):"""Get an xtb ase calculator."""try:fromtblite.aseimportTBLiteexceptImportError:log.warning("No xtb-python installation found. ""See https://tblite.readthedocs.io/ for more information.")raisecalc=TBLite(method=self.method,verbosity=self.verbosity,charge=self.charge,multiplicity=self.multiplicity,)returncalc