Skip to content

Commit

Permalink
Add random bound on random sampler.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgt16-LANL committed Sep 26, 2024
1 parent 1f67cca commit cb9ba64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion architector/io_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ def random_sampler(relaxed_mol, n=10, seed=42, min_rmsd=0.1, max_rmsd=0.5,
total_out = 0
max_attempts = max_attempts + n
count = 0
max_dist = max_rmsd*0.9
with tqdm(total=n) as pbar:
while (total_out < n) and (count < max_attempts):
# Randomize magnitude of displacement
max_dist = max_rmsd*np.random.random()
count += 1
out_atoms = relaxed_atoms.copy()
# Generate random displacements
Expand Down

0 comments on commit cb9ba64

Please sign in to comment.