pele.concurrent._connect_server#

class pele.concurrent._connect_server.ConnectServer[source]

Source

class ConnectServer:

Server which receives requests from, and passes connect jobs to the workers

The server also receives minima and transition states from the workers and adds them to the database.

Parameters:
systempele.system.BaseSystem

system class to process

databasepele.storage.Database

working database

server_namestring, optional

Unique name for clients to connect to this server on current host (objid for pyros). None for random

hoststring, optional

host to setup server. default is localhost which does not allow connections from remote machines

portinteger, optional

port to listen for connections

ConnectServer.set_connect_manager()[source]

Source

def set_connect_manager(self, connect_manager):

add a custom connect manager

the connect manager decides which connect jobs should be performed

ConnectServer.get_connect_job()[source]

Source

def get_connect_job(self, strategy="random"):

get a new connect job

ConnectServer.get_system()[source]

Source

def get_system(self):

provide system class to worker

ConnectServer.add_minimum()[source]

Source

def add_minimum(self, E, coords):

called by worker if a new minimum is found

Returns:
IDglobal id of minimum added.
ConnectServer.add_ts()[source]

Source

def add_ts(self, id1, id2, E, coords, eigenval=None, eigenvec=None):

called by worker if a new transition state is found

Parameters:
id1, id2int

The server-side (global) ID’s of the minima on either side of the transition state. The worker is responsible for knowing the global id of the minima. This ID is returned to the worker when a minimum is added

Efloat

energy of transition state

coordsarray

coordinates of transition state

Returns:
IDglobal id of transition state added
ConnectServer.run()[source]

Source

def run(self):

start the server and listen for incoming connections

class pele.concurrent._connect_server.ConnectWorker[source]

Source

class ConnectWorker:

worker class to execute connect runs.

The worker will return all minima and transiton states found to the server

Parameters:
uristring

uri for job server

systemBaseSystem, optional

if no system class is specified, the worker obtains the system class from the ConnectServer by get_system. This only works for pickleable systems classes. If this is not the case, the system class can be created on the client side and passed as a parameter.

strategystr

strategy to use when choosing which minima to connect

ConnectWorker.run()[source]

Source

def run(self, nruns=None):

start the client

Parameters:
nrunsinteger, optional

stop after so many connect runs

class pele.concurrent._connect_server.BasinhoppingWorker[source]

Source

class BasinhoppingWorker:

worker class to execute basinhopping runs in parallel

The worker will return all new minima to the server.

The basinhopping run will be set up using system.get_basinhopping().

Parameters:
uristring

uri for job server

systemBaseSystem, optional

if no system class is specified, the worker obtains the system class from the ConnectServer by get_system. This only works for pickleable systems classes. If this is not the case, the system class can be created on the client side and passed as a parameter.

BasinhoppingWorker.run()[source]

Source

def run(self, nsteps=10000):

start the client

Parameters:
nstepsinteger

number of basinhopping iterations