Skip to content

Commit 79c926e

Browse files
committed
pass check
1 parent 4bf2b1b commit 79c926e

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

examples/example_09_QRS_conf.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,13 @@ def plot_id_vs_energy(code, energies, match_ids=None, match_energies=None, out_d
366366
composition = composition,
367367
molecules=molecules,
368368
sites=sites,
369-
N_gen=100,
369+
N_gen=200,
370370
N_pop=48,
371-
N_cpu=4,
371+
N_cpu=24,
372372
cif="all.cif",
373-
skip_mlp=True,
374-
mlp='MACEOFF',
373+
skip_mlp=False
375374
verbose=False,
376-
delta_length=1.0,
377-
# Pass per-component delta_angle (scalar or list). QRS will
378-
# expand per-component values to per-site internally.
375+
delta_length=1.2,
379376
delta_angle=selected_deltas,
380377
)
381378

examples/example_10_mlp_relax.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import warnings
2020

2121
# Suppress specific noisy warnings from ASE CIF parser and torch_dftd
22+
warnings.filterwarnings('ignore', category=DeprecationWarning)
2223
warnings.filterwarnings(
2324
"ignore",
2425
message="crystal system 'monoclinic' is not interpreted",
@@ -30,6 +31,7 @@
3031
category=UserWarning,
3132
)
3233

34+
3335
from pyxtal.interface.ase_opt import ASE_relax, resolve_model, DEFAULT_MODELS, get_calculator
3436
from pyxtal.util import ase2pymatgen
3537
from pymatgen.analysis.structure_matcher import StructureMatcher
@@ -170,6 +172,8 @@ def _configure_worker_threads():
170172

171173
def _init_worker(calculator, model, quick):
172174
"""Load the calculator once per worker process (safe with spawn)."""
175+
import warnings
176+
warnings.filterwarnings('ignore', category=DeprecationWarning, module='spglib')
173177
_configure_worker_threads()
174178
get_calculator(calculator, model=model, quick=quick)
175179

@@ -311,8 +315,8 @@ def main(cif_path, nproc=4, step=200, fmax=0.1, out_dir=None, db_file=None, ref_
311315
print(f'Parsed {len(entries)} blocks, {cutoff_pct:.1f} percentile energy = {threshold:.6f} eV')
312316

313317
# select those with energy < threshold
314-
selected = [e for e in entries if e['energy'] is not None and e['energy'] < threshold]
315-
print(f'{len(selected)} selected (energy < {cutoff_pct:.1f} percentile)')
318+
selected = [e for e in entries if e['energy'] is not None and e['energy'] <= threshold]
319+
print(f'{len(selected)} selected (energy <= {cutoff_pct:.1f} percentile)')
316320

317321
# Use a single StructureMatcher across deduplication and reference matching.
318322
matcher = StructureMatcher(ltol=0.3, stol=0.3, angle_tol=5.0)
@@ -510,7 +514,7 @@ def main(cif_path, nproc=4, step=200, fmax=0.1, out_dir=None, db_file=None, ref_
510514
sel_x = sorted(selected_ids)
511515
sel_y = [model_energies[i] for i in sel_x]
512516
ax_bot.plot(sel_x, sel_y, 's-', color='#008B8B',
513-
label=f'{calculator} energy ({len(selected_ids)})',
517+
label=f'{calculator} energy ({len(unique_selected)} unique)',
514518
markersize=6, zorder=1)
515519
# Highlight relaxed structure matches on bottom if present
516520
if sel_x:

0 commit comments

Comments
 (0)