[ase-users] About SinglePointCalculator command...?
Michael Joseph Waters
michael.j.waters at northwestern.edu
Thu Dec 10 19:37:08 CET 2020
Hi DGKang,
For many codes there is a specific ase calculator that interfaces with code so you won't have to store results in a SinglePointCalculator
I don't see QUIP on the list of calculators though: https://wiki.fysik.dtu.dk/ase/ase/calculators/calculators.html
But it look's like QUIP can provide an ASE-compatible calculator: https://libatoms.github.io/GAP/quippy-potential-tutorial.html
Looking at your code example again, it looks like you already have a calculator with results attached to the atoms objects. The calculator results should remain even if you append the atoms object into lists.
-Mike
________________________________
From: Dong gi Kang <kdg4206 at gmail.com>
Sent: Thursday, December 10, 2020 12:04 PM
To: Michael Joseph Waters <michael.j.waters at northwestern.edu>; ase-users at listserv.fysik.dtu.dk <ase-users at listserv.fysik.dtu.dk>
Subject: Re: About SinglePointCalculator command...?
Hi Mike,
Thank you for your prompt email.
At the moment I am using QUIP+GAP with ase interface. I am all new to use these codes. However, I am planning to use LAMMPS with ase.
Could you please let me know the easier way to do single point calculations? Is it using LAMMPS single point calculations commands?
Many thanks.
Kind regards,
DGKang.
From: ase-users-bounces at listserv.fysik.dtu.dk <ase-users-bounces at listserv.fysik.dtu.dk>
Date: Thursday, 10 December 2020 at 17:54
To: ase-users at listserv.fysik.dtu.dk <ase-users at listserv.fysik.dtu.dk>
Subject: Re: [ase-users] About SinglePointCalculator command...?
Hi DGKang,
SinglePointCalculator acts as a cache of data like energy, forces, and stress for a single structure. It's typically used when there isn't another calculator object that contains the data.
Is your MD simulation running in ASE with some code like Lammps on the back end? If yes, there should be an easier way.
If not, calc.results is a dict that stores data like this:
results['energy'] = 87.345344
results['forces'] = [[3.7867, 6.30303, 4.3010],
[1.2367, 4.340303, 1.32010]]
Best,
-Mike
________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk <ase-users-bounces at listserv.fysik.dtu.dk> on behalf of Dong gi Kang via ase-users <ase-users at listserv.fysik.dtu.dk>
Sent: Thursday, December 10, 2020 9:43 AM
To: ase-users at listserv.fysik.dtu.dk <ase-users at listserv.fysik.dtu.dk>
Subject: [ase-users] About SinglePointCalculator command...?
Dear all,
I am advised to use single point calculator in order to pass the MD calculation results:
` ` `
db = []
def collect_data():
atoms_copy = atoms.copy() # copy the results of the MD calcs as atoms_copy
atoms_copy.calc = SinglePointCalculator(atoms, **atoms.calc.results) # do structure constraint calc (single p. calc.) of atoms (?) or results from MD calc (?)
db.append(atoms_copy) (atoms, **atoms.calc.results)
` ` `
To learn about SinglePointCalculator I have searched in ase document page but did not show anything about the commands.
Could you please explain what **atoms.calc.results do? And what ** do which is placed in front of the command?
I appreciate your time and advice in advance.
Kind regards,
DGKang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201210/7591d1c6/attachment-0001.html>
More information about the ase-users
mailing list