Esempio n. 1
0
    def prep_db(self):
        """put scores on each parent"""

        db = connect(self.db_name)
        rows = db.count() - 1

        da = DataConnection(
            self.db_name
        )  # The first row of the database contains the surface/framework w/out the adsorbate.
        struct = da.get_all_unrelaxed_candidates()
        for i in range(1, rows):
            a = struct[i - 1]
            da.c.update(
                a.info['confid'],
                atoms=None,  # update the DB with pertinent information
                origin='StartingCandidateRelaxed',
                raw_score=-a.get_potential_energy(),
                relaxed=True)