Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - AsifShah

Pages: [1] 2 3 4
1
Dear All,

I use an optimization trajectory to relax the interface between two materials, A-B, and then use it to fine-tune the MACE model.
However, there are some high-stress outliers in the optimization trajectory.
I would like to know how to delete such high-stress outlier images and save a new trajectory.


Thank you

2
General Questions and Answers / Update on: Finetuning MACE
« on: March 13, 2026, 02:37 »
Dear Admin,
I am fine-tuning (multi-head) a MACE model "mace-mp-0b3-medium.model" with interface  ~3000 configurations obtained from optimization of various interface structures between two materials. The caculator used to generate the data was LCAO-PAW. However, I observe that the training loss is more than validation loss and it does not converge easily below 2. I am using latest version of QuantumATK Y-2026.03

Code
# %% MACEFittingParameters

model_parameters = MACEModelParameters(
    foundation_model_path='/home/MHeadFineTune/AB_PAW/Model2/mace-mp-0b3-medium.model'
)

replay_finetuning_settings = MACEReplayFinetuningSettings(
    replay_data_filepath='/home/MHeadFineTune/AB_PAW/Model2/mp_traj_combined.xyz',
    number_of_samples=10000,
    replay_subselect_method=MLParameterOptions.REPLAY_SUBSELECT.RANDOM,
    replay_filtering_type=MLParameterOptions.REPLAY_FILTERING.COMBINATIONS,
)

dataset_parameters = ForceFieldDatasetParameters(
    dataset_name=None,
    validation_fraction=0.2,
    isolated_atom_energies=None,
    energy_key='REF_energy',
    forces_key='REF_forces',
    stress_key='REF_stress',
    energy_weight=1,
    forces_weight=100.0,
    stress_weight=1,
    compute_stress=True,
    forces_cap=None,
    replay_finetuning_settings=replay_finetuning_settings,
)

training_parameters = TrainingParameters(
    experiment_name='AB_replay_finetuning',
    batch_size=5,
    max_number_of_epochs=200,
    patience=50,
    device=Automatic,
    random_seed=123,
    number_of_workers=0,
    default_dtype=MLParameterOptions.DTYPE.FLOAT64,
    learning_rate=0.005,
    weight_decay=5e-07,
    restart_from_last_checkpoint=True,
    scheduler_patience=5,
    gradient_clipping_threshold=100,
    save_all_available_model_formats=True,
    additional_parameters=None,
)

mace_fitting_parameters = MACEFittingParameters(
    model_parameters=model_parameters,
    dataset_parameters=dataset_parameters,
    training_parameters=training_parameters,
)
nlsave('GSiO2hBN_Train_model_with_MultiHFine.hdf5', mace_fitting_parameters)


# %% MachineLearnedForceFieldTrainer

machine_learned_force_field_trainer = MachineLearnedForceFieldTrainer(
    fitting_parameters=mace_fitting_parameters,
    training_sets=combined_training_set_training_set_0,
    calculator=cam_AB_training_set_lcao_calculator_0,
    train_test_split=0.9,
    random_seed=None,
    save_model_evaluator=True,
)
machine_learned_force_field_trainer.train()

Log file
Code
Epoch |   Train loss | dataset val. loss | foundation_replay val. loss |
Combined val. loss
    1 |      18.9857 |       9.0502 |       9.6832 |       9.5235
    2 |      16.2392 |       9.5699 |       9.8213 |       9.7579
    3 |      15.9793 |       8.4948 |      14.1380 |      12.7140
    4 |      15.7344 |       7.0205 |       9.3637 |       8.7724
    5 |      15.2174 |       7.4290 |       9.1267 |       8.6983
    6 |      15.1447 |       7.6615 |       9.5313 |       9.0595
    7 |      13.9269 |       7.7902 |       9.3499 |       8.9563
    8 |      14.3858 |       6.9831 |       8.4594 |       8.0869
    9 |      14.6542 |       6.1258 |       9.1843 |       8.4125
   10 |      67.0137 |       7.2914 |       9.0968 |       8.6412
   11 |      14.6468 |       7.3211 |       9.6342 |       9.0505
   12 |      13.7790 |       6.7579 |      72.1496 |      55.6489
   13 |    3348.1013 |       6.4292 |       9.5679 |       8.7759
   14 |      13.6505 |       6.6999 |      13.4243 |      11.7275
   15 |      18.6541 |       4.8157 |       8.1373 |       7.2992
   16 |      10.8260 |       4.5590 |       9.3064 |       8.1084
   17 |      10.2169 |       5.3469 |       8.0607 |       7.3759
   18 |      10.8128 |       4.8280 |       7.9056 |       7.1290
   19 |      44.6345 |       4.8770 |       8.8867 |       7.8749
   20 |      13.1652 |       6.0382 |       8.0510 |       7.5431
   21 |       9.9637 |       5.0135 |       8.2736 |       7.4510
   22 |       9.9831 |       5.1497 |       7.8262 |       7.1508
   23 |       9.9076 |       5.5356 |       8.3363 |       7.6296
   24 |       9.4363 |       5.0831 |       8.0683 |       7.3150
   25 |       9.2744 |       4.0919 |       8.0174 |       7.0269
   26 |       8.5802 |       4.0783 |       7.9753 |       6.9919
   27 |       8.5956 |       3.7595 |       7.9519 |       6.8940
   28 |       7.9154 |       4.1679 |       8.0973 |       7.1057
   29 |       7.9012 |       4.1561 |       8.0263 |       7.0497
   30 |       7.8318 |       3.7461 |       7.9410 |       6.8825
   31 |       7.6374 |       3.7943 |       8.1701 |       7.0659
   32 |       8.1747 |       3.6043 |       8.1010 |       6.9663
   33 |       8.0958 |       3.6114 |       8.4863 |       7.2561
   34 |       7.4335 |       3.9294 |       8.1361 |       7.0746
   35 |       7.4023 |       4.0456 |       8.1316 |       7.1006
   36 |       7.2933 |       3.7167 |       8.4425 |       7.2500
   37 |       7.0873 |       3.3984 |       8.2840 |       7.0512
   38 |       6.3931 |       3.4524 |       8.4852 |       7.2152
   39 |       6.6867 |       3.2221 |       8.5646 |       7.2165
   40 |       6.4043 |       3.3317 |       8.5464 |       7.2305
   41 |       6.6129 |       3.1848 |       8.6768 |       7.2910
   42 |       6.4041 |       3.3490 |       8.6733 |       7.3298
   43 |       6.3622 |       3.0963 |       8.7256 |       7.3051
   44 |       6.0477 |       3.0227 |       8.8481 |       7.3782
   45 |       5.9473 |       3.0272 |       8.8475 |       7.3789
   46 |       5.9198 |       3.0129 |       8.8019 |       7.3411

3
Dear Admin,
I am trying to launch a simulation from SLURM. It shows active status on squeue but the log file is empty for long time.
I m using latest QuantumATK X.2025.06.

Kindly help in this regard!

4
Dear Admin,
I am trying to calculate Raman Spectrum of monolayer MoS2. But I only see one peak around 396 cm^-1 whereas the experimental peaks are around 385 and 403 cm^-1. Kindly clarify the issue. I also tried changing polarization direction to 100. That gives three peaks but incorrect also. The script is as follows:

Code
# %% Molybdenite (1)

# Set up lattice
lattice = Hexagonal(3.1604*Angstrom, 40.0*Angstrom)

# Define elements
elements = [Molybdenum, Sulfur, Sulfur]

# Define coordinates
fractional_coordinates = [[ 0.333333333333,  0.666666666667,  0.5           ],
                          [ 0.666666666667,  0.333333333333,  0.460348625   ],
                          [ 0.666666666667,  0.333333333333,  0.539651375   ]]

# Set up configuration
molybdenite_1 = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

molybdenite_1_name = "Molybdenite (1)"


# %% Set LCAOCalculator

# %% LCAOCalculator

# ----------------------------------------
# Basis Set
# ----------------------------------------
basis_set = [
    BasisGGASG15.Sulfur_High,
    BasisGGASG15.Molybdenum_High,
]

k_point_sampling = MonkhorstPackGrid(na=13, nb=13)

numerical_accuracy_parameters = NumericalAccuracyParameters(
    density_mesh_cutoff=120.0 * Hartree, k_point_sampling=k_point_sampling
)

calculator = LCAOCalculator(
    basis_set=basis_set,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    checkpoint_handler=NoCheckpointHandler,
)


# %% Set Calculator

molybdenite_1.setCalculator(calculator)

molybdenite_1.update()

nlsave('Raman_SG15High.hdf5', molybdenite_1)


# %% OptimizeGeometry

restart_strategy = RestartFromTrajectory(
    trajectory_filename='Raman_SG15High.hdf5',
    object_id='optimize_trajectory',
)

optimized_configuration = OptimizeGeometry(
    configuration=molybdenite_1,
    max_forces=0.01 * eV / Angstrom,
    constraints=[FixStrain(True, True, True)],
    trajectory_filename='Raman_SG15High.hdf5',
    trajectory_object_id='optimize_trajectory',
    optimize_cell=False,
    restart_strategy=restart_strategy,
)

nlsave('Raman_SG15High.hdf5', optimized_configuration, object_id='optgeom')


# %% DynamicalMatrix

dynamical_matrix = DynamicalMatrix(
    configuration=optimized_configuration,
    filename='Raman_SG15High.hdf5',
    object_id='dm',
    calculator=calculator,
)
dynamical_matrix.update()


# %% SusceptibilityDerivatives

kpoints = MonkhorstPackGrid(na=23, nb=23, nc=2)

susceptibility_derivatives = SusceptibilityDerivatives(
    configuration=optimized_configuration,
    filename='Raman_SG15High.hdf5',
    object_id='sd',
    kpoints=kpoints,
)

susceptibility_derivatives.update()


# %% RamanSpectrum

raman_spectrum = RamanSpectrum(
    configuration=optimized_configuration,
    dynamical_matrix=dynamical_matrix,
    susceptibility_derivatives=susceptibility_derivatives,
    polarization_in=(0.0, 0.0, 1.0),
    polarization_out=(0.0, 0.0, 1.0),
    number_of_angles=None,
    polarization_orthogonal=None,
)
nlsave('Raman_SG15High.hdf5', raman_spectrum)

5
General Questions and Answers / DFT Phonon Transmission
« on: August 21, 2025, 18:30 »
Dear Admin,

I want to calculate phonon transmission across an interface of two 2D materials. The dimension are device are 7.83 A in periodic direction and a vacuum in out-of-plane direction and a total number of atoms as 153. In the dynamical matrix, it shows default repetitions as 3x1x1 however, which increases total atoms to 459.
This increases computational time very much beyond few weeks. Therefore, I used repetitions as 1x1x1.

I want to know is it the right approach and how would it affect my results if I don't use repetitions?
Also, would the approach be at-least useful for qualitative results?


Thanks

6
General Questions and Answers / GPU QATK
« on: June 19, 2025, 03:31 »
Dear Admin,

I recently installed the X-2025.06 version of QuantumATK, which supports GPU acceleration for DFT calculations.
In the bin folder, I found the following files:
atkpython
atkpython_gpu
atkpython_system-mpi
quantumatk

In the mpi/bin, I found the following files:
cpuinfo
hydra_bstrap_proxy
hydra_nameserver
hydra_pmi_proxy
impi_info
mpiexec
mpiexec.hydra

Kindly let me know if this is how to run DFT simulations on GPU:

atkpython_gpu input.py > output.log

or

mpiexec.hydra -n 2 atkpython_gpu input.py > output.log (2 here for using 2 GPUs on a given node)
My GPU node shows 6 GPU machines when using nvidia-smi command.

If I am doing it incorrectly, kindly help me do it properly for single-GPU and multiple-GPU machines on a given node.

Also, do we require any licenses to use GPU acceleration because I tried atkpython_gpu input.py > output.log and it shows:
License Error: Unable to obtain a required license for the
requested license feature. It could mean there are no valid
licenses left, a problem with the connection to the license
server, or the license file does not contain the requested feature.
See below for more details.
No such feature exists.
Feature:       qatk_gpu
License path:  [email protected]:
FlexNet Licensing error:-5,234

7
Dear admin,
How to resolve error?

I cant open ATK GUI on Windows 11 :

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Program Files\QuantumATK\QuantumATK-W-2024.09-SP1\bin\quantumatk.exe\__main__.py", line 7, in <module>
    sys.exit(start_quantumatk())
             ^^^^^^^^^^^^^^^^^^
  File "zipdir/ATKExecutables/atkwrappers\__init__.py", line 811, in start_quantumatk
  File "zipdir\NL\__init__.py", line 10, in <module>
  File "zipdir\NL\GUI\Main\Main.py", line 207, in main
  File "zipdir\NL\GUI\Main\ApplicationManager.py", line 11, in <module>
  File "zipdir\NL\GUI\Preferences\Preferences.py", line 17, in <module>
  File "zipdir\NL\GUI\Tools\Builder\Stash\StashConstants.py", line 3, in <module>
  File "zipdir\NL\CommonConcepts\Configurations\BulkConfiguration.py", line 19, in <module>
  File "zipdir\NL\CommonConcepts\Configurations\AtomicConfiguration.py", line 13, in <module>
  File "zipdir\NL\Calculators\ExternalCalculators\ClassicalCalculators\PotentialBuilderUtilities.py", line 13, in <module>
  File "build/atkpython/Lib/site-packages/tremolox\TremoloXPotentialSet.py", line 19, in <module>
  File "build/atkpython/Lib/site-packages/tremolox\potentials\analyzer.py", line 42, in <module>
  File "build/atkpython/Lib/site-packages/tremolox\pymolo.py", line 8, in <module>
  File "build/atkpython/Lib/site-packages/tremolox\pymolo_avx.py", line 10, in <module>
ImportError: DLL load failed while importing _pymolo_avx: The specified procedure could not be found.

8
General Questions and Answers / MPI error
« on: May 15, 2025, 11:04 »
Dear admin,

I got this error when running simulation on cluster on 3 nodes:

Abort(1615247) on node 0 (rank 0 in comm 0): Fatal error in PMPI_Init: Other MPI error, error stack:
MPIR_Init_thread(176)........:
MPID_Init(1525)..............:
MPIDI_OFI_mpi_init_hook(1597):
MPIDU_bc_table_create(320)...: Missing hostname or invalid host/port description in business card


SLURM Script:

#!/bin/bash

#SBATCH --job-name=QuantumATK
#SBATCH --ntasks=120
#SBATCH --ntasks-per-node=60
#SBATCH --nodes=2
#SBATCH --cpus-per-task=1
#SBATCH --output=%x-%j.out
#SBATCH --error=%x-%j.err
#SBATCH --partition=normal
#SBATCH --mem=210GB


cd $SLURM_SUBMIT_DIR
export ATK=/home/user/QATK/QATK_W_SP2/Install/quantumatk/W-2024.09-SP2/bin/atkpython
export MPI=/home/user/QATK/QATK_W_SP2/Install/quantumatk/W-2024.09-SP2/mpi/bin/mpiexec.hydra
export MPIE=/home/user/QATK/QATK_W_SP2/Install/quantumatk/W-2024.09-SP2/mpi/bin/mpiexec
export MKL_DYNAMIC=TRUE
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export LM_LICENSE_FILE="####@*********":"###@***********"
export SNPSLMD_LICENSE_FILE="####@**********":"####@*******"

${MPI} -n 120 -ppn 60 ${ATK} in.py > out.log

9
Dear Admin,

I am running a 500+ atom geometry optimization on 240 cores (60 cores per node). After running for some time the simulation stopped giving error as:
===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 175 PID 170903 RUNNING AT n3
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 176 PID 170908 RUNNING AT n3
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================

===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 177 PID 170910 RUNNING AT n3
=   KILLED BY SIGNAL: 9 (Killed)
===================================================================================


Could you please help how to resolve this issue as it requires me otherwise to run simulation again and again after sometime?

10
Dear Admin,

I am training a MLFF for a system where I need to include both molecular and bulk configurations in training data.
However, in the end when trying to call rankFits() on MTP, it says error that molecular configurations have no stresses. Hence, does not find the best mtp among list of 30 mtps.

How to resolve this issue? and how to evaluate MTP in such case?

# Determine the best fit and extract its parameters.
 best_fit_index = mtp_training.rankFits(
 data_tags=None,
 weights=[[1, 1, 1], [1, 1, 1]],
 statistical_measure=R2Score
 )[0][0]


Thanks
best regards

11
General Questions and Answers / Interface MTP Training
« on: November 27, 2024, 23:03 »
Dear Admin,
Q1. I tried the code on "https://docs.quantumatk.com/manual/Types/CrystalInterfaceTrainingParameters/CrystalInterfaceTrainingParameters.html#NL.Study.MomentTensorPotential.CrystalInterfaceTraining.CrystalInterfaceTrainingParameters" for Iron/Copper interface but I get this error everytime. I tried changing random seed but still has same error. Kindly help resolve.

Master    : Handling exception in delegator process.
  Encountered TaskExecutionError: An exception was raised while executing task "a90b78e8ad0a11ef90b9801844e91328".
    Traceback (most recent call last):
      File "zipdir/NL/ComputerScienceUtilities/ParallelTools/DynamicTaskScheduler.py", line 1391, in __startParallelExecutionOnWorkerProcesses
      File "zipdir/NL/ComputerScienceUtilities/Workflow/Workflow.py", line 1187, in _runTask
      File "zipdir/NL/ComputerScienceUtilities/Workflow/Workflow.py", line 708, in run
      File "zipdir/NL/Study/MomentTensorPotential/FitMomentTensorPotential.py", line 464, in _execute
    NL.ComputerScienceUtilities.Exceptions.NLExecutionError: The training dataset contains no configurations. This error can probably be avoided by picking a different random seed.

Q2. Please answer the following. Step 1: I trained an MTP based with active learning of few configurations Step 2: I want to include more configurations so I combined reference data and active learning candidates from step 1 and passed onto Step 2. Step 3: I again want to include few more configurations. Now should I include all configurations from Step 1 and Step2 or only step 2? Also, in retaining should I change basis size as more configurations are being added or keep same for all Steps?

12
General Questions and Answers / Trying to install QATK W 2024
« on: October 21, 2024, 00:52 »
Dear Admin,

I upgraded my server OS from CentOS 7 to Ubuntu with following description:
Description:   Ubuntu 20.04.6 LTS
Release:   20.04
ldd (Ubuntu GLIBC 2.31-0ubuntu9.16) 2.31

And installed QATK_W version which was installed successfully as displayed in the message (attached pic).
However, the license servers still have CentOS7.

Then, I ran a py file which was created on QATK_2023_SP1 software. But ran into this error as below. Kindly help in this regard.

[SCL] Error:  FLEXlm version of the application is higher than the license daemon version. Please upgrade the license daemon to latest version (SCL-601)

License Error: Unable to obtain a required license for the
requested license feature. It could mean there are no valid
licenses left, a problem with the connection to the license
server, or the license file does not contain the requested feature.
See below for more details.

Cannot check out base license. SCL error message:
Version of vendor daemon is too old.
FlexNet Licensing error:-83,234

13
Dear Admin,

The actual MoS2 forcefield given in the original paper "https://www.frontiersin.org/journals/nanotechnology/articles/10.3389/fnano.2022.1034795/full#supplementary-material" is quite different from what is implemented in QuantumATK ReaxFF_CHOSMoNiAuTi_2022. Upon inspecting the implementation in QuantumATK against with original paper it, I found multiple lines have errors and one line is completely missing.

When using this forcefield it gives so many distortions in MoS2. Kindly, check into this or please let me know if I am missing anything.'

regards
Asif

14
Dear Admin,

How to introduce charged vacancy in a device configuration for transmission?

15
Dear Admin,

How can one set a heating rate only for a specific tag of atoms? In QuantumATK by default heating rate is set for all atoms.

Pages: [1] 2 3 4