[ase-users] db module of ase

Steen Lysgaard stly at dtu.dk
Mon Feb 17 09:43:28 CET 2020


Hi Punit,


check out here how to add more columns in your db: https://wiki.fysik.dtu.dk/ase/dev/ase/db/db.html#add-additional-data

e.g. db.write(slab, pw_cutoff=550)


To add the extra columns to your view on the command line you use the '-c' option:

ase db pure_slab.db -c +pw_cutoff

or to see all extra columns:

ase db pure_slab.db -c ++


Best regards,

Steen


________________________________
From: ase-users-bounces at listserv.fysik.dtu.dk <ase-users-bounces at listserv.fysik.dtu.dk> on behalf of Punit Kumar via ase-users <ase-users at listserv.fysik.dtu.dk>
Sent: Saturday, February 15, 2020 7:30:45 PM
To: ase-users
Subject: [ase-users] db module of ase

Dear ase-users

Recently I have started using the 'db' module of ase to create a database for my work. But since it is the first time when I am using this module I have some queries regarding that. After creating a database I have observed that the number of columns in the database is limited. These columns are
----------------------------------------------------------------------------------------------------------------------------------
id   age   user   formula   calculator   energy   fmax   pbc   volume   charge   mass   magmom
----------------------------------------------------------------------------------------------------------------------------------

But I want to add more columns in the database (such as pw_cutoff, kpts, etc) to make my database more informative and robust. Unfortunately, I didn't find any tutorial in the documentation of the 'db' module (https://wiki.fysik.dtu.dk/ase/ase/db/db.html#module-ase.db) which talks about adding (or removing) extra column from the database. Can anyone have some idea of how to do that?  Your efforts are highly appreciated.

I've created my database using the following piece of code

from ase.db import connect
from ase.io<http://ase.io> import read

slab = read('file.gpw')
db = connect('pure_slab.db')
db.write(slab)

With regards
Punit


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200217/35fb6ac2/attachment.html>


More information about the ase-users mailing list