Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# docs.yaml
name: Auto update docs for master branch
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{ secrets.BUILD_DOCS_ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: html-site
BUILD_SCRIPT: |
apt-get install python3-pip -y &&
pip3 install sphinx==1.7.5 &&
pip3 install sphinxcontrib-napoleon &&
pip3 install numpy &&
pip3 install monty &&
pip3 install m2r &&
python3 setup.py install &&
cd docs && make html && mv _build/html/ ../html-site && cd ..
5 changes: 3 additions & 2 deletions dpdata/qe/scf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ def get_coords (lines) :
return list(atom_names), atom_numbs, atom_types, coord

def get_energy (lines) :
energy = None
for ii in lines :
if '! total energy' in ii :
return ry2ev * float(ii.split('=')[1].split()[0])
return None
energy = ry2ev * float(ii.split('=')[1].split()[0])
return energy

def get_force (lines) :
blk = get_block(lines, 'Forces acting on atoms', skip = 1)
Expand Down
10 changes: 6 additions & 4 deletions dpdata/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def __init__ (self,
type_map = None,
begin = 0,
step = 1,
data = None) :
data = None,
**kwargs) :
"""
Constructor

Expand Down Expand Up @@ -116,7 +117,7 @@ def __init__ (self,
return
if file_name is None :
return
self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step)
self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step, **kwargs)

if type_map is not None:
self.apply_type_map(type_map)
Expand Down Expand Up @@ -963,7 +964,8 @@ def __init__ (self,
type_map = None,
begin = 0,
step = 1,
data=None) :
data=None,
**kwargs) :
"""
Constructor

Expand Down Expand Up @@ -1006,7 +1008,7 @@ def __init__ (self,
return
if file_name is None :
return
self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step)
self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step, **kwargs)
if type_map is not None:
self.apply_type_map(type_map)

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
'dpdata/pwmat',
'dpdata/amber',
'dpdata/fhi_aims',
'dpdata/gromacs'],
'dpdata/gromacs'
],
package_data={'dpdata':['*.json']},
classifiers=[
"Programming Language :: Python :: 3.6",
Expand Down
43 changes: 43 additions & 0 deletions tests/qe.scf/Al.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
&CONTROL
calculation = "scf",
pseudo_dir = "../",
prefix = "Aluminium",
wf_collect = .True.,
tstress = .True.,
tprnfor = .True.,
outdir = "./",
iprint = 1,
/
&SYSTEM
ibrav = 0,
nat = 4,
ntyp = 1,
occupations ='smearing',
smearing ='fermi-dirac',
degauss = 0.001d0,
nosym = .true.,
ecutwfc = 50,
nbnd = 12,
/
&ELECTRONS
electron_maxstep = 200,
mixing_mode = 'plain',
conv_thr = 1.0D-8,
mixing_beta = 0.7D0,
/
CELL_PARAMETERS (angstrom)
4.04 0 0
0 4.04 0
0 0 4.04

ATOMIC_SPECIES
Al 26.98 Al.pbe-n-nc.UPF

ATOMIC_POSITIONS (crystal)
Al 0 0 0
Al 0 0.5 0.5
Al 0.5 0 0.5
Al 0.5 0.5 0

K_POINTS (automatic)
2 2 2 0 0 0
Loading