예제 #1
0
    def from_path(directory, species, filesuffix='.static.xz'):
        from aBuild.database.crystal import Crystal
        from aBuild.calculators.vasp import POTCAR, KPOINTS

        #This routine is called when a path is passed in for initialization.
        # In this case, we want to read all the relevant information from the aflow.in file.
        from os import path

        potcar = POTCAR.from_path(path.join(directory, 'POTCAR' + filesuffix))
        if potcar is None:
            potcar = POTCAR.from_path(path.join(directory, 'POTCAR'))
        kpoints = KPOINTS.from_path(directory)
        incar = INCAR.from_path(path.join(directory, 'INCAR' + filesuffix))
        if incar is None:
            incar = INCAR.from_path(path.join(directory, 'INCAR'))

        crystal = Crystal.from_path(
            path.join(directory, 'POSCAR' + filesuffix), species)
        if crystal is None:
            crystal = Crystal.from_path(path.join(directory, 'POSCAR'),
                                        species)

        aflowobj = AFLOW(incar, kpoints, potcar, crystal, None, directory)
        aflowobj.set_filesuffix(filesuffix)
        return aflowobj
예제 #2
0
파일: vasp.py 프로젝트: lancejnelson/aBuild
 def from_path(folderpath, species):
     from aBuild.database.crystal import Crystal
     incarobj = INCAR.from_path(path.join(folderpath, 'INCAR'))
     potcarobj = POTCAR.from_path(path.join(folderpath, 'POTCAR'))
     kpointsobj = KPOINTS.from_path(path.join(folderpath, 'KPOINTS'))
     crystal = Crystal.from_path(path.join(folderpath, 'POSCAR'), species)
     return VASP(incarobj, kpointsobj, potcarobj, crystal, folderpath)