Skip to content

Commit 27298ad

Browse files
committed
Initial commit
0 parents  commit 27298ad

File tree

208 files changed

+134681
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+134681
-0
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ignored patterns
2+
3+
bin/*
4+
*.pyc
5+
*.pyo
6+
*.x
7+
*.mod
8+
*.out
9+
*.o
10+
*.tex
11+
*.pdf
12+
*~

.vimrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set tabstop=3
2+
set softtabstop=3
3+
set shiftwidth=3
4+
set expandtab

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include README.rst

README.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
i-PI V1.0
2+
--------
3+
4+
A Python interface for ab initio path integral molecular dynamics simulations.
5+
i-PI is composed of a Python server (i-pi itself, that does not need to be
6+
compiled but only requires a relatively recent version of Python and Numpy)
7+
that propagates the (path integral) dynamics of the nuclei, and of an external
8+
code that acts as client and computes the electronic energy and forces.
9+
10+
This is typically a patched version of an electronic structure code, but a
11+
simple self-contained Fortran driver that implements Lennard-Jones and
12+
Silveira-Goldman potentials is included for test purposes.
13+
14+
15+
Quick Installation and Test
16+
---------------------------
17+
18+
Follow these instruction to test i-PI. These assume to be run from a Linux
19+
environment, with a recent version of Python, Numpy and gfortran, and that
20+
the terminal is initially in the i-pi package directory (the directory
21+
containing this file).
22+
23+
* Generate the driver code
24+
25+
$ cd driver
26+
$ make
27+
$ cd ..
28+
29+
* Run one of the examples
30+
31+
This will first start the wrapper in the background, redirecting the output on
32+
a log file, then run a couple of instances of the driver code and then follow
33+
the progress of the wrapper by monitoring the log file
34+
35+
$ cd examples/tutorial/tutorial-1/
36+
$ ../../../i-pi tutorial-1.xml > log &
37+
$ ../../../drivers/driver.x -h localhost -p 31415 -m sg -o 15 &
38+
$ ../../../drivers/driver.x -h localhost -p 31415 -m sg -o 15 &
39+
$ tail -f log
40+
41+
The monitoring can be interrupted with CTRL+C when the run has finished (5000 steps)
42+

TODO

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
A list of things that should be fixed or improved
2+
Format of "bug-reports":
3+
4+
PRIORITY Title of bug (REPORTER) (ASSIGNEE)
5+
Longer description....
6+
7+
PRIORITY:
8+
* Can wait
9+
** Should be done before release
10+
*** High priority
11+
**** Code broken! Must fix now!
12+
The person who "reports" a bug should indicate his initials in the title.
13+
If one decides to actively work on one issue, it should indicate it on the title line.
14+
15+
16+
DONE ** Clean up help (MC) (JM)
17+
New dynamic attributes should be properly included in the documentation.
18+
19+
DONE ** Clean up help (MC) (JM)
20+
The whole input generation method should be documented with comments in the code.
21+
22+
** Clean up help (MC)
23+
The whole input generation method should be bug-checked.
24+
25+
DONE ** Robust input defaults (MC) (JM)
26+
In many places the default value of a storage class is set by defining
27+
fields = { "tag" : ( Class, { "default" : EngineClass(default paramenters) } ) }
28+
This is bad, because the class is generated at parse time, and
29+
just one default object will be returned by any instance of the
30+
container Input class.
31+
Defaults which are not immutable (strings, ints or floats) should be defined by
32+
overloading the __init__ class and calling the parent class with the appropriate default, e.g.
33+
InputSimulation.__init__(self, .... default=None, ....):
34+
if (default is None): default=WhateverClass(parameters)
35+
super(InputSimulation,self).__init__(..... default=default ...)
36+
37+
DONE **** Make the new NM thing actually work (MC) (MC)
38+
39+
DONE *** Move the synchro business out of Beads and into NormalModes (MC) (MC)
40+
41+
DONE *** Fix PDB output NOT to use Atom interface, that is horribly slow (MC) (JM)
42+
43+
DONE ** Fix (or remove) "springs" trajectory output. Not really needed anymore... (MC)
44+
45+
DONE *** More in general, rationalize and clean up the available properties and trajectories. The help strings and function documentation often don't match, often which arguments are supposed to be passed to the function aren't given in the help string, some properties have tensorial equivalents and some don't, some are also trajectories and some aren't. This really needs to be tidied up. (MC/JM) (JM)
46+
47+
DONE (MC) *** Should NOT use the Cholesky decomposition in initializing GLE. Use symmetric decomposition instead (MC) (MC)
48+
49+
DONE *** Benchmark the new property implementation. (MC) (JM)
50+
Completely revamped properties and trajectories scheme.
51+
Now it is possible to specify units and a short help string.
52+
53+
DONE * Multiforce object should be implemented. (JM) (JM)
54+
55+
DONE *** Write a very clean driver for LJ and SG for examples (JM) (JM)
56+
DONE *** Test NPT on the pH2 system (JM) (JM)
57+
58+
* Implement NST (MC) (MC)
59+
60+
DONE ** Find out why NPT and NST ensembles both appear to give jumps in the
61+
conserved quantity (JM)
62+
I have made some progress with this. I got it to stop and go back one step
63+
and print a restart file whenever there was a jump. Restarting from this file
64+
did not reproduce the jump, suggesting that there was a problem with the
65+
neighbour lists, not the wrapper.
66+
I then made it redo the neighbour list at each time step. This appeared to
67+
reduce the frequency and magnitude of the energy jumps, but not eliminate them.
68+
The effect is much larger with a NST than with a NPT ensemble, in fact the
69+
jumps appear to be very rare with the NPT ensemble.
70+
71+
DONE * Figure out how to use FFTW with python for the normal-mode
72+
transformations. (JM) (JM)
73+
74+
DONE ** Add help strings to all the trajectories and properties in the property
75+
list (JM) (JM)
76+
77+
DONE *** Take care that all the arguments for the properties, are being converted to the correct type. (JM) (JM)
78+
I'm pretty sure that at the moment we're using strings as index variables
79+
rather than integers.
80+
81+
DONE * It might be useful to have some kind of standardized error message format
82+
(JM) (JM)
83+
84+
DONE ** In both engine and inputs directories, we need to document initializer,
85+
normalmodes, forces and outputs (JM) (JM)
86+
87+
DONE *** Rework the cell class, and the NPT ensemble (JM)
88+
89+
DONE ** Add property and trajectory help string to the manual (JM) (JM)
90+
91+
DONE *** Re-write the input files for all the test directories. (JM) (JM)
92+
93+
DONE ** Add read cell from (A, B, C) and (alpha, beta, gamma) (JM) (JM)
94+
95+
* Merge the io_xyz.py, io_binary.py and io_pdb.py files (JM)
96+
97+
DONE * In the manual, the attributes of the trajectory, properties and
98+
checkpoint tags in the code snippets of 4.5 and 4.6 are now out-of-date. (JM) (JM)
99+
100+
DONE ** Write the paper (JM) (MC)
101+
** Finish writing the manual (JM) (JM)
102+
103+
DONE ** Implement warning() and info() everywhere (For example, it is missing
104+
from normalmodes.py) (JM) (JM)
105+
106+
** Implement a more robust walltime clock limit mechanism. (MC)
107+
108+
** Alternative communication mechanisms not relying on sockets (MC)
109+
110+
*** Fix the 'dummy' thermostat/barostat options. At the moment, forgetting
111+
to set the barostat style doesn't give an error, and then you get a
112+
fairly unhelpful error message to go with it. (JM)

doc/Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Makefile for the help files
2+
#
3+
# Copyright (C) 2013, Joshua More and Michele Ceriotti
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <http.//www.gnu.org/licenses/>.
17+
18+
.PHONY : all distclean clean aux
19+
all : manual.pdf
20+
21+
aux:
22+
python create_man.py
23+
rm -f *.pyc
24+
25+
manual.pdf: aux
26+
pdflatex manual
27+
bibtex manual
28+
pdflatex manual
29+
pdflatex manual
30+
31+
clean:
32+
bash -c "rm -rf input_docs manual.{aux,bbl,blg,brf,idx,log,lof,out,toc}"
33+
34+
distclean: clean
35+
rm -f manual.pdf manual.xml

doc/README

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
-- Documentation directory --
2+
3+
* This gives all the documentation for the program.
4+
5+
* Directories:
6+
- figures: Holds the figures used in the manual.
7+
- input_docs: Generated by the Makefile to hold the automatically generated
8+
input reference sections of the manual.
9+
10+
* Files:
11+
- create_man.py: python script which automatically generates latex help files
12+
for all the classes, for use in the manual.
13+
- help_list.py: python script which can generate custom help files for
14+
the output classes, for use in the manual.
15+
- help.py: python script which can generate custom help files for
16+
each of the input classes, for use in the manual.
17+
- Makefile: The makefile for the automatically generated manual.
18+
- manual.tex: TeX file giving the manual template.
19+
- mybib.bib: Bibliography file for the manual.
20+
- elsarticle-num-names.bst: Bibliography style file.
21+
- etoolbox.sty: LaTeX package which is used by manual.tex.
22+
23+
* Some of the above files are used to automatically generate sections of the
24+
user manual, and to create an xml showing the class hierarchy. The sections
25+
of the user manual are created in a directory input_docs.
26+
The user manual itself is created in two files, manual.pdf and manual.xml.
27+
These are:
28+
- manual.pdf: The user manual file. This explains how to run the code,
29+
the input and output file syntax, and the design paradigm for ipi.
30+
Also contains a tutorial which goes step by step through an example
31+
calculation.
32+
- manual.xml: This is an xml file that contains all the input names
33+
along with a description of their purpose and what values are
34+
expected for each of them.
35+
36+
* To make the help files use:
37+
38+
$ make
39+
40+
* To remove the input reference sections and LaTeX compiled files, use:
41+
42+
$ make clean
43+
44+
* To remove all the generated files, use:
45+
46+
$ make distclean

doc/create_man.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""Help script which automatically generates the manual files.
2+
3+
Copyright (C) 2013, Joshua More and Michele Ceriotti
4+
5+
This program is free software: you can redistribute it and/or modify
6+
it under the terms of the GNU General Public License as published by
7+
the Free Software Foundation, either version 3 of the License, or
8+
(at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program. If not, see <http.//www.gnu.org/licenses/>.
17+
18+
19+
Creates a latex file, corresponding to a section of the manual, for each of
20+
the classes specified in help.py. It uses help.py to generate information
21+
about the tags for each class, and will include cross-references so that the
22+
title of each tag corresponding to a different class will also be a hyperlink
23+
in the manual to the section corresponding to that class.
24+
25+
Note that any new input class type must be added to the objects
26+
dictionary in help.py and the latex help file must be added to the end of
27+
the manual.lyx file for it to be included in the automatic help generation.
28+
29+
Also creates an xml file with the full list of all the tags.
30+
"""
31+
32+
import os
33+
from help import help, objects
34+
from help_list import help_list, list_objects
35+
36+
if not os.path.exists("input_docs"):
37+
os.mkdir("input_docs")
38+
39+
help(xml=True, prefix="manual")
40+
for opt in objects:
41+
help(latex=True, levels=1, option=opt, prefix=("input_docs/" + opt), standalone=False)
42+
for opt in list_objects:
43+
help_list(option=opt, prefix=("input_docs/" + opt), standalone=False)

0 commit comments

Comments
 (0)