muon-spectroscopy-computational-project / pymuon-suite

Collection of scripts and utilities for muon spectroscopy
GNU General Public License v3.0
8 stars 7 forks source link

Clustering uses incorrect mu_symbol and particle_mass #61

Closed leandro-liborio closed 1 year ago

leandro-liborio commented 2 years ago

Run pymuonsuite for Al2O3 in the venv_eli virtual environemnt. *.yaml file is this one:

poisson_r: 0.6
name: al2o3 
charged: true
geom_steps: 300
vdw_scale: 0.5
calculator: uep
uep_gw_factor: 6.0
uep_chden: al2o3_xc-PBESOL_c-0900_k-5x5x5_nmr.den_fmt
geom_force_tol: 0.05 
clustering_method: hier
clustering_hier_t: 0.2 
mu_symbol: Li:i
clustering_save_type : structures  
clustering_save_format : cell  
particle_mass_amu: 8.022486 
uep_gw_factor : 4.0 

It runs, and a stopping site is found. However, the variables clustering_save_type: structures and clustering_save_format: cell create structural *.cell files with the resulting minimum energy muonated structures. One of this *.cellfiles looks like this:

#######################################################
#CASTEP cell file: al2o3_clusters/uep/al2o3_uep_min_cluster_1.cell
#Created using the Atomic Simulation Environment (ASE)#
#######################################################

%BLOCK LATTICE_CART
 2.386183  1.377665  4.337554
-2.386180  1.377662  4.337554
-0.000001 -2.755327  4.337553
%ENDBLOCK LATTICE_CART

%BLOCK POSITIONS_ABS
O -0.925345  1.377663  7.590719
O  1.655765  0.112544  7.590719
O -0.730417 -1.490207  7.590719
O -1.655763 -0.112544  5.421942
O  0.730419  1.490207  5.421942
O  0.925347 -1.377663  5.421942
Al  0.000000 -0.000000  1.924859
Al  0.000001  0.000000  8.431189
Al  0.000002  0.000000 11.087802
Al  0.000001 -0.000000  4.581472
**H  0.408641 -2.098837  4.363707**
%ENDBLOCK POSITIONS_ABS

The line H 0.408641 -2.098837 4.363707 should have read Li:i 0.408641 -2.098837 4.363707. The command mu_symbol: Li:i in *.yaml is not doing what it is suppose to do.

elichad commented 2 years ago

Thanks for the heads up. I have the cell write working with this test data yaml file, cell file but I'll look into what's happening in this case.

elichad commented 2 years ago

Is the SPECIES_MASS block written correctly or not?

leandro-liborio commented 2 years ago

No.

The output *.cell files are like this one below:

#######################################################

CASTEP cell file: srtio3_clusters/uep/srtio3_uep_min_cluster_2.cell

Created using the Atomic Simulation Environment (ASE)

#######################################################

%BLOCK LATTICE_CART 3.907000 0.000000 0.000000 0.000000 3.907000 0.000000 0.000000 0.000000 3.907000 %ENDBLOCK LATTICE_CART

%BLOCK POSITIONS_ABS O 1.953500 1.953500 0.000000 O 0.000000 1.953500 1.953500 O 1.953500 0.000000 1.953500 Ti 1.953500 1.953500 1.953500 Sr 0.000000 0.000000 0.000000 H 1.952778 3.197325 -0.002414 %ENDBLOCK POSITIONS_ABS

On Fri, 8 Apr 2022 at 12:19, elichad @.***> wrote:

Is the SPECIES_MASS block written correctly or not?

— Reply to this email directly, view it on GitHub https://github.com/muon-spectroscopy-computational-project/pymuon-suite/issues/61#issuecomment-1092756960, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIX5WFA3PBRDKEWD57LORTVEAI4TANCNFSM5S37EZCA . You are receiving this because you modified the open/close state.Message ID: <muon-spectroscopy-computational-project/pymuon-suite/issues/61/1092756960 @github.com>

elichad commented 2 years ago

Ok, I see the issue:

When clustering_save_type and clustering_save_format are set, pm-muairss read does not write the correct mu_symbol to the cell file, or include the SPECIES_MASS block with the custom particle_mass.

Related: When allpos_filename is set, pm-muairss ~read~ write includes the correct symbols in the cell file, but again does not include the SPECIES_MASS block.

elichad commented 2 years ago

The symbols should now be written correctly as of 0.2.2.dev0 .

The SPECIESMASS stuff might take longer as I'd like to see if we can get this fixed in ASE directly - https://gitlab.com/ase/ase/-/issues/1079 [edit 24/10/2022: the issue has been fixed, but there has not yet been an ASE release that contains the fix. Current release is 3.22.1 which came out back in Dec 2021.]_