Beispiel #1
0
    def __init__(self):
        BaseSystem.__init__(self)
                
        self.aasystem = self.setup_aatopology()
                
        self.params.basinhopping["temperature"]=8.
        self.params.takestep["translate"]=0.0
        self.params.takestep["rotate"]=1.6
        
        self.params.double_ended_connect.local_connect_params.nrefine_max = 5
        
        NEBparams = self.params.double_ended_connect.local_connect_params.NEBparams
        self.params.double_ended_connect.local_connect_params.NEBparams.distance=self.aasystem.neb_distance

        NEBparams.max_images=200
        NEBparams.image_density=3.0
        NEBparams.iter_density=10
        NEBparams.k = 400.
        NEBparams.adjustk_freq = 5
        NEBparams.reinterpolate = 50
        NEBparams.adaptive_nimages = True
        NEBparams.adaptive_niter = True
        NEBparams.interpolator=self.aasystem.interpolate
        NEBparams.verbose = -1
        quenchParams = NEBparams.NEBquenchParams
        #quenchParams["nsteps"] = 1000
#        quenchParams["iprint"] = -1
#        quenchParams["maxstep"] = 0.1
#        quenchParams["maxErise"] = 1000
#        quenchParams["tol"] = 1e-6
#        
        
        tsSearchParams = self.params.double_ended_connect.local_connect_params.tsSearchParams

        tsSearchParams["nfail_max"]=20
def main():
    parser = argparse.ArgumentParser(description=desc, 
                                     formatter_class=argparse.RawDescriptionHelpFormatter)
    
    parser.add_argument('--ndof', help='Number of total degrees of freedom (e.g. 3*number of atoms).  This is simply the length of a coordinates vector.', 
                        type=int, default=1)
#    parser.add_argument('--Database','-d', help = 'Name of database to write into', type = str, default="optimdb.sqlite")
#    parser.add_argument('--Mindata','-m', help = 'Name of min.data file', type = str, default="min.data")
#    parser.add_argument('--Tsdata','-t', help = 'Name of ts.data file', type = str, default="ts.data")
#    parser.add_argument('--Pointsmin','-p', help = 'Name of points.min file', type = str, default="points.min")
#    parser.add_argument('--Pointsts','-q', help = 'Name of points.ts file', type = str, default="points.ts")
#    parser.add_argument('--endianness', help = 'set the endianness of the binary data.  Can be "<" for little-endian or ">" for big-endian', type = str, default="=")
    args = parser.parse_args()

    system = BaseSystem()
    db = system.create_database()
    converter = OptimDBConverter(db, mindata="min.data", 
                 tsdata="ts.data", pointsmin="points.min", pointsts="points.ts",
                 endianness="=", assert_coords=False)
    converter.convert_no_coords()
    
    system.get_ndof = lambda : args.ndof
    run_gui(system, db=db)
    
    print db.number_of_minima()
Beispiel #3
0
    def __init__(self,
                 natoms,
                 eps=1.,
                 sig=1.,
                 c=1.,
                 boxvec=[10., 10., 10.],
                 rcut=2.5,
                 n=10,
                 m=8):
        BaseSystem.__init__(self)

        self.potential_kwargs = dict(eps=eps,
                                     sig=sig,
                                     c=c,
                                     boxvec=boxvec,
                                     rcut=rcut,
                                     n=n,
                                     m=m)

        self.natoms = natoms
        self.boxvec = np.array(boxvec, dtype=float)
        self.periodic = True

        self.r0 = sig  # the equilibrium separation of the atoms.

        self.params.database.accuracy = 1e-3
        self.params.basinhopping["temperature"] = 1.0
        self.params.gui.basinhopping_nsteps = 100
Beispiel #4
0
    def __init__(self):
        BaseSystem.__init__(self)
        # js850> we should really change this name from self.aasystem to self.aatopology
        self.aasystem = self.setup_aatopology()
        self.aatopology = self.aasystem

        self.params.basinhopping["temperature"] = 8.
        self.params.takestep["translate"] = 0.0
        self.params.takestep["rotate"] = 1.6

        self.params.double_ended_connect.local_connect_params.nrefine_max = 5

        NEBparams = self.params.double_ended_connect.local_connect_params.NEBparams
        self.params.double_ended_connect.local_connect_params.NEBparams.distance = self.aasystem.neb_distance

        NEBparams.max_images = 200
        NEBparams.image_density = 3.0
        NEBparams.iter_density = 10
        NEBparams.k = 400.
        NEBparams.adjustk_freq = 5
        NEBparams.reinterpolate = 50
        NEBparams.adaptive_nimages = True
        NEBparams.adaptive_niter = True
        NEBparams.interpolator = self.aasystem.interpolate
        NEBparams.verbose = -1
        # quenchParams = NEBparams.NEBquenchParams
        # quenchParams["nsteps"] = 1000
        # quenchParams["iprint"] = -1
        # quenchParams["maxstep"] = 0.1
        # quenchParams["maxErise"] = 1000
        # quenchParams["tol"] = 1e-6

        tsSearchParams = self.params.double_ended_connect.local_connect_params.tsSearchParams

        tsSearchParams["nfail_max"] = 20
Beispiel #5
0
def main():
    parser = argparse.ArgumentParser(
        description=desc, formatter_class=argparse.RawDescriptionHelpFormatter)

    parser.add_argument(
        '--ndof',
        help=
        'Number of total degrees of freedom (e.g. 3*number of atoms).  This is simply the length of a coordinates vector.',
        type=int,
        default=1)
    #    parser.add_argument('--Database','-d', help = 'Name of database to write into', type = str, default="optimdb.sqlite")
    #    parser.add_argument('--Mindata','-m', help = 'Name of min.data file', type = str, default="min.data")
    #    parser.add_argument('--Tsdata','-t', help = 'Name of ts.data file', type = str, default="ts.data")
    #    parser.add_argument('--Pointsmin','-p', help = 'Name of points.min file', type = str, default="points.min")
    #    parser.add_argument('--Pointsts','-q', help = 'Name of points.ts file', type = str, default="points.ts")
    #    parser.add_argument('--endianness', help = 'set the endianness of the binary data.  Can be "<" for little-endian or ">" for big-endian', type = str, default="=")
    args = parser.parse_args()

    system = BaseSystem()
    db = system.create_database()
    converter = OptimDBConverter(db,
                                 mindata="min.data",
                                 tsdata="ts.data",
                                 pointsmin="points.min",
                                 pointsts="points.ts",
                                 endianness="=",
                                 assert_coords=False)
    converter.convert_no_coords()

    system.get_ndof = lambda: args.ndof
    run_gui(system, db=db)

    print(db.number_of_minima())
Beispiel #6
0
 def __init__(self, nspins, p=3):
     BaseSystem.__init__(self)
     self.nspins = nspins
     self.p = p
     self.interactions = self.get_interactions(self.nspins, self.p)
     self.pot = self.get_potential()
     self.zerov = None
     self.setup_params(self.params)
 def __init__(self, nspins, p=3):
     BaseSystem.__init__(self)
     self.nspins = nspins
     self.p = p
     self.interactions = self.get_interactions(self.nspins, self.p)
     self.pot = self.get_potential()
     self.zerov = None
     self.setup_params(self.params)
 def __init__(self, x_train_data, y_train_data, scale=1, dtype='float64', device='cpu'):
     BaseSystem.__init__(self)
     self.dtype = dtype
     self.device = device
     self.x_train_data = np.array(x_train_data, dtype=dtype)
     self.y_train_data = np.array(y_train_data, dtype=dtype)
     self.setup_params(self.params)
     self.scale = scale
Beispiel #9
0
    def __init__(self, dim=[4, 4], phi_disorder=np.pi, phases=None):
        BaseSystem.__init__(self)
        self.one_frozen = True
        self.dim = dim
        self.phi_disorder = phi_disorder
        self.pot = self.get_potential(phases=phases)
        self.nspins = np.prod(dim)

        self.setup_params(self.params)
Beispiel #10
0
 def __init__(self, dim=[4, 4], phi_disorder=np.pi, phases=None):
     BaseSystem.__init__(self)
     self.one_frozen = True
     self.dim = dim
     self.phi_disorder = phi_disorder
     self.pot = self.get_potential(phases=phases)
     self.nspins = np.prod(dim)
     
     self.setup_params(self.params)
Beispiel #11
0
    def __init__(self, natoms, p=5.206, q=1.220, A=0.6124, xi=2.441):
        BaseSystem.__init__(self)

        self.potential_kwargs = dict(p=p, q=q, A=A, xi=xi)

        self.natoms = natoms

        self.params.database.accuracy = 1e-3
        self.params.basinhopping["temperature"] = 1.0
        self.params.gui.basinhopping_nsteps = 100
Beispiel #12
0
 def __init__(self, nspins, p=3, interactions=None):
     BaseSystem.__init__(self)
     self.nspins = nspins
     self.p = p
     if interactions is not None:
         self.interactions = np.array(interactions)
     else:
         self.interactions = self.get_interactions(self.nspins, self.p)
     self.pot = self.get_potential()
     self.setup_params(self.params)
 def __init__(self, nspins, p=3, interactions=None):
     BaseSystem.__init__(self)
     self.nspins = nspins
     self.p = p
     if interactions is not None:
         self.interactions = np.array(interactions)
     else:
         self.interactions = self.get_interactions(self.nspins, self.p)
     self.pot = self.get_potential()
     self.setup_params(self.params)
Beispiel #14
0
    def __init__(self, natoms, 
                 p=5.206, q=1.220, A=0.6124, xi=2.441):
        BaseSystem.__init__(self)

        self.potential_kwargs = dict(p=p,q=q,A=A,xi=xi)

        self.natoms = natoms

        self.params.database.accuracy = 1e-3
        self.params.basinhopping["temperature"] = 1.0
        self.params.gui.basinhopping_nsteps = 100
Beispiel #15
0
 def __init__(self, natoms, d=4.114825, A=1.887117, beta=0.0, c=3.25,
              c0=43.4475218, c1=-31.9332978, c2=6.0804249):
     BaseSystem.__init__(self)
     
     self.potential_kwargs = dict(d=d, A=A, beta=beta, c=c, c0=c0, c1=c1, c2=c2)
     
     self.natoms = natoms
     
     self.params.database.accuracy = 1e-3
     self.params.basinhopping["temperature"] = 1.0
     self.params.gui.basinhopping_nsteps = 100
    def __init__(self, dims=[4,4], field_disorder=1., disorder=False):
        BaseSystem.__init__(self)
        self.dims = dims
        self.field_disorder = field_disorder
        self.nspins = np.prod(dims)

        self.one_frozen = False
        if field_disorder == 0. or not disorder:
            self.one_frozen = True

        self.pot = self.get_potential()
        
        self.setup_params(self.params)
Beispiel #17
0
    def __init__(self, dims=[4,4], field_disorder=1., disorder=False):
        BaseSystem.__init__(self)
        self.dims = dims
        self.field_disorder = field_disorder
        self.nspins = np.prod(dims)

        self.one_frozen = False
        if field_disorder == 0. or not disorder:
            self.one_frozen = True

        self.pot = self.get_potential()
        
        self.setup_params(self.params)
    def __init__(self, natoms, eps=1., sig=1., c=1., boxvec=[10., 10., 10.], rcut=2.5,
                  n=10, m=8):
        BaseSystem.__init__(self)
        
        self.potential_kwargs = dict(eps=eps, sig=sig, c=c, boxvec=boxvec, rcut=rcut, n=n, m=m)
        
        self.natoms = natoms
        self.boxvec = np.array(boxvec, dtype=float)
        self.periodic = True
        
        self.r0 = sig # the equilibrium separation of the atoms.

        self.params.database.accuracy = 1e-3
        self.params.basinhopping["temperature"] = 1.0
        self.params.gui.basinhopping_nsteps = 100
 def __init__(self,
              nspins,
              p=3,
              interactions=None,
              dtype='float64',
              device='cpu'):
     BaseSystem.__init__(self)
     self.nspins = nspins
     self.p = p
     if interactions is not None:
         self.interactions = np.array(interactions)
     else:
         self.interactions = self.get_interactions(self.nspins, self.p,
                                                   dtype)
     self.pot = self.get_potential(dtype=dtype, device=device)
     self.setup_params(self.params)
Beispiel #20
0
    def __init__(self,
                 natoms,
                 d=4.114825,
                 A=1.887117,
                 beta=0.0,
                 c=3.25,
                 c0=43.4475218,
                 c1=-31.9332978,
                 c2=6.0804249):
        BaseSystem.__init__(self)

        self.potential_kwargs = dict(d=d,
                                     A=A,
                                     beta=beta,
                                     c=c,
                                     c0=c0,
                                     c1=c1,
                                     c2=c2)

        self.natoms = natoms

        self.params.database.accuracy = 1e-3
        self.params.basinhopping["temperature"] = 1.0
        self.params.gui.basinhopping_nsteps = 100
Beispiel #21
0
 def create_database(self, *args, **kwargs):
     return BaseSystem.create_database(self, *args, **kwargs)
Beispiel #22
0
 def create_database(self, *args, **kwargs):
     return BaseSystem.create_database(self, *args, **kwargs)