eon.recycling#

Module Contents#

Classes#

SB_Recycling

Constructs a super-basin recycling object. The basic methods this undergoes are as follows:

Recycling

Constructs a saddle point recycling object.

API#

class eon.recycling.SB_Recycling(states, previous_state, current_state, move_distance, recycle_save, path, sb_scheme, superbasining)[source]#

Constructs a super-basin recycling object. The basic methods this undergoes are as follows:

*First, determine whether this is a continuation of a previous recycling effort. *If it is a continuation, simply read in the metadata, and be ready to make suggestions for saddles from where we left off previously. *If it is a new recycling process, first determine whether or not we just left a superbasin. *Then, if we did just leave a superbasin, obtain the list of states we will be recycling from, (the list of states in the superbasin which was just exited) *Next, make educated guesses about what the corresponding states in the new superbasin should look like. *Then, using the states in the exited superbasin, find the process for each which leads to the corresponding state in the new superbasin. *Use the StateList object to make an actual state object of the corresponding states. *Finally, it is ready to begin making saddle-search suggestions, using the corresponding pairs of states, one from the old superbasin and its corresponding state in the new superbasin. *In either case, this will use “Recycling” to actually generate the suggestions for each state pair.

states - the StateList object previous_state - the state object just moved from current_state - the state object just moved to move_didstance - distance an atom must move to be in the “hole” path - the path to the superbasin recycling directory. sb_scheme - either “mcamc” or “askmc” superbasining - if sb_scheme is “mcamc”, then this is the superbasining object; otherwise it is “None”

Initialization

Initialize the data for the super-basin recycling object.

get_process_id(current_state_procs, next_state_num)[source]#

Return the process id of the process going from the current state to the next state (number).

make_suggestion()[source]#

This will use the recycling class to make saddle search suggestions.

write_metadata()[source]#

Write to disk the superbasin state list, and the new possibilities to consider. Also write how far along in this superbasin recycling process we are.

read_metadata()[source]#

Read the metadata and return the superbasin state list, the “current/previous” states, and how far along in the superbasin recycling process we are.

generate_corresponding_states()[source]#

Generate the list of reactants expected as part of the new superbasin. Then, use the StateList object to create the actual states.

class eon.recycling.Recycling(states, suggested_ref_state, new_state, move_distance, save=False, from_sb=False)[source]#

Constructs a saddle point recycling object.

states - the StateList object suggested_ref_state - state to make suggestions from curr_state - state to make suggestions for move_distance - distance an atom must move to be in the “hole”

Initialization

Initialize the data for the recycling object. If there is a file containing the data for the current state, use this file. Otherwise, the previous state will be the reference.

make_suggestion()[source]#

Makes a saddle suggestion and returns True. If no more saddle suggestions are possible (end of process table has been reached), returns False.

read_recycling_metadata()[source]#

Open the recycling metadata file located in the current state’s directory. Return the state from which suggestions are being made. Return the process number current up for recycling consideration.

write_recycling_metadata()[source]#

Write the recycling metadata file located in the current state’s directory.

get_moved_indices()[source]#

Return the indices of atoms that moved in the process getting to the current state from the reference state.