Beispiel #1
0
 def create_interface(self):
     """
     add params that you want to vary
     """
     structure = self.input_structure.copy()
     iface = Interface(structure,
                       hkl=self.system['hkl'],
                       ligand=Ligand.from_dict(self.system['ligand']),
                       from_ase=self.from_ase)
     iface.sort()
     sd = self.set_sd_flags(iface, n_layers=2)
     # if there are other paramters that are being varied
     # change the comment accordingly
     comment = self.system['hkl'] + self.system['ligand']['name']
     return Poscar(iface, comment=comment, selective_dynamics=sd)
Beispiel #2
0
 def create_interface(self):
     """
     add params that you want to vary
     """
     structure = self.input_structure.copy()
     iface = Interface(structure,
                       hkl=self.system['hkl'],
                       ligand = Ligand.from_dict(self.system['ligand']),
                       from_ase=self.from_ase)
     iface.sort()
     sd = self.set_sd_flags(iface, n_layers=2)
     #if there are other paramters that are being varied
     #change the comment accordingly
     comment = self.system['hkl']+self.system['ligand']['name']
     return Poscar(iface, comment=comment,
                   selective_dynamics=sd)
Beispiel #3
0
from pymatgen.io.vasp.inputs import Poscar

from mpinterfaces.interface import Interface, Ligand

if __name__ == '__main__':
    # PbS 100 surface with single hydrazine as ligand
    # strt=get_struct_from_mp("PbS",MAPI_KEY=MAPI_KEY)
    # using smiles_to_xyz.py you can obtain molecule xyz
    # using openbabel.
    # example structure files are provided and set in dev_scripts
    # bulk structure of slab
    strt = Structure.from_file("dev_scripts/POSCAR_PbS")
    # pre-relaxed Ligand in a box
    mol_struct = Structure.from_file("dev_scripts/POSCAR_TCPO")
    mol = Molecule(mol_struct.species, mol_struct.cart_coords)
    hydrazine = Ligand([mol])

    # intital supercell, this wont be the final supercell if
    # surface coverage is specified
    supercell = [1, 1, 1]

    # miller index
    hkl = [1, 0, 0]

    # minimum slab thickness in Angstroms
    min_thick = 19

    # minimum vacuum thickness in Angstroms
    # mind: the ligand will be placed in this vacuum, so the
    # final effective vacuum space will be smaller than this
    min_vac = 12
Beispiel #4
0
from pymatgen.io.vaspio.vasp_input import Incar, Poscar, Potcar, Kpoints
from pymatgen.core import Structure, Molecule


from mpinterfaces.interface import Interface, Ligand

        


#create ligand, interface and slab from the starting POSCARs


strt= Structure.from_file("POSCAR_PbS_bulk_with_vdw")  #using POSCAR of vdW relaxed PbS
mol_struct= Structure.from_file("POSCAR_DMF")    #using POSCAR of vdW relaxed PbS
mol= Molecule(mol_struct.species, mol_struct.cart_coords)
DMF= Ligand([mol])   #create Ligand DMF 
supercell = [1,1,1]
# slab thickness and vacuum set manual for now to converged values, surface coverage fixed at 0.014 ligand/sq.Angstrom 
#for consistency, best ligand spacing at the coverage 
min_thick= 19
min_vac= 12
surface_coverage= 0.014
#hkl of facet to reproduce
hkl= [1,0,0]
# specify the species on slab to adsorb over 
slab_species= 'Pb'
# specify the species onb ligand serving as the bridge atom 
adatom_on_ligand= 'O' 
#initial adsorption distance in angstrom
ads_distance = 3.0 
# create the interface
Beispiel #5
0
    ##################### SECOND WORKFLOW: LIGAND ########################################
    # pull structure of ligand
    # firework 3 firetask1: cutoff convergence
    # firework 4 firetask1: relaxation
    mols = []
    lig_firetasks = []
    lig_fireworks = []
    molecule = Structure.from_file(
        "POSCAR_TCPO")  #for testing purposes, can be constructed
    #from smiles_to_poscar.py script
    mols.append(molecule)
    # create ligand from molecules
    ligand = Ligand(mols,
                    cm_dist=[],
                    angle={},
                    link={},
                    remove=[],
                    charge=0,
                    spin_multiplicity=None,
                    validate_proximity=False)

    #create firetasks for molecule cutoff convergence and relaxation
    lig_firetasks.append(get_calibration_task(structure=ligand, \
                                              turn_knobs={'ENCUT':[400,500,600]}, \
                                              other_params={'job_dir': 'LigandConvergence'}))
    lig_firetasks.append(get_calibration_task(structure=ligand, \
                                    incar_params = {'NSW':100},\
                                    other_params={'job_dir': 'LigandRelax'}))

    #create firework for molecule cutoff convergence
    lig_fireworks.append(
        Firework(lig_firetasks[0], name='molecule_convergence'))