Skip to content

How to change parameters for NEB algorithm? #41

Description

@XiangruiLi-Ray

Hi,

I am trying to run basin hopping for Lennard-Jones clusters 7 and generate some data. However, when it comes to the disconnectivity graph, two cases appear with different transition states explored. I think it might be the convergence problem related to the NEB algorithm and I am trying to change its parameters. Below is the code I use.

from pele.potentials import LJCut
from pele.transition_states import orthogopt
from pele.systems import BaseSystem
from pele.mindist import MinPermDistAtomicCluster
from pele.landscape import ConnectManager
from ase.io import read

natoms = 7

### Define system ###
class LJClusterSystem(BaseSystem):
    def __init__(self, natoms):
        super().__init__()
        self.natoms = natoms
    
    def get_potential(self):
        return LJCut()
    
    def get_mindist(self):
        permlist = [range(self.natoms)]
        return MinPermDistAtomicCluster(permlist=permlist)
    
    def get_orthogonalize_to_zero_eigenvectors(self):
        return orthogopt


### Run Basinhopping ###
system = LJClusterSystem(natoms)
database = system.create_database()
cluster = read(f'7.data', format='lammps-data')
x0 = cluster.get_positions()
bh = system.get_basinhopping(database=database, coords=x0.flatten())
bh.run(1000)

### connect minima ### 
num_minima = database.number_of_minima()
manager = ConnectManager(database, strategy="random")
for i in range(int((num_minima*(num_minima-1))/2)):
    try:
        min1, min2 = manager.get_connect_job()
        connect = system.get_double_ended_connect(min1, min2, database)
        connect.connect()
    except: 
        continue

I try to change the number of iterations based on the following line

system.params['double_ended_connect']['local_connect_params']['tsSearchParams']['nsteps'] = 200

But the output still shows that the NEB runs for 100 steps.

starting NEB run to try to connect minima 4 3 0.7186720661584932
    NEB: nimages   10
    NEB: nsteps    100
    NEB: verbosity 0
NEB finished after 100 steps, rms 1.759676e-02
from NEB search found 1 transition state candidates

I have no idea why it's not using the updated parameters. It is a bug or I am doing it in the wrong way.
Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions