[ape] 01/01: Imported Upstream version 2.2.0
Yann Pouillon
pouillon-guest at alioth.debian.org
Tue Oct 15 18:02:18 UTC 2013
This is an automated email from the git hooks/post-receive script.
pouillon-guest pushed a commit to branch master
in repository ape.
commit 2919421f564acf41515494e3523b013035db598b
Author: Yann Pouillon <yann.pouillon at gmail.com>
Date: Tue Oct 15 20:01:51 2013 +0200
Imported Upstream version 2.2.0
---
AUTHORS | 7 +
COPYING | 339 +
ChangeLog | 6034 ++++++++++++
INSTALL | 370 +
Makefile.am | 41 +
Makefile.in | 770 ++
NEWS | 4 +
README | 1 +
TODO | 16 +
aclocal.m4 | 1141 +++
build-aux/config.guess | 1522 +++
build-aux/config.sub | 1766 ++++
build-aux/depcomp | 688 ++
build-aux/install-sh | 527 ++
build-aux/missing | 331 +
build-aux/texinfo.tex | 9913 ++++++++++++++++++++
build/Makefile.am | 26 +
build/Makefile.in | 382 +
build/ape.spec.in | 92 +
build/svn_release_number.sh | 17 +
config.h.in | 129 +
configure | 7837 ++++++++++++++++
configure.ac | 107 +
doc/Makefile.am | 24 +
doc/Makefile.in | 664 ++
doc/ape.info | 1972 ++++
doc/ape.texi | 1813 ++++
liboct_parser/Makefile.am | 12 +
liboct_parser/Makefile.in | 501 +
liboct_parser/grammar.c | 1020 ++
liboct_parser/gsl_userdef.c | 41 +
liboct_parser/gsl_userdef.h | 28 +
liboct_parser/liboct_parser.h | 63 +
liboct_parser/parse.c | 403 +
liboct_parser/parse_exp.c | 144 +
liboct_parser/parser_f.c | 296 +
liboct_parser/string_f.c | 82 +
liboct_parser/string_f.h | 56 +
liboct_parser/symbols.c | 234 +
liboct_parser/symbols.h | 68 +
libstring_f/AUTHORS | 9 +
libstring_f/COPYING | 340 +
libstring_f/ChangeLog | 1 +
libstring_f/INSTALL | 370 +
libstring_f/Makefile.am | 9 +
libstring_f/Makefile.in | 642 ++
libstring_f/README | 24 +
libstring_f/aclocal.m4 | 973 ++
libstring_f/config.guess | 1522 +++
libstring_f/config.sub | 1766 ++++
libstring_f/configure | 5702 +++++++++++
libstring_f/configure.ac | 42 +
libstring_f/depcomp | 688 ++
libstring_f/install-sh | 527 ++
libstring_f/missing | 331 +
libstring_f/string_f.c | 85 +
libstring_f/string_f.h | 56 +
m4/acx.m4 | 245 +
m4/compilation_info.m4 | 46 +
m4/f90_module_flag.m4 | 55 +
m4/libxc.m4 | 138 +
m4/pspio.m4 | 88 +
sample/Cd/Cd | 40 +
sample/Cu/Cu.ae | 28 +
sample/Cu/Cu.mrpp | 20 +
sample/Cu/Cu.tm | 20 +
sample/Na/Na | 41 +
sample/Si/Si | 35 +
sample/Ti/Ti.ae | 31 +
sample/Ti/Ti.mrpp | 21 +
sample/Ti/Ti.tm | 21 +
src/Makefile.am | 151 +
src/Makefile.in | 680 ++
src/ape.F90 | 94 +
src/atom.F90 | 996 ++
src/atom_ae_inc.F90 | 185 +
src/atom_ps_inc.F90 | 1002 ++
src/eigensolver.F90 | 406 +
src/finite_diff.F90 | 262 +
src/functionals.F90 | 774 ++
src/global.F90 | 67 +
src/global.h | 30 +
src/gsl_interface_c.c | 358 +
src/gsl_interface_f.F90 | 355 +
src/hamann.F90 | 543 ++
src/hartree.F90 | 127 +
src/io.F90 | 93 +
src/kb_projectors.F90 | 426 +
src/liboct_parser.F90 | 298 +
src/linalg.F90 | 166 +
src/loc_potentials.F90 | 419 +
src/math.F90 | 116 +
src/mesh.F90 | 924 ++
src/messages.F90 | 305 +
src/mixing.F90 | 347 +
src/mrpp.F90 | 265 +
src/mrpp_equations.F90 | 334 +
src/multiroot_c.c | 131 +
src/multiroot_f.F90 | 177 +
src/numerical_tests.F90 | 567 ++
src/ode_integrator.F90 | 866 ++
src/odeint.c | 115 +
src/output.F90 | 137 +
src/parser_symbols.F90 | 405 +
src/potentials.F90 | 1088 +++
src/ps_io.F90 | 1347 +++
src/quantum_numbers.F90 | 263 +
src/run_ape.F90 | 326 +
src/sl_potentials.F90 | 371 +
src/splines.F90 | 275 +
src/states.F90 | 1396 +++
src/states_batch.F90 | 1425 +++
src/tm.F90 | 323 +
src/tm_equations.F90 | 276 +
src/units.F90 | 141 +
src/utilities_c.c | 126 +
src/utilities_f.F90 | 181 +
src/wave_equations.F90 | 686 ++
src/xc.F90 | 947 ++
testsuite/Makefile.am | 106 +
testsuite/Makefile.in | 715 ++
testsuite/all_electron/01-non_rel.01-no_spin.inp | 14 +
testsuite/all_electron/01-non_rel.02-spin.inp | 15 +
testsuite/all_electron/01-non_rel.test | 91 +
.../all_electron/02-scalar_rel.01-no_spin.inp | 21 +
testsuite/all_electron/02-scalar_rel.02-spin.inp | 22 +
testsuite/all_electron/02-scalar_rel.test | 129 +
testsuite/all_electron/03-rel.01-no_spin.inp | 19 +
testsuite/all_electron/03-rel.02-spin.inp | 25 +
testsuite/all_electron/03-rel.test | 128 +
testsuite/all_electron/04-unbound.01-Li.inp | 20 +
testsuite/all_electron/04-unbound.test | 15 +
testsuite/all_electron/05-charged.01-C+.inp | 14 +
testsuite/all_electron/05-charged.02-C-.inp | 14 +
testsuite/all_electron/05-charged.test | 37 +
.../all_electron/06-smearing.01-semiconducting.inp | 16 +
.../06-smearing.02-averill_painter.inp | 17 +
testsuite/all_electron/06-smearing.test | 18 +
testsuite/all_electron/Makefile.am | 43 +
testsuite/all_electron/Makefile.in | 451 +
testsuite/ape-run_regression_test.pl | 349 +
testsuite/ape-run_testsuite.in | 288 +
testsuite/basic/01-mesh.01-linear.inp | 14 +
testsuite/basic/01-mesh.02-log1.inp | 14 +
testsuite/basic/01-mesh.03-log2.inp | 14 +
testsuite/basic/01-mesh.test | 32 +
testsuite/basic/02-derivatives.01-splines.inp | 16 +
testsuite/basic/02-derivatives.02-finite_diff.inp | 16 +
testsuite/basic/02-derivatives.test | 54 +
testsuite/basic/03-integration.01-splines.inp | 14 +
testsuite/basic/03-integration.test | 12 +
testsuite/basic/04-ODE_solver.01-rkpd8.inp | 15 +
testsuite/basic/04-ODE_solver.02-rk4.inp | 15 +
testsuite/basic/04-ODE_solver.test | 41 +
testsuite/basic/05-hartree.01-splines.inp | 13 +
testsuite/basic/05-hartree.test | 12 +
testsuite/basic/06-mixing.01-linear.inp | 15 +
testsuite/basic/06-mixing.02-broyden.inp | 15 +
testsuite/basic/06-mixing.03-broyden2.inp | 15 +
testsuite/basic/06-mixing.test | 24 +
testsuite/basic/Makefile.am | 44 +
testsuite/basic/Makefile.in | 452 +
testsuite/libxc/01-H.inp | 11 +
testsuite/libxc/01-H.test | 1595 ++++
testsuite/libxc/02-H_spin.inp | 13 +
testsuite/libxc/02-H_spin.test | 2178 +++++
testsuite/libxc/03-He.inp | 11 +
testsuite/libxc/03-He.test | 1596 ++++
testsuite/libxc/04-He_spin.inp | 13 +
testsuite/libxc/04-He_spin.test | 2189 +++++
testsuite/libxc/05-Li.inp | 14 +
testsuite/libxc/05-Li.test | 2189 +++++
testsuite/libxc/Makefile.am | 171 +
testsuite/libxc/Makefile.in | 579 ++
testsuite/pseudopotentials/01-non_rel.01-ae.inp | 12 +
testsuite/pseudopotentials/01-non_rel.02-ham.inp | 10 +
testsuite/pseudopotentials/01-non_rel.03-tm.inp | 11 +
testsuite/pseudopotentials/01-non_rel.04-mrpp.inp | 11 +
testsuite/pseudopotentials/01-non_rel.test | 163 +
testsuite/pseudopotentials/02-scalar_rel.01-ae.inp | 17 +
.../pseudopotentials/02-scalar_rel.02-hamann.inp | 10 +
testsuite/pseudopotentials/02-scalar_rel.03-tm.inp | 10 +
.../pseudopotentials/02-scalar_rel.04-mrpp.inp | 13 +
testsuite/pseudopotentials/02-scalar_rel.test | 161 +
testsuite/pseudopotentials/03-rel.01-ae.inp | 15 +
testsuite/pseudopotentials/03-rel.02-hamann.inp | 9 +
testsuite/pseudopotentials/03-rel.03-tm.inp | 12 +
testsuite/pseudopotentials/03-rel.04-rtm.inp | 10 +
testsuite/pseudopotentials/03-rel.05-mrpp.inp | 15 +
testsuite/pseudopotentials/03-rel.test | 268 +
testsuite/pseudopotentials/04-nlcc.01-ae.inp | 13 +
testsuite/pseudopotentials/04-nlcc.02-atom.inp | 14 +
testsuite/pseudopotentials/04-nlcc.03-fhi.inp | 13 +
testsuite/pseudopotentials/04-nlcc.test | 39 +
.../pseudopotentials/05-pp_tests.01-ae_pp.inp | 21 +
.../pseudopotentials/05-pp_tests.02-tests_1.inp | 6 +
.../pseudopotentials/05-pp_tests.03-tests_2.inp | 12 +
testsuite/pseudopotentials/05-pp_tests.test | 38 +
testsuite/pseudopotentials/Makefile.am | 50 +
testsuite/pseudopotentials/Makefile.in | 458 +
200 files changed, 90073 insertions(+)
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..7707771
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+APE was brought to you by:
+
+ * Micael Oliveira (micael at teor.fis.uc.pt, Universidade
+ de Coimbra, Departamento de Fisica, Portugal)
+
+ * Fernando Nogueira (fnog at teor.fis.uc.pt, Universidade
+ de Coimbra, Departamento de Fisica, Portugal)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..0e08319
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,6034 @@
+2013-08-05 11:08 micael
+
+ * [r785] m4/libxc.m4: * Updated libxc tests to deal with separated
+ Fortran interface library.
+
+2013-08-02 15:21 micael
+
+ * [r784] src/states_batch.F90: * Removed a couple of unused
+ variables.
+
+2013-08-02 15:05 micael
+
+ * [r783] testsuite/all_electron/06-smearing.test: * Updated test
+ result.
+
+2013-08-02 14:41 micael
+
+ * [r782] src/eigensolver.F90, src/states.F90, src/states_batch.F90:
+ * In some very rare cases the code would identify some unbound
+ states as bound.
+ * Tweaking the Averill-Painter scheme to make it more robust.
+ Unfortunately it might also make the SCF convergence a bit slower
+ in some cases.
+
+2013-08-02 14:39 micael
+
+ * [r781] src/atom.F90: * Increased the field length for printing
+ the iteration number.
+
+2013-07-22 12:53 micael
+
+ * [r780] src/ode_integrator.F90: Making sure the practical infinity
+ is always larger than the classical turning point.
+
+2013-07-22 12:48 micael
+
+ * [r779] src/states_batch.F90: Sometimes the Averil-Painter scheme
+ would put a fraction of electron whose value was well bellow the
+ numerical accuracy.
+
+2013-07-11 15:49 micael
+
+ * [r778] Makefile.am, build/Makefile.am, build/ape.spec.in,
+ configure.ac, doc/Makefile.am, liboct_parser/grammar.c,
+ liboct_parser/grammar.y, liboct_parser/gsl_userdef.c,
+ liboct_parser/gsl_userdef.h, liboct_parser/liboct_parser.h,
+ liboct_parser/parse.c, liboct_parser/parse_exp.c,
+ liboct_parser/parser_f.c, liboct_parser/string_f.c,
+ liboct_parser/string_f.h, liboct_parser/symbols.c,
+ liboct_parser/symbols.h, libstring_f/configure.ac,
+ libstring_f/string_f.c, libstring_f/string_f.h, m4/acx.m4,
+ m4/compilation_info.m4, m4/libxc.m4, m4/pspio.m4,
+ src/Makefile.am, src/ape.F90, src/atom.F90, src/atom_ae_inc.F90,
+ src/atom_ps_inc.F90, src/eigensolver.F90, src/finite_diff.F90,
+ src/functionals.F90, src/global.F90, src/global.h,
+ src/gsl_interface_c.c, src/gsl_interface_f.F90, src/hamann.F90,
+ src/hartree.F90, src/io.F90, src/kb_projectors.F90,
+ src/liboct_parser.F90, src/linalg.F90, src/loc_potentials.F90,
+ src/math.F90, src/mesh.F90, src/messages.F90, src/mixing.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/multiroot_c.c,
+ src/multiroot_f.F90, src/numerical_tests.F90,
+ src/ode_integrator.F90, src/odeint.c, src/output.F90,
+ src/parser_symbols.F90, src/potentials.F90, src/ps_io.F90,
+ src/quantum_numbers.F90, src/run_ape.F90, src/sl_potentials.F90,
+ src/splines.F90, src/states.F90, src/states_batch.F90,
+ src/tm.F90, src/tm_equations.F90, src/units.F90,
+ src/utilities_c.c, src/utilities_f.F90, src/wave_equations.F90,
+ src/xc.F90, testsuite/Makefile.am,
+ testsuite/all_electron/Makefile.am,
+ testsuite/ape-run_regression_test.pl,
+ testsuite/ape-run_testsuite.in, testsuite/basic/Makefile.am,
+ testsuite/libxc/Makefile.am,
+ testsuite/pseudopotentials/Makefile.am: Corrected the FSF address
+ in the copyright.
+
+2013-07-04 14:26 micael
+
+ * [r777] src/parser_symbols.F90, src/ps_io.F90: * Added support for
+ LATEPP output
+ (http://www.fkf.mpg.de/bester/methods/methods.html#LATEPP). Code
+ kindly provided by Frank Zirkelbach.
+
+2013-06-07 09:47 micael
+
+ * [r776] src/atom.F90, src/atom_ps_inc.F90, src/parser_symbols.F90:
+ *) Added new pseudopotential test. It compares the all-electron
+ and pseudo ionization potentials when successionally removing all
+ the electrons from the valence.
+
+2013-05-02 18:03 micael
+
+ * [r775] src/functionals.F90, src/parser_symbols.F90, src/xc.F90: *
+ Added xc density correction scheme. My implementation deviates
+ slightly from the original paper (and from the original code of
+ Xavier Andrade), but it is much simpler and should give the same
+ result.
+
+2013-04-30 07:37 micael
+
+ * [r774] scripts, scripts/ape.py, scripts/configurations.py: *
+ Added python scripts to generate pseudopotentials. There were
+ written by Matteo Giantomassi.
+
+2013-01-21 15:19 micael
+
+ * [r772] testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/03-He.test, testsuite/libxc/04-He_spin.test,
+ testsuite/libxc/05-Li.test: * Updated more reference values for
+ libxc tests.
+
+2013-01-18 10:07 micael
+
+ * [r771] testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/03-He.test, testsuite/libxc/04-He_spin.test,
+ testsuite/libxc/05-Li.test: * Updated some values for the libxc
+ tests.
+
+2013-01-18 09:52 micael
+
+ * [r770] testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/027-lda_c_rc04.inp,
+ testsuite/libxc/028-lda_c_vwn_1.inp,
+ testsuite/libxc/029-lda_c_vwn_2.inp, testsuite/libxc/03-He.test,
+ testsuite/libxc/030-lda_c_vwn_3.inp,
+ testsuite/libxc/031-lda_c_vwn_4.inp,
+ testsuite/libxc/04-He_spin.test, testsuite/libxc/05-Li.test,
+ testsuite/libxc/084-gga_c_op_xalpha.inp,
+ testsuite/libxc/085-gga_c_op_g96.inp,
+ testsuite/libxc/086-gga_c_op_pbe.inp,
+ testsuite/libxc/087-gga_c_op_b88.inp,
+ testsuite/libxc/088-gga_c_ft97.inp,
+ testsuite/libxc/089-gga_c_spbe.inp,
+ testsuite/libxc/090-gga_x_ssb_sw.inp,
+ testsuite/libxc/091-gga_x_ssb.inp,
+ testsuite/libxc/092-gga_x_ssb_d.inp,
+ testsuite/libxc/093-gga_xc_hcth_407p.inp,
+ testsuite/libxc/094-gga_xc_hcth_p76.inp,
+ testsuite/libxc/095-gga_xc_hcth_p14.inp,
+ testsuite/libxc/096-gga_xc_b97_gga1.inp,
+ testsuite/libxc/097-gga_xc_hcth_a.inp,
+ testsuite/libxc/098-gga_x_bpccac.inp,
+ testsuite/libxc/099-gga_c_revtca.inp,
+ testsuite/libxc/100-gga_c_tca.inp,
+ testsuite/libxc/147-gga_c_wl.inp,
+ testsuite/libxc/160-gga_x_lb.inp,
+ testsuite/libxc/160-gga_xc_lb.inp,
+ testsuite/libxc/182-gga_x_lbm.inp,
+ testsuite/libxc/182-gga_xc_lbm.inp,
+ testsuite/libxc/200-gga_c_optc.inp,
+ testsuite/libxc/203-mgga_x_m06_l.inp,
+ testsuite/libxc/206-mgga_x_br89.inp,
+ testsuite/libxc/212-mgga_x_revtpss.inp,
+ testsuite/libxc/213-mgga_x_pkzb.inp,
+ testsuite/libxc/214-mgga_x_m05.inp,
+ testsuite/libxc/215-mgga_x_m05_2x.inp,
+ testsuite/libxc/216-mgga_x_m06_hf.inp,
+ testsuite/libxc/217-mgga_x_m06.inp,
+ testsuite/libxc/218-mgga_x_m06_2x.inp,
+ testsuite/libxc/219-mgga_x_m08_hx.inp,
+ testsuite/libxc/220-mgga_x_m08_so.inp,
+ testsuite/libxc/231-mgga_c_tpss.inp,
+ testsuite/libxc/233-mgga_c_m06_l.inp,
+ testsuite/libxc/234-mgga_c_m06_hf.inp,
+ testsuite/libxc/235-mgga_c_m06.inp,
+ testsuite/libxc/236-mgga_c_m06_2x.inp,
+ testsuite/libxc/237-mgga_c_m05.inp,
+ testsuite/libxc/238-mgga_c_m05_2x.inp,
+ testsuite/libxc/239-mgga_c_pkzb.inp,
+ testsuite/libxc/240-mgga_c_bc95.inp,
+ testsuite/libxc/524-gga_x_wpbeh.inp,
+ testsuite/libxc/525-gga_x_hjs_pbe.inp,
+ testsuite/libxc/526-gga_x_hjs_pbe_sol.inp,
+ testsuite/libxc/527-gga_x_hjs_b88.inp,
+ testsuite/libxc/528-gga_x_hjs_b97x.inp,
+ testsuite/libxc/529-gga_x_ityh.inp, testsuite/libxc/list: *
+ Started to update the libxc tests to libxc 2.0.
+
+2013-01-11 17:00 micael
+
+ * [r769] ChangeLog: * Update ChangeLog.
+ * Tagging version 2.1.0.
+ * Created 2.1.x branch.
+
+2013-01-11 16:53 micael
+
+ * [r768] testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/pseudopotentials/05-pp_tests.test: * Updated
+ tolerances.
+
+2013-01-11 16:18 micael
+
+ * [r767] src/atom_ps_inc.F90: * Bug fixed in the transition
+ dipole-moment test.
+
+2012-12-20 16:07 micael
+
+ * [r766] src/ape.F90: * The code now prints the libxc version if
+ available.
+
+2012-12-20 11:53 micael
+
+ * [r765] src/eigensolver.F90, src/states.F90, src/states_batch.F90:
+ Passing the eigensolver object to the eigensolver routines
+ instead of the tolerance.
+
+2012-12-20 11:32 micael
+
+ * [r764] src/ode_integrator.F90: Some explicit optimizations of the
+ wave-equations derivatives.
+
+2012-12-20 11:30 micael
+
+ * [r763] src/atom.F90, src/atom_ae_inc.F90, src/atom_ps_inc.F90:
+ Simplified the interface of several routines, as we dont need to
+ pass the integrator objects any more, since they are now included
+ in the atom object.
+
+2012-12-19 14:45 micael
+
+ * [r762] testsuite/libxc/add_func.pl, testsuite/libxc/add_list.sh,
+ testsuite/libxc/list, testsuite/libxc/xc_funcs_to_list.sh: *
+ Added scripts to manage the libxc tests.
+
+2012-12-19 14:44 micael
+
+ * [r761] m4/libxc.m4, src/functionals.F90, src/parser_symbols.F90:
+ * Adding support for libxc 2.0.
+
+2012-12-19 14:43 micael
+
+ * [r760] testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/025-lda_c_pw_rpa.inp, testsuite/libxc/03-He.test,
+ testsuite/libxc/04-He_spin.test, testsuite/libxc/05-Li.test,
+ testsuite/libxc/050-lda_k_tf.inp,
+ testsuite/libxc/051-lda_k_lp.inp,
+ testsuite/libxc/147-gga_c_wl.inp,
+ testsuite/libxc/150-gga_x_sogga.inp,
+ testsuite/libxc/151-gga_x_sogga11.inp,
+ testsuite/libxc/152-gga_c_sogga11.inp,
+ testsuite/libxc/153-gga_c_wi0.inp,
+ testsuite/libxc/154-gga_xc_th1.inp,
+ testsuite/libxc/155-gga_xc_th2.inp,
+ testsuite/libxc/156-gga_xc_th3.inp,
+ testsuite/libxc/157-gga_xc_th4.inp,
+ testsuite/libxc/158-gga_x_c09x.inp,
+ testsuite/libxc/159-gga_c_sogga11_x.inp,
+ testsuite/libxc/160-gga_x_lb.inp,
+ testsuite/libxc/160-gga_xc_lb.inp,
+ testsuite/libxc/182-gga_xc_lbm.inp,
+ testsuite/libxc/189-g90_k_tw4.inp,
+ testsuite/libxc/194-gga_xc_mohlyp.inp,
+ testsuite/libxc/195-gga_xc_mohlyp2.inp,
+ testsuite/libxc/196-gga_xc_th_fl.inp,
+ testsuite/libxc/197-gga_xc_th_fc.inp,
+ testsuite/libxc/198-gga_xc_th_fcfo.inp,
+ testsuite/libxc/199-gga_xc_th_fco.inp,
+ testsuite/libxc/203-mgga_x_m06l.inp,
+ testsuite/libxc/205-mgga_x_tau_htch.inp,
+ testsuite/libxc/206-mgga_x_br89.inp,
+ testsuite/libxc/209-mgga_x_rpp09.inp,
+ testsuite/libxc/209-mgga_x_rpp10.inp,
+ testsuite/libxc/231-mgga_c_tpss.inp,
+ testsuite/libxc/50-lda_k_tf.inp, testsuite/libxc/51-lda_k_lp.inp:
+ * Updated libxc tests. Almost all the functionals from libxc-1.2
+ are included. The ones that have problems, like returning NaN or
+ crashing were excluded.
+
+2012-11-13 13:37 fnog
+
+ * [r759] testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.test: Update (lowering) of the
+ tolerances set for some of the runs in the testsuite.
+
+2012-10-31 13:35 micael
+
+ * [r758] testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/05-charged.test,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.test,
+ testsuite/pseudopotentials/04-nlcc.test,
+ testsuite/pseudopotentials/05-pp_tests.test: * Updated testsuite
+ tolerances.
+
+2012-08-31 17:05 micael
+
+ * [r754] configure.ac, m4/pspio.m4, src/Makefile.am,
+ src/atom_ps_inc.F90, src/parser_symbols.F90, src/ps_io.F90: *)
+ Added possibility to use libpspio. At the moment we just check if
+ the library is available.
+
+2012-07-17 09:37 micael
+
+ * [r753] src/mesh.F90, src/ps_io.F90: * Bug fixed: when generating
+ the mesh, the last point was not always exactly equal the value
+ specified. This made the transfer from one mesh to another
+ sometimes fail when calling the extrapolating routines from GSL.
+
+2012-07-03 08:53 micael
+
+ * [r752] src/messages.F90: * Extended the maximum number of
+ messages to 200.
+
+2012-06-29 14:46 micael
+
+ * [r749] testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/05-charged.test,
+ testsuite/basic/06-mixing.02-broyden.inp,
+ testsuite/basic/06-mixing.test, testsuite/libxc/01-H.test,
+ testsuite/libxc/02-H_spin.test, testsuite/libxc/03-He.test,
+ testsuite/libxc/04-He_spin.test, testsuite/libxc/05-Li.test,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.test,
+ testsuite/pseudopotentials/04-nlcc.test,
+ testsuite/pseudopotentials/05-pp_tests.test: * Updated testsuite
+ tolerances.
+
+2012-06-29 14:46 micael
+
+ * [r748] configure.ac: * It seems third-party m4 macros should use
+ the AX prefix instead of AM.
+
+2012-06-29 09:23 micael
+
+ * [r747] sample/Cd/Cd: * Corrected the run mode of one of the
+ sample input files.
+
+2012-06-20 13:05 micael
+
+ * [r745] ChangeLog: * Updated ChangeLog.
+ * Created branch 2.0.x
+
+2012-06-20 12:56 micael
+
+ * [r744] configure.ac, doc/ape.texi: * Updated manual.
+ * Increased version number.
+
+2012-06-06 14:08 micael
+
+ * [r743] INSTALL, doc/ape.texi, src/parser_symbols.F90,
+ src/wave_equations.F90, testsuite/Makefile.am,
+ testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.02-spin.inp,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.01-no_spin.inp,
+ testsuite/all_electron/03-rel.02-spin.inp,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/05-charged.test,
+ testsuite/all_electron/06-smearing.02-averill_painter.inp,
+ testsuite/all_electron/Makefile.am,
+ testsuite/ape-run_regression_test.pl,
+ testsuite/ape-run_testsuite.in,
+ testsuite/basic/06-mixing.01-linear.inp,
+ testsuite/basic/06-mixing.03-broyden2.inp,
+ testsuite/basic/06-mixing.test,
+ testsuite/basic/08-wave_equations.test,
+ testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/03-He.test, testsuite/libxc/04-He_spin.test,
+ testsuite/libxc/05-Li.test,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.01-ae.inp,
+ testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp,
+ testsuite/pseudopotentials/03-rel.test,
+ testsuite/pseudopotentials/04-nlcc.test,
+ testsuite/pseudopotentials/05-pp_tests.01-ae_pp.inp,
+ testsuite/pseudopotentials/05-pp_tests.02-tests_1.inp,
+ testsuite/pseudopotentials/05-pp_tests.03-tests_2.inp,
+ testsuite/pseudopotentials/05-pp_tests.test,
+ testsuite/pseudopotentials/Makefile.am: * Updated testsuite
+ reference values and tolerances.
+ * There is now an option to automatically update the testsuite
+ reference values and tolerances.
+ * Updated manual.
+ * Added more tests.
+
+2012-06-04 15:00 micael
+
+ * [r742] sample/Au/Au.ae, sample/Au/Au.rtm, sample/Cd/Cd,
+ sample/Cu/Cu.ae, sample/Cu/Cu.mrpp, sample/Cu/Cu.tm,
+ sample/Na/Na, sample/Si/Si, sample/Ti/Ti.ae, sample/Ti/Ti.mrpp,
+ sample/Ti/Ti.tm: * Updated sample input files.
+
+2012-06-04 14:01 micael
+
+ * [r741] src/atom.F90: * Removed a couple of unused variables.
+
+2012-06-04 13:11 micael
+
+ * [r740] doc/ape.texi, m4/libxc.m4, src/functionals.F90,
+ src/wave_equations.F90,
+ testsuite/basic/04-ODE_solver.01-rkpd8.inp,
+ testsuite/basic/04-ODE_solver.02-rk4.inp: * Renamed the MaxSteps
+ and SteppingFunction variables
+ * Support for the upcoming libxc 2.0.0
+
+2012-06-04 10:21 micael
+
+ * [r739] src/atom.F90, src/atom_ps_inc.F90, src/eigensolver.F90,
+ src/ode_integrator.F90, src/potentials.F90,
+ src/quantum_numbers.F90, src/states.F90, src/states_batch.F90,
+ src/wave_equations.F90: * Spin-polarized Dirac equation is
+ finally working.
+
+2012-05-28 15:13 micael
+
+ * [r738] src/atom.F90, src/eigensolver.F90, src/ode_integrator.F90,
+ src/potentials.F90, src/states.F90, src/states_batch.F90,
+ src/wave_equations.F90: * Some cleaning of unused variables.
+
+2012-05-28 10:00 micael
+
+ * [r737] doc/ape.texi, src/atom.F90, src/eigensolver.F90,
+ src/mixing.F90, src/states.F90: * Redefined convergence criteria
+ and changed default values.
+ * Changed default mixing value to 0.3.
+ * Changed default eigensolver tolerance to 1e-8
+ * Bug fix in the calculation of the outermost node and peak of
+ the wavefucntions.
+
+2012-05-18 07:58 micael
+
+ * [r736] src/ode_integrator.F90: * Bug fix: error message was not
+ printed correctly.
+
+2012-05-10 15:17 micael
+
+ * [r735] src/atom.F90: * Bug fix: ionization potential from the
+ HOMO eigenvalue was not correct if one of the spin-channels was
+ empty.
+
+2012-05-10 15:08 micael
+
+ * [r734] testsuite/basic/06-mixing.01-linear.inp,
+ testsuite/basic/06-mixing.02-broyden.inp,
+ testsuite/basic/06-mixing.03-broyden2.inp: * Updated testsuite.
+
+2012-05-10 14:34 micael
+
+ * [r733] src/eigensolver.F90, src/potentials.F90, src/states.F90,
+ src/states_batch.F90: * Reverting some previous changes. Dirac
+ equation with spin-polarization is still not fully working. In
+ particular, it is not working for closed-shell atoms.
+
+2012-05-10 09:45 micael
+
+ * [r732] src/potentials.F90: * Added a function to tell if the
+ potential has spin polarization or not, i.e. if v_up == v_dn.
+
+2012-05-10 09:44 micael
+
+ * [r731] src/eigensolver.F90: * Bug fix in eigensolver: criteria to
+ refine brackets was still wrong.
+ * Improved debug output of the eigensolver.
+
+2012-05-09 17:45 micael
+
+ * [r730] src/eigensolver.F90: * Small change in the way the
+ bracketing is done.
+
+2012-05-09 17:20 micael
+
+ * [r729] src/loc_potentials.F90, src/ode_integrator.F90,
+ src/potentials.F90, src/states_batch.F90: * The code is now able
+ to properly handle degenerate sg=up and sg=dn states.
+ * Improved boundary conditions at infinity for the spin-polarized
+ dirac equation.
+
+2012-05-09 17:09 micael
+
+ * [r728] src/states.F90: * Kinetic energy of a state was wrong for
+ states with |2m|=2l+1.
+
+2012-05-09 14:10 micael
+
+ * [r727] src/ode_integrator.F90, src/potentials.F90,
+ src/wave_equations.F90: * Renamed some functions and variables to
+ improve clarity.
+ * Added some documentation.
+
+2012-05-09 13:07 micael
+
+ * [r726] src/atom.F90: * Total energy printed during SCF cycle was
+ calculated with an inconstent potential.
+
+2012-05-09 12:58 micael
+
+ * [r725] src/Makefile.am, src/atom.F90, src/mix.F90,
+ src/mixing.F90, src/parser_symbols.F90, src/potentials.F90: *
+ Some cleaning of the mixing module.
+ * Changed the naming of the mixing input variables to make them
+ more consistent.
+
+2012-05-08 17:07 micael
+
+ * [r724] src/eigensolver.F90: * Simple improvement to the
+ bracketing that can, in some circunstances, speed up the code by
+ a factor of 5.
+
+2012-05-08 14:58 micael
+
+ * [r723] src/ode_integrator.F90, src/states.F90: * Small bug fix in
+ the boundary conditions.
+ * Laplacian of the density is now working for 4-spinors.
+
+2012-05-08 13:25 micael
+
+ * [r722] src/states.F90: * Gradient of the density is now working
+ with 4-spinors.
+
+2012-05-08 13:01 micael
+
+ * [r721] src/ode_integrator.F90, src/odeint.c,
+ src/wave_equations.F90: * More cleaning and simplification: now
+ the ode_integrator object stores the potential, the energy and
+ the quantum numbers.
+
+2012-05-08 11:01 micael
+
+ * [r720] src/Makefile.am, src/atom.F90, src/atom_ae_inc.F90,
+ src/atom_ps_inc.F90, src/eigensolver.F90, src/hamann.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/ode_integrator.F90,
+ src/odeint.c, src/parser_symbols.F90, src/states.F90,
+ src/states_batch.F90, src/tm.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ * Rewrote the ode integration part to clearly separate the ode
+ equations that are solved from the actual wave-equations.
+ * ode_solve now takes a pointer to a Fortran type that holds what
+ is necessary to compute the derivatives. This way it is not
+ necessary to store that data as global variables.
+ * The GSL objects to do the ode integration are initialized just
+ before the integration, so that the dimension of the system of
+ equations can be change. This is useful to speed up the case
+ where |2m|=2l+1.
+ * Some further simplifications and improvements...
+
+2012-05-07 16:33 micael
+
+ * [r719] src/states.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ * 4-spinors are now stored in the following order: (g+, f+, g-,
+ f-).
+ * Some cleaning.
+ * Gradient and laplacian of the density for 4-spinors are now
+ wrong. This should be fixed later.
+
+2012-05-07 14:56 micael
+
+ * [r718] src/quantum_numbers.F90, src/wave_equations.F90,
+ src/wave_equations_integrator.F90: * States with abs(m) = l + 1/2
+ are now two-component spinors.
+
+2012-05-07 14:04 micael
+
+ * [r717] src/atom.F90, src/atom_ae_inc.F90, src/atom_ps_inc.F90,
+ src/eigensolver.F90, src/mrpp_equations.F90, src/states.F90,
+ src/states_batch.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ * Dirac equation with spin-polarization seems to be working,
+ although the code still needs some cleaning and optimization.
+ * Changed the way the two sets of boundary conditions of the
+ Dirac equation with spin-polarization are handled:
+ they are now integrated at the same time by the ODE solver as a
+ single set of equations.
+
+2012-05-04 10:23 micael
+
+ * [r716] src/quantum_numbers.F90: * Maximum occupation of states
+ with m/= 0 was not correct.
+
+2012-04-27 16:44 micael
+
+ * [r715] src/wave_equations_integrator.F90: * Some cleaning.
+
+2012-04-27 14:46 micael
+
+ * [r714] m4/libxc.m4, src/functionals.F90, src/parser_symbols.F90:
+ * Made APE compatible with all the official releases of libxc.
+
+2012-04-27 14:35 tiago
+
+ * [r713] src/eigensolver.F90, src/messages.F90,
+ src/mrpp_equations.F90, src/quantum_numbers.F90, src/states.F90,
+ src/states_batch.F90, src/wave_equations.F90,
+ src/wave_equations_integrator.F90: * The inward and outward
+ integrations are now done in the same subroutine
+ (wave_equation_integration).
+ * Inward_integration subroutine now only returns the first points
+ for the integration. Same for the outward.
+ * Wave-functions integration is now done between each point in
+ the mesh.
+ * Integration of RSDFT equations is now done separately for each
+ set.
+ * Several bug fixes on the RSDFT part.
+
+2012-04-27 09:14 micael
+
+ * [r712] testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/05-charged.test: * Updated reference
+ values for the all-electron tests.
+
+2012-04-27 08:36 micael
+
+ * [r711] src/mrpp.F90, src/tm.F90: * Residues of the non-linear
+ equations are now also printed to the pp/info file at the end of
+ the TM and MRPP generation.
+
+2012-04-27 08:22 micael
+
+ * [r710] doc/ape.texi: * Bug fix in the manual.
+
+2012-04-26 19:47 micael
+
+ * [r708] src/ps_io.F90: * Fixed problem with the xc functional
+ specification in the UPF fileformat.
+
+2012-04-26 17:24 micael
+
+ * [r707] src/Makefile.am, src/math.F90, src/mesh.F90,
+ src/utilities_f.F90: * Fixed circular dependencies in the modules
+ by spliting the utilities module.
+
+2012-04-26 16:52 micael
+
+ * [r706] doc/ape.texi: * Update to the manual.
+
+2012-04-26 16:33 micael
+
+ * [r705] src/mrpp.F90, src/mrpp_equations.F90, src/states.F90,
+ src/tm.F90, src/tm_equations.F90,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.test: * Changed the stopping
+ criteria for the multiroot solver used by the TM and MRPP
+ schemes. Now the relative difference in the coefficients is used.
+ * Update tests to tackle changes in the output.
+
+2012-04-26 09:36 micael
+
+ * [r704] src/states.F90: * Pseudopotential genration scheme is now
+ printed for each component.
+
+2012-04-26 09:26 micael
+
+ * [r703] testsuite/pseudopotentials/01-non_rel.02-ham.inp,
+ testsuite/pseudopotentials/01-non_rel.03-tm.inp,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/02-scalar_rel.02-hamann.inp,
+ testsuite/pseudopotentials/02-scalar_rel.03-tm.inp,
+ testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/03-rel.02-hamann.inp,
+ testsuite/pseudopotentials/03-rel.03-tm.inp,
+ testsuite/pseudopotentials/03-rel.04-rtm.inp,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp,
+ testsuite/pseudopotentials/04-nlcc.02-atom.inp,
+ testsuite/pseudopotentials/04-nlcc.03-fhi.inp: * Update the
+ testsuite input files to make them compatible with the previous
+ commit.
+
+2012-04-26 09:24 micael
+
+ * [r702] src/atom_ps_inc.F90, src/mrpp.F90, src/mrpp_equations.F90,
+ src/states.F90, src/states_batch.F90: * Removed the PPScheme
+ variable and changed the PPComponents block so that the scheme is
+ specified for each component. This means it is now possible to
+ use different schemes at the same time.
+ * Valence states higher in energy than the ones specified in the
+ PPComponents block are now included properly.
+ * Now only semi-core component should be specified for the MRPP
+ scheme, as the code will find the corresponding valence state
+ automatically. Also, the same cut-off radius will be used for
+ both, as I realized that in fact it made no sense for it to be
+ different.
+
+2012-04-24 12:49 micael
+
+ * [r701] src/Makefile.am, src/mesh.F90, src/utilities_f.F90: * If
+ the lower bound of the integration interval is smaller than the
+ first point of the mesh, the integration in the region outside
+ the mesh is done by using a polynomial extrapolation.
+
+2012-03-20 15:38 micael
+
+ * [r700] src/states.F90: * Removed 4*Pi factor that should not be
+ there.
+
+2012-03-16 13:32 micael
+
+ * [r699] src/states_batch.F90: * Bug fixed in the Averill-Painter
+ smearing.
+
+2012-03-09 16:41 micael
+
+ * [r698] src/states_batch.F90: * Bug fixed in the Averill-Painter
+ smearing.
+
+2012-03-09 16:40 micael
+
+ * [r697] src/eigensolver.F90: * Nothing should be done in
+ eigensolver_bracket if the number of eigenvalues to bracket is
+ zero.
+
+2012-03-09 10:55 micael
+
+ * [r696] src/atom.F90: * New argument from states_batch_smearing
+ was missing in one call.
+
+2012-03-09 10:51 micael
+
+ * [r695] src/atom.F90: * I forgot to commit this file.
+
+2012-03-09 10:47 micael
+
+ * [r694] src/states_batch.F90: * Removed debug statement that was
+ left over.
+
+2012-03-09 10:46 micael
+
+ * [r693] src/states_batch.F90,
+ testsuite/all_electron/06-smearing.test: * Fixed bug in
+ Averill-Painter smearing: two states eigenvalues should be
+ considered equal if they differ by less than the eigensolver
+ tolerance.
+
+2012-03-09 09:47 micael
+
+ * [r692] src/kb_projectors.F90, src/states.F90,
+ src/states_batch.F90, src/wave_equations_integrator.F90: *
+ Removed unused variables.
+ * Fixed length of some strings.
+
+2012-03-08 19:06 micael
+
+ * [r691] src/wave_equations_integrator.F90: * Factor was wrong by a
+ factor of 10.
+
+2012-03-08 19:03 micael
+
+ * [r690] testsuite/all_electron/02-scalar_rel.01-no_spin.inp,
+ testsuite/all_electron/02-scalar_rel.02-spin.inp,
+ testsuite/all_electron/03-rel.01-no_spin.inp,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp: * Update the
+ values of the ODEIntTolerance.
+
+2012-03-08 18:24 micael
+
+ * [r689] src/functionals.F90: * Shift of potentials was not correct
+ for one point.
+
+2012-03-08 16:27 micael
+
+ * [r688] src/functionals.F90: * Small typo.
+
+2012-03-08 16:26 micael
+
+ * [r687] src/xc.F90: * It is not necessary any more to set the
+ density and its derivatives to zero if they are bellow some
+ treshold.
+
+2012-03-08 16:18 micael
+
+ * [r686] src/wave_equations.F90, src/wave_equations_integrator.F90:
+ * Changed the meaning of the ODEIntTolerance: now it is the
+ tolerance of the higher precision integrator, instead of being
+ the square root. Changed the default accordingly.
+ * The value below which the wavefunction is considered to be zero
+ is now the integrator tolerance time 10^-2.
+
+2012-03-06 15:45 micael
+
+ * [r685] src/atom.F90, src/states_batch.F90: * The code now stops
+ if the Averill-Painter smearing is used without at least one
+ non-fully occupied state.
+
+2012-02-28 11:34 micael
+
+ * [r684] src/states_batch.F90: * Bug fix: ordering of the states in
+ the states_batch_sort routine was wrong when there is only one
+ state.
+
+2012-02-27 13:52 micael
+
+ * [r683] src/atom.F90, src/atom_ps_inc.F90: * Some compilers seem
+ to have problems when an intent(inout) argument of a routine is a
+ pointer returned by a function. I'm not sure what the Fortran
+ standard says about this.
+
+2012-02-03 17:47 micael
+
+ * [r682] src/run_ape.F90, src/wave_equations_integrator.F90: *
+ Small bug fix in the determination of the practical infinity.
+ * XC evaluation should be done _after_ running an all-electron
+ calculation.
+
+2012-02-01 16:29 tiago
+
+ * [r681] src/states.F90, src/wave_equations_integrator.F90: * Bug
+ fixes.
+
+2012-02-01 10:19 micael
+
+ * [r680] src/atom.F90, src/run_ape.F90, src/states_batch.F90: *
+ Ionization potentials calculated from the HOMO eigenvalue and
+ from the total energy difference are now printed to the screen
+ and info file
+ * Bug fixed in the determination of the IP from the HOMO
+ eigenvalue.
+ * Some cleaning.
+
+2012-01-30 18:58 micael
+
+ * [r679] src/atom.F90, src/atom_ae_inc.F90, src/atom_ps_inc.F90,
+ src/xc.F90: * The states component of atom_t is now a batch of
+ states.
+
+2012-01-30 18:45 micael
+
+ * [r678] src/Makefile.am, src/atom.F90, src/atom_ps_inc.F90,
+ src/ps_generation.F90, src/sl_potentials.F90,
+ src/states_batch.F90,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp: * Moved the
+ content of the ps_generation module to the atom_ps_create
+ routine. This still needs a lot of cleaning.
+ * The PPSemiCoreComponents block is no longer used.
+ * Some cosmetic changes.
+ * Deleted some unused variables.
+
+2012-01-30 16:51 micael
+
+ * [r677] src/potentials.F90, src/states.F90,
+ src/wave_equations_derivs.F90: * Several bug fixes.
+
+2012-01-30 12:30 tiago
+
+ * [r676] src/atom.F90, src/parser_symbols.F90,
+ src/quantum_numbers.F90, src/run_ape.F90, src/states.F90,
+ src/states_batch.F90: * Added a runmode ("ip") that removed 1
+ electron from a previous AE calculation and solves the new
+ configuration.
+ * Changed the output for the RSDFT case; states are now displaed
+ by 'n_l_m' and 'sigma'.
+ * Added a routine to updated potentials.
+
+2012-01-27 18:16 micael
+
+ * [r675] src/atom_ps_inc.F90, src/ps_generation.F90,
+ src/states_batch.F90: * Some reorganization of the ps generation
+ and more "batchification".
+
+2012-01-27 12:16 micael
+
+ * [r674] src/atom.F90, src/atom_ps_inc.F90, src/ps_generation.F90,
+ src/run_ape.F90: * Moved the creation of the KB atom to its own
+ routine.
+
+2012-01-27 11:44 micael
+
+ * [r673] src/atom_ps_inc.F90, src/ps_generation.F90,
+ src/states.F90: * When using a Vanderbilt function for the local
+ part of the KB projector, the cutoff radius should be the radius
+ beyond which the pseudopotentials are all equal. Previously the
+ maximum value of the pseudopotential cutoff radii was used, but
+ this was wrong for the Hamann scheme.
+ * state_kb_projector does not return the quantum numbers of the
+ state anymore, as this is not really necessary.
+
+2012-01-27 10:39 micael
+
+ * [r672] src/Makefile.am, src/atom.F90, src/atom_ae_inc.F90,
+ src/atom_ps_inc.F90, src/ps_generation.F90: * Split atom.F90 into
+ three files, as it was getting too large.
+
+2012-01-26 18:07 micael
+
+ * [r671] src/atom.F90, src/ps_generation.F90: * KB generation now
+ is done for a batch of states.
+
+2012-01-26 17:18 micael
+
+ * [r670] src/atom.F90: * Added a couple of sanity checks for the
+ relativistic spin-polarized case.
+
+2012-01-26 17:04 micael
+
+ * [r669] src/atom.F90, src/hartree.F90, src/potentials.F90,
+ src/quantum_numbers.F90: * The atomic states are now initialized
+ from the input data directly to a batch. This should make the
+ code a lot easier to read...
+ * Several small bug fixes.
+
+2012-01-26 14:24 micael
+
+ * [r668] src/atom.F90, src/hartree.F90, src/xc.F90: * Hartree
+ potential is now written to a separate file.
+ * MGGA term is now written by the xc module.
+
+2012-01-26 12:22 micael
+
+ * [r667] doc/ape.texi, src/atom.F90, src/states.F90,
+ src/states_batch.F90: * Logarithmic derivatives tests is now done
+ for a fold of states.
+ * Logarithmic derivatives tests can now be done using an adaptive
+ energy step.
+ * Changed the default upper and lower bound for the logarithmic
+ derivatives tests.
+
+2012-01-25 18:22 micael
+
+ * [r666] doc/ape.texi: * Updated the manual and added some FAQ.
+
+2012-01-25 17:18 micael
+
+ * [r665] src/atom.F90, src/states.F90, src/states_batch.F90: *
+ Kinetic energy is now obtained for a batch.
+
+2012-01-25 16:40 micael
+
+ * [r664] src/atom.F90, src/functionals.F90, src/hartree.F90,
+ src/numerical_tests.F90, src/ps_generation.F90, src/states.F90,
+ src/states_batch.F90: * Added functions to compute the (total)
+ charge and magnetization densities.
+ * Hartree potential is now calculated using the charge density.
+ * Fixed calculation of the total magnetic moment.
+ * More batches...
+
+2012-01-25 15:33 micael
+
+ * [r663] src/atom.F90: * The transition dipole moments test now use
+ the batches of states.
+
+2012-01-25 15:23 micael
+
+ * [r662] src/atom.F90, src/states_batch.F90: * Added routine to get
+ a pointer to a given state of the batch.
+ * Replaced states_batch_is_empty by a states_batch_size.
+ * With this changes it is now possible to iterate over the states
+ of a batch.
+ * More use of the batches.
+
+2012-01-25 14:52 micael
+
+ * [r661] src/states.F90: * The state_*_m routines are not needed
+ any more. With this change, all the routines in the states module
+ act on only one state at a time.
+
+2012-01-25 14:47 micael
+
+ * [r660] src/Makefile.am, src/atom.F90, src/ps_generation.F90,
+ src/states_batch.F90, src/xc.F90: * Evaluation of the xc
+ potential is now done for a batch of states.
+ * Added function that returns the ionization potential of a batch
+ of states.
+
+2012-01-25 14:19 micael
+
+ * [r659] src/atom.F90, src/states.F90, src/states_batch.F90: *
+ Calculation of density moments is now done for of a batch of
+ states.
+
+2012-01-25 14:03 micael
+
+ * [r658] src/atom.F90, src/states.F90, src/states_batch.F90: * The
+ states_ps_io_set routine is now called for a batch of states.
+
+2012-01-24 15:59 micael
+
+ * [r657] src/atom.F90, src/potentials.F90, src/ps_generation.F90,
+ src/quantum_numbers.F90, src/states_batch.F90,
+ src/wave_equations_derivs.F90: * Added sigma quantum number.
+ * Smearing routine now takes an optional argument that allows to
+ change the number of electrons in the system.
+ * Added a function that returns Bxc.
+
+2012-01-24 10:24 micael
+
+ * [r656] src/atom.F90, src/states.F90, src/states_batch.F90: *
+ atom_t now includes a batch of states. For now this batch just
+ points to the states of the atom, but it should replace it
+ somewhere in the future.
+ * Added functions to calculate the gradient and laplacian of the
+ density and the kinetic energy density of a batch of states.
+ * Added a subroutine to output the densities of a batch of
+ states.
+ * The new routines are now used in the atom module.
+
+2012-01-24 09:32 micael
+
+ * [r655] src/states_batch.F90: * It is now possible to sort a batch
+ of states by increasing quantum numbers.
+ * States are now sorted by increasing quantum numbers before
+ calling the eigensolver bracketing.
+
+2012-01-23 15:56 micael
+
+ * [r654] src/eigensolver.F90, src/quantum_numbers.F90,
+ src/states.F90, src/states_batch.F90: * The bracketing of the
+ eigenvalues is now done for a fold of quantum numbers.
+
+2012-01-23 11:05 micael
+
+ * [r653] src/eigensolver.F90, src/hamann.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/quantum_numbers.F90, src/states.F90,
+ src/states_batch.F90, src/tm.F90, src/tm_equations.F90,
+ src/wave_equations.F90, src/wave_equations_integrator.F90: *
+ wf_dim is not passed anymore as a subroutine argument. It is
+ rather determined from the quantum numbers.
+ * More work on the way the eigensolver is called for a batch of
+ states.
+
+2012-01-18 22:22 micael
+
+ * [r652] src/eigensolver.F90: * Simplified the bracketing of the
+ eigenvalues.
+
+2012-01-18 22:21 micael
+
+ * [r651] src/atom.F90, src/wave_equations_integrator.F90: * The
+ dimensions of the system of ODE to solve is part of the
+ integrator_t object, so there is no need to pass it as argument
+ of some routines.
+
+2012-01-17 16:11 micael
+
+ * [r650] src/atom.F90, src/states_batch.F90: * During the SCF cycle
+ the states are divided into batchs of states that belong to the
+ same fold.
+ * Now all the states are included in the SCF cycle, not only the
+ occupied ones.
+
+2012-01-17 16:10 micael
+
+ * [r649] src/quantum_numbers.F90: * There is now a function to
+ check if two sets of quantum numbers belong to the same fold.
+
+2012-01-17 16:09 micael
+
+ * [r648] src/Makefile.am: * Added some missing dependencies of
+ states_batch.o.
+
+2012-01-11 11:26 micael
+
+ * [r647] testsuite/basic/04-ODE_solver.test,
+ testsuite/basic/08-wave_equations.01-schrodinger.inp,
+ testsuite/basic/08-wave_equations.02-scalar_rel.inp,
+ testsuite/basic/08-wave_equations.03-dirac.inp,
+ testsuite/basic/08-wave_equations.test: * Added a new test for
+ the wave-equations.
+ * Some small fixes to the tests related to the previous commit.
+
+2012-01-11 10:57 tiago
+
+ * [r646] src/atom.F90, src/states_batch.F90,
+ testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/05-charged.test,
+ testsuite/all_electron/06-smearing.test: * The change in the
+ output advertized in rev#635 was not commited by mistake, it is
+ being added now.
+ * Updated testsuit to support the output.
+
+2012-01-11 09:02 micael
+
+ * [r645] src/wave_equations_integrator.F90: * Bug fix in the
+ determination of the practical infinity when using Dirac's
+ equation.
+ * Small cosmetic changes.
+
+2012-01-10 19:05 micael
+
+ * [r644] src/eigensolver.F90, src/states.F90, src/states_batch.F90:
+ * Now the unbound states are always checked outside the
+ eigensolver.
+
+2012-01-10 19:02 micael
+
+ * [r643] src/wave_equations_integrator.F90: * Small fixes in the
+ debug output of the wavefunction integrator.
+
+2012-01-10 09:41 micael
+
+ * [r642] testsuite/pseudopotentials/01-non_rel.03-tm.inp,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/03-rel.03-tm.inp,
+ testsuite/pseudopotentials/03-rel.test: * Added tests for the KB
+ projectors.
+
+2012-01-09 12:51 micael
+
+ * [r641] src/atom.F90, src/run_ape.F90,
+ src/wave_equations_integrator.F90: * Several bug fixes: atom
+ states where not deallocated properly; when copying an ODE
+ integrator, GSL objects must be initialized properly instead of
+ just copying the pointers to them.
+
+2012-01-09 09:48 micael
+
+ * [r640] src/eigensolver.F90, src/states.F90: * Reverted unintended
+ change.
+
+2012-01-09 09:46 micael
+
+ * [r639] src/eigensolver.F90, src/states.F90, src/states_batch.F90:
+ * Further improvements and simplifications in the eigensolver.
+
+2012-01-08 18:03 micael
+
+ * [r638] src/states_batch.F90: * There is now a better check as if
+ a state is unbound or not.
+
+2012-01-08 17:41 micael
+
+ * [r637] src/eigensolver.F90, src/states.F90, src/states_batch.F90:
+ * Some reorganization.
+ * Changed the name of some routines.
+
+2012-01-08 16:56 micael
+
+ * [r636] src/eigensolver.F90, src/wave_equations.F90: * Moved the
+ functions to determine the maximum and minimum possible values
+ for the eigenvalues to the wave_equations module.
+
+2012-01-08 15:31 tiago
+
+ * [r635] src/atom.F90, src/ps_generation.F90,
+ src/quantum_numbers.F90, src/states.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ * Add secondary total angular momentum quantum number "m".
+ * It's now possible to add an extra collumn at the "Orbitals"
+ block to pass "m".
+ * Spin is only outputed now for spin-polarized calculations.
+
+2012-01-05 10:59 micael
+
+ * [r634] src/atom.F90, src/states.F90, src/states_batch.F90: *
+ Added a routine to compute the density of a batch.
+ * Added comments and routine headers.
+ * Minor improvements.
+
+2012-01-05 10:02 micael
+
+ * [r633] src/Makefile.am, src/atom.F90, src/eigensolver.F90,
+ src/parser_symbols.F90, src/states.F90, src/states_batch.F90: *
+ Added the possibility to have a batch of states, which is an
+ array of pointers to some states.
+ * Some operations are now done on a batch of states.
+ * Eigenvolver no longer returns the wavefunctions, just the
+ eigenvalue.
+ * Split the state_update routine into state_update_wavefunction
+ and state_eigensolve.
+
+2012-01-05 09:57 micael
+
+ * [r632] testsuite/all_electron/06-smearing.01-semiconducting.inp,
+ testsuite/all_electron/06-smearing.02-averill_painter.inp,
+ testsuite/all_electron/06-smearing.test,
+ testsuite/all_electron/Makefile.am: * Added test for smearing.
+
+2011-12-08 12:03 micael
+
+ * [r631] src/atom.F90, src/ps_generation.F90, src/ps_io.F90,
+ src/run_ape.F90, src/states.F90,
+ testsuite/all_electron/03-rel.test,
+ testsuite/basic/04-ODE_solver.test: * Pseudopotential generation
+ is working again, although some things might still be broken.
+ * Updated some tests from the testsuite.
+ * Some cleanup.
+
+2011-12-07 18:45 tiago
+
+ * [r630] src/atom.F90, src/quantum_numbers.F90, src/states.F90,
+ src/wave_equations.F90, src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90: *Starting points for the
+ unpolarized Dirac equation (inward integration) are now obtained
+ with a power series expansion, rather than with Bessel functions.
+ *Continued with the RSDFT implementation: corrected coeficients
+ and derivatives; added density, gradient and laplacian.
+
+2011-12-06 16:15 fnog
+
+ * [r629] src/ps_generation.F90: Corrected the value of rc_max that
+ was being used by Vanderbilt local potential:
+ now it ignores valence rc for angular momentum channels with both
+ valence and
+ semicore components.
+
+2011-11-16 15:19 tiago
+
+ * [r627] src/atom.F90, src/functionals.F90, src/odeint.c,
+ src/ps_generation.F90, src/run_ape.F90, src/states.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: * Added some changes that were missing in previous
+ commit.
+ * Corrected some spacing errors.
+ * Added GSL support for 4-dimensional systems of equations.
+ * First steps on RSDFT implementation.
+
+2011-11-04 10:09 tiago
+
+ * [r626] src/atom.F90, src/states.F90,
+ testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/04-unbound.test,
+ testsuite/all_electron/05-charged.test: * Changed the way how
+ states are stored, in preparation for RSDFT.
+ * Eingenvalues are know all outputed in one column.
+ * Updated testsuit to support the new output.
+ * PP generation is NOT working at this time.
+
+2011-10-10 14:34 micael
+
+ * [r625] Doxyfile: * Add initial support for Doxygen.
+
+2011-08-26 17:46 micael
+
+ * [r624] testsuite/pseudopotentials/01-non_rel.01-ae.inp,
+ testsuite/pseudopotentials/01-non_rel.02-ham.inp,
+ testsuite/pseudopotentials/01-non_rel.03-tm.inp,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.01-ae.inp,
+ testsuite/pseudopotentials/02-scalar_rel.03-tm.inp,
+ testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.01-ae.inp,
+ testsuite/pseudopotentials/03-rel.02-hamann.inp,
+ testsuite/pseudopotentials/03-rel.03-tm.inp,
+ testsuite/pseudopotentials/03-rel.04-rtm.inp,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp,
+ testsuite/pseudopotentials/03-rel.test,
+ testsuite/pseudopotentials/04-nlcc.01-ae.inp,
+ testsuite/pseudopotentials/04-nlcc.02-atom.inp,
+ testsuite/pseudopotentials/04-nlcc.03-fhi.inp,
+ testsuite/pseudopotentials/04-nlcc.test: * Added and update
+ pseudopotentials tests
+
+2011-08-26 15:23 micael
+
+ * [r623] src/ps_io.F90, src/xc.F90: * Fixed some small numerical
+ problems in pseudopotentials output.
+ * One of the constants printed to output in one of the NLCC
+ schemes was missing a 4Pi factor. This is needed to compare its
+ values with the one given by the code of JLM.
+ --This line, and those below, will be ignored--
+
+ M src/ps_io.F90
+ M src/xc.F90
+
+2011-08-23 16:22 micael
+
+ * [r622] src/ps_io.F90: * Fixed numerical problem in the
+ interpolation between the meshes when writing the
+ pseudopontentials in the Siesta format.
+
+2011-08-23 10:51 micael
+
+ * [r621] testsuite/all_electron/Makefile.am: * Removed deleted file
+ from the Makefile.
+
+2011-08-23 10:50 micael
+
+ * [r620] testsuite/all_electron/04-unbound.01-B.inp: * Removed file
+ that was commited by mistake.
+
+2011-08-23 10:02 micael
+
+ * [r619] testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/03-He.test, testsuite/libxc/04-He_spin.test,
+ testsuite/libxc/05-Li.test, testsuite/libxc/185-gga_k_apbe.inp,
+ testsuite/libxc/187-gga_k_tw1.inp,
+ testsuite/libxc/188-gga_k_tw2.inp,
+ testsuite/libxc/189-g90_k_tw4.inp,
+ testsuite/libxc/189-gga_k_tw3.inp,
+ testsuite/libxc/190-gga_k_tw4.inp,
+ testsuite/libxc/50-lda_k_tf.inp,
+ testsuite/libxc/500-gga_k_vw.inp,
+ testsuite/libxc/501-gga_k_ge2.inp,
+ testsuite/libxc/502-gga_k_golden.inp,
+ testsuite/libxc/503-gga_k_yt65.inp,
+ testsuite/libxc/504-gga_k_baltin.inp,
+ testsuite/libxc/505-gga_k_lieb.inp,
+ testsuite/libxc/506-gga_k_absr1.inp,
+ testsuite/libxc/507-gga_k_absr2.inp,
+ testsuite/libxc/508-gga_k_gr.inp,
+ testsuite/libxc/509-gga_k_ludena.inp,
+ testsuite/libxc/51-lda_k_lp.inp,
+ testsuite/libxc/510-gga_k_gp85.inp,
+ testsuite/libxc/511-gga_k_pearson.inp,
+ testsuite/libxc/512-gga_k_ol1.inp,
+ testsuite/libxc/513-gga_k_ol2.inp,
+ testsuite/libxc/514-gga_k_fr_b88.inp,
+ testsuite/libxc/515-gga_k_fr_pw86.inp,
+ testsuite/libxc/516-gga_k_dk.inp,
+ testsuite/libxc/517-gga_k_perdew.inp,
+ testsuite/libxc/518-gga_k_vsk.inp,
+ testsuite/libxc/519-gga_k_vjks.inp,
+ testsuite/libxc/520-gga_k_ernzerhof.inp,
+ testsuite/libxc/521-gga_k_lc94.inp,
+ testsuite/libxc/522-gga_k_llp.inp,
+ testsuite/libxc/523-gga_k_thakkar.inp,
+ testsuite/libxc/Makefile.am: * Added tests for kinetic energy
+ functionals.
+
+2011-08-22 15:15 micael
+
+ * [r618] testsuite/libxc/01-H.test, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/03-He.test, testsuite/libxc/04-He_spin.test,
+ testsuite/libxc/05-Li.test, testsuite/libxc/201-mgga_x_lta.inp,
+ testsuite/libxc/202-mgga_x_tpss.inp,
+ testsuite/libxc/203-mgga_x_m06l.inp,
+ testsuite/libxc/204-mgga_x_gvt4.inp,
+ testsuite/libxc/205-mgga_x_tau_hcth.inp,
+ testsuite/libxc/205-mgga_x_tau_htch.inp,
+ testsuite/libxc/206-mgga_x_br89.inp,
+ testsuite/libxc/207-mgga_x_bj06.inp,
+ testsuite/libxc/208-mgga_x_tb09.inp,
+ testsuite/libxc/209-mgga_x_rpp10.inp,
+ testsuite/libxc/231-mgga_c_tpss.inp,
+ testsuite/libxc/232-mgga_c_vsxc.inp: * Added tests for MGGAs from
+ libxc.
+ * Disable the functionals that are not working properly.
+
+2011-08-22 14:35 micael
+
+ * [r617] src/parser_symbols.F90, testsuite/libxc/01-H.test,
+ testsuite/libxc/02-H_spin.test, testsuite/libxc/03-He.test,
+ testsuite/libxc/04-He_spin.test, testsuite/libxc/05-Li.test,
+ testsuite/libxc/101-gga_x_pbe.inp,
+ testsuite/libxc/102-gga_x_pbe_r.inp,
+ testsuite/libxc/103-gga_x_b86.inp,
+ testsuite/libxc/104-gga_x_herman.inp,
+ testsuite/libxc/105-gga_x_b86_mgc.inp,
+ testsuite/libxc/106-gga_x_b88.inp,
+ testsuite/libxc/107-gga_x_g96.inp,
+ testsuite/libxc/108-gga_x_pw86.inp,
+ testsuite/libxc/109-gga_x_pw91.inp,
+ testsuite/libxc/110-gga_x_optx.inp,
+ testsuite/libxc/111-gga_x_dk87_r1.inp,
+ testsuite/libxc/112-gga_x_dk87_r2.inp,
+ testsuite/libxc/113-gga_x_lg93.inp,
+ testsuite/libxc/114-gga_x_ft97_a.inp,
+ testsuite/libxc/115-gga_x_ft97_b.inp,
+ testsuite/libxc/116-gga_x_pbe_sol.inp,
+ testsuite/libxc/117-gga_x_rpbe.inp,
+ testsuite/libxc/118-gga_x_wc.inp,
+ testsuite/libxc/119-gga_x_mpw91.inp,
+ testsuite/libxc/120-gga_x_am05.inp,
+ testsuite/libxc/121-gga_x_pbea.inp,
+ testsuite/libxc/122-gga_x_mpbe.inp,
+ testsuite/libxc/123-gga_x_xpbe.inp,
+ testsuite/libxc/125-gga_x_bayesian.inp,
+ testsuite/libxc/126-gga_x_pbe_jsjr.inp,
+ testsuite/libxc/130-gga_c_pbe.inp,
+ testsuite/libxc/131-gga_c_lyp.inp,
+ testsuite/libxc/132-gga_c_p86.inp,
+ testsuite/libxc/133-gga_c_pbe_sol.inp,
+ testsuite/libxc/134-gga_c_pw91.inp,
+ testsuite/libxc/135-gga_c_am05.inp,
+ testsuite/libxc/136-gga_c_xpbe.inp,
+ testsuite/libxc/137-gga_c_lm.inp,
+ testsuite/libxc/138-gga_c_pbe_jrgx.inp,
+ testsuite/libxc/139-gga_x_optb88_vdw.inp,
+ testsuite/libxc/140-gga_x_pbek1_vdw.inp,
+ testsuite/libxc/141-gga_x_optpbe_vdw.inp,
+ testsuite/libxc/142-gga_x_rge2.inp,
+ testsuite/libxc/143-gga_c_rge2.inp,
+ testsuite/libxc/144-gga_x_rpw86.inp,
+ testsuite/libxc/145-gga_x_kt1.inp,
+ testsuite/libxc/146-gga_xc_kt2.inp,
+ testsuite/libxc/147-gga_c_wl.inp,
+ testsuite/libxc/148-gga_c_wi.inp,
+ testsuite/libxc/149-gga_x_mb88.inp,
+ testsuite/libxc/160-gga_x_lb.inp,
+ testsuite/libxc/161-gga_xc_hcth_93.inp,
+ testsuite/libxc/162-gga_xc_hcth_120.inp,
+ testsuite/libxc/163-gga_xc_hcth_147.inp,
+ testsuite/libxc/164-gga_xc_hcth_407.inp,
+ testsuite/libxc/165-gga_xc_edf1.inp,
+ testsuite/libxc/166-gga_xc_xlyp.inp,
+ testsuite/libxc/167-gga_xc_b97.inp,
+ testsuite/libxc/168-gga_xc_b97_1.inp,
+ testsuite/libxc/169-gga_xc_b97_2.inp,
+ testsuite/libxc/170-gga_xc_b97_d.inp,
+ testsuite/libxc/171-gga_xc_b97_k.inp,
+ testsuite/libxc/172-gga_xc_b97_3.inp,
+ testsuite/libxc/173-gga_xc_pbe1w.inp,
+ testsuite/libxc/174-gga_xc_mpwlyp1w.inp,
+ testsuite/libxc/175-gga_xc_pbelyp1w.inp,
+ testsuite/libxc/176-gga_xc_sb98_1a.inp,
+ testsuite/libxc/177-gga_xc_sb98_1b.inp,
+ testsuite/libxc/178-gga_xc_sb98_1c.inp,
+ testsuite/libxc/179-gga_xc_sb98_2a.inp,
+ testsuite/libxc/180-gga_xc_sb98_2b.inp,
+ testsuite/libxc/181-gga_xc_sb98_2c.inp,
+ testsuite/libxc/183-gga_x_ol2.inp,
+ testsuite/libxc/184-gga_x_apbe.inp,
+ testsuite/libxc/186-gga_c_apbe.inp,
+ testsuite/libxc/191-gga_x_htbs.inp,
+ testsuite/libxc/192-gga_x_airy.inp,
+ testsuite/libxc/193-gga_x_lag.inp: * Added some missing GGAs from
+ libxc.
+ * Added tests for the GGAs from libxc.
+
+2011-08-19 17:06 micael
+
+ * [r616] testsuite/all_electron/01-non_rel.01-no_spin.inp,
+ testsuite/all_electron/01-non_rel.02-spin.inp,
+ testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.01-no_spin.inp,
+ testsuite/all_electron/02-scalar_rel.02-spin.inp,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.01-no_spin.inp,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/04-unbound.01-B.inp,
+ testsuite/all_electron/04-unbound.01-Li.inp,
+ testsuite/all_electron/04-unbound.test,
+ testsuite/all_electron/05-charged.01-C+.inp,
+ testsuite/all_electron/05-charged.02-C-.inp,
+ testsuite/all_electron/05-charged.test,
+ testsuite/all_electron/Makefile.am,
+ testsuite/basic/01-mesh.01-linear.inp,
+ testsuite/basic/01-mesh.02-log1.inp,
+ testsuite/basic/01-mesh.03-log2.inp,
+ testsuite/basic/01-mesh.test,
+ testsuite/basic/02-derivatives.01-splines.inp,
+ testsuite/basic/02-derivatives.02-finite_diff.inp,
+ testsuite/basic/02-derivatives.test,
+ testsuite/basic/03-integration.01-splines.inp,
+ testsuite/basic/03-integration.test,
+ testsuite/basic/04-ODE_solver.01-rkpd8.inp,
+ testsuite/basic/04-ODE_solver.02-rk4.inp,
+ testsuite/basic/04-ODE_solver.test,
+ testsuite/basic/05-hartree.01-splines.inp,
+ testsuite/basic/05-hartree.test,
+ testsuite/basic/06-mixing.01-linear.inp,
+ testsuite/basic/06-mixing.02-broyden.inp,
+ testsuite/basic/06-mixing.03-broyden2.inp,
+ testsuite/basic/06-mixing.test,
+ testsuite/basic/07-dens_moments.01-non_rel.inp,
+ testsuite/basic/07-dens_moments.02-rel.inp,
+ testsuite/basic/07-dens_moments.test,
+ testsuite/basic/Makefile.am, testsuite/libxc/000-none.inp,
+ testsuite/libxc/001-lda_x.inp, testsuite/libxc/001-none.inp,
+ testsuite/libxc/002-lda_c_wigner.inp,
+ testsuite/libxc/002-lda_x.inp, testsuite/libxc/003-lda_c_rpa.inp,
+ testsuite/libxc/003-lda_c_wigner.inp,
+ testsuite/libxc/004-lda_c_hl.inp,
+ testsuite/libxc/004-lda_c_rpa.inp,
+ testsuite/libxc/005-lda_c_gl.inp,
+ testsuite/libxc/005-lda_c_hl.inp,
+ testsuite/libxc/006-lda_c_gl.inp,
+ testsuite/libxc/006-lda_c_xalpha.inp,
+ testsuite/libxc/007-lda_c_vwn.inp,
+ testsuite/libxc/007-lda_c_xalpha.inp,
+ testsuite/libxc/008-lda_c_vwn.inp,
+ testsuite/libxc/008-lda_c_vwn_rpa.inp,
+ testsuite/libxc/009-lda_c_pz.inp,
+ testsuite/libxc/009-lda_c_vwn_rpa.inp, testsuite/libxc/01-H.inp,
+ testsuite/libxc/01-H.test, testsuite/libxc/010-lda_c_pz.inp,
+ testsuite/libxc/010-lda_c_pz_mod.inp,
+ testsuite/libxc/011-lda_c_ob_pz.inp,
+ testsuite/libxc/011-lda_c_pz_mod.inp,
+ testsuite/libxc/012-lda_c_ob_pz.inp,
+ testsuite/libxc/012-lda_c_pw.inp,
+ testsuite/libxc/013-lda_c_pw.inp,
+ testsuite/libxc/013-lda_c_pw_mod.inp,
+ testsuite/libxc/014-lda_c_ob_pw.inp,
+ testsuite/libxc/014-lda_c_pw_mod.inp,
+ testsuite/libxc/015-lda_c_ob_pw.inp,
+ testsuite/libxc/016-lda_c_vbh.inp,
+ testsuite/libxc/017-lda_c_ml1.inp,
+ testsuite/libxc/017-lda_c_vbh.inp,
+ testsuite/libxc/018-lda_c_ml2.inp,
+ testsuite/libxc/019-lda_c_gombas.inp,
+ testsuite/libxc/02-H_spin.inp, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/020-lda_xc_teter93.inp,
+ testsuite/libxc/022-lda_c_ml1.inp,
+ testsuite/libxc/023-lda_c_ml2.inp,
+ testsuite/libxc/024-lda_c_gombas.inp, testsuite/libxc/03-He.inp,
+ testsuite/libxc/03-He.test, testsuite/libxc/04-He_spin.inp,
+ testsuite/libxc/04-He_spin.test, testsuite/libxc/05-Li.inp,
+ testsuite/libxc/05-Li.test, testsuite/libxc/Makefile.am,
+ testsuite/pseudopotentials/01-non_rel.02-ham.inp,
+ testsuite/pseudopotentials/01-non_rel.03-tm.inp,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/02-scalar_rel.02-hamann.inp,
+ testsuite/pseudopotentials/02-scalar_rel.03-tm.inp,
+ testsuite/pseudopotentials/03-rel.02-hamann.inp,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp,
+ testsuite/pseudopotentials/Makefile.am: * Reorganized libxc tests
+ so that the file prefixes match the functional id.
+
+2011-08-19 16:29 micael
+
+ * [r615] Makefile.am, configure.ac, testsuite/Makefile.am,
+ testsuite/all_electron, testsuite/basic, testsuite/libxc,
+ testsuite/libxc/001-none.inp, testsuite/libxc/002-lda_x.inp,
+ testsuite/libxc/003-lda_c_wigner.inp,
+ testsuite/libxc/004-lda_c_rpa.inp,
+ testsuite/libxc/005-lda_c_hl.inp,
+ testsuite/libxc/006-lda_c_gl.inp,
+ testsuite/libxc/007-lda_c_xalpha.inp,
+ testsuite/libxc/008-lda_c_vwn.inp,
+ testsuite/libxc/009-lda_c_vwn_rpa.inp, testsuite/libxc/01-H.inp,
+ testsuite/libxc/01-H.test, testsuite/libxc/010-lda_c_pz.inp,
+ testsuite/libxc/011-lda_c_pz_mod.inp,
+ testsuite/libxc/012-lda_c_ob_pz.inp,
+ testsuite/libxc/013-lda_c_pw.inp,
+ testsuite/libxc/014-lda_c_pw_mod.inp,
+ testsuite/libxc/015-lda_c_ob_pw.inp,
+ testsuite/libxc/016-lda_c_vbh.inp,
+ testsuite/libxc/017-lda_c_ml1.inp,
+ testsuite/libxc/018-lda_c_ml2.inp,
+ testsuite/libxc/019-lda_c_gombas.inp,
+ testsuite/libxc/02-H_spin.inp, testsuite/libxc/02-H_spin.test,
+ testsuite/libxc/020-lda_xc_teter93.inp,
+ testsuite/libxc/03-He.inp, testsuite/libxc/03-He.test,
+ testsuite/libxc/04-He_spin.inp, testsuite/libxc/04-He_spin.test,
+ testsuite/libxc/05-Li.inp, testsuite/libxc/05-Li.test,
+ testsuite/libxc/Makefile.am, testsuite/pseudopotentials: * Added
+ a set of tests for the libxc LDA functionals. GGA's and MGGA's
+ should follow soon.
+
+2011-08-19 10:35 micael
+
+ * [r614] Makefile.am, configure.ac, testsuite/01-Li.01-ae_pp.inp,
+ testsuite/01-Li.02-tm.inp, testsuite/01-Li.03-mrpp.inp,
+ testsuite/01-Li.test, testsuite/02-Cr.01-ae.inp,
+ testsuite/02-Cr.02-hamann.inp, testsuite/02-Cr.03-tm.inp,
+ testsuite/02-Cr.04-mrpp.inp, testsuite/02-Cr.test,
+ testsuite/03-Au.01-ae.inp, testsuite/03-Au.02-hamann.inp,
+ testsuite/03-Au.03-tm.inp, testsuite/03-Au.04-rtm.inp,
+ testsuite/03-Au.05-mrpp.inp, testsuite/03-Au.test,
+ testsuite/Makefile.am, testsuite/all_electron,
+ testsuite/all_electron/01-non_rel.01-no_spin.inp,
+ testsuite/all_electron/01-non_rel.02-spin.inp,
+ testsuite/all_electron/01-non_rel.test,
+ testsuite/all_electron/02-scalar_rel.01-no_spin.inp,
+ testsuite/all_electron/02-scalar_rel.02-spin.inp,
+ testsuite/all_electron/02-scalar_rel.test,
+ testsuite/all_electron/03-rel.01-no_spin.inp,
+ testsuite/all_electron/03-rel.test,
+ testsuite/all_electron/04-unbound.01-B.inp,
+ testsuite/all_electron/04-unbound.01-Li.inp,
+ testsuite/all_electron/04-unbound.test,
+ testsuite/all_electron/05-charged.01-C+.inp,
+ testsuite/all_electron/05-charged.02-C-.inp,
+ testsuite/all_electron/05-charged.test,
+ testsuite/all_electron/Makefile.am, testsuite/basic,
+ testsuite/basic/01-mesh.01-linear.inp,
+ testsuite/basic/01-mesh.02-log1.inp,
+ testsuite/basic/01-mesh.03-log2.inp,
+ testsuite/basic/01-mesh.test,
+ testsuite/basic/02-derivatives.01-splines.inp,
+ testsuite/basic/02-derivatives.02-finite_diff.inp,
+ testsuite/basic/02-derivatives.test,
+ testsuite/basic/03-integration.01-splines.inp,
+ testsuite/basic/03-integration.test,
+ testsuite/basic/04-ODE_solver.01-rkpd8.inp,
+ testsuite/basic/04-ODE_solver.02-rk4.inp,
+ testsuite/basic/04-ODE_solver.test,
+ testsuite/basic/05-hartree.01-splines.inp,
+ testsuite/basic/05-hartree.test,
+ testsuite/basic/06-mixing.01-linear.inp,
+ testsuite/basic/06-mixing.02-broyden.inp,
+ testsuite/basic/06-mixing.03-broyden2.inp,
+ testsuite/basic/06-mixing.test,
+ testsuite/basic/07-dens_moments.01-non_rel.inp,
+ testsuite/basic/07-dens_moments.02-rel.inp,
+ testsuite/basic/07-dens_moments.test,
+ testsuite/basic/Makefile.am, testsuite/pseudopotentials,
+ testsuite/pseudopotentials/01-non_rel.01-ae.inp,
+ testsuite/pseudopotentials/01-non_rel.02-ham.inp,
+ testsuite/pseudopotentials/01-non_rel.03-tm.inp,
+ testsuite/pseudopotentials/01-non_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/01-non_rel.test,
+ testsuite/pseudopotentials/02-scalar_rel.01-ae.inp,
+ testsuite/pseudopotentials/02-scalar_rel.02-hamann.inp,
+ testsuite/pseudopotentials/02-scalar_rel.03-tm.inp,
+ testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp,
+ testsuite/pseudopotentials/02-scalar_rel.test,
+ testsuite/pseudopotentials/03-rel.01-ae.inp,
+ testsuite/pseudopotentials/03-rel.02-hamann.inp,
+ testsuite/pseudopotentials/03-rel.03-tm.inp,
+ testsuite/pseudopotentials/03-rel.04-rtm.inp,
+ testsuite/pseudopotentials/03-rel.05-mrpp.inp,
+ testsuite/pseudopotentials/03-rel.test,
+ testsuite/pseudopotentials/Makefile.am: * Major rewrite of the
+ testsuite. Organized and added many tests.
+
+2011-08-18 17:53 micael
+
+ * [r613] src/hartree.F90, src/numerical_tests.F90: * Minor bug fix
+ * Should only correct the hartree potential asymptotic limit is
+ charge is non-null.
+
+2011-08-18 13:43 micael
+
+ * [r612] src/numerical_tests.F90, src/parser_symbols.F90: * It is
+ now possible to choose the type of numerical tests and the
+ functions to be tested from the input file.
+
+2011-08-18 11:19 micael
+
+ * [r611] src/ape.F90: * Change the filename for the parser log.
+
+2011-08-18 10:11 micael
+
+ * [r610] src/atom.F90: * Improved the output of the information
+ about the details of the calculation
+
+2011-08-18 09:48 micael
+
+ * [r609] src/atom.F90, src/parser_symbols.F90: * Added the
+ possibility to treat electrons as independent particles.
+
+2011-08-17 15:06 micael
+
+ * [r608] src/atom.F90, src/numerical_tests.F90,
+ src/parser_symbols.F90, src/ps_generation.F90, src/run_ape.F90,
+ src/states.F90, src/wave_equations_integrator.F90, src/xc.F90: *
+ Renamed some constants to have a more consistent naming scheme.
+
+2011-06-09 13:51 micael
+
+ * [r603] src/parser_symbols.F90, src/xc.F90: * Added symbols for
+ new libxc functionals.
+ * Small bug fix in output of NLCC.
+
+2011-05-09 20:50 micael
+
+ * [r602] testsuite/01-Li.test, testsuite/02-Cr.test,
+ testsuite/03-Au.test: * Updated testsuite.
+
+2011-05-02 14:36 micael
+
+ * [r601] src/atom.F90, src/functionals.F90, src/hartree.F90,
+ src/numerical_tests.F90, src/ps_generation.F90, src/tm.F90,
+ src/xc.F90: * Force the Hartree potential to have the correct
+ asymptotic limit.
+
+2011-04-16 18:38 micael
+
+ * [r600] src/ps_io.F90: * Bug fixed: the definition of the core
+ charge radius in the Abinit file format is in fact the radius at
+ which the core density vanishes.
+
+2011-04-16 12:08 micael
+
+ * [r599] src/atom.F90, src/mesh.F90, src/numerical_tests.F90,
+ src/parser_symbols.F90, src/ps_io.F90: * Split the initialization
+ of the mesh so that it is possible to initialize it without using
+ the input file.
+ * Fixed bug in FHI output related to the mesh initialization.
+ * Improved debug.
+ * Changed the name of some parameters.
+
+2011-04-06 13:30 micael
+
+ * [r598] src/parser_symbols.F90: * Added more functionals to the
+ parser symbols.
+
+2011-04-06 13:30 micael
+
+ * [r597] src/functionals.F90, src/xc.F90: * Some reorganization of
+ the KED functionals.
+ * Fixed calculation of KED funcitonals for spin-polarized cases.
+
+2011-04-06 13:19 micael
+
+ * [r596] src/output.F90, src/ps_io.F90, src/states.F90: * Removed
+ unused variables.
+
+2011-04-06 13:09 micael
+
+ * [r595] src/atom.F90, src/states.F90,
+ src/wave_equations_derivs.F90: * There was still a missing term
+ in the wave-equation related to the MGGA.
+ * There is now a routine to calculate the kinetic energy of a
+ given state. This is used to computed the total kinetic energy.
+ * Added MGGA extra term in the calculation of the kinetic energy.
+
+2011-04-06 08:19 micael
+
+ * [r594] src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90: * The extra MGGA term in the
+ Hamiltonian was not correct.
+ * Changed the way how this term is applied.
+
+2011-03-28 16:14 micael
+
+ * [r593] src/xc.F90: * A 2 pi factor was missing.
+
+2011-03-28 15:41 micael
+
+ * [r592] src/atom.F90, src/parser_symbols.F90, src/xc.F90: * A
+ parser symbol was wrong.
+ * Changed some names in xc.
+
+2011-03-28 13:52 micael
+
+ * [r591] src/states.F90: * Calculation of densities is now correct
+ for spin-polarized systems.
+
+2011-03-28 11:05 micael
+
+ * [r590] src/xc.F90: * The existence of negative values of the
+ approximated KED is now printed to the output.
+
+2011-03-28 10:41 micael
+
+ * [r589] src/atom.F90, src/xc.F90: * Some extra information about
+ the KED is given during the xc evaluation mode.
+
+2011-03-28 08:42 micael
+
+ * [r588] src/states.F90: * Derivatives of the density are now
+ computed using the derivatives of the wavefuntions obtained while
+ solving the wave-equation.
+
+2011-03-25 17:42 micael
+
+ * [r587] src/functionals.F90, src/parser_symbols.F90, src/xc.F90: *
+ Some cleaning of the kinetic energy functionals implementation.
+ * Update the available functionals in parser_symbols.
+
+2011-03-25 17:28 micael
+
+ * [r586] testsuite/01-Li.test, testsuite/02-Cr.test,
+ testsuite/03-Au.test, testsuite/ape-run_regression_test.pl: *
+ Updated testsuite results.
+ * Some aesthetic improvements to the testsuite.
+
+2011-03-25 17:27 micael
+
+ * [r585] src/eigensolver.F90, src/hamann.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, src/wave_equations.F90,
+ src/wave_equations_integrator.F90: * More work to transform the
+ wavefunctions into spinors.
+ * Derivatives of Dirac's wavefunctions are now computed using the
+ wave-equation, instead of using numerical methods.
+
+2011-03-24 17:43 micael
+
+ * [r584] src/eigensolver.F90, src/hamann.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, src/wave_equations.F90: * Continued to
+ gather the wavefunctions into a single array.
+
+2011-03-23 19:06 micael
+
+ * [r583] src/Makefile.am, src/hamann.F90, src/mrpp.F90,
+ src/mtm.F90, src/mtm_equations.F90, src/states.F90, src/tm.F90: *
+ Removed modified TM scheme that was not working.
+ * Started to gather the wavefunctions into a single array. This
+ will be necessary to implement RSDFT.
+
+2011-03-23 17:50 micael
+
+ * [r582] src/atom.F90, src/multiroot_f.F90: * Added missing
+ pop_sub's.
+
+2011-03-23 17:49 micael
+
+ * [r581] src/functionals.F90: * Removed some unused routines.
+
+2011-03-17 17:27 micael
+
+ * [r580] src/atom.F90, src/eigensolver.F90, src/functionals.F90,
+ src/hamann.F90, src/io.F90, src/kb_projectors.F90,
+ src/loc_potentials.F90, src/mrpp.F90, src/mtm.F90,
+ src/numerical_tests.F90, src/output.F90, src/ps_generation.F90,
+ src/ps_io.F90, src/run_ape.F90, src/sl_potentials.F90,
+ src/states.F90, src/tm.F90, src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90, src/xc.F90: * Fixed couple of
+ bugs in the tau approximations.
+ * Simplified the output module.
+ * There is now a wrapper to open files.
+
+2011-03-17 15:24 micael
+
+ * [r579] src/atom.F90, src/functionals.F90, src/xc.F90: *
+ Simplified the xc evaluation mode.
+ * It is now possible to use the kinetic energy functionals from
+ libxc.
+
+2011-03-16 16:23 micael
+
+ * [r578] src/atom.F90, src/output.F90, src/parser_symbols.F90,
+ src/run_ape.F90: * Added run mode to evaluate the
+ exchange-correlation potential and energy using the wavefunctions
+ of a previous run.
+
+2011-03-09 18:40 micael
+
+ * [r577] doc/ape.texi, src/finite_diff.F90, src/mesh.F90,
+ src/numerical_tests.F90: * Added new variables to the manual.
+ * A bit of cleaning.
+ * More information about the mesh is now printed to the screen
+ and files.
+
+2011-03-08 21:28 micael
+
+ * [r576] testsuite/01-Li.01-ae_pp.inp, testsuite/01-Li.02-tm.inp,
+ testsuite/01-Li.03-mrpp.inp, testsuite/01-Li.test,
+ testsuite/02-Cr.test, testsuite/03-Au.test: * Forgot to commit
+ the changes to the testsuite related to revision #573
+
+2011-03-08 21:26 micael
+
+ * [r575] src/finite_diff.F90, src/numerical_tests.F90: * Added
+ routine headers.
+ * Added some checks.
+
+2011-03-07 19:00 micael
+
+ * [r574] src/Makefile.am, src/finite_diff.F90,
+ src/loc_potentials.F90, src/mesh.F90, src/messages.F90,
+ src/mrpp.F90, src/numerical_tests.F90, src/parser_symbols.F90,
+ src/sl_potentials.F90, src/states.F90, src/tm.F90, src/xc.F90: *
+ Added finite diffences as a method to compute derivatives.
+ * Now all the derivatives are computed using the mesh module,
+ including the ones of the potential. As such, the derivatives of
+ the potential are now first computed and then interpolated
+ (before the potential was interpolated and the derivatives
+ computed using this interpolation). This implied small numerical
+ changes in the results of the tests.
+ * Changed the name of function mesh_eval to mesh_extrapolate.
+ * Functions mesh_eval_deriv* are gone: we now use
+ mesh_derivative* followed by mesh_extrapolation. This is not very
+ efficient, but these functions are not called very often and so
+ it is not critical.
+ * Added a function to calculate third derivatives.
+
+2011-02-28 17:25 micael
+
+ * [r573] testsuite/Makefile.am: * File missing in testsuite
+ Makefile.
+
+2011-02-28 17:24 micael
+
+ * [r572] src/numerical_tests.F90: * More numerical tests.
+
+2011-02-24 22:21 micael
+
+ * [r571] src/mesh.F90, src/numerical_tests.F90,
+ src/parser_symbols.F90, src/ps_io.F90: * More work on the
+ numerical testing mode.
+
+2011-02-18 10:50 micael
+
+ * [r570] src/Makefile.am, src/numerical_tests.F90, src/output.F90,
+ src/parser_symbols.F90, src/run_ape.F90: Added a new runmode to
+ perform numerical tests. For now it only tests the derivatives of
+ a couple of functions.
+
+2011-02-17 17:02 micael
+
+ * [r569] src/mesh.F90: Bug fixed: the interp_range component of the
+ mesh was not save/read nor copied properly.
+
+2011-02-15 20:28 micael
+
+ * [r568] src/hamann.F90, src/hartree.F90, src/mesh.F90,
+ src/mrpp.F90, src/ps_io.F90, src/states.F90, src/tm.F90,
+ src/xc.F90: *) Renamed a couple of routines.
+ *) Added routines in module mesh to return the value of a
+ function and its first and second derivatives at an arbitrary
+ point.
+
+2011-02-14 21:10 micael
+
+ * [r567] src/hartree.F90: Some cleaning in the Hartree module.
+
+2011-02-14 20:58 micael
+
+ * [r566] src/atom.F90, src/hartree.F90, src/mesh.F90: *) Added a
+ routine that returns the integral of a function between 0 and r,
+ being r a vector.
+ *) The mesh_integrate_* routines now accept the volume element of
+ the integration as an optional argument, being r**2 the default.
+
+2011-02-14 18:12 micael
+
+ * [r565] src/atom.F90, src/ps_generation.F90, src/ps_io.F90,
+ src/states.F90, src/xc.F90: *) Changed the ordering of the states
+ so that the last column runs over the spin.
+ *) A private statement was missing in the declaration of the xc_t
+ type.
+
+2011-02-11 18:19 micael
+
+ * [r564] src/ps_io.F90: It is now possible to output the
+ pseudopotentials in more than one format simultaneously.
+
+2011-02-11 14:55 micael
+
+ * [r563] src/mrpp.F90, testsuite/01-Li.02-tm.inp,
+ testsuite/01-Li.03-mrpp.inp, testsuite/01-Li.test,
+ testsuite/02-Cr.02-hamann.inp, testsuite/02-Cr.02-mrpp.inp,
+ testsuite/02-Cr.03-tm.inp, testsuite/02-Cr.04-mrpp.inp,
+ testsuite/02-Cr.test, testsuite/03-Au.02-hamann.inp,
+ testsuite/03-Au.02-tm.inp, testsuite/03-Au.03-rtm.inp,
+ testsuite/03-Au.03-tm.inp, testsuite/03-Au.04-rtm.inp,
+ testsuite/03-Au.05-mrpp.inp, testsuite/03-Au.test,
+ testsuite/Makefile.am: *) Added several tests, such that all
+ combinations of PPScheme and WaveEquation are tested.
+ *) Corrected small error in output format.
+
+2011-02-09 21:34 micael
+
+ * [r562] testsuite/02-Cr.02-mrpp.inp, testsuite/02-Cr.test: Enabled
+ the MRPP test.
+
+2011-02-09 15:58 micael
+
+ * [r561] Makefile.am, debian, libxc: Removed debian files from
+ revision control.
+
+2011-01-24 16:47 micael
+
+ * [r560] COPYING: Changed the version of the GPL mentioned in the
+ COPYING file to version 2 to make it consistent with the source
+ files.
+
+2010-11-24 20:30 micael
+
+ * [r559] src/atom.F90: The total magnetic moment is now printed to
+ the info file.
+
+2010-11-24 20:01 micael
+
+ * [r558] doc/ape.texi, src/atom.F90, src/parser_symbols.F90,
+ src/quantum_numbers.F90, src/states.F90: Implemented a new way of
+ setting the occupations of the states.
+
+2010-11-23 16:16 micael
+
+ * [r557] doc/ape.texi, src/states.F90: *) Fixed a couple of bugs in
+ the filling of the levels.
+ *) Added an entry for the variable "FixedOcc" in the manual.
+
+2010-11-23 15:29 micael
+
+ * [r556] src/atom.F90, src/quantum_numbers.F90, src/states.F90,
+ src/utilities_f.F90: It is now possible not to impose fixed
+ occupancies.
+
+2010-11-12 13:10 micael
+
+ * [r555] src/Makefile.am, src/hamann.F90, src/mesh.F90,
+ src/mrpp.F90, src/ps_io.F90, src/splines.F90, src/tm.F90: Moved
+ the routines that compute the derivatives of a function on all
+ the mesh points to the mesh module.
+
+2010-11-12 11:56 micael
+
+ * [r554] src/Makefile.am, src/eigensolver.F90, src/functionals.F90,
+ src/mesh.F90, src/mtm.F90, src/mtm_equations.F90, src/states.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: Removed unused variables.
+
+2010-11-12 11:42 micael
+
+ * [r553] src/atom.F90, src/functionals.F90, src/hamann.F90,
+ src/hartree.F90, src/mesh.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, src/wave_equations.F90, src/xc.F90: The
+ r**2 factor of the volume element in spherical coordinates is now
+ taken into account in the mesh_integrate routine.
+
+2010-11-11 17:43 micael
+
+ * [r552] src/hamann.F90, src/mesh.F90, src/mrpp.F90, src/mtm.F90,
+ src/ps_generation.F90, src/tm.F90: Added a routine to truncate a
+ mesh.
+
+2010-11-11 16:13 micael
+
+ * [r551] src/xc.F90: *) Now the derivatives of the core density are
+ stored in the xc structure.
+ *) When using NLCC the core density and its derivatives are
+ written to a file.
+
+2010-11-11 16:11 micael
+
+ * [r550] src/states.F90: Fixed a couple of minor typos.
+
+2010-11-11 16:11 micael
+
+ * [r549] src/atom.F90: The energies and eivenvalues are now written
+ to the info file whenever an SCF calculation is done, not only
+ for the all-electron runs.
+
+2010-11-10 13:57 micael
+
+ * [r548] src/functionals.F90, src/mesh.F90, src/states.F90,
+ src/xc.F90: Calculation of the gradient, divergence and laplacian
+ is now done using the mesh module.
+
+2010-11-10 11:49 micael
+
+ * [r547] src/Makefile.am, src/atom.F90, src/functionals.F90,
+ src/hamann.F90, src/hartree.F90, src/mesh.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/ps_io.F90, src/states.F90,
+ src/tm.F90, src/tm_equations.F90, src/wave_equations.F90,
+ src/xc.F90: Added a routine to calculate the integral of a
+ function on a mesh in the mesh module. Now all the integrals are
+ calculated using the new function.
+
+2010-11-10 11:00 micael
+
+ * [r546] doc/ape.texi, src/atom.F90: *) Replaced the sum of the
+ eigenvalues by the total energy as a convergence criteria of the
+ SCF cycle.
+ *) Now the total energy is printed at each SCF iteration.
+
+2010-11-10 10:01 micael
+
+ * [r545] src/Makefile.am, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/hartree.F90, src/mesh.F90, src/mix.F90,
+ src/mrpp.F90, src/mtm.F90, src/mtm_equations.F90,
+ src/parser_symbols.F90, src/potentials.F90,
+ src/ps_generation.F90, src/tm.F90, src/tm_equations.F90,
+ src/wave_equations_integrator.F90, src/xc.F90: Cleaned the use of
+ use.
+
+2010-11-09 22:23 micael
+
+ * [r544] src/atom.F90, src/eigensolver.F90, src/functionals.F90,
+ src/hamann.F90, src/hartree.F90, src/kb_projectors.F90,
+ src/loc_potentials.F90, src/mesh.F90, src/mix.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/mtm.F90, src/mtm_equations.F90,
+ src/multiroot_f.F90, src/potentials.F90, src/ps_generation.F90,
+ src/ps_io.F90, src/quantum_numbers.F90, src/run_ape.F90,
+ src/sl_potentials.F90, src/splines.F90, src/states.F90,
+ src/tm.F90, src/tm_equations.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: Replace _type by _t in the name of all the derived
+ data types.
+
+2010-11-09 21:28 micael
+
+ * [r543] src/ape.F90, src/atom.F90, src/eigensolver.F90,
+ src/functionals.F90, src/global.F90, src/gsl_interface_f.F90,
+ src/hamann.F90, src/hartree.F90, src/io.F90,
+ src/kb_projectors.F90, src/liboct_parser.F90, src/linalg.F90,
+ src/loc_potentials.F90, src/mesh.F90, src/messages.F90,
+ src/mix.F90, src/mrpp.F90, src/mrpp_equations.F90, src/mtm.F90,
+ src/mtm_equations.F90, src/multiroot_f.F90, src/output.F90,
+ src/parser_symbols.F90, src/potentials.F90,
+ src/ps_generation.F90, src/ps_io.F90, src/quantum_numbers.F90,
+ src/run_ape.F90, src/sl_potentials.F90, src/splines.F90,
+ src/states.F90, src/tm.F90, src/tm_equations.F90, src/units.F90,
+ src/utilities_f.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: *) Added "_m" at the end of all the module names.
+
+2010-11-09 18:10 micael
+
+ * [r542] src/mtm.F90, src/mtm_equations.F90: Cleaned the modified
+ TM scheme.
+
+2010-11-09 18:08 micael
+
+ * [r541] src/Makefile.am: Fixed dependencies using makedepf90.
+
+2010-11-09 17:53 micael
+
+ * [r540] build/Makefile.am, build/ape.spec.in,
+ build/svn_release_number.sh, doc/Makefile.am, doc/ape.texi,
+ liboct_parser/Makefile.am, liboct_parser/grammar.c,
+ liboct_parser/grammar.y, liboct_parser/gsl_userdef.c,
+ liboct_parser/gsl_userdef.h, liboct_parser/liboct_parser.h,
+ liboct_parser/parse.c, liboct_parser/parse_exp.c,
+ liboct_parser/parser_f.c, liboct_parser/string_f.c,
+ liboct_parser/string_f.h, liboct_parser/symbols.c,
+ liboct_parser/symbols.h, m4/acx.m4, m4/compilation_info.m4,
+ m4/f90_module_flag.m4, m4/libxc.m4, src/Makefile.am, src/ape.F90,
+ src/atom.F90, src/eigensolver.F90, src/functionals.F90,
+ src/global.F90, src/global.h, src/gsl_interface_c.c,
+ src/gsl_interface_f.F90, src/hamann.F90, src/hartree.F90,
+ src/io.F90, src/kb_projectors.F90, src/liboct_parser.F90,
+ src/linalg.F90, src/loc_potentials.F90, src/mesh.F90,
+ src/messages.F90, src/mix.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/multiroot_c.c, src/multiroot_f.F90,
+ src/odeint.c, src/output.F90, src/potentials.F90,
+ src/ps_generation.F90, src/ps_io.F90, src/quantum_numbers.F90,
+ src/run_ape.F90, src/sl_potentials.F90, src/splines.F90,
+ src/states.F90, src/tm.F90, src/tm_equations.F90, src/units.F90,
+ src/utilities_c.c, src/utilities_f.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90, testsuite/01-Li.01-ae_pp.inp, testsuite/01-Li.test,
+ testsuite/02-Cr.01-ae.inp, testsuite/02-Cr.02-mrpp.inp,
+ testsuite/02-Cr.test, testsuite/03-Au.01-ae.inp,
+ testsuite/03-Au.02-tm.inp, testsuite/03-Au.03-rtm.inp,
+ testsuite/03-Au.test, testsuite/Makefile.am,
+ testsuite/ape-run_regression_test.pl,
+ testsuite/ape-run_testsuite.in: Setting more svn:keywords
+ properties.
+
+2010-11-09 17:29 micael
+
+ * [r539] Makefile.am, configure.ac: Started to set the svn:keywords
+ property to some files.
+
+2010-11-09 14:46 micael
+
+ * [r538] src/Makefile.am, src/atom.F90, src/scf.F90: *) Moved the
+ SCF stuff to the atom module.
+
+2010-11-03 11:38 micael
+
+ * [r536] Makefile.am, debian, debian/ape-doc.install,
+ debian/ape.install, debian/changelog, debian/control,
+ debian/copyright, debian/rules: *) Added files to make debian
+ packages.
+
+2010-11-03 09:35 micael
+
+ * [r535] COPYING, INSTALL, build: *) INSTALL and COPYING files are
+ now under revision control.
+
+2010-11-02 11:21 micael
+
+ * [r534] configure.ac, doc/ape.texi: *) Changing version number of
+ trunk.
+
+2010-11-02 11:15 micael
+
+ * [r533] ChangeLog: Updated ChangeLog.
+
+2010-11-02 10:26 micael
+
+ * [r529] Makefile.am: *) Added "build" directory to the subdirs
+ list.
+
+2010-11-02 10:07 micael
+
+ * [r527] src/xc.F90: *) A message is printed if the relativistic
+ version of xLDA is used.
+
+2010-11-02 10:07 micael
+
+ * [r526] src/wave_equations_derivs.F90: *) Missing changes from
+ commit #524.
+
+2010-11-02 10:05 micael
+
+ * [r525] doc/ape.texi, sample/Au/Au.ae, sample/Cd/Cd,
+ sample/Cu/Cu.ae, sample/Cu/Cu.tm, sample/Na/Na, sample/Si/Si,
+ sample/Ti/Ti.ae, sample/Ti/Ti.mrpp, sample/Ti/Ti.tm: *) Updated
+ documentation and sample files.
+
+2010-11-02 10:03 micael
+
+ * [r524] src/odeint.c, src/wave_equations_integrator.F90: *)
+ Simplified the ODE solver part by removing the calculation of the
+ jacobian, as it was only needed by one solver that was not used.
+ *) Changed the default value for MaxSteps.
+
+2010-10-30 13:45 fnog
+
+ * [r523] m4/compilation_info.m4: One file missing from the server
+ restore...
+
+2010-10-30 11:43 fnog
+
+ * [r522] build/Makefile.am, build/svn_release_number.sh: This files
+ were not put back after the server corruption.
+
+2010-10-30 11:39 fnog
+
+ * [r521] libstring_f/AUTHORS, libstring_f/configure.ac,
+ src/utilities_c.c: Corrected some irrelevant typos.
+
+2010-10-30 10:46 fnog
+
+ * [r520] src/xc.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r519] src/wave_equations_derivs.F90: Syncing corrupted svn
+ server..
+
+2010-10-30 10:46 fnog
+
+ * [r518] src/states.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r517] src/scf.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r516] src/ps_generation.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r515] src/potentials.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r514] src/parser_symbols.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r513] src/mtm_equations.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r512] src/mtm.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r511] src/functionals.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r510] src/eigensolver.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r509] src/atom.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r508] src/ape.F90: Syncing corrupted svn server..
+
+2010-10-30 10:46 fnog
+
+ * [r507] configure.ac: Syncing corrupted svn server..
+
+2010-07-29 14:35 micael
+
+ * [r506] src/functionals.F90, src/hamann.F90, src/mrpp.F90,
+ src/tm.F90: *) Replaced some spline_eval_integ calls by
+ spline_integ.
+
+2010-07-28 17:03 micael
+
+ * [r505] src/functionals.F90, src/xc.F90: *) Becke-Johnson
+ potential is now shifted so that it goes to zero at infinity.
+
+2010-07-28 17:02 micael
+
+ * [r504] src/eigensolver.F90, src/potentials.F90: *) Added a
+ function that returns the maximum of a potential.
+ *) Simplified the way how the upper bound for the eigenvalues is
+ determined.
+
+2010-07-28 14:52 micael
+
+ * [r503] src/states.F90: *) Implemented the calculation of the
+ kinetic energy density for the Dirac equation.
+
+2010-06-27 15:13 micael
+
+ * [r502] configure.ac, m4/libxc.m4: *) Pkgconfig is now used to
+ determine the libxc path.
+
+2010-06-23 12:55 micael
+
+ * [r501] src/Makefile.am, src/functionals.F90: *) Fixed linking
+ with libxc.
+
+2010-05-16 14:04 micael
+
+ * [r500] Makefile.am, configure.ac, doc/ape.texi, libxc/AUTHORS,
+ libxc/COPYING, libxc/ChangeLog, libxc/DONE, libxc/INSTALL,
+ libxc/Makefile.am, libxc/NEWS, libxc/PACKAGING, libxc/README,
+ libxc/TODO, libxc/configure.ac, libxc/m4/acx.m4,
+ libxc/m4/fc_integer.m4, libxc/m4/fcflags.m4,
+ libxc/src/Makefile.am, libxc/src/functionals.c,
+ libxc/src/get_funcs.pl, libxc/src/gga.c, libxc/src/gga_c_am05.c,
+ libxc/src/gga_c_lm.c, libxc/src/gga_c_lyp.c,
+ libxc/src/gga_c_p86.c, libxc/src/gga_c_pbe.c,
+ libxc/src/gga_c_pw91.c, libxc/src/gga_perdew.c,
+ libxc/src/gga_x_2d_b86.c, libxc/src/gga_x_2d_b86_mgc.c,
+ libxc/src/gga_x_2d_b88.c, libxc/src/gga_x_2d_pbe.c,
+ libxc/src/gga_x_am05.c, libxc/src/gga_x_b86.c,
+ libxc/src/gga_x_b86_mgc.c, libxc/src/gga_x_b88.c,
+ libxc/src/gga_x_bayesian.c, libxc/src/gga_x_dk87.c,
+ libxc/src/gga_x_ft97.c, libxc/src/gga_x_g96.c,
+ libxc/src/gga_x_lg93.c, libxc/src/gga_x_mpbe.c,
+ libxc/src/gga_x_optx.c, libxc/src/gga_x_pbe.c,
+ libxc/src/gga_x_pbea.c, libxc/src/gga_x_pw86.c,
+ libxc/src/gga_x_pw91.c, libxc/src/gga_x_rpbe.c,
+ libxc/src/gga_x_wc.c, libxc/src/gga_xc_1w.c,
+ libxc/src/gga_xc_b97.c, libxc/src/gga_xc_edf1.c,
+ libxc/src/gga_xc_lb.c, libxc/src/hyb_gga_xc_b1wc.c,
+ libxc/src/hyb_gga_xc_b3lyp.c, libxc/src/hyb_gga_xc_b97.c,
+ libxc/src/hyb_gga_xc_o3lyp.c, libxc/src/hyb_gga_xc_pbeh.c,
+ libxc/src/integrate.c, libxc/src/lca.c, libxc/src/lca_lch.c,
+ libxc/src/lca_omc.c, libxc/src/lda.c, libxc/src/lda_c_1d_csc.c,
+ libxc/src/lda_c_2d_amgb.c, libxc/src/lda_c_2d_prm.c,
+ libxc/src/lda_c_hl.c, libxc/src/lda_c_pw.c, libxc/src/lda_c_pz.c,
+ libxc/src/lda_c_rpa.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_c_wigner.c, libxc/src/lda_x.c,
+ libxc/src/lda_x_1d.c, libxc/src/lda_x_2d.c,
+ libxc/src/lda_xc_teter93.c, libxc/src/libxc_master.F90,
+ libxc/src/mgga.c, libxc/src/mgga_c_tpss.c,
+ libxc/src/mgga_x_br89.c, libxc/src/mgga_x_lta.c,
+ libxc/src/mgga_x_m06l.c, libxc/src/mgga_x_tau_hcth.c,
+ libxc/src/mgga_x_tpss.c, libxc/src/mgga_xc_vsxc.c,
+ libxc/src/mix_func.c, libxc/src/special_functions.c,
+ libxc/src/string_f.h, libxc/src/test.c, libxc/src/util.c,
+ libxc/src/util.h, libxc/src/work_gga_becke.c,
+ libxc/src/work_gga_x.c, libxc/src/work_gga_x_2d.c,
+ libxc/src/work_lda.c, libxc/src/work_mgga_c.c,
+ libxc/src/work_mgga_x.c, libxc/src/xc.h, libxc/src/xc_config.h,
+ libxc/src/xc_f.c, libxc/src/xc_s.h, libxc/testsuite/Makefile.am,
+ libxc/testsuite/gga_c_lyp.data, libxc/testsuite/gga_c_p86.data,
+ libxc/testsuite/gga_c_pbe.data, libxc/testsuite/gga_c_pw91.data,
+ libxc/testsuite/gga_x_b88.data,
+ libxc/testsuite/gga_x_ft97_b.data,
+ libxc/testsuite/gga_x_pbe.data, libxc/testsuite/gga_x_pw91.data,
+ libxc/testsuite/gga_xc_b97.data,
+ libxc/testsuite/gga_xc_b97_1.data,
+ libxc/testsuite/gga_xc_b97_2.data,
+ libxc/testsuite/gga_xc_edf1.data,
+ libxc/testsuite/gga_xc_hcth_120.data,
+ libxc/testsuite/gga_xc_hcth_147.data,
+ libxc/testsuite/gga_xc_hcth_407.data,
+ libxc/testsuite/gga_xc_hcth_93.data,
+ libxc/testsuite/hyb_gga_xc_b3lyp.data,
+ libxc/testsuite/lda_c_pw.data, libxc/testsuite/lda_c_pz.data,
+ libxc/testsuite/lda_c_vwn.data,
+ libxc/testsuite/lda_c_vwn_rpa.data, libxc/testsuite/lda_x.data,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c,
+ libxc/testsuite/xc-reference.pl,
+ libxc/testsuite/xc-run_testsuite, m4/ax_f90_module_flag.m4,
+ m4/f90_module_flag.m4, m4/libxc.m4: *) Removed libxc from APE.
+
+2010-05-16 14:03 micael
+
+ * [r499] src/Makefile.am, src/atom.F90, src/functionals.F90,
+ src/hartree.F90, src/ps_generation.F90, src/scf.F90, src/xc.F90:
+ *) Cleaned the ADSIC routine and moved it to the functionals
+ module.
+
+2010-05-12 11:52 micael
+
+ * [r498] src/functionals.F90: This line should not have been
+ commited.
+
+2010-05-12 11:45 micael
+
+ * [r497] doc/ape.texi, src/atom.F90, src/functionals.F90,
+ src/parser_symbols.F90, src/ps_generation.F90, src/scf.F90,
+ src/xc.F90: *) Fixed a couple of bugs.
+ *) Implemented the Tran and Blaha functional.
+
+2010-03-02 16:45 micael
+
+ * [r495] doc/ape.texi, src/ps_generation.F90, src/xc.F90:
+ Simplified the input for the non-linear core-corrections.
+
+2010-03-02 16:35 micael
+
+ * [r494] doc/ape.texi: *) Documented Vanderbilt local component.
+
+2010-03-02 16:31 micael
+
+ * [r493] src/atom.F90: This fixes the problem with the Vanderbilt
+ local component.
+
+2010-03-01 19:23 micael
+
+ * [r492] src/ps_generation.F90, src/states.F90: *) Improved the
+ output during the pseudopotential generation.
+ *) The position of the wavefunction nodes was not always correct.
+
+2010-03-01 19:21 micael
+
+ * [r491] libstring_f/Makefile.am: This change was missing from the
+ previous commit.
+
+2010-03-01 19:20 micael
+
+ * [r490] Makefile.am, build/ape.spec.in, liboct_parser/Makefile.am,
+ libxc/INSTALL, libxc/src/Makefile.am: With these changes 'make
+ rpm' now works correctly.
+
+2010-03-01 15:38 micael
+
+ * [r489] sample/Cu/Cu.mrpp: *) Sample file for Cu was wrong.
+
+2010-02-17 12:45 fnog
+
+ * [r488] src/parser_symbols.F90, src/xc.F90: Average Density Self
+ Interaction Correction is now implemented. Use with
+ 'XCCorrections=adsic'.
+
+2009-12-02 17:15 micael
+
+ * [r487] libxc/src/gga.c: This file was commited by mistake.
+
+2009-12-02 17:14 micael
+
+ * [r486] libxc/src/work_mgga_x.c: Fixed the kinetic energy density
+ threshold for the MGGA.
+
+2009-12-02 14:18 micael
+
+ * [r485] libxc/src/gga_x_2d_b86.c, libxc/src/gga_x_2d_b88.c,
+ libxc/src/gga_x_2d_pbe.c: I forgot to add this files in the
+ previous commit.
+
+2009-12-02 14:09 micael
+
+ * [r484] libxc/src/Makefile.am, libxc/src/gga.c,
+ libxc/src/gga_c_lm.c, libxc/src/gga_c_pbe.c,
+ libxc/src/gga_c_pw91.c, libxc/src/gga_perdew.c,
+ libxc/src/gga_x_2d_b86_mgc.c, libxc/src/gga_x_b86.c,
+ libxc/src/gga_x_b88.c, libxc/src/gga_x_pbe.c,
+ libxc/src/gga_xc_edf1.c, libxc/src/gga_xc_lb.c, libxc/src/lda.c,
+ libxc/src/util.c, libxc/src/util.h, libxc/src/work_gga_x.c,
+ libxc/src/xc.h, src/functionals.F90, src/parser_symbols.F90,
+ src/scf.F90: *) Updated libxc
+ *) More improvements to the debug mode
+ *) Fixed the GGA potential when the density is smaller than the
+ threshold.
+
+2009-12-02 09:53 micael
+
+ * [r483] src/ape.F90, src/eigensolver.F90, src/hamann.F90,
+ src/scf.F90, src/wave_equations_integrator.F90: Some improvements
+ to the debug mode.
+
+2009-12-02 09:31 micael
+
+ * [r482] src/states.F90: *) Now also the gradient and the laplacian
+ of the density are writen to the density file.
+ *) The kinetic energy density is now aslo writen to a file.
+
+2009-12-02 09:02 micael
+
+ * [r481] src/atom.F90, src/functionals.F90, src/states.F90,
+ src/xc.F90: *) The output of the density and of the xc potential
+ when running spin-polarized calculations were not consitent with
+ the output of the other quantities: both spin-up and spin-down
+ quantitites were writen to the same file, while in the other
+ cases two different files were writen.
+ *) The output of the density is now done in the states module.
+ *) Some cleaning.
+
+2009-12-01 19:15 micael
+
+ * [r480] src/states.F90: Corrected the calculation of the laplacian
+ and gradient of the density.
+
+2009-12-01 19:03 micael
+
+ * [r479] src/ps_generation.F90: Now the KB localization radii are
+ printed to the screen and info file.
+
+2009-11-17 10:18 micael
+
+ * [r478] src/potentials.F90: Fixed potential_debug routine.
+
+2009-11-17 10:05 micael
+
+ * [r477] src/Makefile.am: Some changes so that the code can compile
+ in systems where the filenames are case insensitive.
+
+2009-11-16 21:00 micael
+
+ * [r476] libxc/src/gga_xc_xlyp.c, libxc/src/hyb_gga.c,
+ libxc/src/lda_x.c, libxc/src/xc_f.c, testsuite/03-Au.test: *)
+ Syncing libxc.
+ *) The changes to libxc include a bugfix to the relativistic
+ correction of the LDA exchange that implied the update of one of
+ the tests.
+
+2009-11-16 20:36 micael
+
+ * [r475] src/wave_equations_integrator.F90: Improved the asymptotic
+ expansion when r->0 for the scalar-relativistic equation and for
+ Dirac's equation.
+
+2009-11-06 20:36 micael
+
+ * [r474] libxc/src/gga.c, libxc/src/gga_xc_lb.c, libxc/src/lda_x.c,
+ libxc/src/libxc_master.F90, libxc/src/util.h, libxc/src/xc.h,
+ libxc/src/xc_f.c, src/functionals.F90, testsuite/03-Au.test: The
+ relativitic corrections to the LDA exchange functional are now
+ working again.
+
+2009-11-06 20:26 micael
+
+ * [r473] libxc/src/Makefile.am, libxc/src/functionals.c,
+ libxc/src/gga.c, libxc/src/gga_c_lyp.c,
+ libxc/src/gga_x_2d_b86_mgc.c, libxc/src/gga_x_b88.c,
+ libxc/src/gga_xc_1w.c, libxc/src/gga_xc_edf1.c,
+ libxc/src/gga_xc_lb.c, libxc/src/hyb_gga_xc_b1wc.c,
+ libxc/src/hyb_gga_xc_b3lyp.c, libxc/src/hyb_gga_xc_b97.c,
+ libxc/src/hyb_gga_xc_o3lyp.c, libxc/src/hyb_gga_xc_pbeh.c,
+ libxc/src/lda_c_2d_prm.c, libxc/src/libxc_master.F90,
+ libxc/src/mgga_x_br89.c, libxc/src/mix_func.c, libxc/src/util.h,
+ libxc/src/work_gga_x_2d.c, libxc/src/xc.h, libxc/src/xc_f.c,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c:
+ Syncing libxc.
+
+2009-11-04 20:41 micael
+
+ * [r471] src/ps_io.F90: Fixed UPF format, which was not properly
+ implemented.
+
+2009-11-04 09:45 micael
+
+ * [r470] src/ps_io.F90: Minor corrections to the UPF format related
+ to the case where there are no KB projectors and to the case
+ where the xc functional is unknown.
+
+2009-11-04 09:43 micael
+
+ * [r469] src/atom.F90, src/states.F90: Added some density moments
+ to the output of the all-electron calculations.
+
+2009-10-26 16:50 micael
+
+ * [r468] src/states.F90: *) Bug fix: the calculation of the
+ laplacian was not done in the correct way.
+
+2009-10-26 16:31 micael
+
+ * [r467] src/splines.F90, src/states.F90: *) The routines that
+ compute the first and second derivatives of a function using
+ splines are now functions. This simplifies a bit the code.
+
+2009-10-26 16:23 micael
+
+ * [r466] libxc/src/mgga_x_br89.c, src/functionals.F90,
+ src/states.F90, src/xc.F90: *) The calculation of the
+ gradient/laplacian of the density is now done in the states
+ module and is calculated as the sum over the gradient/laplacian
+ of the density of each state.
+ *) Couple of bug fixes.
+
+2009-10-09 08:32 micael
+
+ * [r465] libxc/src/gga_xc_lb.c, libxc/src/mgga.c,
+ libxc/src/mgga_x_br89.c, libxc/src/xc.h, libxc/src/xc_f.c,
+ src/functionals.F90: *) Corrected some bugs in libxc.
+
+2009-10-08 15:13 micael
+
+ * [r464] libxc/configure.ac, libxc/src/functionals.c,
+ libxc/src/gga.c, libxc/src/gga_c_am05.c, libxc/src/gga_c_lm.c,
+ libxc/src/gga_c_lyp.c, libxc/src/gga_c_p86.c,
+ libxc/src/gga_c_pbe.c, libxc/src/gga_c_pw91.c,
+ libxc/src/gga_perdew.c, libxc/src/gga_xc_b97.c,
+ libxc/src/gga_xc_lb.c, libxc/src/lda.c, libxc/src/lda_c_1d_csc.c,
+ libxc/src/lda_c_2d_prm.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_x.c, libxc/src/lda_x_1d.c,
+ libxc/src/libxc_master.F90, libxc/src/mgga.c,
+ libxc/src/mgga_c_tpss.c, libxc/src/mgga_x_br89.c,
+ libxc/src/mgga_x_m06l.c, libxc/src/mgga_xc_vsxc.c,
+ libxc/src/util.h, libxc/src/work_gga_becke.c,
+ libxc/src/work_mgga_c.c, libxc/src/xc.h, libxc/src/xc_f.c,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c,
+ src/functionals.F90: *) Updated to the latest version of libxc.
+
+2009-10-08 13:36 micael
+
+ * [r463] src/functionals.F90, src/xc.F90: *) Corrected the
+ calculation of the laplacian of the density.
+ *) Now the exchange and correlation potentials are written
+ separatedly to a file.
+
+2009-10-08 12:32 micael
+
+ * [r462] src/wave_equations_integrator.F90: *) The boundary
+ conditions close to the origin for the Schrodinger equation were
+ not accurate for l=0. I took the opportunity to improve them for
+ all values of l.
+
+2009-10-08 07:08 micael
+
+ * [r461] src/atom.F90: *) Some cleaning in the atom module.
+
+2009-10-08 07:08 micael
+
+ * [r460] src/Makefile.am: *) Fixed some dependencies in the
+ Makefile.
+
+2009-10-08 07:07 micael
+
+ * [r459] src/splines.F90: *) Added a couple of routines that return
+ the first and second derivatives of a function at all points in
+ the mesh.
+
+2009-09-25 18:57 micael
+
+ * [r458] doc/ape.texi: *) Updated documentation to match some
+ changes in the code.
+
+2009-09-25 18:55 micael
+
+ * [r457] src/states.F90: *) Corrected the calculation of the
+ kinetic energy density in spherical coordinates.
+
+2009-09-23 15:27 micael
+
+ * [r456] libxc/AUTHORS, libxc/ChangeLog, libxc/DONE, libxc/INSTALL,
+ libxc/Makefile.am, libxc/NEWS, libxc/PACKAGING, libxc/README,
+ libxc/TODO, libxc/configure.ac, libxc/m4/acx.m4,
+ libxc/m4/fc_integer.m4, libxc/m4/fcflags.m4,
+ libxc/src/Makefile.am, libxc/src/functionals.c,
+ libxc/src/get_funcs.pl, libxc/src/gga.c, libxc/src/gga_c_am05.c,
+ libxc/src/gga_c_lm.c, libxc/src/gga_c_lyp.c,
+ libxc/src/gga_c_p86.c, libxc/src/gga_c_pbe.c,
+ libxc/src/gga_c_pw91.c, libxc/src/gga_perdew.c,
+ libxc/src/gga_x_2d_b86_mgc.c, libxc/src/gga_x_am05.c,
+ libxc/src/gga_x_b86.c, libxc/src/gga_x_b86_mgc.c,
+ libxc/src/gga_x_b88.c, libxc/src/gga_x_bayesian.c,
+ libxc/src/gga_x_dk87.c, libxc/src/gga_x_ft97.c,
+ libxc/src/gga_x_g96.c, libxc/src/gga_x_lg93.c,
+ libxc/src/gga_x_mpbe.c, libxc/src/gga_x_optx.c,
+ libxc/src/gga_x_pbe.c, libxc/src/gga_x_pbea.c,
+ libxc/src/gga_x_pw86.c, libxc/src/gga_x_pw91.c,
+ libxc/src/gga_x_rpbe.c, libxc/src/gga_x_wc.c,
+ libxc/src/gga_xc_1w.c, libxc/src/gga_xc_b97.c,
+ libxc/src/gga_xc_edf1.c, libxc/src/gga_xc_lb.c,
+ libxc/src/gga_xc_xlyp.c, libxc/src/hyb_gga.c,
+ libxc/src/hyb_gga_xc_b1wc.c, libxc/src/hyb_gga_xc_b3lyp.c,
+ libxc/src/hyb_gga_xc_b97.c, libxc/src/hyb_gga_xc_o3lyp.c,
+ libxc/src/hyb_gga_xc_pbeh.c, libxc/src/integrate.c,
+ libxc/src/lca.c, libxc/src/lca_lch.c, libxc/src/lca_omc.c,
+ libxc/src/lda.c, libxc/src/lda_c_1d_csc.c,
+ libxc/src/lda_c_2d_amgb.c, libxc/src/lda_c_2d_prm.c,
+ libxc/src/lda_c_hl.c, libxc/src/lda_c_pw.c, libxc/src/lda_c_pz.c,
+ libxc/src/lda_c_rpa.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_c_wigner.c, libxc/src/lda_c_xalpha.c,
+ libxc/src/lda_x.c, libxc/src/lda_x_1d.c, libxc/src/lda_x_2d.c,
+ libxc/src/lda_xc_teter93.c, libxc/src/libxc_master.F90,
+ libxc/src/mgga.c, libxc/src/mgga_c_tpss.c,
+ libxc/src/mgga_x_br89.c, libxc/src/mgga_x_lta.c,
+ libxc/src/mgga_x_m06l.c, libxc/src/mgga_x_tau_hcth.c,
+ libxc/src/mgga_x_tpss.c, libxc/src/mgga_xc_vsxc.c,
+ libxc/src/mix_func.c, libxc/src/special_functions.c,
+ libxc/src/string_f.h, libxc/src/test.c, libxc/src/util.c,
+ libxc/src/util.h, libxc/src/work_gga_becke.c,
+ libxc/src/work_gga_x.c, libxc/src/work_gga_x_2d.c,
+ libxc/src/work_lda.c, libxc/src/work_lda_1d.c,
+ libxc/src/work_mgga_c.c, libxc/src/work_mgga_x.c, libxc/src/xc.h,
+ libxc/src/xc_config.h, libxc/src/xc_f.c, libxc/src/xc_s.h,
+ libxc/testsuite/Makefile.am, libxc/testsuite/xc-consistency.c,
+ libxc/testsuite/xc-get_data.c, libxc/testsuite/xc-reference.pl,
+ libxc/testsuite/xc-run_testsuite, src/functionals.F90,
+ src/parser_symbols.F90: *) Updated the code to the latest version
+ of libxc.
+
+2009-09-23 10:49 micael
+
+ * [r455] src/Makefile.am, src/atom.F90, src/functionals.F90,
+ src/hartree.F90, src/ps_generation.F90, src/scf.F90,
+ src/states.F90, src/xc.F90: *) Some more work related to the
+ implementation of OEP method.
+
+2009-08-30 16:07 fnog
+
+ * [r454] src/ps_generation.F90: ps_gen was declared as intent(in)
+ in ps_generate and should be declared as intent(inout).
+
+2009-07-23 11:58 micael
+
+ * [r453] src/atom.F90, src/run_ape.F90, src/states.F90: When
+ testing a pseudopotential it is now possible to do the following:
+ *) Solve the KS equations for the pseudopotential with different
+ occupancies for the orbitals than the ones used to generate the
+ pseudopotential.
+ *) To use different all-electron data than the one that was used
+ to generate the pseudopotential.
+
+2009-07-22 18:29 micael
+
+ * [r452] src/Makefile.am, src/atom.F90, src/eigensolver.F90,
+ src/mesh.F90, src/output.F90, src/parser_symbols.F90,
+ src/ps_atom.F90, src/ps_generation.F90, src/run_ape.F90,
+ src/scf.F90, src/states.F90: *) Now the pseudo-atom is stored in
+ the same data structure as the all-electron atom. This means the
+ ps_atom module is gone. Is content was moved to the atom module
+ and to a new module that deals only with the generation of
+ pseudopotentials.
+ *) Created an eigensolver data type.
+ *) Cleaned a bit the output to the screen.
+ *) The KB files now go to their own directory.
+
+2009-07-21 19:49 micael
+
+ * [r451] src/ps_atom.F90, src/states.F90: *) The core density is
+ now calculated when needed instead of being stored at the
+ begining of the PP generation run.
+
+2009-07-21 19:17 micael
+
+ * [r450] src/potentials.F90, src/ps_atom.F90: *) The output of the
+ screening is now done in the potentials module using the routine
+ that already exists.
+
+2009-07-21 13:20 micael
+
+ * [r449] src/ps_atom.F90: *) Bug fixed: the local component of the
+ KB projectors was not correct.
+ *) Added a couple of sanity checks.
+
+2009-07-21 13:02 micael
+
+ * [r448] src/parser_symbols.F90, src/ps_atom.F90, src/run_ape.F90,
+ src/states.F90: *) It is now possible to select which tests
+ should be performed when testing the pseudopotentials
+ *) One can now solve the Kohn-Sham equation for the
+ pseudopotentials before testing them. This SCF procedure can be
+ done with a different wave-equation than the one used to generate
+ the pseudopotentials.
+
+2009-07-21 11:49 micael
+
+ * [r447] sample/Au/Au.rtm, sample/Cd/Cd, sample/Cu/Cu.mrpp,
+ sample/Cu/Cu.tm, sample/Na/Na, sample/Si/Si, sample/Ti/Ti.mrpp,
+ sample/Ti/Ti.tm, src/Makefile.am, src/atom.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/states.F90, testsuite/01-Li.01-ae_pp.inp,
+ testsuite/03-Au.02-tm.inp, testsuite/03-Au.03-rtm.inp: *) The
+ pseudostates module is gone. It's content was moved mainly to the
+ ps_atom module.
+ *) Changed the format of the PPComponents block: it is not
+ possible anymore to specify different core radii for spin-up and
+ spin-down and the main quantum number is now required.
+ *) Now the code stops for an unknown PP file format.
+
+2009-07-17 11:50 micael
+
+ * [r446] src/kb_projectors.F90, src/potentials.F90,
+ src/ps_atom.F90, src/pseudostates.F90, src/states.F90: *) The KB
+ projectors are now handle by the kb_projectors module.
+
+2009-07-16 19:29 micael
+
+ * [r445] src/Makefile.am, src/parser_symbols.F90,
+ src/potentials.F90, src/ps_atom.F90, src/ps_io.F90,
+ src/pseudostates.F90, src/sl_potentials.F90, src/states.F90,
+ src/xc.F90, testsuite/03-Au.test: *) Changed the way how the
+ output of the pseudopotentials is done. Now ps_io includes a
+ container. This container is filled with the necessary
+ information in the relevant places in the code.
+ This means ps_io is now a low level module and is more
+ independent from the rest of the code.
+ This serves two purposes: it will make the next changes to be
+ introduced easier and it is the first step to be able to read
+ pseudopotentials generated from other codes.
+ *) Fixed several small errors in the output of the
+ pseudopotentials.
+ *) The code is more strict to what kind of pseudopotentials are
+ allowed for each PP format.
+ *) PPRelativisticMode is gone, as it is not really necessary and
+ was making the code complicated in many places.
+
+2009-07-10 15:35 micael
+
+ * [r444] testsuite/01-Li.test, testsuite/02-Cr.test: *) Updated the
+ testsuite, as the name of some files changed.
+
+2009-07-10 15:34 micael
+
+ * [r443] src/Makefile.am, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/kb_projectors.F90, src/loc_potentials.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/mtm.F90,
+ src/mtm_equations.F90, src/potentials.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/pseudostates.F90, src/quantum_numbers.F90,
+ src/sl_potentials.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ *) Separated the potentials into three types: local, semi-local
+ and KB projectors. Each one has its own new module, but the KB
+ projectors one is not yet used (the KB projectors are still
+ handled in the pseudostates module).
+ *) The quantum numbers now have there own module.
+
+2009-07-08 18:20 micael
+
+ * [r442] src/ps_io.F90: *) Removed some duplicated code.
+
+2009-07-08 17:51 micael
+
+ * [r441] src/Makefile.am, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/mrpp.F90, src/mrpp_equations.F90,
+ src/mtm.F90, src/mtm_equations.F90, src/parser_symbols.F90,
+ src/potentials.F90, src/ps_atom.F90, src/ps_io.F90,
+ src/pseudostates.F90, src/scf.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ testsuite/03-Au.test: *) Now all the l-components of the
+ pseudopotential are stored in a single potential data structure.
+
+2009-07-07 12:14 micael
+
+ * [r440] src/atom.F90, src/hamann.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/mtm.F90, src/mtm_equations.F90,
+ src/parser_symbols.F90, src/potentials.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/pseudostates.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, testsuite/01-Li.test, testsuite/02-Cr.test,
+ testsuite/03-Au.test: *) The pseudopotentials now include Vhxc in
+ the same way as the all-electron potentials.
+ *) Moved the output of the potentials to the potentials module.
+
+2009-07-06 16:16 micael
+
+ * [r439] src/Makefile.am, src/ae_potentials.F90, src/atom.F90,
+ src/potentials.F90, src/ps_potentials.F90, src/pseudostates.F90:
+ *) Merged ae_potentials and ps_potentials modules into the
+ potentials module. This is the first step to treat the Hartree
+ and XC potentials when having a pseudopotential in a similar way
+ as when having all-electron potentials.
+
+2009-07-06 08:22 micael
+
+ * [r438] src/pseudostates.F90, src/states.F90: *) Moved some
+ information about the wave-functions from the pseudostates module
+ the the states one, where they belong.
+
+2009-07-03 15:47 micael
+
+ * [r437] src/pseudostates.F90: *) Small bug fixed.
+
+2009-07-03 15:33 micael
+
+ * [r436] src/pseudostates.F90, src/scf.F90, src/states.F90: *)
+ Changed the state_eigensolve routine so that it can also be used
+ to update the wavefunctions using a given potential and energy.
+ *) Most of the work related to the calculation of the dipole
+ matrix elements is now done in the pseudostates module.
+ *) Removed some more direct accesses to the components of the
+ states data structure.
+
+2009-07-03 11:13 micael
+
+ * [r435] src/atom.F90, src/ps_atom.F90, src/ps_io.F90,
+ src/pseudostates.F90, src/scf.F90, src/states.F90,
+ src/wave_equations.F90: *) Changed the names of the routines and
+ data types in the states module to make them consistent with the
+ name of the module.
+ *) Reduced the number of places outside the states module where
+ the components of the states data type are accessed.
+
+2009-07-03 07:43 micael
+
+ * [r434] doc/ape.texi, src/atom.F90, src/states.F90: *) The
+ Orbitals block is now read in the atom module.
+ *) Simplified the format of the Orbitals block by removing the
+ possibility to specify the j quantum number. In fact, the user
+ should not be able to set the occupancies for j=l+1/2 and j=l-1/2
+ orbitals, otherwise the spherical symmetry may not be ensured.
+
+2009-07-02 13:07 micael
+
+ * [r433] src/atom.F90, src/pseudostates.F90, src/states.F90: *) The
+ states module now includes routines to nullify, initialize, and
+ copy a single orbital.
+
+2009-07-02 08:44 micael
+
+ * [r432] src/ps_atom.F90, src/pseudostates.F90: *) The output of
+ local component of the KB projectors is now done in a dedicated
+ subroutine.
+
+2009-07-02 07:43 micael
+
+ * [r431] src/ps_atom.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/states.F90: *) Implemented a new test for the
+ pseudopotentials. This test consists in comparing the dipole
+ matrix elements between pairs of pseudo-states with the
+ corresponding all-electron ones.
+
+2009-06-30 13:13 micael
+
+ * [r430] ., libstring_f, libxc, libxc/src, libxc/testsuite: *)
+ Updated the svn:ignore propertie in some directories.
+
+2009-06-30 12:53 micael
+
+ * [r429] src/ps_io.F90: *) Samll bug fixed in the output of the
+ non-linear core-corrections.
+
+2009-06-23 20:58 micael
+
+ * [r428] src/ps_io.F90: *) A spline_null was missing when writing
+ the non-linear core-corrections in some formats.
+
+2009-06-22 08:07 micael
+
+ * [r427] src/xc.F90: *) PBE identifier was also wrong for UPF
+ format.
+
+2009-06-22 08:04 micael
+
+ * [r426] src/xc.F90: *) The value of pspxc in the FHI output file
+ was not correct for PBE.
+
+2009-06-21 16:10 micael
+
+ * [r425] src/pseudostates.F90: *) Finished cleaning the xc part in
+ the pseudostates module.
+
+2009-06-18 08:36 micael
+
+ * [r424] src/mrpp.F90: *) Removed the calculation of the norm of
+ the valence wavefunction in the MRPP scheme, as it is not
+ necessary any more.
+
+2009-06-18 08:34 micael
+
+ * [r423] src/hartree.F90, src/pseudostates.F90, src/states.F90,
+ src/xc.F90: *) Some more cleaning of xc stuff.
+
+2009-06-16 18:49 micael
+
+ * [r422] src/Makefile.am, src/ae_potentials.F90, src/atom.F90,
+ src/functionals.F90, src/potentials.F90, src/ps_atom.F90,
+ src/pseudostates.F90, src/scf.F90, src/states.F90, src/xc.F90: *)
+ Some reshufle of the xc stuff in order to prepare the
+ implementaion of OEP.
+
+2009-06-15 18:38 micael
+
+ * [r421] src/ps_io.F90, src/xc.F90: *) There were some
+ inconsistencies in the definition of the partial core density.
+ Now I think it is correct.
+
+2009-06-10 16:04 micael
+
+ * [r420] doc/ape.texi, src/functionals.F90, src/parser_symbols.F90,
+ src/xc.F90, testsuite/03-Au.01-ae.inp: *) Now we always assume
+ there is an exchange functional and a correlation functional,
+ even if one of them is null.
+ *) Replaced the XRelativisticCorrection keyword by a more general
+ one named XCCorrections.
+ *) Documented the new keyword.
+ *) Changed a test so it uses the new keyword.
+
+2009-06-10 14:01 micael
+
+ * [r419] src/xc.F90: *) Bug fixed: the exchange functional was
+ ignored when the correlation functional was not set.
+
+2009-05-21 09:29 micael
+
+ * [r418] src/Makefile.am, src/mrpp.F90, src/mtm.F90,
+ src/multiroot_c.c, src/multiroot_f.F90, src/multiroots_c.c,
+ src/multiroots_f.F90, src/tm.F90: *) Expanded the multiroot
+ Fortran module to include a "solver" structure. This will be
+ useful later.
+ *) Changed "multiroots" to "multiroot" in the subroutine and
+ module names in order to be consistent.
+ *) The absolute tolerance in the residues is now the same for all
+ of them.
+ *) In the TM and MRPP schemes, now only the error in the residues
+ is taken into account to decide if the system of non-linear
+ equations has been solved.
+
+2009-05-20 18:14 micael
+
+ * [r417] src/mrpp.F90, src/mtm.F90, src/mtm_equations.F90,
+ src/multiroots_f.F90, src/tm.F90: *) Added a Fortran wrapper
+ subroutine to the gsl multiroot solver that takes care of
+ allocating and deallocating memory.
+ *) The modified TM scheeme now uses the logarithmic derivative at
+ rc as it is computed in the Hamann scheme. This saves some time
+ and makes it easier to deal with unbound states. Later I will
+ generalize this to the other TM schemes.
+
+2009-05-17 10:28 micael
+
+ * [r416] src/Makefile.am, src/mtm.F90, src/mtm_equations.F90,
+ src/parser_symbols.F90, src/ps_atom.F90, src/pseudostates.F90,
+ src/states.F90: First step in order to add a modified version of
+ the Troullier-Martins scheme to generate pseudopotentials. This
+ scheme is perfectly equivalent to the TM scheme in the
+ non-relativistic regime, but yields accurate relativistic
+ pseudopotentials without making use of the usual relativistic
+ extension. This is acomplished by avoiding the inversion of the
+ wave equation.
+
+
+2009-05-17 09:26 micael
+
+ * [r415] src/mrpp.F90, src/mrpp_equations.F90, src/states.F90: *)
+ Some cleaning of the MRPP routines.
+
+2009-05-13 14:00 micael
+
+ * [r414] src/mrpp.F90, src/mrpp_equations.F90: Two of the
+ conditions imposed on the valence pseudo-wavefunction in the
+ original MRPP scheme were formally equivalent. I thus removed one
+ of the conditions and reduced the order of the polynomial.
+
+ This slighly improves the convergence of the system of non-linear
+ equations and the results are very similar to the ones obtained
+ with the original scheme.
+
+2009-03-12 13:26 micael
+
+ * [r413] src/ps_atom.F90, src/pseudostates.F90: *) Several bug
+ fixes related to the loading and saving of the KB stuff in the
+ pstates data structure. Some missing nullifies. The logarithmic
+ derivatives at the maximum energy was not calculated.
+
+ *) src/ps_atom.F90 In ps_atom_end, the mesh was not correctly
+ terminated and the memory associated to the all-electron
+ potential was no deallocated.
+
+2009-03-12 12:51 micael
+
+ * [r412] libxc/DONE, libxc/INSTALL, libxc/TODO, libxc/configure.ac,
+ libxc/m4/fcflags.m4, libxc/src/Makefile.am,
+ libxc/src/functionals.c, libxc/src/get_funcs.pl, libxc/src/gga.c,
+ libxc/src/gga_c_lm.c, libxc/src/gga_perdew.c,
+ libxc/src/gga_x_2d_b86_mgc.c, libxc/src/gga_x_bayesian.c,
+ libxc/src/gga_x_pbe.c, libxc/src/gga_x_pw91.c,
+ libxc/src/gga_xc_1w.c, libxc/src/gga_xc_b97.c,
+ libxc/src/gga_xc_edf1.c, libxc/src/gga_xc_hcth.c,
+ libxc/src/gga_xc_xlyp.c, libxc/src/hyb_gga.c,
+ libxc/src/hyb_gga_xc_b1wc.c, libxc/src/hyb_gga_xc_b3lyp.c,
+ libxc/src/hyb_gga_xc_b3p86.c, libxc/src/hyb_gga_xc_b3pw91.c,
+ libxc/src/hyb_gga_xc_b97.c, libxc/src/hyb_gga_xc_o3lyp.c,
+ libxc/src/hyb_gga_xc_pbeh.c, libxc/src/hyb_gga_xc_x3lyp.c,
+ libxc/src/lda.c, libxc/src/lda_c_1d_csc.c,
+ libxc/src/lda_c_2d_amgb.c, libxc/src/lda_c_2d_prm.c,
+ libxc/src/lda_c_amgb.c, libxc/src/lda_c_hl.c,
+ libxc/src/lda_c_pw.c, libxc/src/lda_c_pz.c,
+ libxc/src/lda_c_rpa.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_c_wigner.c, libxc/src/lda_c_xalpha.c,
+ libxc/src/lda_xc_teter93.c, libxc/src/libxc_master.F90,
+ libxc/src/mgga.c, libxc/src/mgga_c_tpss.c,
+ libxc/src/mgga_x_lta.c, libxc/src/mgga_x_m06l.c,
+ libxc/src/mgga_x_tau_hcth.c, libxc/src/mgga_x_tpss.c,
+ libxc/src/mgga_xc_vsxc.c, libxc/src/mix_func.c,
+ libxc/src/string_f.h, libxc/src/test.c, libxc/src/util.h,
+ libxc/src/work_gga_becke.c, libxc/src/work_gga_x_2d.c,
+ libxc/src/work_lda.c, libxc/src/work_lda_1d.c,
+ libxc/src/work_mgga_c.c, libxc/src/work_mgga_x.c, libxc/src/xc.h,
+ libxc/src/xc_config.h, libxc/src/xc_f.c,
+ libxc/testsuite/gga_xc_b97.data,
+ libxc/testsuite/gga_xc_b97_1.data,
+ libxc/testsuite/gga_xc_b97_2.data,
+ libxc/testsuite/hyb_gga_xc_b3lyp.data,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c,
+ libxc/testsuite/xc-reference.pl, src/ae_potentials.F90,
+ src/atom.F90, src/functionals.F90, src/parser_symbols.F90,
+ src/potentials.F90, src/ps_atom.F90, src/ps_io.F90,
+ src/pseudostates.F90, src/scf.F90, src/states.F90, src/xc.F90: *)
+ Updated to the latest version of libxc
+ *) First step to implement the meta-GGAs in APE: now the kinetic
+ energy density
+ is calculated and passed to the libxc.
+
+2008-12-08 15:51 micael
+
+ * [r411] src/ps_io.F90: *) Some fixes in the abinit format number
+ 5. Mainly related to j-averaged pseudopotentials.
+
+2008-12-08 08:40 micael
+
+ * [r410] doc/ape.texi, src/parser_symbols.F90, src/ps_io.F90: *)
+ Implemented format 5 of ABINIT. This format supports j-dependent
+ pseudopotentials.
+
+2008-12-02 12:13 micael
+
+ * [r409] src/functionals.F90: *) Since the last sync of the libxc
+ the LB94 functional was not working. This was because LB94 does
+ not provide exc and now libxc complains about it. The workaround
+ is to use the modified version of LB94, but in the long term this
+ is not a satisfactory solution.
+
+2008-11-05 10:10 micael
+
+ * [r408] Makefile.am, build/ape.spec.in, configure.ac,
+ src/states.F90: *) Added spec file for rpm build. Note that this
+ is still not working as it seems there is some problem with the
+ instalation of the info file.
+
+2008-11-05 10:01 micael
+
+ * [r407] configure.ac, testsuite/01-Li.01-ae_pp.inp,
+ testsuite/01-Li.test, testsuite/02-Cr.01-ae.inp,
+ testsuite/02-Cr.02-mrpp.inp, testsuite/02-Cr.test,
+ testsuite/03-Au.01-ae.inp, testsuite/03-Au.02-tm.inp,
+ testsuite/03-Au.03-rtm.inp, testsuite/03-Au.test,
+ testsuite/Makefile.am, testsuite/ape-run_regression_test.pl,
+ testsuite/non_relativistic_systems,
+ testsuite/relativistic_systems,
+ testsuite/scalar_relativistic_systems: *) Updated the regression
+ test script. Now, in a similar way as to what is done in octopus,
+ instead of comparing directly two regular expressions, the script
+ takes the difference between the calculated value and the
+ reference value and checks if it is smaller than a given
+ tolerance.
+ *) The regression test script now has an option to output the
+ calculated values to a specific file. This allowed me to run the
+ testsuite over a wide range of architectures/compilers and to
+ gather all the results. Those results were then used to compute
+ the average value and the maximum deviation and to update the
+ test files.
+ *) Simplified the directory structure of the testsuite.
+
+2008-10-30 13:28 micael
+
+ * [r402] src/pseudostates.F90: *) When including semi-core states,
+ the check for ghost states was done for the semi-core states, but
+ not for the valence states.
+
+2008-10-25 14:12 micael
+
+ * [r401] doc/ape.texi: *) The link to the parsec webpage in the
+ manual was missing.
+
+2008-10-25 14:03 micael
+
+ * [r400] doc/ape.texi, src/ps_io.F90: *) Added parsec
+ pseudopotential format. This format is a small variation of
+ the siesta format that includes the pseudo wavefunctions. This
+ piece of
+ code is a contribution of Doron Naveh.
+
+2008-10-25 13:52 micael
+
+ * [r399] src/wave_equations_derivs.F90: *) Optimized the routines
+ that calculate the wave-equations derivatives.
+
+2008-10-25 13:50 micael
+
+ * [r398] src/scf.F90,
+ testsuite/non_relativistic_systems/01-Li.test,
+ testsuite/relativistic_systems/01-Au.test: *) Bug fixed: at the
+ end of the SCF cycle, the potential to be saved should be the
+ output one. This required a small update of the testesuite.
+
+2008-06-03 13:11 micael
+
+ * [r397] testsuite/non_relativistic_systems/01-Li.test,
+ testsuite/scalar_relativistic_systems/01-Cr.test: *) Updated some
+ tests that were failing after some changes in the output.
+
+2008-05-29 10:50 micael
+
+ * [r396] src/xc.F90: *) Bugfix: code was not compiling because of a
+ misspelled variable.
+ *) Backport of some corrections to the UPF format.
+
+2008-05-16 15:23 fnog
+
+ * [r395] src/ps_io.F90, src/states.F90, src/xc.F90: * Some
+ corrections to PWSCF UPF format
+
+2008-05-08 11:47 fnog
+
+ * [r393] src/ps_io.F90: * Incorrect number of projectors wase being
+ written to .UPF files
+
+2008-05-07 17:21 fnog
+
+ * [r392] src/ps_io.F90: * Linear grid parameters required by pwscf
+ are now correctly calculated.
+
+2008-05-07 16:20 micael
+
+ * [r391] libxc/src/get_funcs.pl: *) Added back the get_funcs.pl
+ script. This time, I hope, with the correct properties.
+
+2008-05-07 16:19 micael
+
+ * [r390] libxc/src/get_funcs.pl, test: *) I was not able to
+ understand how to change the svn:executable property of a file
+ already under revision control, so I'm removing the get_funcs.pl
+ script.
+
+2008-05-07 16:17 micael
+
+ * [r389] test: test2
+
+2008-05-07 16:14 micael
+
+ * [r388] libxc/src/get_funcs.pl: Test.
+
+2008-05-07 16:07 micael
+
+ * [r387] doc/ape.texi, src/mesh.F90: *) The definition of a mesh of
+ type "log2" was not printed correctly to the output. It was also
+ wrong in the manual.
+
+2008-05-07 15:50 micael
+
+ * [r386] libxc/DONE, libxc/Makefile.am, libxc/configure.ac,
+ libxc/m4/acx.m4, libxc/m4/fcflags.m4, libxc/src/Makefile.am,
+ libxc/src/functionals.c, libxc/src/get_funcs.pl, libxc/src/gga.c,
+ libxc/src/gga_c_am05.c, libxc/src/gga_c_lyp.c,
+ libxc/src/gga_c_p86.c, libxc/src/gga_c_pbe.c,
+ libxc/src/gga_c_pw91.c, libxc/src/gga_perdew.c,
+ libxc/src/gga_x_am05.c, libxc/src/gga_x_b86.c,
+ libxc/src/gga_x_b86_mgc.c, libxc/src/gga_x_b88.c,
+ libxc/src/gga_x_dk87.c, libxc/src/gga_x_ft97.c,
+ libxc/src/gga_x_g96.c, libxc/src/gga_x_lg93.c,
+ libxc/src/gga_x_mpbe.c, libxc/src/gga_x_optx.c,
+ libxc/src/gga_x_pbe.c, libxc/src/gga_x_pbea.c,
+ libxc/src/gga_x_pw86.c, libxc/src/gga_x_pw91.c,
+ libxc/src/gga_x_rpbe.c, libxc/src/gga_x_wc.c,
+ libxc/src/gga_xc_edf1.c, libxc/src/gga_xc_hcth.c,
+ libxc/src/gga_xc_lb.c, libxc/src/gga_xc_xlyp.c,
+ libxc/src/hyb_gga.c, libxc/src/hyb_gga_xc_b1wc.c,
+ libxc/src/hyb_gga_xc_b3lyp.c, libxc/src/hyb_gga_xc_b3p86.c,
+ libxc/src/hyb_gga_xc_b3pw91.c, libxc/src/hyb_gga_xc_o3lyp.c,
+ libxc/src/hyb_gga_xc_pbeh.c, libxc/src/hyb_gga_xc_x3lyp.c,
+ libxc/src/lca.c, libxc/src/lca_lch.c, libxc/src/lca_omc.c,
+ libxc/src/lda.c, libxc/src/lda_c_amgb.c, libxc/src/lda_c_hl.c,
+ libxc/src/lda_c_pw.c, libxc/src/lda_c_pz.c,
+ libxc/src/lda_c_rpa.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_c_wigner.c, libxc/src/lda_c_xalpha.c,
+ libxc/src/lda_x.c, libxc/src/lda_xc_teter93.c,
+ libxc/src/libxc.f90, libxc/src/libxc_master.F90,
+ libxc/src/mgga.c, libxc/src/mgga_c_tpss.c,
+ libxc/src/mgga_x_tpss.c, libxc/src/special_functions.c,
+ libxc/src/test.c, libxc/src/util.c, libxc/src/util.h,
+ libxc/src/work_gga_x.c, libxc/src/work_lda.c, libxc/src/xc.h,
+ libxc/src/xc_config.h, libxc/src/xc_f.c, libxc/src/xc_s.h,
+ libxc/testsuite/Makefile.am, libxc/testsuite/xc-consistency.c,
+ libxc/testsuite/xc-get_data.c, libxc/testsuite/xc-reference.pl,
+ libxc/testsuite/xc-run_testsuite, src/ae_potentials.F90,
+ src/functionals.F90, src/hartree.F90, src/potentials.F90,
+ src/xc.F90: *) Updated lixc.
+ *) Some compilers where not recognizing one function overload
+ in the xc module.
+ *) Some compilers are not able to deal properly with functions
+ that return
+ fixed size arrays...
+
+2008-05-06 15:22 fnog
+
+ * [r385] src/ps_atom.F90: * Minor *english* correction.
+
+2008-05-06 14:41 fnog
+
+ * [r384] src/ps_atom.F90, src/ps_io.F90, src/pseudostates.F90: *
+ PP_ADDINFO field in UPF format is now fully pwscf compatible.
+
+ * Vanderbilt local component is correctly generated using the
+ true nuclear charge.
+
+2008-05-05 19:14 fnog
+
+ * [r383] src/pseudostates.F90: * Added KB projector output to pp/
+ directory.
+
+2008-05-05 18:16 fnog
+
+ * [r382] src/ps_atom.F90, src/ps_io.F90, src/ps_potentials.F90,
+ src/pseudostates.F90: * Local component of the pseudopotential
+ can now be chosen to be a
+ smooth "Vanderbilt" function instead of using one of the
+ projectors
+ as the local component
+
+ * UPF output updated to include some parameters required by Pwscf
+
+2008-02-26 11:57 micael
+
+ * [r381] src/functionals.F90, src/xc.F90: *) Now also the LB94
+ total energy is properly computed.
+
+2008-02-26 10:56 micael
+
+ * [r380] src/splines.F90: *) Small change in the way the memory is
+ allocated in splines_init.
+
+2008-02-25 12:24 micael
+
+ * [r379] sample/Au/Au.ae, sample/Cd/Cd, sample/Na/Na, sample/Si/Si,
+ sample/Ti/Ti.ae, src/atom.F90: *) Updated sample files to use the
+ new XCFunctional variable.
+ *) Minor bug fix in atom.F90.
+
+2008-02-24 21:30 micael
+
+ * [r378] doc/ape.texi, libxc/COPYING, libxc/INSTALL,
+ libxc/Makefile.am, libxc/TODO, libxc/configure.ac,
+ libxc/m4/acx.m4, libxc/src/Makefile.am, libxc/src/functionals.c,
+ libxc/src/get_funcs.pl, libxc/src/gga.c, libxc/src/gga_c_lyp.c,
+ libxc/src/gga_c_p86.c, libxc/src/gga_c_pbe.c,
+ libxc/src/gga_c_pw91.c, libxc/src/gga_lb.c,
+ libxc/src/gga_perdew.c, libxc/src/gga_x.c, libxc/src/gga_x_b86.c,
+ libxc/src/gga_x_b86_mgc.c, libxc/src/gga_x_b88.c,
+ libxc/src/gga_x_dk87.c, libxc/src/gga_x_ft97.c,
+ libxc/src/gga_x_g96.c, libxc/src/gga_x_lg93.c,
+ libxc/src/gga_x_optx.c, libxc/src/gga_x_pbe.c,
+ libxc/src/gga_x_pw86.c, libxc/src/gga_x_pw91.c,
+ libxc/src/gga_x_rpbe.c, libxc/src/gga_x_wc.c,
+ libxc/src/gga_xc_edf1.c, libxc/src/gga_xc_hcth.c,
+ libxc/src/gga_xc_lb.c, libxc/src/gga_xc_xlyp.c,
+ libxc/src/hyb_gga.c, libxc/src/hyb_gga_xc_b3lyp.c,
+ libxc/src/hyb_gga_xc_b3p86.c, libxc/src/hyb_gga_xc_b3pw91.c,
+ libxc/src/hyb_gga_xc_o3lyp.c, libxc/src/hyb_gga_xc_pbeh.c,
+ libxc/src/hyb_gga_xc_x3lyp.c, libxc/src/lca.c,
+ libxc/src/lca_lch.c, libxc/src/lca_omc.c, libxc/src/lda.c,
+ libxc/src/lda_c_amgb.c, libxc/src/lda_c_hl.c,
+ libxc/src/lda_c_pw.c, libxc/src/lda_c_pz.c,
+ libxc/src/lda_c_rpa.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_c_wigner.c, libxc/src/lda_c_xalpha.c,
+ libxc/src/lda_funcs.c, libxc/src/lda_x.c,
+ libxc/src/lda_xc_teter93.c, libxc/src/libxc.f90,
+ libxc/src/mgga.c, libxc/src/mgga_c_tpss.c,
+ libxc/src/mgga_x_tpss.c, libxc/src/test.c, libxc/src/util.c,
+ libxc/src/util.h, libxc/src/work_gga_x.c, libxc/src/xc.h,
+ libxc/src/xc_f.c, libxc/testsuite/Makefile.am,
+ libxc/testsuite/gga_c_pw91.data,
+ libxc/testsuite/gga_xc_edf1.data,
+ libxc/testsuite/gga_xc_hcth_120.data,
+ libxc/testsuite/gga_xc_hcth_147.data,
+ libxc/testsuite/gga_xc_hcth_407.data,
+ libxc/testsuite/gga_xc_hcth_93.data,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c,
+ libxc/testsuite/xc-reference.pl,
+ libxc/testsuite/xc-run_testsuite, src/Makefile.am, src/atom.F90,
+ src/functionals.F90, src/libxc.F90, src/parser_symbols.F90,
+ src/ps_io.F90, src/xc.F90,
+ testsuite/relativistic_systems/01-Au.01-ae.inp: *) Updated to the
+ latest version of libxc.
+ *) Changed the way the exchange-correlation functionals are
+ handled in APE.
+ *) Replaced the XFunctional and CFunctional variables by
+ XCFunctional.
+ *) Tested LB94 functional and it is working properly.
+
+2007-11-25 22:12 micael
+
+ * [r377] testsuite/relativistic_systems/01-Au.test: *) Update a
+ couple of tests so they will pass with gfortran and no
+ optimizations.
+
+2007-11-08 16:17 micael
+
+ * [r376] src/Makefile.am, src/gsl_interface_c.c,
+ src/gsl_interface_f.F90, src/mrpp.F90, src/mrpp_equations.F90,
+ src/multiroots_c.c, src/multiroots_f.F90, src/odeint.c,
+ src/ps_atom.F90, src/tm.F90, src/tm_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ testsuite/relativistic_systems/01-Au.test: *) GSL error reporting
+ is now done using gsl_strerror.
+ *) The mrpp and tm routines now print more information to the
+ screen when solving the set of non-linear equations.
+ *) The mrpp and tm routines now use the broyden method to solve
+ the set of non-linear equations.
+
+2007-10-11 20:46 micael
+
+ * [r374] pp2pp: *) Moved pspconvert (previously known as pp2pp) to
+ it's own directory.
+
+2007-09-10 19:05 micael
+
+ * [r371] Makefile.am, configure.ac, doc/ape.texi: *) Updated the
+ manual.
+ *) Removed pp2pp from the build system.
+
+2007-09-10 15:36 micael
+
+ * [r370] src/eigensolver.F90, src/hamann.F90, src/potentials.F90,
+ src/ps_atom.F90, src/ps_io.F90, src/pseudostates.F90,
+ src/run_ape.F90, src/tm.F90, src/wave_equations.F90: *) Fixed
+ some small bugs related to non-initialized variables.
+ *) Added some missing headers.
+ *) Removed variables that were not used.
+ *) Some more changes to make gfortran happy.
+
+2007-09-07 13:23 micael
+
+ * [r369] Makefile.am, TODO, doc/Makefile.am, src/Makefile.am,
+ src/ae_potentials.F90, src/ape.F90, src/atom.F90,
+ src/eigensolver.F90, src/global.F90, src/global.h,
+ src/gsl_interface_c.c, src/gsl_interface_f.F90, src/hamann.F90,
+ src/hartree.F90, src/io.F90, src/kb.F90, src/kb_projector.F90,
+ src/liboct_parser.F90, src/linalg.F90, src/mesh.F90,
+ src/messages.F90, src/mix.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/multiroots_c.c, src/multiroots_f.F90,
+ src/odeint.c, src/output.F90, src/parser_symbols.F90,
+ src/potentials.F90, src/ps_atom.F90, src/ps_io.F90,
+ src/ps_potentials.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/scf.F90, src/splines.F90, src/states.F90, src/tm.F90,
+ src/tm_equations.F90, src/units.F90, src/utilities_c.c,
+ src/utilities_f.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90, testsuite/Makefile.am,
+ testsuite/non_relativistic_systems/Makefile.am,
+ testsuite/relativistic_systems/01-Au.test,
+ testsuite/relativistic_systems/Makefile.am,
+ testsuite/scalar_relativistic_systems/Makefile.am: *) Updated the
+ logarithmic derivatives test to output more information to the
+ screen and added headers to the output files.
+ *) Removed duplicated code in the MRPP and TM modules.
+ *) Added comments and headers to all the fortran routines.
+ *) Updated test for ghost states. It is now more verbose and
+ takes into
+ account more cases (like unbound states)
+ *) UPF info header now includes more information
+ *) Simplified the KB code and removed the kb and kb_projectors
+ modules.
+ *) Lots of small improvements in the code.
+
+2007-08-31 16:00 micael
+
+ * [r368] doc/ape.texi: *) I update a bit the manual.
+
+2007-08-07 22:24 micael
+
+ * [r367] testsuite/relativistic_systems/01-Au.01-ae.inp,
+ testsuite/relativistic_systems/01-Au.02-tm.inp,
+ testsuite/relativistic_systems/01-Au.03-rtm.inp,
+ testsuite/relativistic_systems/01-Au.test,
+ testsuite/scalar_relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/scalar_relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/scalar_relativistic_systems/01-Cr.test: *) Update tests
+ so they run in a lot of different environments.
+ I had to disable the MRPP test because its convergence is too
+ much
+ sensitive to very small changes in the all-electron calculations.
+
+2007-08-07 20:23 micael
+
+ * [r366] configure.ac, testsuite/Makefile.am,
+ testsuite/non_relativistic_systems/01-Li.01-ae_pp.inp,
+ testsuite/non_relativistic_systems/01-Li.test,
+ testsuite/relativistic_systems/01-Au.01-ae.inp,
+ testsuite/relativistic_systems/01-Au.02-tm.inp,
+ testsuite/relativistic_systems/01-Au.03-rtm.inp,
+ testsuite/relativistic_systems/01-Au.test,
+ testsuite/relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/relativistic_systems/01-Cr.test,
+ testsuite/relativistic_systems/02-Au.01-ae.inp,
+ testsuite/relativistic_systems/02-Au.02-tm.inp,
+ testsuite/relativistic_systems/02-Au.03-rtm.inp,
+ testsuite/relativistic_systems/02-Au.test,
+ testsuite/relativistic_systems/Makefile.am,
+ testsuite/scalar_relativistic_systems,
+ testsuite/scalar_relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/scalar_relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/scalar_relativistic_systems/01-Cr.test,
+ testsuite/scalar_relativistic_systems/Makefile.am: *) Changed the
+ Li test so it runs with gfortran.
+ *) Created a new directory in the testsuite containing tests
+ using the scalar relativistic equation.
+ *) Moved the Cr test to the scalar relativistic directory. The
+ input
+ files and the test file still need to be updated.
+
+2007-08-07 17:29 micael
+
+ * [r365] Makefile.am, configure.ac, liboct_parser/Makefile.am,
+ libstring_f/Makefile.am, src/Makefile.am, testsuite/Makefile.am,
+ testsuite/ape-run_regression_test.pl,
+ testsuite/ape-run_testsuite, testsuite/ape-run_testsuite.in,
+ testsuite/non_relativistic_systems/01-Li.test,
+ testsuite/relativistic_systems/01-Cr.test,
+ testsuite/relativistic_systems/02-Au.test: *) Some more work on
+ the build system. Now GNU Make VPATH feature
+ should be working. The only problem is the pp2pp directory,
+ as the conditional compilation of a tree is not simple to deal
+ with.
+ *) Update testsuite scripts.
+
+2007-08-07 15:42 micael
+
+ * [r364] Makefile.am, configure.ac, libstring_f/INSTALL,
+ libxc/INSTALL, m4/acx.m4, share, src/Makefile.am,
+ src/gsl_interface_c.c, src/multiroots_c.c, src/odeint.c,
+ src/utilities_c.c,
+ testsuite/non_relativistic_systems/Makefile.am,
+ testsuite/relativistic_systems/Makefile.am: *) Some maintenance
+ of the build system.
+
+2007-08-07 13:23 micael
+
+ * [r363] libxc/Makefile.am, libxc/configure.ac,
+ libxc/src/Makefile.am, libxc/src/libxc.f90,
+ libxc/src/mgga_c_tpss.c, libxc/src/mgga_x_tpss.c,
+ libxc/src/util.h, libxc/src/xc.h, libxc/src/xc_f.c,
+ libxc/testsuite/Makefile.am, libxc/testsuite/xc-get_data.c,
+ libxc/testsuite/xc-reference.pl,
+ libxc/testsuite/xc-run_testsuite: *) Updating libxc to matche the
+ libxc in Octopus.
+
+2007-08-06 17:29 micael
+
+ * [r362] src/mrpp.F90, src/mrpp_equations.F90, src/tm.F90,
+ src/tm_equations.F90: *) Fixed a couple of bugs in the RTM
+ scheme.
+ Now the eigenvalues of the pseudo-potentials match almost
+ perfectly the
+ all-electron ones, but more tests may be needed.
+
+2007-06-05 18:33 jrfsousa
+
+ * [r361] pp2pp/MANIFEST.in: Adding missing file
+
+2007-06-05 18:01 jrfsousa
+
+ * [r360] pp2pp/Makefile.am, pp2pp/configure.ac, pp2pp/setup.py.in:
+ Updating autotools scripts
+
+2007-06-05 10:07 micael
+
+ * [r359] pp2pp/doc/pp2pp.pdf, pp2pp/doc/pp2pp.tex: *) Some small
+ changes to the documentation.
+ *) Included pdf file.
+
+2007-06-05 09:59 jrfsousa
+
+ * [r358] pp2pp/doc, pp2pp/doc/F3-M3.bb, pp2pp/doc/F3-M3.png,
+ pp2pp/doc/fdl.tex, pp2pp/doc/pp2pp.tex,
+ pp2pp/ppformats/cpi/cpi.py: pp2pp documentation included
+
+2007-05-11 17:30 micael
+
+ * [r356] TODO, configure.ac, libxc/src/util.h,
+ src/ae_potentials.F90: *) Reduced the density treshold in libxc.
+ *) Minor changes to prepare release 0.7.3
+
+2007-05-08 17:56 jrfsousa
+
+ * [r355] pp2pp/pp2pp.py: added -f and -g options to pp2pp minor bug
+ fixes
+
+2007-05-07 18:33 jrfsousa
+
+ * [r354] pp2pp/ppdata/__init__.py, pp2pp/ppdata/data.py: Adding
+ some forgoten files
+
+2007-05-07 18:24 jrfsousa
+
+ * [r353] pp2pp/pp2pp.py, pp2pp/ppformats/__init__.py,
+ pp2pp/ppformats/cpi/cpi.py, pp2pp/ppformats/fhi/fhi.py,
+ pp2pp/ppformats/hgh/hgh.py, pp2pp/ppformats/ncpp/ncpp.py,
+ pp2pp/ppformats/psf/psf.py, pp2pp/ppformats/upf/upf.py,
+ pp2pp/ppformats/vdb/vdb.py, pp2pp/ppformats/xpp/__init__.py,
+ pp2pp/ppformats/xpp/xpp.py, pp2pp/pt.py, pp2pp/setup.py.in: pp2pp
+ interface clean up and numerous small fixes
+
+2007-04-26 14:52 jrfsousa
+
+ * [r352] pp2pp/pp2pp.py, pp2pp/ppdata/data.py: correcting a few
+ mistakes in pp2pp
+
+2007-04-24 18:20 jrfsousa
+
+ * [r351] pp2pp/ppdata/__init__.py, pp2pp/ppdata/config.data,
+ pp2pp/ppdata/data.py, pp2pp/ppformats/__init__.py,
+ pp2pp/ppformats/cpi/__init__.py, pp2pp/ppformats/cpi/cpi.py,
+ pp2pp/ppformats/fhi/__init__.py, pp2pp/ppformats/fhi/fhi.py,
+ pp2pp/ppformats/hgh/__init__.py, pp2pp/ppformats/hgh/hgh.py,
+ pp2pp/ppformats/ncpp/__init__.py, pp2pp/ppformats/ncpp/ncpp.py,
+ pp2pp/ppformats/psf/__init__.py, pp2pp/ppformats/psf/psf.py,
+ pp2pp/ppformats/upf/__init__.py, pp2pp/ppformats/upf/upf.py,
+ pp2pp/ppformats/vdb/__init__.py, pp2pp/ppformats/vdb/vdb.py,
+ pp2pp/ppformats/xpp/__init__.py, pp2pp/ppformats/xpp/xpp.py:
+ pp2pp global code tidy.
+
+2007-04-24 17:51 jrfsousa
+
+ * [r350] pp2pp/Makefile.am, pp2pp/configure.ac, pp2pp/m4,
+ pp2pp/m4/az_python.m4, pp2pp/setup.py.in: Updated pp2pp build
+ system.
+
+2007-04-24 17:48 jrfsousa
+
+ * [r349] pp2pp/pp2pp.in.in: replaced pp2pp.in.in with pp2pp.py
+
+2007-04-24 17:47 jrfsousa
+
+ * [r348] pp2pp/pp2pp.py: replaced pp2pp.in.in with pp2pp.py
+
+2007-04-24 11:28 jrfsousa
+
+ * [r347] Makefile.am, configure.ac: pp2pp included in the
+ Makefile.am and configure.ac files
+
+2007-03-21 17:16 micael
+
+ * [r346] src/pseudostates.F90: *) Bug fixed: oct_parse_isdef
+ returns an integer, not a logical.
+
+2007-03-20 16:46 micael
+
+ * [r345] doc/ape.texi, sample/Cu/Cu.mrpp, sample/Ti/Ti.mrpp,
+ src/pseudostates.F90, src/states.F90,
+ testsuite/relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/relativistic_systems/01-Cr.test: *) Changed the input
+ format for the pseudopotential components. The semi-core
+ states are now to be specified in a separate block.
+ *) It is now possible to include semi-core states when using the
+ normal
+ Troullier-Martins scheme, even if in that case the valence will
+ not be
+ included explicitly. The valence pseudo wave-functions are still
+ determined using the TM scheme, but the pseudo-potentials will be
+ the ones
+ determined from the semi-core states.
+ *) Updated the tests, samples and documentation.
+
+2007-02-06 18:12 micael
+
+ * [r344] sample/Au, sample/Au/Au.ae, sample/Au/Au.rtm: *) Added
+ some sample files for Gold.
+
+2007-02-06 18:10 micael
+
+ * [r343] src/ps_io.F90: *) Bug fixed: siesta format was not working
+ for l=0 with j-averaged pp.
+
+2007-02-05 18:25 micael
+
+ * [r342] src/ps_io.F90: *) Siesta format now also accepts
+ j-dependent pseudopotentials.
+
+2007-01-26 11:34 micael
+
+ * [r341] sample/Cd/Cd, sample/Cu/Cu.ae, sample/Cu/Cu.mrpp,
+ sample/Cu/Cu.tm, sample/Na/Na, sample/Si/Si, sample/Ti/Ti.ae,
+ sample/Ti/Ti.mrpp, sample/Ti/Ti.tm: *) Cleaned and update the
+ sample input files.
+
+2007-01-24 12:16 micael
+
+ * [r340] src/pseudostates.F90, src/wave_equations_integrator.F90,
+ testsuite/relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/relativistic_systems/01-Cr.test: *) The local part of
+ the j-dependent KB projectors is now the j-averaged
+ potential.
+ *) Changed the integration routine so that the relativistic
+ wave-functions
+ at infinity are always positive. This required updating some
+ tests.
+
+2007-01-05 17:28 micael
+
+ * [r339] src/ps_io.F90: *) Added a new tag to the UPF format so it
+ can be used to output j-dependend pseudopotentials.
+
+2007-01-05 17:07 micael
+
+ * [r338] src/ps_atom.F90: *) The code now outputs the
+ pseudopotentials screening.
+
+2007-01-05 17:05 micael
+
+ * [r337] src/mrpp.F90: *) Small bug fix in the relativistic
+ extension to the MRPP scheme.
+
+2006-11-28 19:21 micael
+
+ * [r336] Makefile.am: *) pp2pp directory needs to be included in
+ the main Makefile.am file.
+
+2006-11-28 19:11 micael
+
+ * [r335] pp2pp/Makefile.am, pp2pp/Makefile.in: *) Bug fixed: I
+ mixed this two files...
+
+2006-11-28 18:34 micael
+
+ * [r334] pp2pp/pp2pp.in.in, pp2pp/setup.py.in: *) Some more missing
+ files.
+
+2006-11-28 18:32 micael
+
+ * [r333] configure.ac: *) Forgot to commit this file.
+
+2006-11-28 18:27 micael
+
+ * [r332] pp2pp, pp2pp/AUTHORS, pp2pp/ChangeLog, pp2pp/Makefile.in,
+ pp2pp/NEWS, pp2pp/README, pp2pp/configure.ac, pp2pp/ppdata,
+ pp2pp/ppdata/__init__.py, pp2pp/ppdata/atomic.data,
+ pp2pp/ppdata/data.py, pp2pp/ppformats,
+ pp2pp/ppformats/__init__.py, pp2pp/ppformats/cpi,
+ pp2pp/ppformats/cpi/__init__.py, pp2pp/ppformats/cpi/cpi.py,
+ pp2pp/ppformats/fhi, pp2pp/ppformats/fhi/__init__.py,
+ pp2pp/ppformats/fhi/fhi.py, pp2pp/ppformats/hgh,
+ pp2pp/ppformats/hgh/__init__.py, pp2pp/ppformats/hgh/hgh.py,
+ pp2pp/ppformats/ncpp, pp2pp/ppformats/ncpp/__init__.py,
+ pp2pp/ppformats/ncpp/ncpp.py, pp2pp/ppformats/psf,
+ pp2pp/ppformats/psf/__init__.py, pp2pp/ppformats/psf/psf.py,
+ pp2pp/ppformats/upf, pp2pp/ppformats/upf/__init__.py,
+ pp2pp/ppformats/upf/upf.py, pp2pp/ppformats/vdb,
+ pp2pp/ppformats/vdb/__init__.py, pp2pp/ppformats/vdb/vdb.py,
+ pp2pp/ppformats/xpp, pp2pp/ppformats/xpp/__init__.py,
+ pp2pp/ppformats/xpp/xpp.py, pp2pp/pptools,
+ pp2pp/pptools/__init__.py, pp2pp/pptools/gfit.py,
+ pp2pp/pptools/io.py, pp2pp/pptools/parametric.py,
+ pp2pp/pptools/ppdiff.py, pp2pp/pptools/slatec,
+ pp2pp/pptools/slatec/__init__.py, pp2pp/pptools/slatec/double.py,
+ pp2pp/pptools/slatec/single.py, pp2pp/pptools/spline.py: *) Added
+ the pp2pp pseudopotential conversor to the APE tree.
+ This is still under development.
+
+2006-11-28 12:00 micael
+
+ * [r331] src/pseudostates.F90: *) Bug fixed: in routine
+ pseudostates_load the pseudopotentials were being saved instead
+ of being loaded.
+
+2006-11-28 11:56 micael
+
+ * [r330] testsuite/relativistic_systems/02-Au.test: *) More
+ fine-tuning of the tests.
+
+2006-11-28 11:20 micael
+
+ * [r329] testsuite/non_relativistic_systems/Makefile.am,
+ testsuite/relativistic_systems/Makefile.am: *) The testsuite
+ input files were not instaled.
+
+2006-11-27 18:00 micael
+
+ * [r328] src/mrpp_equations.F90, src/wave_equations.F90,
+ testsuite/relativistic_systems/02-Au.test: *) The logarithmic
+ devirative of the Dirac wavefunctions is now properly computed.
+ This does not change the all-electron results, but it makes the
+ MRPP solver is more stable.
+
+2006-11-25 18:47 micael
+
+ * [r327] src/multiroots_c.c, src/states.F90,
+ testsuite/relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/relativistic_systems/01-Cr.test,
+ testsuite/relativistic_systems/02-Au.test: *) Updated the tests
+ so they are passed without problems with different compilers.
+ *) Some minor bug fixes.
+
+2006-11-24 18:08 micael
+
+ * [r326] src/mix.F90, src/pseudostates.F90,
+ testsuite/non_relativistic_systems/01-Li.01-ae_pp.inp,
+ testsuite/relativistic_systems/01-Cr.02-mrpp.inp,
+ testsuite/relativistic_systems/01-Cr.02-pp.inp,
+ testsuite/relativistic_systems/01-Cr.test,
+ testsuite/relativistic_systems/02-Au.01-ae.inp,
+ testsuite/relativistic_systems/02-Au.02-tm.inp,
+ testsuite/relativistic_systems/02-Au.03-rtm.inp,
+ testsuite/relativistic_systems/02-Au.test: *) A small bug fix in
+ the pseudopotentials output.
+ *) Changed the default value for the mixing paramenter
+ *) Added new tests for the multireference pseudopotentials and
+ the relativistic extension of the TM scheme.
+
+2006-11-24 11:10 micael
+
+ * [r325] src/ps_io.F90: *) Bug fixes in the UPF output when one has
+ relativistic pseudopotentials.
+
+2006-11-11 18:20 micael
+
+ * [r324] src/kb_projector.F90, src/ps_io.F90, src/states.F90: *) KB
+ projectors are now always build with spin-unpolarized pseudo
+ wave-functions.
+ *) Extended the UPF format so to pass as an add-on the
+ spin-polarized pseudo wave-functions. These wave-functions
+ could be useful in some cases (like to build a guess density).
+
+2006-11-07 16:28 micael
+
+ * [r323] src/kb.F90, src/kb_projector.F90, src/ps_io.F90,
+ src/pseudostates.F90, src/wave_equations.F90: *) Some bug fixes
+ in the UPF format.
+ *) The averaging of the j-dependent pseudo-potentials was not
+ consistent when
+ computing the KB projectors.
+
+2006-11-02 18:05 micael
+
+ * [r322] src/kb.F90, src/kb_projector.F90, src/messages.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/pseudostates.F90, src/scf.F90,
+ src/splines.F90, src/states.F90: *) Some changes were required in
+ order to compile the code with gfortran.
+
+2006-11-02 17:31 micael
+
+ * [r321] libxc/testsuite/gga_x_ft97_b.data,
+ testsuite/non_relativistic_systems/01-Li.test,
+ testsuite/relativistic_systems/01-Cr.test: *) Fixed the
+ testsuite. Now all tests are passed in several different
+ configurations.
+ *) Forgot one file from the libxc.
+
+2006-10-26 15:11 micael
+
+ * [r320] src/eigensolver.F90, src/states.F90: *) Bug fixed in the
+ KB construction.
+ *) Some changes in the eigensolver where required, as the code
+ was not able to properly identify some unbound states.
+
+2006-10-26 13:06 micael
+
+ * [r319] src/libxc.F90, src/parser_symbols.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/xc.F90: *) Changing label PWSCF to UPF.
+ *) Finished syncing the libxc.
+
+2006-10-26 11:07 micael
+
+ * [r318] libxc/src/gga.c, libxc/src/gga_c_p86.c,
+ libxc/src/gga_c_pbe.c, libxc/src/gga_lb.c, libxc/src/gga_x.c,
+ libxc/src/lca.c, libxc/src/lda.c, libxc/src/lda_c_amgb.c,
+ libxc/src/lda_c_pw.c, libxc/src/lda_funcs.c, libxc/src/lda_x.c,
+ libxc/src/mgga_c_tpss.c, libxc/src/mgga_x_tpss.c,
+ libxc/src/util.h, libxc/src/xc.h, libxc/src/xc_f.c,
+ libxc/testsuite/gga_c_pbe.data,
+ libxc/testsuite/gga_c_pbe.data-disabled,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c:
+ *) Updated the libxc. This seems to fix the problems with the
+ GGA's.
+
+2006-10-26 10:59 micael
+
+ * [r317] src/kb_projector.F90, src/ps_io.F90: *) More work done on
+ the UPF format.
+
+2006-10-26 10:58 micael
+
+ * [r316] src/states.F90: *) Bug fixed: added workaround for the
+ case where the KB energy should be zero.
+
+2006-10-19 13:04 micael
+
+ * [r315] src/xc.F90: *) Several bug fixes. GGA exchange functionals
+ seem to work, but there are still some problems with the
+ correlation part.
+
+2006-10-16 16:33 micael
+
+ * [r314] m4/ax_f90_module_flag.m4, src/atom.F90, src/xc.F90: *) A
+ file was missing.
+ *) Some uninitalized variables where causing problems.
+
+2006-10-16 14:50 micael
+
+ * [r313] Makefile.am, acinclude.m4, build/acx.m4, configure.ac,
+ libstring_f, libstring_f/AUTHORS, libstring_f/COPYING,
+ libstring_f/ChangeLog, libstring_f/INSTALL,
+ libstring_f/Makefile.am, libstring_f/NEWS, libstring_f/README,
+ libstring_f/configure.ac, libstring_f/string_f.c,
+ libstring_f/string_f.h, libxc/AUTHORS, libxc/COPYING,
+ libxc/ChangeLog, libxc/INSTALL, libxc/Makefile.am, libxc/NEWS,
+ libxc/README, libxc/configure.ac, libxc/gga.c, libxc/gga_lb.c,
+ libxc/gga_pbe.c, libxc/lca.c, libxc/lca_lch.c, libxc/lca_omc.c,
+ libxc/lda.c, libxc/lda_c_amgb.c, libxc/lda_c_pw.c,
+ libxc/lda_c_pz.c, libxc/lda_c_vwn.c, libxc/lda_funcs.c,
+ libxc/lda_x.c, libxc/m4, libxc/m4/acx.m4, libxc/mgga.c,
+ libxc/mgga_c_tpss.c, libxc/mgga_x_tpss.c, libxc/src,
+ libxc/src/Makefile.am, libxc/src/functionals.c, libxc/src/gga.c,
+ libxc/src/gga_c_lyp.c, libxc/src/gga_c_p86.c,
+ libxc/src/gga_c_pbe.c, libxc/src/gga_lb.c, libxc/src/gga_x.c,
+ libxc/src/lca.c, libxc/src/lca_lch.c, libxc/src/lca_omc.c,
+ libxc/src/lda.c, libxc/src/lda_c_amgb.c, libxc/src/lda_c_pw.c,
+ libxc/src/lda_c_pz.c, libxc/src/lda_c_vwn.c,
+ libxc/src/lda_funcs.c, libxc/src/lda_x.c, libxc/src/mgga.c,
+ libxc/src/mgga_c_tpss.c, libxc/src/mgga_x_tpss.c,
+ libxc/src/test.c, libxc/src/util.c, libxc/src/util.h,
+ libxc/src/xc.h, libxc/src/xc_f.c, libxc/test.c, libxc/testsuite,
+ libxc/testsuite/Makefile.am, libxc/testsuite/gga_c_lyp.data,
+ libxc/testsuite/gga_c_p86.data,
+ libxc/testsuite/gga_c_pbe.data-disabled,
+ libxc/testsuite/gga_x_b88.data, libxc/testsuite/gga_x_pbe.data,
+ libxc/testsuite/gga_x_pw91.data, libxc/testsuite/lda_c_pw.data,
+ libxc/testsuite/lda_c_pz.data, libxc/testsuite/lda_c_vwn.data,
+ libxc/testsuite/lda_c_vwn_rpa.data, libxc/testsuite/lda_x.data,
+ libxc/testsuite/xc-consistency.c, libxc/testsuite/xc-get_data.c,
+ libxc/testsuite/xc-reference.pl,
+ libxc/testsuite/xc-run_testsuite, libxc/util.c, libxc/util.h,
+ libxc/xc.h, libxc/xc_f.c, m4, m4/acx.m4, src/Makefile.am,
+ src/libxc.F90, src/parser_symbols.F90, src/xc.F90: *) Implemented
+ new version of libxc. The LDA seems to work, but there are still
+ problems with the GGA.
+
+2006-10-15 14:44 micael
+
+ * [r312] src/kb.F90, src/parser_symbols.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/wave_equations_integrator.F90: *) KB mode is now an input
+ option of the PP mode.
+ *) Started implementing PWSCF format.
+ *) Corrected a couple of bugs related to the averaging of the
+ fully relativistic pseudopotentials.
+
+2006-08-23 15:24 micael
+
+ * [r311] ., doc, liboct_parser, libxc, share, share/HGH, src,
+ testsuite, testsuite/non_relativistic_systems,
+ testsuite/non_relativistic_systems/01-Li.01-ae_pp.inp,
+ testsuite/relativistic_systems,
+ testsuite/relativistic_systems/01-Cr.01-ae.inp,
+ testsuite/relativistic_systems/01-Cr.02-pp.inp: *) Forgot to
+ commit the testsuite input files.
+ *) Updated the svn:ignore proprety.
+
+2006-08-22 11:00 micael
+
+ * [r310] configure.ac, src/Makefile.am, src/ae_potentials.F90,
+ src/ape.F90, src/atom.F90, src/eigensolver.F90, src/global.F90,
+ src/gsl_interface_f.F90, src/hamann.F90, src/hartree.F90,
+ src/io.F90, src/kb.F90, src/kb_potentials.F90,
+ src/kb_projector.F90, src/liboct_parser.F90, src/linalg.F90,
+ src/mesh.F90, src/messages.F90, src/mix.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/multiroots_f.F90, src/output.F90,
+ src/parser_symbols.F90, src/potentials.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/ps_potentials.F90, src/pseudostates.F90,
+ src/run_ape.F90, src/scf.F90, src/splines.F90, src/states.F90,
+ src/tm.F90, src/tm_equations.F90, src/types.F90, src/units.F90,
+ src/utilities_f.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90, testsuite/ape-run_regression_test.pl,
+ testsuite/ape-run_testsuite,
+ testsuite/non_relativistic_systems/01-Li.test,
+ testsuite/non_relativistic_systems/Li.test,
+ testsuite/relativistic_systems/01-Cr.test,
+ testsuite/relativistic_systems/Cr.test: *) Finished removing the
+ debug mode at compile time. It is now a "verbose level".
+ *) Fixed a bug in the hamann module.
+ *) Averaging of the relativistic pseudopotentials was not done
+ properly.
+ *) Spin "dimension" is now taken into account in the pseudostates
+ structure. This was important
+ in order to simplify the generation of the Kleinman and Bylander
+ projectors.
+ *) Updated testsuite scripts and tests.
+
+
+2006-06-06 09:57 micael
+
+ * [r309] src/ps_io.F90: FHI and Abinit output formats now accpets
+ averaged full relativistic pseudopotentials.
+
+2006-05-31 17:28 micael
+
+ * [r308] src/mrpp.F90: Bug fixed: MRPP schem knew nothing about the
+ scalar-relativistic equation.
+
+2006-05-31 14:33 micael
+
+ * [r306] configure.ac, doc/ape.texi, testsuite/Makefile.am,
+ testsuite/ape-run_regression_test.pl.pod,
+ testsuite/non_relativistic_systems/Makefile.am,
+ testsuite/relativistic_systems/Makefile.am: Release of version
+ 0.7.2
+
+2006-05-30 10:44 micael
+
+ * [r305] src/mrpp.F90, src/mrpp_equations.F90: It seems the valence
+ wavefunction at the cut-off radius for the MRPP scheme does not
+ need to be positive. In fact, the way this was handled in the
+ code was wrong.
+
+2006-05-29 11:45 micael
+
+ * [r304] src/potentials.F90: Bug fixed.
+
+2006-05-29 11:15 micael
+
+ * [r303] configure.ac, src/Makefile.am, src/ape.F90, src/global.h,
+ src/messages.F90, src/utilities_c.c, src/utilities_f.F90:
+ Cleaning of the debug mode.
+
+2006-05-24 10:00 micael
+
+ * [r298] doc/ape.texi: Fixed
+ http://www.tddft.org/trac/APE/ticket/1.
+
+2006-05-24 09:19 micael
+
+ * [r297] NEWS: Testing svn.
+
+2006-05-24 09:12 micael
+
+ * [r296] NEWS: Updated news. (this is an excuse to test the new svn
+ repository and notification system)
+
+2006-03-21 11:57 micael
+
+ * [r295] libxc/Makefile.am, libxc/gga_lb.c, libxc/lda.c,
+ libxc/lda_c_amgb.c, libxc/lda_c_vwn.c, libxc/lda_x.c,
+ libxc/test.c, libxc/xc.h, libxc/xc_f.c: *) Syncing the libxc in
+ APE with the one in Octopus.
+
+2006-03-20 12:28 micael
+
+ * [r294] libxc/gga_lb.c, libxc/gga_pbe.c, libxc/lda.c,
+ libxc/lda_funcs.c, libxc/lda_x.c, libxc/mgga_x_tpss.c,
+ libxc/util.h, libxc/xc.h, libxc/xc_f.c, src/libxc.F90,
+ src/xc.F90: *) Added relativisitic corrections to the LDA
+ exchange.
+
+2006-02-21 18:07 micael
+
+ * [r293] src/mrpp.F90, src/mrpp_equations.F90, src/states.F90: *)
+ MRPP scheme now also works with the scalar-relativistic equation.
+
+2006-02-21 16:07 micael
+
+ * [r292] src/mrpp.F90, src/mrpp_equations.F90,
+ src/pseudostates.F90, src/states.F90, src/tm_equations.F90: *)
+ Implemented relativistic extension to the MRPP scheme.
+
+2006-02-21 11:28 micael
+
+ * [r291] src/multiroots_c.c: *) This line should remain commented.
+
+2006-02-21 11:22 micael
+
+ * [r290] doc/ape.texi, src/mrpp.F90, src/mrpp_equations.F90,
+ src/multiroots_c.c, src/tm.F90, src/tm_equations.F90: *) MRPP are
+ working!
+
+2006-02-16 17:31 micael
+
+ * [r289] src/mrpp.F90, src/states.F90, src/tm.F90: *) Fixed a
+ couple of bugs.
+
+2006-02-16 16:40 micael
+
+ * [r288] src/tm.F90, src/tm_equations.F90: *) Bug fixed:
+ relativistic extension to the TM scheme is now working.
+
+2006-02-14 11:18 micael
+
+ * [r286] configure.ac, doc/ape.texi: *) Taging version 0.7.1
+
+2006-02-14 11:17 micael
+
+ * [r285] src/ps_io.F90: *) Bug fixed.
+
+2006-02-14 10:55 micael
+
+ * [r284] Makefile.am: *) Added some sample files to the
+ distribution.
+
+2006-01-30 16:03 micael
+
+ * [r283] doc/ape.texi, src/pseudostates.F90, src/states.F90,
+ src/tm.F90: *) Bug fixed: levels of relativistic pseudostates
+ were not ordered properly.
+ *) Added some information about the default core-radii in the
+ manual.
+ *) APE now outputs information about the spin during the
+ pseudopotentials
+ generation.
+
+2006-01-18 14:32 micael
+
+ * [r282] doc/ape.texi, src/parser_symbols.F90,
+ src/wave_equations_integrator.F90: *) Added parser symbols for
+ the stepping function.
+
+2006-01-18 14:05 micael
+
+ * [r281] src/kb.F90, src/ps_atom.F90, src/pseudostates.F90: *) Just
+ some cosmetic changes.
+
+2006-01-18 13:53 micael
+
+ * [r280] doc/ape.texi: *) Updated the manual.
+
+2006-01-18 11:14 micael
+
+ * [r279] sample/Na/Na: *) Updated Na sample file to include the
+ pseudopotentials log. derivatives test.
+
+2006-01-18 11:13 micael
+
+ * [r278] src/atom.F90: *) Atom input information should now on only
+ be writen when subroutine atom_init
+ is called.
+
+2006-01-17 14:53 micael
+
+ * [r277] src/output.F90: *) A couple of bugs fixed.
+
+2006-01-13 14:47 micael
+
+ * [r276] src/hamann.F90, src/ps_atom.F90, src/pseudostates.F90,
+ src/states.F90, src/tm.F90, src/xc.F90: *) Updated
+ pseudopotential information output.
+
+2006-01-13 12:53 micael
+
+ * [r275] src/atom.F90, src/scf.F90: *) The file "ae/info" now
+ includes information about the SCF cycle.
+
+2006-01-13 09:25 micael
+
+ * [r274] src/output.F90: *) Forgot to add this file.
+
+2006-01-12 17:02 micael
+
+ * [r273] src/Makefile.am, src/atom.F90, src/ps_atom.F90,
+ src/pseudostates.F90, src/run_ape.F90, src/types.F90, src/xc.F90:
+ *) Changed the way the output to the "info" files is done.
+ *) Cleaned the core correction routines.
+
+2006-01-12 15:36 fnog
+
+ * [r272] src/ps_io.F90, src/types.F90, src/xc.F90: Core corrections
+ problem solved, ps_io was outputting the wrong core density.
+
+ Bug remaining: code complains about missing 'pp' directory when
+ writing the
+ 'cc' file (unless 'pp' already exists...)
+
+2006-01-11 17:15 fnog
+
+ * [r271] src/xc.F90: 3rd derivative of core charge was wrong.
+ New file created in 'pp' directory: 'cc' contains info about core
+ corrections.
+
+2006-01-11 15:13 fnog
+
+ * [r270] src/xc.F90: A 4*Pi factor was missing in the FHI core
+ correction scheme.
+
+2006-01-11 01:55 fnog
+
+ * [r269] src/pseudostates.F90, src/xc.F90: Minor bug corrections.
+
+2006-01-11 01:42 fnog
+
+ * [r268] src/pseudostates.F90, src/types.F90, src/xc.F90: FHI-type
+ core corrections are now available.
+
+2006-01-10 14:21 micael
+
+ * [r267] src/states.F90: *) APE now checks that there is not more
+ than one orbital with a given set
+ of quantum numbers.
+
+2006-01-10 11:04 micael
+
+ * [r264] TODO: *) Updating TODO list.
+
+2006-01-10 11:03 micael
+
+ * [r263] src/parser_symbols.F90: *) Adding symbols for the
+ PPOutputFileFormat variable.
+
+2006-01-10 11:02 micael
+
+ * [r262] doc/ape.texi: *) Updating manual.
+
+2006-01-09 17:44 micael
+
+ * [r261] configure.ac, doc/ape.texi: *) preparing to tag version
+ 0.7
+
+2006-01-09 17:37 micael
+
+ * [r260] src/atom.F90, src/mesh.F90, src/pseudostates.F90,
+ src/scf.F90, src/states.F90, src/units.F90: *) Changed the way
+ the input and output units are defined to make them
+ consistent with Octopus.
+
+2006-01-09 14:10 micael
+
+ * [r259] src/ps_atom.F90, src/ps_potentials.F90,
+ src/pseudostates.F90: *) Logarithmic derivatives test seems to be
+ working.
+ *) Log. derivatives test variables are now read from the input
+ file.
+
+2006-01-06 18:08 micael
+
+ * [r258] src/ae_potentials.F90, src/hamann.F90, src/potentials.F90,
+ src/ps_atom.F90, src/ps_io.F90, src/pseudostates.F90,
+ src/states.F90, src/wave_equations.F90: *) Fixed some bugs
+ related to the initialization of derived data types.
+ *) Some more work on the logarithmic derivatives test.
+
+2006-01-06 15:39 micael
+
+ * [r257] src/pseudostates.F90, src/tm.F90, src/wave_equations.F90:
+ *) Scalar-relativistic equation now works for the pseudopotential
+ generation.
+ This needs some more testing.
+
+2006-01-06 11:10 micael
+
+ * [r256] src/eigensolver.F90, src/states.F90,
+ src/wave_equations.F90, src/wave_equations_integrator.F90: *)
+ Scalar-relativistic equation is now working for the all-electron
+ calculations.
+
+2006-01-04 15:51 micael
+
+ * [r255] src/atom.F90, src/eigensolver.F90, src/hamann.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/parser_symbols.F90,
+ src/ps_io.F90, src/states.F90, src/tm.F90, src/tm_equations.F90,
+ src/wave_equations.F90, src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90: *) Some more work on the
+ scalar-relativistic equation.
+ *) Some cosmetic changes.
+ *) Changed the naming convention for the wavefunctions (I swaped
+ f and g
+ everywhere in the code) in order to use the usual convention for
+ the
+ relativistic case: g is the major component and f is the minor
+ component.
+
+2006-01-04 15:18 micael
+
+ * [r254] src/pp_data_convert.F90: *) Forgot to remove this file
+ some time ago.
+
+2006-01-03 14:51 micael
+
+ * [r253] src/ae_potentials.F90, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/hartree.F90, src/kb.F90,
+ src/kb_potentials.F90, src/mesh.F90, src/mix.F90, src/mrpp.F90,
+ src/mrpp_equations.F90, src/potentials.F90, src/ps_atom.F90,
+ src/ps_io.F90, src/ps_potentials.F90, src/pseudostates.F90,
+ src/run_ape.F90, src/scf.F90, src/splines.F90, src/states.F90,
+ src/tm.F90, src/tm_equations.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: *) Started implementig the scalar-relativistic
+ wave-equation.
+ *) Optimized the computation of the derivatives of the
+ differentials equation.
+ *) It seems a derived data type parameter cannot have a component
+ that is a pointer.
+ The Intel compiler did not complain about this, but the Pathscale
+ one did.
+ So, I had to remove all the NULL_* parameters from the code. As
+ this implied
+ removing almost all the Fortran 95 stuff, at the end I just
+ removed it all.
+ This implied a lot of debuging, so I added lots of "push/pop"
+ calls all over
+ the code.
+
+2006-01-03 14:33 micael
+
+ * [r252] sample/Cd/Cd, sample/Na/Na, sample/Si/Si,
+ src/parser_symbols.F90, src/run_ape.F90,
+ testsuite/non_relativistic_systems/Li.test: *) Run modes should
+ now be "added" in the input file. Update sample input files
+ and tests accordingly.
+
+2006-01-03 14:20 micael
+
+ * [r251] src/kb.F90, src/pseudostates.F90, src/states.F90: *) APE
+ now computes the KB projectors for the non-relativistic case.
+
+2005-12-07 18:08 fnog
+
+ * [r250] src/ps_atom.F90, src/ps_io.F90, src/run_ape.F90,
+ src/xc.F90: ABINIT output + Core corrections in FHI output
+ format. There is still a
+ problem with the core charge density: normalization?
+
+2005-12-05 11:34 micael
+
+ * [r249] testsuite/non_relativistic_systems/Li.test,
+ testsuite/relativistic_systems,
+ testsuite/relativistic_systems/Cr.test: *) Added some new tests.
+
+2005-11-23 15:29 micael
+
+ * [r248] src/ps_io.F90: *) Bug fixed in the FHI format.
+
+2005-11-21 15:42 micael
+
+ * [r247] src/ape2xml.F90: *) This file should also go.
+
+2005-11-21 15:37 micael
+
+ * [r246] src/output.F90, src/ps_io.F90: I forgot to remove and add
+ the files.
+
+2005-11-21 15:36 micael
+
+ * [r245] src/Makefile.am, src/ps_atom.F90: *) ape2xml utility is
+ gone.
+ *) Changed the name of the output module.
+ *) Saving and loading the ps_atom structure is now done using the
+ new module.
+
+2005-11-21 15:32 micael
+
+ * [r244] src/atom.F90: *) Code now stops if someone tries to do
+ Relativistic-SDFT calculations.
+
+2005-11-10 13:40 micael
+
+ * [r243] src/output.F90: *) Added FHI pseudopotentials format.
+
+2005-11-09 15:38 micael
+
+ * [r242] src/Makefile.am, src/atom.F90, src/output.F90,
+ src/ps_atom.F90, src/run_ape.F90: *) pp_data_convert utility is
+ gone. For now, I moved it to the output module.
+
+2005-11-08 09:07 micael
+
+ * [r241] src/parser_symbols.F90: *) Removed some unused symbols and
+ added a new one.
+
+2005-11-08 09:06 micael
+
+ * [r240] doc/ape.texi: *) Small update to the manual.
+
+2005-11-03 13:17 micael
+
+ * [r239] sample/Cd, sample/Cd/Cd, sample/Si, sample/Si/Si: *) Added
+ some sample input files.
+
+2005-11-03 11:07 micael
+
+ * [r238] sample/Cu/Cu.ae, sample/Na/Na, sample/Ti/Ti.ae,
+ src/parser_symbols.F90: *) Added parser symbols for the
+ exchange-correlation functionals. Sample input files
+ updated accordingly.
+
+2005-11-02 18:02 micael
+
+ * [r237] src/hamann.F90, src/pseudostates.F90: *) APE now knows the
+ difference between the matching radius and the core radius.
+
+2005-11-02 14:21 micael
+
+ * [r236] src/hamann.F90: *) I forced the pseudo wavefunctions
+ beyond the matching radius to be equal
+ to the all-electron wavefunctions. This seems to fix the problems
+ with
+ the Hamann scheme and the Dirac equation.
+
+2005-10-31 14:36 micael
+
+ * [r235] src/hamann.F90: *) Bug fixed.
+
+2005-10-30 16:51 micael
+
+ * [r234] src/hamann.F90, src/states.F90, src/wave_equations.F90: *)
+ Again there was a problem with the hamann scheme in the
+ relativistic case:
+ all-electron wavefunctions should obviously be the relativistic
+ ones.
+
+2005-10-30 16:46 micael
+
+ * [r233] src/pseudostates.F90: *) Bug fixed.
+
+2005-10-30 13:13 micael
+
+ * [r232] libxc/Makefile.am: *) Syncing with the latest version of
+ the libxc.
+
+2005-10-28 14:19 micael
+
+ * [r231] libxc/lda.c, libxc/lda_c_pw.c, libxc/util.h, libxc/xc.h,
+ libxc/xc_f.c: *) Syncing with the latest version of the libxc.
+
+2005-08-29 08:32 micael
+
+ * [r230] Makefile.am, configure.ac, libvxc, libxc,
+ libxc/Makefile.am, libxc/gga.c, libxc/gga_lb.c, libxc/gga_pbe.c,
+ libxc/lca.c, libxc/lca_lch.c, libxc/lca_omc.c, libxc/lda.c,
+ libxc/lda_c_amgb.c, libxc/lda_c_pw.c, libxc/lda_c_pz.c,
+ libxc/lda_c_vwn.c, libxc/lda_funcs.c, libxc/lda_x.c,
+ libxc/mgga.c, libxc/mgga_c_tpss.c, libxc/mgga_x_tpss.c,
+ libxc/test.c, libxc/util.c, libxc/util.h, libxc/xc.h,
+ libxc/xc_f.c, src/Makefile.am: *) Included latest version of the
+ libxc. I changed the name of the source
+ directory to make it exactly equal to the one distributed with
+ Octopus.
+ This way, both liboct_parser and libxc are just a copies of the
+ directories
+ found in the latest version of Octopus.
+
+2005-08-29 08:22 micael
+
+ * [r229] Makefile.am, configure.ac, liboct_parser,
+ liboct_parser/Makefile.am, liboct_parser/grammar.c,
+ liboct_parser/grammar.y, liboct_parser/gsl_userdef.c,
+ liboct_parser/gsl_userdef.h, liboct_parser/liboct_parser.h,
+ liboct_parser/parse.c, liboct_parser/parse_exp.c,
+ liboct_parser/parser_f.c, liboct_parser/string_f.c,
+ liboct_parser/string_f.h, liboct_parser/symbols.c,
+ liboct_parser/symbols.h, libvxc/Makefile.am, src/Makefile.am,
+ src/ape.F90, src/liboct_parser.F90, src/pseudostates.F90,
+ src/states.F90, src/string_f.c, src/string_f.h: *) Include the
+ latest version of the liboct_parser. It will be distributed
+ with the source.
+
+2005-08-29 08:17 micael
+
+ * [r228] testsuite/non_relativistic_systems/Li.test: *) Bug fixed.
+
+2005-08-29 08:13 micael
+
+ * [r227] src/ae_potentials.F90, src/atom.F90, src/hamann.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/potentials.F90,
+ src/pp_data_convert.F90, src/ps_potentials.F90, src/splines.F90,
+ src/states.F90, src/tm.F90, src/tm_equations.F90, src/xc.F90: *)
+ Removed elemental functions.
+
+2005-07-20 17:44 micael
+
+ * [r226] testsuite/ape-run_testsuite: *) Bug fixes.
+
+2005-07-11 08:48 micael
+
+ * [r225] src/states.F90: *) The ifort compiler did not like these
+ lines.
+
+2005-07-11 08:48 micael
+
+ * [r224] src/wave_equations_integrator.F90: *) Bug fixed: a couple
+ of lines disappeared nine months ago...
+
+2005-07-10 15:51 micael
+
+ * [r223] Makefile.am, configure.ac, share/HGH/Makefile.am,
+ share/Makefile.am: *) Testsuite and HGH potentials are now
+ installed in the share directory.
+
+2005-07-08 19:18 micael
+
+ * [r222] testsuite/Makefile.am: *) Small bug fix.
+
+2005-07-08 19:12 micael
+
+ * [r221] Makefile.am, configure.ac, testsuite,
+ testsuite/Makefile.am, testsuite/ape-run_regression_test.pl,
+ testsuite/ape-run_regression_test.pl.pod,
+ testsuite/ape-run_testsuite, testsuite/non_relativistic_systems,
+ testsuite/non_relativistic_systems/Li.test: *) New testsuite. I
+ took the testsuite from Octopus and adapted it.
+
+2005-07-08 19:08 micael
+
+ * [r220] doc/ape.texi: *) Small update to the manual.
+
+2005-07-08 19:07 micael
+
+ * [r219] src/messages.F90, src/scf.F90: *) Messages that go to a
+ file are now always writen.
+
+2005-07-08 09:31 micael
+
+ * [r218] src/ps_atom.F90, src/pseudostates.F90, src/states.F90: *)
+ Changed (again) the routines to get the default core radii.
+ *) Updated the pseudopotential information output.
+
+2005-07-08 09:15 micael
+
+ * [r217] src/ae_potentials.F90, src/eigensolver.F90,
+ src/ps_potentials.F90: *) Bug fixed: the latest changes to the
+ libxc introduced modifications to the
+ tail of the xc potentials, so I had to change the routine to
+ compute the
+ classical turning point.
+ *) Removed the changes to the eigensolver that were introduced to
+ fix a bug
+ related to the previous one.
+
+2005-07-08 09:02 micael
+
+ * [r216] src/hamann.F90: *) Added debug information to the hamann
+ routines.
+
+2005-06-17 14:42 micael
+
+ * [r215] src/hamann.F90, src/mrpp.F90, src/ps_atom.F90,
+ src/pseudostates.F90, src/run_ape.F90, src/states.F90,
+ src/tm.F90: *) Default cut-off radii are working again.
+ *) Some more work on the PP output.
+ *) Now on, when initialized, the pseudostates contain the
+ information of the
+ corresponding all-electron states and it is changed during the PP
+ generation.
+
+2005-06-16 12:14 micael
+
+ * [r214] sample/Cu/Cu.ae, sample/Cu/Cu.mrpp, sample/Cu/Cu.tm,
+ sample/Na/Na, sample/Ti/Ti.ae, sample/Ti/Ti.mrpp,
+ sample/Ti/Ti.tm: *) Updating sample input files.
+
+2005-06-16 12:12 micael
+
+ * [r213] src/Makefile.am, src/atom.F90, src/output.F90,
+ src/ps_atom.F90, src/run_ape.F90: *) All the files in the "ae"
+ and "pp" directories are now written at the same time.
+ *) Also, now all the files are always writen (for example: one
+ cannot choose anymore
+ to write or not the density after an all-electron calculation)
+ *) The output module is now empty. Later it will be used to
+ choose the output format
+ in order to make the various functions easier to plot.
+
+2005-06-16 11:41 micael
+
+ * [r212] src/atom.F90, src/output.F90, src/ps_atom.F90,
+ src/pseudostates.F90, src/states.F90: *) Changed output so that
+ the "info" files in the "ae" and "pp" directories
+ are always consistent with the data stored in the "data" file.
+ *) Got ride of the title string that was written in all the
+ output files because
+ it was not really usefull.
+
+2005-06-16 11:18 micael
+
+ * [r211] src/ae_potentials.F90, src/ape2xml.F90, src/atom.F90,
+ src/kb_potentials.F90, src/mesh.F90, src/output.F90,
+ src/potentials.F90, src/pp_data_convert.F90, src/ps_atom.F90,
+ src/ps_potentials.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/states.F90, src/xc.F90: *) Changed the name of some routines
+ in order to have a consistent naming scheme.
+ *) Changed the place were the atom and ps_atom information is
+ saved.
+ *) Some changes in the output.
+
+2005-06-15 14:31 micael
+
+ * [r210] sample/Na, sample/Na/Na: *) New sample input file.
+
+2005-06-15 12:56 micael
+
+ * [r209] src/atom.F90, src/states.F90: *) Removed some duplicated
+ stuff related to the output.
+
+2005-06-15 08:13 micael
+
+ * [r208] src/pp_data_convert.F90, src/ps_atom.F90,
+ src/pseudostates.F90, src/states.F90, src/xc.F90: *) Implemented
+ non-linear core-corrections.
+
+2005-06-07 15:08 micael
+
+ * [r207] TODO: *) Update the TODO list.
+
+2005-06-07 14:45 micael
+
+ * [r206] src/kb.F90, src/ps_atom.F90, src/pseudostates.F90,
+ src/states.F90: *) Bug fixed: the ghosts test was done using a
+ non-screened potential.
+
+2005-06-07 14:44 micael
+
+ * [r205] src/eigensolver.F90: *) Changed the way the eigensolver
+ recognizes unbound states to include a new
+ situation: sometimes the logarithmic derivatives differences
+ function is
+ non continuous.
+ *) Commented the code a bit better.
+
+2005-06-06 10:32 micael
+
+ * [r204] src/Makefile.am, src/kb.F90, src/parser_symbols.F90,
+ src/ps_atom.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/states.F90: *) New run mode to compute the KB energies and to
+ test the KB pseudopotential
+ for ghost states.
+
+2005-06-06 08:23 micael
+
+ * [r203] src/pp_data_convert.F90: *) Bug fixes.
+
+2005-06-05 14:45 micael
+
+ * [r202] src/ps_atom.F90: *) Bug fixed: one of the components of
+ the ps_atom derived data type was not
+ writen to the restart file.
+
+2005-06-03 10:46 micael
+
+ * [r201] src/Makefile.am, src/potentials.F90, src/ps_atom.F90: *)
+ Bug fixe: potentials were not allocated when reading then from a
+ file.
+ *) Cleaned the use of use in module ps_atom.
+
+2005-06-03 10:17 micael
+
+ * [r200] src/Makefile.am: *) Bug fixed: I forgot to remove some
+ dependencies.
+
+2005-06-03 10:14 micael
+
+ * [r199] src/Makefile.am, src/ape2xml.F90, src/atom.F90,
+ src/atom_output.F90, src/output.F90, src/ps_atom.F90,
+ src/run_ape.F90: *) Broke module atom.F90 in two.
+
+2005-05-23 11:15 micael
+
+ * [r198] src/libvxc.F90, src/libxc.F90: *) Forgot to update one
+ file.
+ *) Removed file libvxc.F90 (I forgot to remove it during a
+ previous commit).
+
+2005-05-23 11:10 micael
+
+ * [r197] libvxc/Makefile.am, libvxc/config.h, libvxc/gga_lb.c,
+ libvxc/gga_pbe.c, libvxc/lca.c, libvxc/lca_lch.c,
+ libvxc/lca_omc.c, libvxc/lda.c, libvxc/lda_c_pw.c,
+ libvxc/lda_funcs.c, libvxc/lda_x.c, libvxc/mgga_c_tpss.c,
+ libvxc/mgga_x_tpss.c, libvxc/util.h, libvxc/xc.h, libvxc/xc_f.c,
+ src/xc.F90: *) Updating the libxc.
+
+2005-05-20 10:43 micael
+
+ * [r196] src/global.h: *) Forgot this file.
+
+2005-05-20 10:38 micael
+
+ * [r195] src/Makefile.am, src/ae_potentials.F90, src/ape.F90,
+ src/ape2xml.F90, src/atom.F90, src/eigensolver.F90,
+ src/gsl_interface_f.F90, src/hamann.F90, src/kb_potentials.F90,
+ src/libxc.F90, src/linalg.F90, src/mesh.F90, src/messages.F90,
+ src/mrpp.F90, src/mrpp_equations.F90, src/multiroots_f.F90,
+ src/potentials.F90, src/pp_data_convert.F90,
+ src/ps_potentials.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/scf.F90, src/splines.F90, src/tm.F90, src/tm_equations.F90,
+ src/types.F90, src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90, src/xc.F90: *) Separated the
+ potentials module in three parts: one for the all-electron
+ potentials,
+ another one for the pseudopotentials and a third one for the KB
+ projectors.
+ The potentials module now is just an "interface" for these three
+ modules.
+ In the process, I simplified some routines.
+ *) Added the ASSERT pre-processor directive.
+
+2005-03-17 14:10 micael
+
+ * [r194] src/atom.F90, src/atom_output.F90, src/eigensolver.F90,
+ src/hamann.F90, src/mrpp.F90, src/mrpp_equations.F90,
+ src/potentials.F90, src/pp_data_convert.F90,
+ src/pseudostates.F90, src/run_ape.F90, src/scf.F90,
+ src/states.F90, src/tm.F90, src/tm_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ *) Bug fixed in pseudostates.
+ *) First step towards including the KB projectors: there are now
+ 3 different
+ potential types in module potential. The KB type is still empty.
+ *) Second step: the fuctions that return the value of the
+ potential at
+ a certain point are now l-dependent.
+
+2005-03-17 11:40 micael
+
+ * [r193] src/Makefile.am: *) Bug fixed: the ape2xml linking options
+ and dependencies were wrong.
+
+2005-03-14 11:01 micael
+
+ * [r192] TODO: *) Added a TODO file.
+
+2005-02-24 16:24 fnog
+
+ * [r191] share, share/HGH, share/HGH/Ag.hgh, share/HGH/Ag_sc.hgh,
+ share/HGH/Al.hgh, share/HGH/Ar.hgh, share/HGH/As.hgh,
+ share/HGH/At.hgh, share/HGH/Au.hgh, share/HGH/Au_sc.hgh,
+ share/HGH/B.hgh, share/HGH/Ba.hgh, share/HGH/Ba_sc.hgh,
+ share/HGH/Be.hgh, share/HGH/Be_sc.hgh, share/HGH/Bi.hgh,
+ share/HGH/Br.hgh, share/HGH/C.hgh, share/HGH/Ca.hgh,
+ share/HGH/Ca_sc.hgh, share/HGH/Cd.hgh, share/HGH/Cd_sc.hgh,
+ share/HGH/Ce_sc.hgh, share/HGH/Cl.hgh, share/HGH/Co.hgh,
+ share/HGH/Co_sc.hgh, share/HGH/Cr.hgh, share/HGH/Cr_sc.hgh,
+ share/HGH/Cs.hgh, share/HGH/Cs_sc.hgh, share/HGH/Cu.hgh,
+ share/HGH/Cu_sc.hgh, share/HGH/Dy_sc.hgh, share/HGH/Er_sc.hgh,
+ share/HGH/Eu_sc.hgh, share/HGH/F.hgh, share/HGH/Fe.hgh,
+ share/HGH/Fe_sc.hgh, share/HGH/Ga.hgh, share/HGH/Ga_sc.hgh,
+ share/HGH/Gd_sc.hgh, share/HGH/Ge.hgh, share/HGH/H.hgh,
+ share/HGH/He.hgh, share/HGH/Hf_sc.hgh, share/HGH/Hg.hgh,
+ share/HGH/Hg_sc.hgh, share/HGH/Ho_sc.hgh, share/HGH/I.hgh,
+ share/HGH/In.hgh, share/HGH/In_sc.hgh, share/HGH/Ir.hgh,
+ share/HGH/Ir_sc.hgh, share/HGH/K.hgh, share/HGH/K_sc.hgh,
+ share/HGH/Kr.hgh, share/HGH/La_sc.hgh, share/HGH/Li.hgh,
+ share/HGH/Li_sc.hgh, share/HGH/Lu_sc.hgh, share/HGH/Makefile.am,
+ share/HGH/Mg.hgh, share/HGH/Mg_sc.hgh, share/HGH/Mn.hgh,
+ share/HGH/Mn_sc.hgh, share/HGH/Mo.hgh, share/HGH/Mo_sc.hgh,
+ share/HGH/N.hgh, share/HGH/Na.hgh, share/HGH/Na_sc.hgh,
+ share/HGH/Nb.hgh, share/HGH/Nb_sc.hgh, share/HGH/Nd_sc.hgh,
+ share/HGH/Ne.hgh, share/HGH/Ni.hgh, share/HGH/Ni_sc.hgh,
+ share/HGH/O.hgh, share/HGH/Os.hgh, share/HGH/Os_sc.hgh,
+ share/HGH/P.hgh, share/HGH/Pb.hgh, share/HGH/Pd.hgh,
+ share/HGH/Pd_sc.hgh, share/HGH/Pm_sc.hgh, share/HGH/Po.hgh,
+ share/HGH/Pr_sc.hgh, share/HGH/Pt.hgh, share/HGH/Pt_sc.hgh,
+ share/HGH/Rb.hgh, share/HGH/Rb_sc.hgh, share/HGH/Re.hgh,
+ share/HGH/Re_sc.hgh, share/HGH/Rh.hgh, share/HGH/Rh_sc.hgh,
+ share/HGH/Rn.hgh, share/HGH/Ru.hgh, share/HGH/Ru_sc.hgh,
+ share/HGH/S.hgh, share/HGH/Sb.hgh, share/HGH/Sc.hgh,
+ share/HGH/Sc_sc.hgh, share/HGH/Se.hgh, share/HGH/Si.hgh,
+ share/HGH/Sm_sc.hgh, share/HGH/Sn.hgh, share/HGH/Sr.hgh,
+ share/HGH/Sr_sc.hgh, share/HGH/Ta.hgh, share/HGH/Ta_sc.hgh,
+ share/HGH/Tb_sc.hgh, share/HGH/Tc.hgh, share/HGH/Tc_sc.hgh,
+ share/HGH/Te.hgh, share/HGH/Ti.hgh, share/HGH/Ti_sc.hgh,
+ share/HGH/Tl.hgh, share/HGH/Tl_sc.hgh, share/HGH/Tm_sc.hgh,
+ share/HGH/V.hgh, share/HGH/V_sc.hgh, share/HGH/W.hgh,
+ share/HGH/W_sc.hgh, share/HGH/Xe.hgh, share/HGH/Y.hgh,
+ share/HGH/Y_sc.hgh, share/HGH/Yb_sc.hgh, share/HGH/Zn.hgh,
+ share/HGH/Zn_sc.hgh, share/HGH/Zr.hgh, share/HGH/Zr_sc.hgh,
+ share/HGH/configurations: FNOG: HGH PP parameters added to the
+ share directory
+
+2005-02-24 15:36 fnog
+
+ * [r190] NEWS: FNOG: Test
+
+2005-02-24 15:29 fnog
+
+ * [r189] NEWS: FNOG: Announcement of the mailing lists
+
+2005-02-24 12:50 fnog
+
+ * [r188] AUTHORS, src/Makefile.am: FNOG: Insert ape2xml project in
+ Makefile
+
+2005-02-24 12:44 fnog
+
+ * [r187] src/ape2xml.F90: FNOG: Start of the XML output converter
+ (really!)
+
+2005-02-24 12:41 fnog
+
+ * [r186] src/ape2xml.F90: FNOG: Start of the XML output converter
+
+2005-01-21 17:31 micael
+
+ * [r185] libvxc/Makefile.am, libvxc/config.h, libvxc/double.F90,
+ libvxc/gga.F90, libvxc/gga.c, libvxc/gga_c.F90, libvxc/gga_lb.c,
+ libvxc/gga_pbe.c, libvxc/gga_x.F90, libvxc/lda.F90, libvxc/lda.c,
+ libvxc/lda_c.F90, libvxc/lda_c_amgb.c, libvxc/lda_c_pw.c,
+ libvxc/lda_c_pz.c, libvxc/lda_c_vwn.c, libvxc/lda_funcs.c,
+ libvxc/lda_x.F90, libvxc/lda_x.c, libvxc/mgga.c,
+ libvxc/mgga_c_tpss.c, libvxc/mgga_x_tpss.c, libvxc/single.F90,
+ libvxc/undef.F90, libvxc/util.c, libvxc/util.h, libvxc/xc.h,
+ libvxc/xc_f.c, src/Makefile.am, src/atom.F90, src/libxc.F90,
+ src/potentials.F90, src/xc.F90: *) APE now uses the XC library
+ writen by M. Marques.
+
+2004-11-16 13:22 micael
+
+ * [r184] src/mrpp_equations.F90, src/tm_equations.F90: *) Changes
+ to make multiroots solver more stable and to allow compiling the
+ code
+ with some older compilers.
+ *) MRPP scheme seems to be working.
+
+2004-11-16 13:20 micael
+
+ * [r183] Makefile.am: *) Updated extra files to make the
+ distribution.
+
+2004-11-16 13:14 micael
+
+ * [r182] src/Makefile.am, src/mrpp.F90, src/multiroots_c.c,
+ src/multiroots_f.F90, src/tm.F90: *) Changes to make multiroots
+ solver more stable and to allow compiling the code
+ with some older compilers.
+ *) MRPP scheme seems to be working.
+
+2004-11-15 18:09 micael
+
+ * [r181] src/gsl_interface_c.c, src/gsl_interface_f.F90,
+ src/linalg.F90, src/mrpp.F90, src/multiroots_c.c,
+ src/multiroots_f.F90, src/pseudostates.F90, src/tm.F90: *)
+ Rewrote the TM and MRPP modules. TM is now much faster. MRPP
+ seems to be
+ working.
+
+2004-11-11 11:34 micael
+
+ * [r180] src/output.F90: *) Changed the default title.
+
+2004-11-11 11:05 micael
+
+ * [r179] sample/Cu, sample/Cu/Cu.ae, sample/Cu/Cu.mrpp,
+ sample/Cu/Cu.tm: *) New sample files for Copper.
+
+2004-11-09 12:49 micael
+
+ * [r178] src/eigensolver.F90, src/wave_equations_integrator.F90: *)
+ Bug fixes.
+
+2004-11-09 11:07 micael
+
+ * [r177] src/eigensolver.F90, src/potentials.F90: *) Eigensolver
+ ev_guess is gone. It was causing too many problems.
+ *) Changed the e_min routine so it can deal properly with
+ pseudopotentials.
+ Now, e_min = min(potential) when we have a pseudopotential.
+ *) Bug fixed in routine find_eigenvalue. It was not returning the
+ eigenvalue
+ properly for unbound states.
+ *) There is a new routine do deallocate the brackets.
+
+2004-11-09 10:41 micael
+
+ * [r176] src/pseudostates.F90: *) Bug fixed.
+
+2004-11-09 10:36 micael
+
+ * [r175] src/eigensolver.F90: *) Merged some routines.
+
+2004-11-09 10:19 micael
+
+ * [r174] src/wave_equations.F90, src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90: *) Merged some routines.
+
+2004-11-04 16:45 micael
+
+ * [r173] src/eigensolver.F90, src/mrpp.F90, src/scf.F90,
+ src/states.F90: *) eigensolver_type and eigensolver_init are
+ gone.
+
+2004-11-04 16:22 micael
+
+ * [r172] sample, sample/Ti, sample/Ti/Ti.ae, sample/Ti/Ti.mrpp,
+ sample/Ti/Ti.tm: *) Added sample input files to generato both
+ Troullier-Martins and MRPP
+ pseudopotentials for Titanium.
+
+2004-11-04 16:18 micael
+
+ * [r171] src/atom.F90, src/eigensolver.F90, src/mrpp.F90,
+ src/potentials.F90, src/pseudostates.F90, src/states.F90: *)
+ Eigensolver now uses makes use of a guess eigenvalue. There is
+ also a new debug routine.
+ *) PPs self-consistency is checked.
+ *) New routine to add something to a pseudopotential.
+ *) PPs unscreening routine is gone. There is now a routine that
+ returns the
+ screening.
+ *) MRPP routine now uses the multiroots solver. Also fixed
+ several bugs.
+
+2004-11-03 12:23 micael
+
+ * [r170] src/pseudostates.F90: *) Bug fixed.
+
+2004-11-03 12:17 micael
+
+ * [r169] src/states.F90: *) ps_orbitals quantum numbers now refer
+ to the pseudopotentials and not the
+ all-electron potential (this means the pseudowavefunctions number
+ of nodes
+ agrees with the quantum numbers)
+
+2004-11-03 11:56 micael
+
+ * [r168] src/pseudostates.F90, src/states.F90: *) Rewrote the
+ ps_orbitals_init routine.
+ *) There is now a "label" variable in the orbital_type data type.
+
+2004-11-02 16:24 micael
+
+ * [r167] src/atom_output.F90, src/pseudostates.F90, src/states.F90,
+ src/wave_equations.F90: *) Simplified the orbitals labels and the
+ output filenames.
+
+2004-11-02 15:38 micael
+
+ * [r166] src/scf.F90: *) Changed the labels.
+ *) Changed the way the unoccupied levels are dealt in the SCF
+ cycle.
+
+2004-11-02 15:37 micael
+
+ * [r165] src/states.F90, src/wave_equations.F90: *) Changed the
+ labels.
+ *) Changed the way the unoccupied levels are dealt in the SCF
+ cycle.
+
+2004-11-02 14:58 micael
+
+ * [r164] src/pseudostates.F90: *) Bug fixed: not all memory was
+ deallocated in routine pseudostates_generation
+
+2004-11-02 10:36 micael
+
+ * [r163] src/atom.F90: *) Changed the name of routine
+ ps_atom_solve.
+
+2004-11-02 10:08 micael
+
+ * [r162] src/pseudostates.F90: Bug fixed: valence and semi-core
+ states had the wrong index.
+
+2004-11-02 10:05 micael
+
+ * [r161] src/run_ape.F90: *) Made sure the "exit" instruction is
+ always the last to be executed.
+
+2004-10-29 17:03 micael
+
+ * [r160] src/Makefile.am, src/mrpp.F90, src/multiroots_c.c,
+ src/multiroots_f.F90, src/tm.F90: *) There is now a module to use
+ the multiroots solver from GSL.
+ *) TM scheme now uses the multiroots solver from GSL.
+
+2004-10-29 11:04 micael
+
+ * [r159] src/odeint.c: *) Header was missing.
+
+2004-10-29 10:56 micael
+
+ * [r158] src/tm.F90: *) Removed the debug calls "*_sub" to two
+ routines in order to make the debug output
+ easier to read.
+
+2004-10-29 10:55 micael
+
+ * [r157] src/scf.F90: *) The number of the current iteration is now
+ printed at the same time than the eigenvalues.
+
+2004-10-29 10:52 micael
+
+ * [r156] src/eigensolver.F90: *) Changed eigensolver subroutines to
+ functions.
+
+2004-10-28 13:58 micael
+
+ * [r155] src/odeint.c, src/potentials.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ *) Added routines to monitor some variables in debug mode.
+ *) First application of the previous routines: if there is a
+ problem
+ with the ODE solver, in debug mode, some information is written
+ to the
+ debug_info directory just before the program dies.
+
+2004-10-28 10:52 micael
+
+ * [r154] configure.ac, src/Makefile.am, src/messages.F90: *) Now
+ debug mode is a compile mode.
+
+2004-10-27 15:49 micael
+
+ * [r153] src/Makefile.am, src/atom.F90, src/atom_output.F90,
+ src/eigensolver.F90, src/hamann.F90, src/io.F90,
+ src/messages.F90, src/mrpp.F90, src/output.F90,
+ src/potentials.F90, src/pp_data_convert.F90,
+ src/pseudostates.F90, src/run_ape.F90, src/scf.F90,
+ src/states.F90, src/tm.F90, src/utilities_c.c,
+ src/utilities_f.F90, src/wave_equations.F90, src/xc.F90: *) New
+ debug mode.
+
+2004-10-27 11:50 micael
+
+ * [r152] src/eigensolver.F90, src/mrpp.F90, src/states.F90,
+ src/tm.F90, src/wave_equations.F90: *) MRPP scheme almost
+ implemented. I am commiting now, because I want to
+ do other things before finishing it.
+ *) Some changes in the eigensolver so the emin routine can deal
+ with a pseudopotential.
+ *) Changed some routines from the TM scheme so the MRPP scheme
+ can use them.
+
+2004-10-26 10:51 micael
+
+ * [r151] src/hamann.F90, src/mrpp.F90, src/pseudostates.F90,
+ src/states.F90, src/tm.F90: *) Changed the name and the arguments
+ order in the PPs generation routines.
+ *) More work to implement the MRPP scheme.
+
+2004-10-26 09:51 micael
+
+ * [r150] src/pp_data_convert.F90: *) APE now prints some nice
+ information in the second line of the Octopus format.
+
+2004-10-22 15:22 micael
+
+ * [r149] src/atom.F90, src/pp_data_convert.F90,
+ src/pseudostates.F90, src/states.F90, src/tm.F90,
+ src/wave_equations.F90: *) Some changes to make the code compile
+ with the NAG compiler.
+ *) Removed some unused variables.
+
+2004-10-22 12:01 micael
+
+ * [r148] src/pp_data_convert.F90: *) Bugs fixed in the Octopus
+ format: valence charge was missing a 4*Pi factor,
+ there were some problems with the spline interpolation for the
+ new mesh and
+ the number of orbitals in the "rel" mode was wrong.
+
+2004-10-22 11:49 micael
+
+ * [r147] src/tm.F90: *) Bug fixed: charged associated to the minor
+ component of the relativistic
+ wavefunctions beyond the cutoff radius was not transfered to the
+ pseudo-charge
+ inside the cutoff radius.
+
+2004-10-21 21:08 micael
+
+ * [r146] src/pp_data_convert.F90, src/states.F90: *) Bug fixed:
+ there were a couple of bugs in the Octopus PP format related
+ to the relativistic PPs.
+
+2004-10-21 18:25 micael
+
+ * [r145] src/hamann.F90, src/states.F90, src/wave_equations.F90: *)
+ Undone some changes I had introduced before, because there were
+ of no
+ use and could lead to some errors.
+
+2004-10-21 16:12 micael
+
+ * [r144] Makefile.am, configure.ac, src/pp_data_convert.F90: *) Now
+ the configure script will only detect liboct_parser version 1.1.
+
+2004-10-21 15:26 micael
+
+ * [r143] doc/ape.texi: *) More updates to the manual.
+
+2004-10-21 13:57 micael
+
+ * [r142] src/parser_symbols.F90: *) Changed a symbol.
+
+2004-10-21 13:56 micael
+
+ * [r141] doc/ape.texi: *) Uptates to the manual.
+
+2004-10-21 10:14 micael
+
+ * [r140] src/atom.F90, src/parser_symbols.F90,
+ src/pp_data_convert.F90, src/pseudostates.F90, src/states.F90: *)
+ Changed the name of some variables.
+
+2004-10-20 15:40 micael
+
+ * [r139] doc/ape.texi: *) Some updates to the manual. Still much to
+ do.
+
+2004-10-20 15:39 micael
+
+ * [r138] sample: *) Changed the name of the sample input file and
+ added a new one for gold.
+
+2004-10-20 14:35 micael
+
+ * [r137] src/atom.F90, src/atom_output.F90, src/mesh.F90,
+ src/parser_symbols.F90, src/units.F90: *) Parser symbols for
+ MeshType
+ *) Some small changes to the messages.
+
+2004-10-20 11:29 micael
+
+ * [r136] src/ape.F90: *) AE is now able to read the input from the
+ standard input. This means one
+ can do the following: "ape < filename".
+
+2004-10-20 10:59 micael
+
+ * [r135] src/potentials.F90, src/wave_equations_integrator.F90: *)
+ Just correcting some message errors.
+
+2004-10-20 10:18 micael
+
+ * [r134] src/states.F90: *) Deleted routine orbitals_get_wf.
+
+2004-10-20 08:41 micael
+
+ * [r133] src/atom.F90, src/states.F90: *) Changed the format of the
+ Orbitals block.
+
+2004-10-19 11:09 micael
+
+ * [r132] src/atom.F90, src/pp_data_convert.F90,
+ src/pseudostates.F90, src/tm.F90: *) Bug fixes in the
+ relativistic PPs and the j average of those PPs.
+ *) Implemented relativistic PPs in the pp_data_convert utility.
+
+2004-10-18 16:55 micael
+
+ * [r131] src/atom_output.F90, src/pseudostates.F90, src/states.F90:
+ *) Pseudo-wavefunctions are now printed in their own files.
+
+2004-10-18 16:06 micael
+
+ * [r130] src/pseudostates.F90, src/states.F90: *) Spin polarized
+ pseudopotentials are now converted to non spin-polarized
+ pseudopotentials so that the core polarization is zero.
+
+2004-10-18 15:38 micael
+
+ * [r129] src/tm.F90: *) Forgot to remove these "debug" lines...
+
+2004-10-18 15:37 micael
+
+ * [r128] src/atom.F90, src/parser_symbols.F90,
+ src/pp_data_convert.F90, src/pseudostates.F90, src/states.F90,
+ src/tm.F90: j averge of the relativistic pseudopotentials
+ inplemented.
+ *) There is a new flag "reltype".
+ *) Changed again the pseudostates_init routine. Now it takes into
+ account the
+ "reltype" and the fact that for certain pseudostates we a orbital
+ for each j value.
+ *) Splited tm_ps_potential in two and corrected some bugs.
+
+2004-10-15 15:00 micael
+
+ * [r127] src/hamann.F90, src/states.F90, src/wave_equations.F90,
+ src/wave_equations_integrator.F90: *) Hamman scheme now works
+ with Dirac equation. At least it should...
+
+2004-10-15 14:59 micael
+
+ * [r126] src/tm.F90: *) Removed fp. The wavefunction derivative is
+ now stored in g.
+
+2004-10-15 14:21 micael
+
+ * [r125] src/eigensolver.F90, src/hamann.F90, src/states.F90,
+ src/tm.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90:
+ *) Merged schrodinger_wavefunction with dirac_wavefunction and
+ schrodinger_ld_diff with dirac_ld_diff
+ *) Removed orbital_type component fp. When using the Schrodinger
+ equation, the
+ wavefunction derivative is stored in component g.
+ *) When using the Dirac equation, the major component is now
+ stored in orbital_type
+ component f and the minor component in component g.
+
+2004-10-15 10:11 micael
+
+ * [r124] src/eigensolver.F90, src/hamann.F90, src/mrpp.F90,
+ src/tm.F90, src/wave_equations.F90: *) Created routines in
+ wave_equations module to choose the appropriate wave equation to
+ use.
+
+2004-10-15 09:45 micael
+
+ * [r123] src/atom_output.F90, src/states.F90: *) Removed another
+ "wave_eq" argument from a routine.
+
+2004-10-15 09:42 micael
+
+ * [r122] src/pp_data_convert.F90, src/pseudostates.F90,
+ src/states.F90: *) Orbital variable in pseudostate_type is now an
+ array. I had to change some
+ routines and to create new ones.
+
+2004-10-14 11:15 micael
+
+ * [r121] src/atom.F90, src/atom_output.F90, src/scf.F90,
+ src/states.F90: *) Removed the use of the "wave_eq" variable from
+ some routines.
+
+2004-10-14 10:41 micael
+
+ * [r120] src/states.F90: *) Bug fixed: display of the wavefunctions
+ info was not working properly.
+
+2004-10-14 10:30 micael
+
+ * [r119] src/Makefile.am: *) Bug fixed: some dependencies were
+ wrong.
+
+2004-10-14 10:22 micael
+
+ * [r118] sample/inp.ape, src/Makefile.am, src/ape.F90,
+ src/atom.F90, src/atom_output.F90, src/eigensolver.F90,
+ src/liboct_parser.F90, src/mix.F90, src/parser_symbols.F90,
+ src/pp_data_convert.F90, src/pseudostates.F90, src/run_ape.F90,
+ src/scf.F90, src/states.F90, src/tm.F90,
+ src/wave_equations_integrator.F90: *) APE now uses oct_parser
+ version 1.1
+ *) Added parser symbols
+ *) Renamed some input variables (Polarization and Relativistic)
+ *) Logical variable "rel" changed to an integer named "wave_eq"
+
+2004-09-30 13:25 micael
+
+ * [r117] src/pp_data_convert.F90, src/pseudostates.F90,
+ src/states.F90, src/wave_equations_integrator.F90, src/xc.F90: *)
+ Bug fixes to make the code compile and run with the NAG compiler.
+
+2004-09-30 11:10 micael
+
+ * [r116] configure.ac: *) Changed version number to 0.6
+
+2004-09-29 18:03 micael
+
+ * [r115] src/potentials.F90, src/pseudostates.F90: *) Bug fixed:
+ unscreening of spin-polarized pseudopotentials was wrong.
+
+2004-09-29 17:45 micael
+
+ * [r114] src/potentials.F90, src/pseudostates.F90, src/states.F90:
+ *) Bug fixed in states. The routine ps_orbitals_init did not take
+ into
+ acount the spin channels.
+ *) Changed the order of the spin-channels.
+
+2004-09-29 13:21 micael
+
+ * [r113] src/pp_data_convert.F90: *) Bug fixed: valence charge was
+ not writen properly.
+
+2004-09-29 13:01 micael
+
+ * [r112] src/wave_equations.F90: *) Bug fixed: name of files when
+ having spin-polarized calculations was wrong.
+
+2004-09-22 20:18 micael
+
+ * [r111] src/mesh.F90: *) mesh_output_params now writes the mesh
+ parameters "a" and "b".
+
+2004-09-22 12:52 micael
+
+ * [r110] sample/inp.ape, src/atom.F90, src/atom_output.F90,
+ src/mesh.F90, src/pp_data_convert.F90, src/states.F90: *) Changed
+ the mesh input and the mesh generation.
+ *) Bug fixed: the mesh input did not take into acount the units.
+ *) New routines to save and read the mesh and to output the mesh
+ parameters.
+ *) Removed the charge function overload in module states.
+
+2004-09-21 15:50 micael
+
+ * [r109] sample/inp.ape: *) I changed this file by mistake.
+
+2004-09-21 15:46 micael
+
+ * [r108] sample/inp.ape, src/Makefile.am, src/atom.F90,
+ src/atom_output.F90, src/pp_data_convert.F90,
+ src/pseudostates.F90, src/scf.F90, src/states.F90,
+ src/states_output.F90, src/wave_equations.F90: Big changes!
+ *) Broke the states module in two parts. First part is related to
+ the
+ orbitals. Second part is the ps_orbitals part. ps_orbitals are
+ now named
+ pseudostates and they include orbitals as components.
+ *) The PPComponents block format is now much more flexible. The
+ routine
+ tough, is much more complicated...
+ *) states_output.F90 is now back into states.F90
+
+2004-09-14 16:22 micael
+
+ * [r107] src/ape.F90: *) Some cosmetics...
+
+2004-09-14 15:59 micael
+
+ * [r106] src/Makefile.am, src/ape.F90, src/atom.F90,
+ src/output.F90, src/run_ape.F90: *) New way of dealing with the
+ different calculation modes.
+ *) Started to add things needed to the pseudopotentials tests.
+
+2004-09-14 11:46 micael
+
+ * [r105] src/pp_data_convert.F90: *) Of course, I forgot to add a
+ file...
+
+2004-09-14 11:30 micael
+
+ * [r104] sample/inp.ape, src/Makefile.am, src/atom.F90,
+ src/atom_output.F90, src/mesh.F90, src/messages.F90,
+ src/output.F90, src/splines.F90, src/states.F90, src/tm.F90,
+ src/units.F90, src/wave_equations.F90, src/xc.F90: *) New mesh
+ types.
+ *) The pseudopotentials information is now stored in the file
+ pp/data.
+ *) New utility to convert pseudopotentials stored in the file
+ pp/data to other
+ formats. For now, the only format available is the one of the
+ Jose Luis
+ Martins code.
+
+2004-08-27 19:43 micael
+
+ * [r103] src/atom.F90, src/states.F90, src/tm.F90,
+ src/wave_equations.F90: *) Bugs fixes.
+
+2004-08-24 13:19 micael
+
+ * [r102] configure.ac, src/Makefile.am, src/atom_output.F90,
+ src/output.F90, src/string_f.c, src/string_f.h, src/tm.F90,
+ src/utilities.F90, src/utilities_c.c, src/utilities_f.F90: *) APE
+ is now able to create and remove directories. I took the routines
+ form
+ Octopus.
+ *) io_assign is now OK. It think it should work fine.
+ *) Troullier-Martins scheme is working again.
+ *) Relativistic Troullier-Martins scheme implemented. It still
+ needs to be
+ tested.
+
+2004-08-22 19:29 micael
+
+ * [r101] src/mrpp.F90: *) I forgot this file...
+
+2004-08-22 19:26 micael
+
+ * [r100] Makefile.am, acinclude.m4, build/acx.m4, configure.ac,
+ doc/ape.texi, sample/inp.ape, src/Makefile.am, src/ape.F90,
+ src/atom.F90, src/atom_output.F90, src/eigensolver.F90,
+ src/gsl_interface_c.c, src/gsl_interface_f.F90, src/hamann.F90,
+ src/hartree.F90, src/liboct_parser.F90, src/libvxc.F90,
+ src/linalg.F90, src/mesh.F90, src/messages.F90, src/mix.F90,
+ src/odeint.c, src/orbitals.F90, src/output.F90,
+ src/potentials.F90, src/scf.F90, src/splines.F90, src/states.F90,
+ src/states_output.F90, src/tm.F90, src/types.F90, src/units.F90,
+ src/utilities.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: Lots and lots of changes!
+ *) Eigensolver now uses pointers. It is much faster.
+ *) Unbound states are now detected imediatly.
+ *) Modified the splines: spline_init is now a subroutine and the
+ splines
+ object is a pointer. This is faster and it solved some memory
+ leaks.
+ *) Changed the name of the output files. Output files now go into
+ a sub-directory
+ of the working directory. This is not working yet.
+ *) Hardwired the name of the atomic calculation data file.
+ *) Changed the name of orbitals.F90 to states.F90.
+ *) Split both states.F90 and atom.F90 in two. All the output
+ routines are now in
+ the new files. (Note that there are no new modules!)
+ *) Dirac equation energy in the integration routines now include
+ the -mc**2 term.
+ All the other routines now takes this into account.
+ *) New io_assing routine. This routine is working but should be
+ changed!
+ *) Completely changed the ps_orbitals_init subroutine. Now it is
+ much better and it
+ works with the MRPP scheme.
+ *) Hamann default cutoff radius are now correct.
+ *) Some more work to implement the MRPP scheme.
+ *) Started implementing the relativistic version of the
+ Troullier-Martins scheme.
+ Because of that, TM scheme is broken (it think...).
+ *) Mixing routine now mixes both spin channels at the same time
+ (this is the correct way).
+ *) PBE exchange-correlation functionals now work with the Broyden
+ mixing.
+ *) New comments and routine headers.
+ *) Updated the manual.
+ *) Fixed some bugs.
+ *) Some more changes that I do not remember...
+
+2004-07-12 18:08 micael
+
+ * [r99] src/atom.F90, src/hamann.F90, src/orbitals.F90, src/tm.F90:
+ *) Several bug fixes: Troulier-Martins pseudopotentials and
+ unscreening now works.
+
+2004-07-09 19:32 micael
+
+ * [r98] src/orbitals.F90: *) Missing use statement.
+
+2004-07-09 19:30 micael
+
+ * [r97] src/Makefile.am, src/atom.F90, src/orbitals.F90,
+ src/potentials.F90: *) I believe unscreening is now working.
+
+2004-07-09 18:43 micael
+
+ * [r96] src/atom.F90, src/orbitals.F90, src/tm.F90: *) Severall bug
+ fixes. I introduced them during last commit.
+
+2004-07-09 18:18 micael
+
+ * [r95] src/atom.F90, src/hamann.F90, src/orbitals.F90, src/tm.F90:
+ *) Simplified TM routine.
+ *) Started to implement the unscreening of the PPs.
+
+2004-07-08 13:11 micael
+
+ * [r94] sample/inp.ape, src/orbitals.F90, src/tm.F90: *) TM
+ pseudo-potentials are now working!
+
+2004-07-07 12:43 micael
+
+ * [r93] src/linalg.F90: *) Bug fixed.
+
+2004-07-05 17:39 micael
+
+ * [r92] sample/inp.ape, src/atom.F90, src/hamann.F90, src/mesh.F90,
+ src/orbitals.F90, src/potentials.F90, src/tm.F90, src/types.F90,
+ src/wave_equations.F90, src/xc.F90: *) Lots of bug fixes.
+ Pseudopotentials calculations only mode was broken.
+
+2004-07-05 15:02 micael
+
+ * [r91] src/atom.F90: *) Some bugs fixed. Potential was initialized
+ twice in routine atom_init.
+ Some intent statements were not OK.
+
+2004-07-05 14:28 micael
+
+ * [r90] src/atom.F90: *) Bug fixed: in routine read_atom_data
+ argument atm had and intent(out)
+ atribute instead of intent(inout).
+
+2004-07-02 13:52 micael
+
+ * [r89] doc/ape.texi: *) Updated the XC functional options in the
+ manual.
+
+2004-07-02 13:35 micael
+
+ * [r88] libvxc/gga_x.F90, sample/inp.ape, src/atom.F90,
+ src/mix.F90, src/potentials.F90, src/scf.F90, src/xc.F90: *)
+ Finished implementing the GGA xc-functional, but it only works
+ when
+ using linear mixing.
+ *) Some bug fixes related to the initialization of pointer
+ variables.
+ *) XC functionals input options are now strings.
+ *) BUg fixed in the PBE GGA implementation.
+
+2004-06-22 11:30 micael
+
+ * [r87] src/atom.F90, src/xc.F90: *) Chnaged the xc functionnals
+ input options. Now, instead of integer the user
+ has to set a string.
+
+2004-06-21 11:17 micael
+
+ * [r86] src/mesh.F90: *) I forgot to add this file...
+
+2004-06-17 17:24 micael
+
+ * [r85] src/atom.F90, src/hartree.F90, src/orbitals.F90,
+ src/potentials.F90, src/scf.F90, src/xc.F90: *) Changed the way
+ the density is stored.
+
+2004-06-17 16:33 micael
+
+ * [r84] src/potentials.F90: *) Uncommented some code that was not
+ working with previous versions of some compilers.
+
+2004-06-17 15:21 micael
+
+ * [r83] src/Makefile.am, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/hartree.F90, src/orbitals.F90,
+ src/potentials.F90, src/scf.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/xc.F90: *) New mesh structure.
+ *) Some changes to make the use of pointers safer.
+
+2004-06-16 16:47 micael
+
+ * [r82] src/potentials.F90: *) Bug fixed: the assigment overload
+ was not available outside the
+ module.
+
+2004-06-16 16:17 micael
+
+ * [r81] libvxc/gga_c.F90, libvxc/gga_x.F90, libvxc/lda_c.F90,
+ libvxc/lda_x.F90, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/hartree.F90, src/liboct_parser.F90,
+ src/mix.F90, src/orbitals.F90, src/output.F90,
+ src/potentials.F90, src/scf.F90, src/tm.F90, src/types.F90,
+ src/units.F90, src/utilities.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90, src/wave_equations_integrator.F90,
+ src/xc.F90: Many changes...
+ *) Added global parameters.
+ *) Some changes to make the code compile with the NAG compiler.
+ *) Bug fixed in the potential module.
+
+2004-06-15 17:00 micael
+
+ * [r80] libvxc/gga_x.F90: *) Bug fixed.
+
+2004-06-14 14:16 micael
+
+ * [r79] Makefile.am, libvxc/lda_c.F90, libvxc/lda_x.F90,
+ sample/inp.ape, src/Makefile.am, src/atom.F90, src/libvxc.F90,
+ src/potentials.F90, src/xc.F90: *) Added interfaces for the
+ libvxc.
+ *) GGA is now implemented in APE, but it is still no working
+ properly.
+ *) Corrected some minor bugs.
+
+2004-06-13 12:16 micael
+
+ * [r78] AUTHORS: *) Small bug.
+
+2004-06-13 12:11 micael
+
+ * [r77] autogen.sh: *) The script is no longer necessary. Instead
+ use autoreconf -i.
+
+2004-06-13 12:09 micael
+
+ * [r76] build/acx.m4, configure.ac: *) Some changes to the build
+ system. Now APE requires automake 1.8.
+
+2004-06-13 11:51 micael
+
+ * [r75] libvxc/Makefile.am, libvxc/double.F90, libvxc/gga.F90,
+ libvxc/gga_c.F90, libvxc/gga_x.F90, libvxc/lda.F90,
+ libvxc/lda_c.F90, libvxc/lda_inc.F90, libvxc/lda_x.F90,
+ libvxc/single.F90: *) Split lda_inc.F90 in 2 parts: lda_x.F90 and
+ lda_c.F90.
+ *) Added PBE GGA to the libvxc, but it is no yet implemented in
+ APE.
+
+2004-06-11 09:33 micael
+
+ * [r74] libvxc/double.F90, libvxc/lda_inc.F90, libvxc/single.F90,
+ libvxc/undef.F90: *) Some changes to avoid numerical problems.
+
+2004-06-01 10:38 micael
+
+ * [r73] Makefile.am, configure.ac, libvxc, libvxc/Makefile.am,
+ libvxc/double.F90, libvxc/lda.F90, libvxc/lda_inc.F90,
+ libvxc/single.F90, libvxc/undef.F90, src/Makefile.am, src/xc.F90:
+ *) The exchange and correlation functionals have now their own
+ library.
+
+2004-05-14 16:50 micael
+
+ * [r72] README: *) Since now there is a manual, this file should
+ lead to it.
+
+2004-05-14 16:49 micael
+
+ * [r71] doc/Makefile.am, doc/ape.texi: *) Corrected some bugs in
+ the manual and added the file ape.texi to the
+ Makefile.am in doc.
+
+2004-05-14 16:39 micael
+
+ * [r70] doc/ape.texi: *) First draft of the APE manual.
+
+2004-05-14 16:36 micael
+
+ * [r69] src/output.F90: *) Changed (again) the default values for
+ the output options.
+
+2004-05-14 16:29 micael
+
+ * [r68] src/atom.F90, src/scf.F90,
+ src/wave_equations_integrator.F90: *) Changed some messages
+ because the lines were too big.
+
+2004-05-14 16:05 micael
+
+ * [r67] sample/inp.ape, src/output.F90: *) Changed the name of some
+ output options.
+
+2004-05-14 16:02 micael
+
+ * [r66] src/wave_equations_integrator.F90: *) Small change to speed
+ up the code.
+
+2004-05-14 14:51 micael
+
+ * [r65] src/eigensolver.F90: *) EingenSolverTolerance now takes
+ into account the input units.
+
+2004-05-13 18:48 micael
+
+ * [r64] src/atom.F90: *) Nuclear charge was printed with a minus
+ sign...
+
+2004-05-13 18:28 micael
+
+ * [r63] src/Makefile.am, src/atom.F90, src/mesh_generation.F90,
+ src/orbitals.F90, src/output.F90: *) Simplified the mesh
+ generation.
+
+2004-05-13 18:04 micael
+
+ * [r62] sample/inp.ape, src/orbitals.F90: *) Fixed some output
+ messages.
+
+2004-05-13 17:06 micael
+
+ * [r61] AUTHORS: *) Small change.
+
+2004-05-13 17:02 micael
+
+ * [r60] src/mix.F90, src/wave_equations_integrator.F90, src/xc.F90:
+ *) Changed some default values.
+
+2004-05-13 16:47 micael
+
+ * [r59] src/eigensolver.F90: *) Bug fixed: EigenSolverTolerance
+ default value was zero.
+
+2004-05-13 16:41 micael
+
+ * [r58] src/ape.F90, src/output.F90: *) Option OutputAll is gone.
+
+2004-05-13 14:52 micael
+
+ * [r57] sample/inp.ape, src/atom.F90, src/orbitals.F90,
+ src/potentials.F90, src/scf.F90, src/units.F90: *) Output and
+ input units are now working.
+
+2004-05-11 17:37 micael
+
+ * [r56] src/scf.F90: *) Changed the default value of the maximum
+ number of iterations.
+
+2004-05-11 17:35 micael
+
+ * [r55] src/scf.F90: *) Changed the default values of the
+ convergence parameters.
+
+2004-05-11 17:31 micael
+
+ * [r54] src/ape.F90: *) Output is now initialized after the SCF
+ cycle.
+
+2004-05-11 12:53 micael
+
+ * [r53] Makefile.am, configure.ac, doc, doc/Makefile.am: *) Added a
+ new "doc" directory. Soon I will commit a fisrt draft of the APE
+ Manual.
+
+2004-05-11 12:48 micael
+
+ * [r52] src/mix.F90: *) Changed some default values.
+
+2004-04-28 18:29 micael
+
+ * [r51] src/ape.F90, src/atom.F90, src/eigensolver.F90,
+ src/hamann.F90, src/hartree.F90, src/messages.F90,
+ src/orbitals.F90, src/potentials.F90, src/scf.F90,
+ src/splines.F90, src/tm.F90, src/wave_equations.F90,
+ src/wave_equations_derivs.F90: *) Just some some indentation...
+
+2004-04-28 14:38 micael
+
+ * [r50] src/orbitals.F90: *) BUg fixed: array dimension was wrong.
+
+2004-02-05 19:10 micael
+
+ * [r48] sample/inp.ape, src/atom.F90, src/hamann.F90,
+ src/orbitals.F90, src/output.F90, src/potentials.F90, src/tm.F90:
+ *) Fixed some stuff in the hamman scheme.
+ *) Small changes in other places.
+
+2004-02-05 10:40 micael
+
+ * [r47] src/wave_equations.F90, src/wave_equations_integrator.F90:
+ *) The way how the values of the wvefunctions at infinity are
+ treated is now diferent.
+ The way it was was causing some proplems.
+
+2004-02-05 09:16 micael
+
+ * [r46] sample/inp.ape, src/atom.F90, src/orbitals.F90: *) It is
+ now possible to include rare gases in the orbitals data block.
+
+2004-02-04 10:06 micael
+
+ * [r45] sample/inp.ape, src/atom.F90, src/orbitals.F90,
+ src/output.F90: *) Removed output mesh: to dificult to use
+ without problems.
+ *) There is now only one way to output the pseudopotentials. I
+ will write an
+ utilitie to convert formats.
+
+2004-02-03 13:53 micael
+
+ * [r44] configure.ac, src/Makefile.am, src/ape.F90, src/atom.F90,
+ src/eigensolver.F90, src/hamann.F90, src/orbitals.F90,
+ src/scf.F90, src/tm.F90, src/wave_equations.F90,
+ src/wave_equations_integrator.F90: *) Some compilers required
+ these changes.
+
+2004-02-03 11:59 micael
+
+ * [r43] src/ape.F90, src/utilities.F90: *) Version number printed
+ by the program is consitent with autoconf version.
+
+2004-02-03 11:35 micael
+
+ * [r42] acinclude.m4, build/acx.m4, build/fortran90.m4,
+ configure.ac, src/Makefile.am, src/gsl_interface_c.c,
+ src/odeint.c: *) We now use the Autoconf support for Fortran
+ 90/95.
+
+2004-02-02 19:05 micael
+
+ * [r41] acinclude.m4: *) Added headers to almost all the files.
+
+2004-02-02 19:04 micael
+
+ * [r40] AUTHORS, Makefile.am, autogen.sh, build/acx.m4,
+ build/fortran90.m4, configure.ac, src/Makefile.am, src/ape.F90,
+ src/atom.F90, src/eigensolver.F90, src/gsl_interface_c.c,
+ src/gsl_interface_f.F90, src/hamann.F90, src/hartree.F90,
+ src/liboct_parser.F90, src/linalg.F90, src/mesh_generation.F90,
+ src/messages.F90, src/mix.F90, src/output.F90,
+ src/potentials.F90, src/scf.F90, src/splines.F90, src/tm.F90,
+ src/types.F90, src/units.F90, src/utilities.F90,
+ src/wave_equations.F90, src/wave_equations_derivs.F90,
+ src/wave_equations_integrator.F90, src/xc.F90: *) Added headers
+ to almost all the files.
+
+2004-02-02 18:34 micael
+
+ * [r39] Makefile.am, configure.ac, src/Makefile.am, src/ape.F90,
+ src/ape.f90, src/atom.F90, src/atom.f90, src/eigensolver.F90,
+ src/eigensolver.f90, src/gsl_interface_f.F90,
+ src/gsl_interface_f.f90, src/hamann.F90, src/hamann.f90,
+ src/hartree.F90, src/hartree.f90, src/liboct_parser.F90,
+ src/liboct_parser.f90, src/linalg.F90, src/linalg.f90,
+ src/mesh_generation.F90, src/mesh_generation.f90,
+ src/messages.F90, src/messages.f90, src/mix.F90, src/mix.f90,
+ src/orbitals.F90, src/orbitals.f90, src/output.F90,
+ src/output.f90, src/potentials.F90, src/potentials.f90,
+ src/scf.F90, src/scf.f90, src/splines.F90, src/splines.f90,
+ src/tm.F90, src/tm.f90, src/types.F90, src/types.f90,
+ src/units.F90, src/units.f90, src/utilities.F90,
+ src/utilities.f90, src/wave_equations.F90,
+ src/wave_equations.f90, src/wave_equations_derivs.F90,
+ src/wave_equations_derivs.f90, src/wave_equations_integrator.F90,
+ src/wave_equations_integrator.f90, src/xc.F90, src/xc.f90: *)
+ More "Autotools" stuff. Now, all the Fortran 90 files are
+ pre-processed.
+ In order to do that, the extension of all the .f90 files was
+ changed to .F90.
+ *) POINTER_SIZE is now handled by the Autotools.
+
+2004-02-02 14:20 micael
+
+ * [r38] src/Makefile.am: *) Bug fixed. The name of a file was
+ incorrect.
+
+2004-02-02 14:09 micael
+
+ * [r37] src/atom.f90: *) Small bug fixed related to the default
+ name of the AtomDataFile.
+
+2004-02-02 13:02 micael
+
+ * [r36] src/gsl_interface_c.c, src/odeint.c: Lets start using the
+ autotools...
+ *) C functions names are now handled properly regarding the
+ Fortran mangling scheme.
+
+2004-02-02 12:38 micael
+
+ * [r35] Makefile, configure.ac, sample/inp.ape, src/Makefile.am: *)
+ New build system is now working!
+
+2004-02-01 16:11 micael
+
+ * [r34] src/hartree.f90, src/xc.f90: *) Some changes needed to make
+ the code compile with some diferent compilers.
+
+2004-02-01 16:06 micael
+
+ * [r33] src/mix.f90: +) Bug fixed: intent(out) atribute missing.
+
+2004-02-01 16:03 micael
+
+ * [r32] src/mesh_generation.f90: *) Some changes needed to make the
+ code compile with some diferent compilers.
+
+2004-02-01 15:58 micael
+
+ * [r31] src/splines.f90: *) Some changes needed to make the code
+ compile with some diferent compilers.
+
+2004-01-31 14:49 micael
+
+ * [r30] src/odeint.c: *) Bug fixed. There was some c stuff wrong.
+
+2004-01-31 14:46 micael
+
+ * [r29] autogen.sh: *) Forgot to commit this file for the new build
+ system.
+
+2004-01-31 14:44 micael
+
+ * [r28] Makefile: *) Updated the Makefile because some filenames
+ have changed recently.
+
+2004-01-31 14:41 micael
+
+ * [r27] build, build/acx.m4, build/fortran90.m4: *) Some files that
+ were missing.
+
+2004-01-31 14:40 micael
+
+ * [r26] src/tm.f90: *) Removed call to LAPACK to allow compilation
+ with the autotools.
+
+2004-01-31 14:37 micael
+
+ * [r25] AUTHORS, ChangeLog, Makefile.am, NEWS, README,
+ acinclude.m4, configure.ac, src/Makefile.am, src/gsl_interface.c,
+ src/gsl_interface.f90, src/gsl_interface_c.c,
+ src/gsl_interface_f.f90: *) New build system. It is *not* working
+ yet.
+
+2004-01-12 11:11 micael
+
+ * [r24] Makefile, parser, src/ape.f90, src/atom.f90,
+ src/eigensolver.f90, src/liboct_parser.f90, src/messages.f90,
+ src/mix.f90, src/orbitals.f90, src/output.f90, src/scf.f90,
+ src/units.f90, src/wave_equations_integrator.f90, src/xc.f90: *)
+ The parser is no longer part of the APE source. Instead it uses
+ the oct_parser package.
+
+2004-01-10 15:41 micael
+
+ * [r23] Makefile, sample/inp.ape, sample/input.dat, src/ape.f90,
+ src/messages.f90, src/output.f90: *) Changed the name the input
+ file.
+ *) Changed the names of some output files.
+ *) Some other minor changes.
+
+2004-01-09 10:52 micael
+
+ * [r22] src/hamann.f90: *) Bug fix. USE statement missing.
+
+2004-01-05 23:38 micael
+
+ * [r21] sample/input.dat, src/atom.f90, src/hamann.f90,
+ src/orbitals.f90, src/output.f90, src/wave_equations.f90: *)
+ Hamann pseudopotential generation scheme is working. Needs some
+ testing now...
+ *) Pseudopotential output fixed
+
+2004-01-04 21:37 micael
+
+ * [r20] Makefile, sample/input.dat, src/ape.f90, src/atom.f90,
+ src/eigensolver.f90, src/gsl_interface.c, src/gsl_interface.f90,
+ src/gsl_utilities.f90, src/hamann.f90, src/hartree.f90,
+ src/linalg.f90, src/mix.f90, src/orbitals.f90, src/output.f90,
+ src/potentials.f90, src/scf.f90,
+ src/schrodinger_dirac_derivs.f90, src/schrodinger_dirac_int.f90,
+ src/splines.f90, src/tm.f90, src/wave_equations.f90,
+ src/wave_equations_derivs.f90, src/wave_equations_integrator.f90,
+ src/xc.f90: *) Changed the names of files schrodinger_dirac_int
+ and schrodinger_dirac_devivs
+ *) Changed the names of some variables (nop -> np; polar ->
+ nspin)
+ *) Some bug fixes
+ *) Output of the potential and wavefunctions is now working
+ *) Added hamann and troulier-martins modules. They are not yet
+ working.
+ *) Cleaned the gsl interfaces
+ *) New linear algebra module
+
+2003-12-29 21:00 micael
+
+ * [r19] sample/input.dat, src/orbitals.f90, src/wave_equations.f90,
+ src/xc.f90: *) Bug fixed in the xc module
+ *) The eigenvalues are now printed in a new way
+
+2003-12-29 16:48 micael
+
+ * [r18] sample/input.dat, src/atom.f90, src/messages.f90,
+ src/mix.f90, src/potentials.f90, src/scf.f90: *) Bug fixed in
+ module atom
+ *) New mixing module (it's the octopus module with some changes)
+
+2003-12-29 16:03 micael
+
+ * [r17] Makefile, sample/input.dat, src/atom.f90, src/messages.f90,
+ src/orbitals.f90, src/potentials.f90, src/qn.f90, src/scf.f90,
+ src/wave_equations.f90: *) Renamed file qn.f90 to
+ wave_equations.f90
+ *) More changes to the messages
+ *) Changed the way the convergence critiria are calculated
+
+2003-12-29 13:16 micael
+
+ * [r16] src/gsl_interface.c, src/gsl_interface.f90,
+ src/gsl_utilities.f90: *) I forgot to remove and add some
+ files...
+
+2003-12-29 13:05 micael
+
+ * [r15] Makefile, parser/parser_interface.f90, sample/input.dat,
+ src/ape.f90, src/atom.f90, src/eigensolver.f90, src/hartree.f90,
+ src/mesh_generation.f90, src/messages.f90, src/mix.f90,
+ src/orbitals.f90, src/output.f90, src/potentials.f90, src/qn.f90,
+ src/scf.f90, src/schrodinger_dirac_derivs.f90,
+ src/schrodinger_dirac_int.f90, src/splines.f90, src/types.f90,
+ src/units.f90, src/utilities.f90, src/xc.f90: *) More changes to
+ make APE "compatible" with Octopus
+ *) The "info" and "density" output are now working
+ *) Some more messages
+
+2003-12-16 18:06 micael
+
+ * [r14] src/hartree.f90, src/mesh_generation.f90,
+ src/potentials.f90, src/schrodinger_dirac_derivs.f90,
+ src/splines.f90, src/utilities.f90: *) Finished implementing the
+ new indentation and case style.
+ *) Finished implementig the new message system.
+
+2003-12-16 16:57 micael
+
+ * [r13] src/ape.f90, src/atom.f90, src/orbitals.f90, src/qn.f90: *)
+ Bug fixed in ps_orbitals_init.
+ *) More "messages"...
+
+2003-12-16 16:03 micael
+
+ * [r12] Makefile, sample/input.dat, src/ape.f90, src/atom.f90,
+ src/eigensolver.f90, src/messages.f90, src/mix.f90,
+ src/orbitals.f90, src/output.f90, src/scf.f90,
+ src/schrodinger_dirac_int.f90, src/units.f90, src/xc.f90: *) New
+ screen messages system.
+
+2003-12-12 17:32 micael
+
+ * [r11] src/ape.f90, src/atom.f90, src/eigensolver.f90,
+ src/orbitals.f90, src/qn.f90: *) New indentation and case style
+ (more octopus like...)
+ Started implementing the pseudopotentials generation:
+ *) New types
+ *) Subroutines to initialize and end new types
+
+2003-12-10 15:29 micael
+
+ * [r10] src/atom.f90, src/eigensolver.f90, src/orbitals.f90,
+ src/output.f90, src/potentials.f90, src/qn.f90, src/scf.f90,
+ src/schrodinger_dirac_derivs.f90, src/schrodinger_dirac_int.f90,
+ src/xc.f90: *) Some more work... (I dont remember all the changes
+ I made...)
+
+2003-12-10 15:06 micael
+
+ * [r9] sample, sample/input.dat: *) Added sample input file.
+
+2003-10-22 17:45 micael
+
+ * [r8] src/eigensolver.f90, src/orbitals.f90, src/qn.f90,
+ src/scf.f90: Modified Files:
+ src/eigensolver.f90 src/orbitals.f90 src/qn.f90 src/scf.f90
+ Log:
+ Subroutine orbitals_eigensolve now passes fp and g to subroutine
+ eigensolve
+ and lets it decide which one should be used.
+
+2003-10-22 13:58 micael
+
+ * [r7] src/output.f90: Added Files:
+ src/output.f90
+ Log:
+ An another one...
+
+2003-10-22 13:57 micael
+
+ * [r6] src/eigensolver.f90: Added Files:
+ src/eigensolver.f90
+ Log:
+ Another missing file...
+
+2003-10-22 13:54 micael
+
+ * [r5] parser, parser/grammar.c, parser/grammar.y, parser/math.c,
+ parser/parse.c, parser/parse_exp.c, parser/parser.h,
+ parser/parser_f.c, parser/parser_interface.f90,
+ parser/string_f.c, parser/string_f.h, parser/symbols.c,
+ parser/symbols.h: Added Files:
+ gsl/gsl_linalg_interface.f90 gsl/gsl_math_interface.f90
+ gsl/gsl_matrix_interface.f90 gsl/gsl_odeiv_interface.f90
+ gsl/gsl_permutation_interface.f90 gsl/gsl_sf_interface.f90
+ gsl/gsl_spline_interface.f90 gsl/gsl_utilities.f90
+ gsl/gsl_vector_interface.f90 parser/grammar.c parser/grammar.y
+ parser/math.c parser/parse.c parser/parse_exp.c
+ parser/parser.h parser/parser_f.c parser/parser_interface.f90
+ parser/string_f.c parser/string_f.h parser/symbols.c
+ parser/symbols.h
+ Log:
+ Importing missing files.
+
+2003-10-22 13:52 micael
+
+ * [r4] Makefile, src/ape.f90, src/atom.f90, src/hartree.f90,
+ src/mix.f90, src/odeint.c, src/orbitals.f90, src/potentials.f90,
+ src/qn.f90, src/scf.f90, src/schrodinger_dirac_derivs.f90,
+ src/schrodinger_dirac_int.f90, src/splines.f90, src/units.f90,
+ src/utilities.f90, src/xc.f90: Added Files:
+ Makefile src/ape.f90 src/atom.f90 src/hartree.f90 src/mix.f90
+ src/odeint.c src/orbitals.f90 src/potentials.f90 src/qn.f90
+ src/scf.f90 src/schrodinger_dirac_derivs.f90
+ src/schrodinger_dirac_int.f90 src/splines.f90 src/units.f90
+ src/utilities.f90 src/xc.f90
+ Log:
+ Importing files for atomic calculations.
+
+2003-10-22 13:37 micael
+
+ * [r3] src/mesh_generation.f90: Added Files:
+ src/mesh_generation.f90
+ Log:
+ Added mesh generation module.
+
+2003-10-09 15:13 micael
+
+ * [r2] src, src/types.f90: Adding types.f90
+
+2003-10-09 15:13
+
+ * [r1] .: New repository initialized by cvs2svn.
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..a1e89e1
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..9ba9a54
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,41 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+ACLOCAL_AMFLAGS = -I m4
+
+SUBDIRS = libstring_f liboct_parser src doc testsuite build
+
+EXTRA_DIST = sample/Na/Na sample/Cu/Cu.ae sample/Cu/Cu.tm sample/Cu/Cu.mrpp \
+ sample/Ti/Ti.ae sample/Ti/Ti.tm sample/Ti/Ti.mrpp \
+ sample/Cd/Cd sample/Si/Si \
+ build/ape.spec.in
+
+CLEANFILES = *~ *.bak *.pc*
+DISTCLEANFILES = config.log config.status ape.spec
+
+check-basic:
+ $(MAKE) -C testsuite check-basic
+check-ae:
+ $(MAKE) -C testsuite check-ae
+check-ps:
+ $(MAKE) -C testsuite check-ps
+check-libxc:
+ $(MAKE) -C testsuite check-libxc
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..59588a4
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,770 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/build-aux/config.guess \
+ $(top_srcdir)/build-aux/config.sub \
+ $(top_srcdir)/build-aux/install-sh \
+ $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \
+ AUTHORS COPYING ChangeLog INSTALL NEWS TODO \
+ build-aux/config.guess build-aux/config.sub build-aux/depcomp \
+ build-aux/install-sh build-aux/missing build-aux/texinfo.tex
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ cscope distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = libstring_f liboct_parser src doc testsuite build
+EXTRA_DIST = sample/Na/Na sample/Cu/Cu.ae sample/Cu/Cu.tm sample/Cu/Cu.mrpp \
+ sample/Ti/Ti.ae sample/Ti/Ti.tm sample/Ti/Ti.mrpp \
+ sample/Cd/Cd sample/Si/Si \
+ build/ape.spec.in
+
+CLEANFILES = *~ *.bak *.pc*
+DISTCLEANFILES = config.log config.status ape.spec
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+ -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist-recursive cscopelist
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod u+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-cscope \
+ clean-generic cscope cscopelist cscopelist-recursive ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzip \
+ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+
+
+check-basic:
+ $(MAKE) -C testsuite check-basic
+check-ae:
+ $(MAKE) -C testsuite check-ae
+check-ps:
+ $(MAKE) -C testsuite check-ps
+check-libxc:
+ $(MAKE) -C testsuite check-libxc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..b76b7df
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,4 @@
+24-May-2006: Moved from CVS to subversion.
+
+24-Feb-2005: Mailing lists for the APE project created at http://www.tddft.org/mailman/listinfo
+
diff --git a/README b/README
new file mode 100644
index 0000000..8db53b1
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+Please refer to the manual in the doc directory for further information.
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..8f7881d
--- /dev/null
+++ b/TODO
@@ -0,0 +1,16 @@
+In the near future:
+===================
+
+* Update output
+
+
+In the future:
+==============
+
+* Fix the default cut-off radii for the TM scheme.
+
+
+Things to think about:
+======================
+
+* GUI
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..b81029c
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1141 @@
+# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Configure path for the GNU Scientific Library
+# Christopher R. Gabriel <cgabriel at linux.it>, April 2000
+
+
+AC_DEFUN([AX_PATH_GSL],
+[
+AC_ARG_WITH(gsl-prefix,[ --with-gsl-prefix=PFX Prefix where GSL is installed (optional)],
+ gsl_prefix="$withval", gsl_prefix="")
+AC_ARG_WITH(gsl-exec-prefix,[ --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional)],
+ gsl_exec_prefix="$withval", gsl_exec_prefix="")
+AC_ARG_ENABLE(gsltest, [ --disable-gsltest Do not try to compile and run a test GSL program],
+ , enable_gsltest=yes)
+
+ if test "x${GSL_CONFIG+set}" != xset ; then
+ if test "x$gsl_prefix" != x ; then
+ GSL_CONFIG="$gsl_prefix/bin/gsl-config"
+ fi
+ if test "x$gsl_exec_prefix" != x ; then
+ GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config"
+ fi
+ fi
+
+ AC_PATH_PROG(GSL_CONFIG, gsl-config, no)
+ min_gsl_version=ifelse([$1], ,0.2.5,$1)
+ AC_MSG_CHECKING(for GSL - version >= $min_gsl_version)
+ no_gsl=""
+ if test "$GSL_CONFIG" = "no" ; then
+ no_gsl=yes
+ else
+ GSL_CFLAGS=`$GSL_CONFIG --cflags`
+ GSL_LIBS=`$GSL_CONFIG --libs`
+
+ gsl_major_version=`$GSL_CONFIG --version | \
+ sed 's/^\([[0-9]]*\).*/\1/'`
+ if test "x${gsl_major_version}" = "x" ; then
+ gsl_major_version=0
+ fi
+
+ gsl_minor_version=`$GSL_CONFIG --version | \
+ sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\2/'`
+ if test "x${gsl_minor_version}" = "x" ; then
+ gsl_minor_version=0
+ fi
+
+ gsl_micro_version=`$GSL_CONFIG --version | \
+ sed 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\3/'`
+ if test "x${gsl_micro_version}" = "x" ; then
+ gsl_micro_version=0
+ fi
+
+ if test "x$enable_gsltest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GSL_CFLAGS"
+ LIBS="$LIBS $GSL_LIBS"
+
+ rm -f conf.gsltest
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char* my_strdup (const char *str);
+
+char*
+my_strdup (const char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main (void)
+{
+ int major = 0, minor = 0, micro = 0;
+ int n;
+ char *tmp_version;
+
+ system ("touch conf.gsltest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_gsl_version");
+
+ n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) ;
+
+ if (n != 2 && n != 3) {
+ printf("%s, bad version string\n", "$min_gsl_version");
+ exit(1);
+ }
+
+ if (($gsl_major_version > major) ||
+ (($gsl_major_version == major) && ($gsl_minor_version > minor)) ||
+ (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro)))
+ {
+ exit(0);
+ }
+ else
+ {
+ exit(1);
+ }
+}
+
+],, no_gsl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gsl" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$GSL_CONFIG" = "no" ; then
+ echo "*** The gsl-config script installed by GSL could not be found"
+ echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GSL_CONFIG environment variable to the"
+ echo "*** full path to gsl-config."
+ else
+ if test -f conf.gsltest ; then
+ :
+ else
+ echo "*** Could not run GSL test program, checking why..."
+ CFLAGS="$CFLAGS $GSL_CFLAGS"
+ LIBS="$LIBS $GSL_LIBS"
+ AC_TRY_LINK([
+#include <stdio.h>
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GSL or finding the wrong"
+ echo "*** version of GSL. If it is not finding GSL, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GSL was incorrectly installed"
+ echo "*** or that you have moved GSL since it was installed. In the latter case, you"
+ echo "*** may want to edit the gsl-config script: $GSL_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+# GSL_CFLAGS=""
+# GSL_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GSL_CFLAGS)
+ AC_SUBST(GSL_LIBS)
+ rm -f conf.gsltest
+])
+
+AU_ALIAS([AM_PATH_GSL], [AX_PATH_GSL])
+
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.12'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.12.2], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.12.2])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 17
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 19
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+[$0: two- and three-arguments forms are deprecated. For more info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of '-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/acx.m4])
+m4_include([m4/compilation_info.m4])
+m4_include([m4/f90_module_flag.m4])
+m4_include([m4/libxc.m4])
+m4_include([m4/pspio.m4])
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755
index 0000000..49ba16f
--- /dev/null
+++ b/build-aux/config.guess
@@ -0,0 +1,1522 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-01-01'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755
index 0000000..d6b6b3c
--- /dev/null
+++ b/build-aux/config.sub
@@ -0,0 +1,1766 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-01-01'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/depcomp b/build-aux/depcomp
new file mode 100755
index 0000000..bd0ac08
--- /dev/null
+++ b/build-aux/depcomp
@@ -0,0 +1,688 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2011-12-04.11; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755
index 0000000..a9244eb
--- /dev/null
+++ b/build-aux/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for `test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/missing b/build-aux/missing
new file mode 100755
index 0000000..86a8fc3
--- /dev/null
+++ b/build-aux/missing
@@ -0,0 +1,331 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2012-01-06.13; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
new file mode 100644
index 0000000..2abda0f
--- /dev/null
+++ b/build-aux/texinfo.tex
@@ -0,0 +1,9913 @@
+% texinfo.tex -- TeX macros to handle Texinfo files.
+%
+% Load plain if necessary, i.e., if running under initex.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+%
+\def\texinfoversion{2012-01-03.09}
+%
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+%
+% This texinfo.tex file is free software: you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation, either version 3 of the
+% License, or (at your option) any later version.
+%
+% This texinfo.tex file is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+% As a special exception, when this file is read by TeX when processing
+% a Texinfo source document, you may use the result without
+% restriction. (This has been our intent since Texinfo was invented.)
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+% ftp://tug.org/tex/texinfo.tex
+% (and all CTAN mirrors, see http://www.ctan.org).
+% The texinfo.tex in any given distribution could well be out
+% of date, so if that's what you're using, please check.
+%
+% Send bug reports to bug-texinfo at gnu.org. Please include including a
+% complete document in each bug report with which we can reproduce the
+% problem. Patches are, of course, greatly appreciated.
+%
+% To process a Texinfo manual with TeX, it's most reliable to use the
+% texi2dvi shell script that comes with the distribution. For a simple
+% manual foo.texi, however, you can get away with this:
+% tex foo.texi
+% texindex foo.??
+% tex foo.texi
+% tex foo.texi
+% dvips foo.dvi -o # or whatever; this makes foo.ps.
+% The extra TeX runs get the cross-reference information correct.
+% Sometimes one run after texindex suffices, and sometimes you need more
+% than two; texi2dvi does it as many times as necessary.
+%
+% It is possible to adapt texinfo.tex for other languages, to some
+% extent. You can get the existing language-specific files from the
+% full Texinfo distribution.
+%
+% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+
+
+\message{Loading texinfo [version \texinfoversion]:}
+
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}%
+ \catcode`+=\active \catcode`\_=\active}
+
+\chardef\other=12
+
+% We never want plain's \outer definition of \+ in Texinfo.
+% For @tex, we can use \tabalign.
+\let\+ = \relax
+
+% Save some plain tex macros whose names we will redefine.
+\let\ptexb=\b
+\let\ptexbullet=\bullet
+\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
+\let\ptexfootnote=\footnote
+\let\ptexgtr=>
+\let\ptexhat=^
+\let\ptexi=\i
+\let\ptexindent=\indent
+\let\ptexinsert=\insert
+\let\ptexlbrace=\{
+\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
+\let\ptexplus=+
+\let\ptexraggedright=\raggedright
+\let\ptexrbrace=\}
+\let\ptexslash=\/
+\let\ptexstar=\*
+\let\ptext=\t
+\let\ptextop=\top
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Use TeX 3.0's \inputlineno to get the line number, for better error
+% messages, but if we're using an old version of TeX, don't do anything.
+%
+\ifx\inputlineno\thisisundefined
+ \let\linenumber = \empty % Pre-3.0.
+\else
+ \def\linenumber{l.\the\inputlineno:\space}
+\fi
+
+% Set up fixed words for English if not already set.
+\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putworderror\undefined \gdef\putworderror{error}\fi
+\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
+\ifx\putwordin\undefined \gdef\putwordin{in}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
+\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
+\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
+\ifx\putwordof\undefined \gdef\putwordof{of}\fi
+\ifx\putwordon\undefined \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
+\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
+\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
+%
+\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
+\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
+\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
+\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
+\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
+\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
+\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
+\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
+\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
+\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
+\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
+\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
+%
+\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
+\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
+\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
+\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
+\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
+
+% Since the category of space is not known, we have to be careful.
+\chardef\spacecat = 10
+\def\spaceisspace{\catcode`\ =\spacecat}
+
+% sometimes characters are active, so we need control sequences.
+\chardef\ampChar = `\&
+\chardef\colonChar = `\:
+\chardef\commaChar = `\,
+\chardef\dashChar = `\-
+\chardef\dotChar = `\.
+\chardef\exclamChar= `\!
+\chardef\hashChar = `\#
+\chardef\lquoteChar= `\`
+\chardef\questChar = `\?
+\chardef\rquoteChar= `\'
+\chardef\semiChar = `\;
+\chardef\slashChar = `\/
+\chardef\underChar = `\_
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+% The following is used inside several \edef's.
+\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
+
+% Hyphenation fixes.
+\hyphenation{
+ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
+ ap-pen-dix bit-map bit-maps
+ data-base data-bases eshell fall-ing half-way long-est man-u-script
+ man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
+ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+ spell-ing spell-ings
+ stand-alone strong-est time-stamp time-stamps which-ever white-space
+ wide-spread wrap-around
+}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt }
+
+% Sometimes it is convenient to have everything in the transcript file
+% and nothing on the terminal. We don't just call \tracingall here,
+% since that produces some useless output on the terminal. We also make
+% some effort to order the tracing commands to reduce output in the log
+% file; cf. trace.sty in LaTeX.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{%
+ \tracingstats2
+ \tracingpages1
+ \tracinglostchars2 % 2 gives us more in etex
+ \tracingparagraphs1
+ \tracingoutput1
+ \tracingmacros2
+ \tracingrestores1
+ \showboxbreadth\maxdimen \showboxdepth\maxdimen
+ \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
+ \tracingscantokens1
+ \tracingifs1
+ \tracinggroups1
+ \tracingnesting2
+ \tracingassigns1
+ \fi
+ \tracingcommands3 % 3 gives us more in etex
+ \errorcontextlines16
+}%
+
+% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
+% aren't perfect, it's not the end of the world, being an error message,
+% after all.
+%
+\def\errormsg{\begingroup \indexnofonts \doerrormsg}
+\def\doerrormsg#1{\errmessage{#1}}
+
+% add check for \lastpenalty to plain's definitions. If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi\fi}
+
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
+%
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
+\newdimen\cornerlong \cornerlong=1pc
+\newdimen\cornerthick \cornerthick=.3pt
+\newdimen\topandbottommargin \topandbottommargin=.75in
+
+% Output a mark which sets \thischapter, \thissection and \thiscolor.
+% We dump everything together because we only have one kind of mark.
+% This works because we only use \botmark / \topmark, not \firstmark.
+%
+% A mark contains a subexpression of the \ifcase ... \fi construct.
+% \get*marks macros below extract the needed part using \ifcase.
+%
+% Another complication is to let the user choose whether \thischapter
+% (\thissection) refers to the chapter (section) in effect at the top
+% of a page, or that at the bottom of a page. The solution is
+% described on page 260 of The TeXbook. It involves outputting two
+% marks for the sectioning macros, one before the section break, and
+% one after. I won't pretend I can describe this better than DEK...
+\def\domark{%
+ \toks0=\expandafter{\lastchapterdefs}%
+ \toks2=\expandafter{\lastsectiondefs}%
+ \toks4=\expandafter{\prevchapterdefs}%
+ \toks6=\expandafter{\prevsectiondefs}%
+ \toks8=\expandafter{\lastcolordefs}%
+ \mark{%
+ \the\toks0 \the\toks2
+ \noexpand\or \the\toks4 \the\toks6
+ \noexpand\else \the\toks8
+ }%
+}
+% \topmark doesn't work for the very first chapter (after the title
+% page or the contents), so we use \firstmark there -- this gets us
+% the mark with the chapter defs, unless the user sneaks in, e.g.,
+% @setcolor (or @url, or @link, etc.) between @contents and the very
+% first @chapter.
+\def\gettopheadingmarks{%
+ \ifcase0\topmark\fi
+ \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
+}
+\def\getbottomheadingmarks{\ifcase1\botmark\fi}
+\def\getcolormarks{\ifcase2\topmark\fi}
+
+% Avoid "undefined control sequence" errors.
+\def\lastchapterdefs{}
+\def\lastsectiondefs{}
+\def\prevchapterdefs{}
+\def\prevsectiondefs{}
+\def\lastcolordefs{}
+
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox
+\newbox\footlinebox
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+ \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+ %
+ \ifodd\pageno \advance\hoffset by \bindingoffset
+ \else \advance\hoffset by -\bindingoffset\fi
+ %
+ % Do this outside of the \shipout so @code etc. will be expanded in
+ % the headline as they should be, not taken literally (outputting ''code).
+ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
+ \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
+ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ {%
+ % Have to do this stuff outside the \shipout because we want it to
+ % take effect in \write's, yet the group defined by the \vbox ends
+ % before the \shipout runs.
+ %
+ \indexdummies % don't expand commands in the output.
+ \normalturnoffactive % \ in index entries must not stay \, e.g., if
+ % the page break happens to be in the middle of an example.
+ % We don't want .vr (or whatever) entries like this:
+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % "\acronym" won't work when it's read back in;
+ % it needs to be
+ % {\code {{\tt \backslashcurfont }acronym}
+ \shipout\vbox{%
+ % Do this early so pdf references go to the beginning of the page.
+ \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
+ %
+ \ifcropmarks \vbox to \outervsize\bgroup
+ \hsize = \outerhsize
+ \vskip-\topandbottommargin
+ \vtop to0pt{%
+ \line{\ewtop\hfil\ewtop}%
+ \nointerlineskip
+ \line{%
+ \vbox{\moveleft\cornerthick\nstop}%
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}%
+ }%
+ \vss}%
+ \vskip\topandbottommargin
+ \line\bgroup
+ \hfil % center the page within the outer (page) hsize.
+ \ifodd\pageno\hskip\bindingoffset\fi
+ \vbox\bgroup
+ \fi
+ %
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \ifdim\ht\footlinebox > 0pt
+ % Only leave this space if the footline is nonempty.
+ % (We lessened \vsize for it in \oddfootingyyy.)
+ % The \baselineskip=24pt in plain's \makefootline has no effect.
+ \vskip 24pt
+ \unvbox\footlinebox
+ \fi
+ %
+ \ifcropmarks
+ \egroup % end of \vbox\bgroup
+ \hfil\egroup % end of (centering) \line\bgroup
+ \vskip\topandbottommargin plus1fill minus1fill
+ \boxmaxdepth = \cornerthick
+ \vbox to0pt{\vss
+ \line{%
+ \vbox{\moveleft\cornerthick\nsbot}%
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}%
+ }%
+ \nointerlineskip
+ \line{\ewbot\hfil\ewbot}%
+ }%
+ \egroup % \vbox from first cropmarks clause
+ \fi
+ }% end of \shipout\vbox
+ }% end of group with \indexdummies
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+\newinsert\margin \dimen\margin=\maxdimen
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha at viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
+\dimen@=\dp#1\relax \unvbox#1\relax
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr at ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+% Here are the rules for the cropmarks. Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+ {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+ {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1. The argument is the rest of
+% the input line (except we remove a trailing comment). #1 should be a
+% macro which expects an ordinary undelimited TeX argument.
+%
+\def\parsearg{\parseargusing{}}
+\def\parseargusing#1#2{%
+ \def\argtorun{#2}%
+ \begingroup
+ \obeylines
+ \spaceisspace
+ #1%
+ \parseargline\empty% Insert the \empty token, see \finishparsearg below.
+}
+
+{\obeylines %
+ \gdef\parseargline#1^^M{%
+ \endgroup % End of the group started in \parsearg.
+ \argremovecomment #1\comment\ArgTerm%
+ }%
+}
+
+% First remove any @comment, then any @c comment.
+\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
+%
+% \argremovec might leave us with trailing space, e.g.,
+% @end itemize @c foo
+% This space token undergoes the same procedure and is eventually removed
+% by \finishparsearg.
+%
+\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
+\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
+\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
+ \def\temp{#3}%
+ \ifx\temp\empty
+ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
+ \let\temp\finishparsearg
+ \else
+ \let\temp\argcheckspaces
+ \fi
+ % Put the space token in:
+ \temp#1 #3\ArgTerm
+}
+
+% If a _delimited_ argument is enclosed in braces, they get stripped; so
+% to get _exactly_ the rest of the line, we had to prevent such situation.
+% We prepended an \empty token at the very beginning and we expand it now,
+% just before passing the control to \argtorun.
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
+% either the null string, or it ends with \^^M---thus there is no danger
+% that a pair of braces would be stripped.
+%
+% But first, we have to remove the trailing space token.
+%
+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+
+% \parseargdef\foo{...}
+% is roughly equivalent to
+% \def\foo{\parsearg\Xfoo}
+% \def\Xfoo#1{...}
+%
+% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
+% favourite TeX trick. --kasal, 16nov03
+
+\def\parseargdef#1{%
+ \expandafter \doparseargdef \csname\string#1\endcsname #1%
+}
+\def\doparseargdef#1#2{%
+ \def#2{\parsearg#1}%
+ \def#1##1%
+}
+
+% Several utility definitions with active space:
+{
+ \obeyspaces
+ \gdef\obeyedspace{ }
+
+ % Make each space character in the input produce a normal interword
+ % space in the output. Don't allow a line break at this space, as this
+ % is used only in environments like @example, where each line of input
+ % should produce a line of output anyway.
+ %
+ \gdef\sepspaces{\obeyspaces\let =\tie}
+
+ % If an index command is used in an @example environment, any spaces
+ % therein should become regular spaces in the raw index file, not the
+ % expansion of \tie (\leavevmode \penalty \@M \ ).
+ \gdef\unsepspaces{\let =\space}
+}
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+% Define the framework for environments in texinfo.tex. It's used like this:
+%
+% \envdef\foo{...}
+% \def\Efoo{...}
+%
+% It's the responsibility of \envdef to insert \begingroup before the
+% actual body; @end closes the group after calling \Efoo. \envdef also
+% defines \thisenv, so the current environment is known; @end checks
+% whether the environment name matches. The \checkenv macro can also be
+% used to check whether the current environment is the one expected.
+%
+% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
+% are not treated as environments; they don't open a group. (The
+% implementation of @end takes care not to call \endgroup in this
+% special case.)
+
+
+% At run-time, environments start with this:
+\def\startenvironment#1{\begingroup\def\thisenv{#1}}
+% initialize
+\let\thisenv\empty
+
+% ... but they get defined via ``\envdef\foo{...}'':
+\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
+\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+
+% Check whether we're in the right environment:
+\def\checkenv#1{%
+ \def\temp{#1}%
+ \ifx\thisenv\temp
+ \else
+ \badenverr
+ \fi
+}
+
+% Environment mismatch, #1 expected:
+\def\badenverr{%
+ \errhelp = \EMsimple
+ \errmessage{This command can appear only \inenvironment\temp,
+ not \inenvironment\thisenv}%
+}
+\def\inenvironment#1{%
+ \ifx#1\empty
+ outside of any environment%
+ \else
+ in environment \expandafter\string#1%
+ \fi
+}
+
+% @end foo executes the definition of \Efoo.
+% But first, it executes a specialized version of \checkenv
+%
+\parseargdef\end{%
+ \if 1\csname iscond.#1\endcsname
+ \else
+ % The general wording of \badenverr may not be ideal.
+ \expandafter\checkenv\csname#1\endcsname
+ \csname E#1\endcsname
+ \endgroup
+ \fi
+}
+
+\newhelp\EMsimple{Press RETURN to continue.}
+
+
+% Be sure we're in horizontal mode when doing a tie, since we make space
+% equivalent to this in @example-like environments. Otherwise, a space
+% at the beginning of a line will start with \penalty -- and
+% since \penalty is valid in vertical mode, we'd end up putting the
+% penalty on the vertical list instead of in the new paragraph.
+{\catcode`@ = 11
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @/ allows a line break.
+\let\/=\allowbreak
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
+
+% @! is an end-of-sentence bang.
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
+
+% @? is an end-of-sentence query.
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \plainfrenchspacing
+ \else\ifx\temp\offword \plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
+ \fi\fi
+}
+
+% @w prevents a word break. Without the \leavevmode, @w at the
+% beginning of a paragraph, when TeX is still in vertical mode, would
+% produce a whole line of output instead of starting the paragraph.
+\def\w#1{\leavevmode\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page, by enclosing
+% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
+% to keep its height that of a normal line. According to the rules for
+% \topskip (p.114 of the TeXbook), the glue inserted is
+% max (\topskip - \ht (first item), 0). If that height is large,
+% therefore, no glue is inserted, and the space between the headline and
+% the text is small, which looks bad.
+%
+% Another complication is that the group might be very large. This can
+% cause the glue on the previous page to be unduly stretched, because it
+% does not have much material. In this case, it's better to add an
+% explicit \vfill so that the extra space is at the bottom. The
+% threshold for doing this is if the group is more than \vfilllimit
+% percent of a page (\vfilllimit can be changed inside of @tex).
+%
+\newbox\groupbox
+\def\vfilllimit{0.7}
+%
+\envdef\group{%
+ \ifnum\catcode`\^^M=\active \else
+ \errhelp = \groupinvalidhelp
+ \errmessage{@group invalid in context where filling is enabled}%
+ \fi
+ \startsavinginserts
+ %
+ \setbox\groupbox = \vtop\bgroup
+ % Do @comment since we are called inside an environment such as
+ % @example, where each end-of-line in the input causes an
+ % end-of-line in the output. We don't want the end-of-line after
+ % the `@group' to put extra space in the output. Since @group
+ % should appear on a line by itself (according to the Texinfo
+ % manual), we don't worry about eating any user text.
+ \comment
+}
+%
+% The \vtop produces a box with normal height and large depth; thus, TeX puts
+% \baselineskip glue before it, and (when the next line of text is done)
+% \lineskip glue after it. Thus, space below is not quite equal to space
+% above. But it's pretty close.
+\def\Egroup{%
+ % To get correct interline space between the last line of the group
+ % and the first line afterwards, we have to propagate \prevdepth.
+ \endgraf % Not \par, as it may have been set to \lisppar.
+ \global\dimen1 = \prevdepth
+ \egroup % End the \vtop.
+ % \dimen0 is the vertical size of the group's box.
+ \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
+ % \dimen2 is how much space is left on the page (more or less).
+ \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
+ % if the group doesn't fit on the current page, and it's a big big
+ % group, force a page break.
+ \ifdim \dimen0 > \dimen2
+ \ifdim \pagetotal < \vfilllimit\pageheight
+ \page
+ \fi
+ \fi
+ \box\groupbox
+ \prevdepth = \dimen1
+ \checkinserts
+}
+%
+% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
+% message, so this ends up printing `@group can only ...'.
+%
+\newhelp\groupinvalidhelp{%
+group can only be used in environments such as @example,^^J%
+where each line of input produces a line of output.}
+
+% @need space-in-mils
+% forces a page break if there is not space-in-mils remaining.
+
+\newdimen\mil \mil=0.001in
+
+\parseargdef\need{%
+ % Ensure vertical mode, so we don't make a big box in the middle of a
+ % paragraph.
+ \par
+ %
+ % If the @need value is less than one line space, it's useless.
+ \dimen0 = #1\mil
+ \dimen2 = \ht\strutbox
+ \advance\dimen2 by \dp\strutbox
+ \ifdim\dimen0 > \dimen2
+ %
+ % Do a \strut just to make the height of this box be normal, so the
+ % normal leading is inserted relative to the preceding line.
+ % And a page break here is fine.
+ \vtop to #1\mil{\strut\vfil}%
+ %
+ % TeX does not even consider page breaks if a penalty added to the
+ % main vertical list is 10000 or more. But in order to see if the
+ % empty box we just added fits on the page, we must make it consider
+ % page breaks. On the other hand, we don't want to actually break the
+ % page after the empty box. So we use a penalty of 9999.
+ %
+ % There is an extremely small chance that TeX will actually break the
+ % page at this \penalty, if there are no other feasible breakpoints in
+ % sight. (If the user is using lots of big @group commands, which
+ % almost-but-not-quite fill up a page, TeX will have a hard time doing
+ % good page breaking, for example.) However, I could not construct an
+ % example where a page broke at this \penalty; if it happens in a real
+ % document, then we can reconsider our strategy.
+ \penalty9999
+ %
+ % Back up by the size of the box, whether we did a page break or not.
+ \kern -#1\mil
+ %
+ % Do not allow a page break right after this kern.
+ \nobreak
+ \fi
+}
+
+% @br forces paragraph break (and is undocumented).
+
+\let\br = \par
+
+% @page forces the start of a new page.
+%
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+% This records the amount of indent in the innermost environment.
+% That's how much \exdent should take out.
+\newskip\exdentamount
+
+% This defn is used inside fill environments such as @defun.
+\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
+
+% This defn is used inside nofill environments such as @example.
+\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
+ \leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
+% paragraph. For more general purposes, use the \margin insertion
+% class. WHICH is `l' or `r'. Not documented, written for gawk manual.
+%
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+%
+\def\doinmargin#1#2{\strut\vadjust{%
+ \nobreak
+ \kern-\strutdepth
+ \vtop to \strutdepth{%
+ \baselineskip=\strutdepth
+ \vss
+ % if you have multiple lines of stuff to put here, you'll need to
+ % make the vbox yourself of the appropriate size.
+ \ifx#1l%
+ \llap{\ignorespaces #2\hskip\inmarginspacing}%
+ \else
+ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
+ \fi
+ \null
+ }%
+}}
+\def\inleftmargin{\doinmargin l}
+\def\inrightmargin{\doinmargin r}
+%
+% @inmargin{TEXT [, RIGHT-TEXT]}
+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
+% else use TEXT for both).
+%
+\def\inmargin#1{\parseinmargin #1,,\finish}
+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \def\lefttext{#1}% have both texts
+ \def\righttext{#2}%
+ \else
+ \def\lefttext{#1}% have only one text
+ \def\righttext{#1}%
+ \fi
+ %
+ \ifodd\pageno
+ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
+ \else
+ \def\temp{\inleftmargin\lefttext}%
+ \fi
+ \temp
+}
+
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change). This command
+% is not documented, not supported, and doesn't work.
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
+% @include FILE -- \input text of FILE.
+%
+\def\include{\parseargusing\filenamecatcodes\includezzz}
+\def\includezzz#1{%
+ \pushthisfilestack
+ \def\thisfile{#1}%
+ {%
+ \makevalueexpandable % we want to expand any @value in FILE.
+ \turnoffactive % and allow special characters in the expansion
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \wlog{texinfo.tex: doing @include of #1^^J}%
+ \edef\temp{\noexpand\input #1 }%
+ %
+ % This trickery is to read FILE outside of a group, in case it makes
+ % definitions, etc.
+ \expandafter
+ }\temp
+ \popthisfilestack
+}
+\def\filenamecatcodes{%
+ \catcode`\\=\other
+ \catcode`~=\other
+ \catcode`^=\other
+ \catcode`_=\other
+ \catcode`|=\other
+ \catcode`<=\other
+ \catcode`>=\other
+ \catcode`+=\other
+ \catcode`-=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
+}
+
+\def\pushthisfilestack{%
+ \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
+}
+\def\pushthisfilestackX{%
+ \expandafter\pushthisfilestackY\thisfile\StackTerm
+}
+\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
+ \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
+}
+
+\def\popthisfilestack{\errthisfilestackempty}
+\def\errthisfilestackempty{\errmessage{Internal error:
+ the stack of filenames is empty.}}
+
+\def\thisfile{}
+
+% @center line
+% outputs that line, centered.
+%
+\parseargdef\center{%
+ \ifhmode
+ \let\next\centerH
+ \else
+ \let\next\centerV
+ \fi
+ \next{\hfil \ignorespaces#1\unskip \hfil}%
+}
+\def\centerH#1{%
+ {%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+ }%
+}
+\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+
+% @sp n outputs n lines of vertical space
+
+\parseargdef\sp{\vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore is another way to write a comment
+
+\def\comment{\begingroup \catcode`\^^M=\other%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
+\commentxxx}
+{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+
+\let\c=\comment
+
+% @paragraphindent NCHARS
+% We'll use ems for NCHARS, close enough.
+% NCHARS can also be the word `asis' or `none'.
+% We cannot feasibly implement @paragraphindent asis, though.
+%
+\def\asisword{asis} % no translation, these are keywords
+\def\noneword{none}
+%
+\parseargdef\paragraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \defaultparindent = 0pt
+ \else
+ \defaultparindent = #1em
+ \fi
+ \fi
+ \parindent = \defaultparindent
+}
+
+% @exampleindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+% It seems @exampleindent asis isn't necessary, but
+% I preserve it to make it similar to @paragraphindent.
+\parseargdef\exampleindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \lispnarrowing = 0pt
+ \else
+ \lispnarrowing = #1em
+ \fi
+ \fi
+}
+
+% @firstparagraphindent WORD
+% If WORD is `none', then suppress indentation of the first paragraph
+% after a section heading. If WORD is `insert', then do indent at such
+% paragraphs.
+%
+% The paragraph indentation is suppressed or not by calling
+% \suppressfirstparagraphindent, which the sectioning commands do.
+% We switch the definition of this back and forth according to WORD.
+% By default, we suppress indentation.
+%
+\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
+\def\insertword{insert}
+%
+\parseargdef\firstparagraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\noneword
+ \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
+ \else\ifx\temp\insertword
+ \let\suppressfirstparagraphindent = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @firstparagraphindent option `\temp'}%
+ \fi\fi
+}
+
+% Here is how we actually suppress indentation. Redefine \everypar to
+% \kern backwards by \parindent, and then reset itself to empty.
+%
+% We also make \indent itself not actually do anything until the next
+% paragraph.
+%
+\gdef\dosuppressfirstparagraphindent{%
+ \gdef\indent{%
+ \restorefirstparagraphindent
+ \indent
+ }%
+ \gdef\noindent{%
+ \restorefirstparagraphindent
+ \noindent
+ }%
+ \global\everypar = {%
+ \kern -\parindent
+ \restorefirstparagraphindent
+ }%
+}
+
+\gdef\restorefirstparagraphindent{%
+ \global \let \indent = \ptexindent
+ \global \let \noindent = \ptexnoindent
+ \global \everypar = {}%
+}
+
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi % \openindices needs to do some work in any case.
+ \openindices
+ \let\setfilename=\comment % Ignore extra @setfilename cmds.
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc.
+ \openin 1 texinfo.cnf
+ \ifeof 1 \else \input texinfo.cnf \fi
+ \closein 1
+ %
+ \comment % Ignore the actual filename.
+}
+
+% Called from \setfilename.
+%
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+
+\message{pdf,}
+% adobe `portable' document format
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+\newtoks\toksA
+\newtoks\toksB
+\newtoks\toksC
+\newtoks\toksD
+\newbox\boxA
+\newcount\countA
+\newif\ifpdf
+\newif\ifpdfmakepagedest
+
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as being undefined.
+\ifx\pdfoutput\thisisundefined
+\else
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+
+% PDF uses PostScript string constants for the names of xref targets,
+% for display in the outlines, and in other places. Thus, we have to
+% double any backslashes. Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e. Not good.
+%
+% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
+% related messages. The final outcome is that it is up to the TeX user
+% to double the backslashes and otherwise make the string valid, so
+% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
+% do this reliably, so we use it.
+
+% #1 is a control sequence in which to do the replacements,
+% which we \xdef.
+\def\txiescapepdf#1{%
+ \ifx\pdfescapestring\relax
+ % No primitive available; should we give a warning or log?
+ % Many times it won't matter.
+ \else
+ % The expandable \pdfescapestring primitive escapes parentheses,
+ % backslashes, and other special chars.
+ \xdef#1{\pdfescapestring{#1}}%
+ \fi
+}
+
+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
+with PDF output, and none of those formats could be found. (.eps cannot
+be supported due to the design of the PDF format; use regular TeX (DVI
+output) for that.)}
+
+\ifpdf
+ %
+ % Color manipulation macros based on pdfcolor.tex,
+ % except using rgb instead of cmyk; the latter is said to render as a
+ % very dark gray on-screen and a very dark halftone in print, instead
+ % of actual black.
+ \def\rgbDarkRed{0.50 0.09 0.12}
+ \def\rgbBlack{0 0 0}
+ %
+ % k sets the color for filling (usual text, etc.);
+ % K sets the color for stroking (thin rules, e.g., normal _'s).
+ \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
+ %
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\setcolor#1{%
+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ }
+ %
+ \def\maincolor{\rgbBlack}
+ \pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\lastcolordefs{}
+ %
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
+ %
+ \def\makeheadline{%
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
+ %
+ %
+ \pdfcatalog{/PageMode /UseOutlines}
+ %
+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
+ \def\dopdfimage#1#2#3{%
+ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ %
+ % pdftex (and the PDF format) support .pdf, .png, .jpg (among
+ % others). Let's try in that order, PDF first since if
+ % someone has a scalable image, presumably better to use that than a
+ % bitmap.
+ \let\pdfimgext=\empty
+ \begingroup
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \errhelp = \nopdfimagehelp
+ \errmessage{Could not find image file #1 for pdf}%
+ \else \gdef\pdfimgext{JPG}%
+ \fi
+ \else \gdef\pdfimgext{jpeg}%
+ \fi
+ \else \gdef\pdfimgext{jpg}%
+ \fi
+ \else \gdef\pdfimgext{png}%
+ \fi
+ \else \gdef\pdfimgext{PDF}%
+ \fi
+ \else \gdef\pdfimgext{pdf}%
+ \fi
+ \closein 1
+ \endgroup
+ %
+ % without \immediate, ancient pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
+ \ifnum\pdftexversion < 14
+ \immediate\pdfimage
+ \else
+ \immediate\pdfximage
+ \fi
+ \ifdim \wd0 >0pt width \imagewidth \fi
+ \ifdim \wd2 >0pt height \imageheight \fi
+ \ifnum\pdftexversion<13
+ #1.\pdfimgext
+ \else
+ {#1.\pdfimgext}%
+ \fi
+ \ifnum\pdftexversion < 14 \else
+ \pdfrefximage \pdflastximage
+ \fi}
+ %
+ \def\pdfmkdest#1{{%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \indexnofonts
+ \turnoffactive
+ \makevalueexpandable
+ \def\pdfdestname{#1}%
+ \txiescapepdf\pdfdestname
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }}
+ %
+ % used to mark target names; must be expandable.
+ \def\pdfmkpgn#1{#1}
+ %
+ % by default, use a color that is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing.
+ \def\urlcolor{\rgbDarkRed}
+ \def\linkcolor{\rgbDarkRed}
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
+ % Adding outlines to PDF; macros for calculating structure of outlines
+ % come from Petr Olsak
+ \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+ \else \csname#1\endcsname \fi}
+ \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+ \advance\tempnum by 1
+ \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+ %
+ % #1 is the section text, which is what will be displayed in the
+ % outline by the pdf viewer. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node text,
+ % which might be empty if this toc entry had no corresponding node.
+ % #4 is the page number
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ % Generate a link to the node text if that exists; else, use the
+ % page number. We could generate a destination for the section
+ % text in the case where a section has no node, but it doesn't
+ % seem worth the trouble, since most documents are normally structured.
+ \edef\pdfoutlinedest{#3}%
+ \ifx\pdfoutlinedest\empty
+ \def\pdfoutlinedest{#4}%
+ \else
+ \txiescapepdf\pdfoutlinedest
+ \fi
+ %
+ % Also escape PDF chars in the display string.
+ \edef\pdfoutlinetext{#1}%
+ \txiescapepdf\pdfoutlinetext
+ %
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ % Read toc silently, to get counts of subentries for \pdfoutline.
+ \def\partentry##1##2##3##4{}% ignore parts in the outlines
+ \def\numchapentry##1##2##3##4{%
+ \def\thischapnum{##2}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsecentry##1##2##3##4{%
+ \advancenumber{chap\thischapnum}%
+ \def\thissecnum{##2}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsubsecentry##1##2##3##4{%
+ \advancenumber{sec\thissecnum}%
+ \def\thissubsecnum{##2}%
+ }%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \advancenumber{subsec\thissubsecnum}%
+ }%
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ %
+ % use \def rather than \let here because we redefine \chapentry et
+ % al. a second time, below.
+ \def\appentry{\numchapentry}%
+ \def\appsecentry{\numsecentry}%
+ \def\appsubsecentry{\numsubsecentry}%
+ \def\appsubsubsecentry{\numsubsubsecentry}%
+ \def\unnchapentry{\numchapentry}%
+ \def\unnsecentry{\numsecentry}%
+ \def\unnsubsecentry{\numsubsecentry}%
+ \def\unnsubsubsecentry{\numsubsubsecentry}%
+ \readdatafile{toc}%
+ %
+ % Read toc second time, this time actually producing the outlines.
+ % The `-' means take the \expnumber as the absolute number of
+ % subentries, which we calculated on our first read of the .toc above.
+ %
+ % We use the node names as the destinations.
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{% count is always zero
+ \dopdfoutline{##1}{}{##3}{##4}}%
+ %
+ % PDF outlines are displayed using system fonts, instead of
+ % document fonts. Therefore we cannot use special characters,
+ % since the encoding is unknown. For example, the eogonek from
+ % Latin 2 (0xea) gets translated to a | character. Info from
+ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
+ %
+ % TODO this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Too
+ % much work for too little return. Just use the ASCII equivalents
+ % we use for the index sort strings.
+ %
+ \indexnofonts
+ \setupdatafile
+ % We can have normal brace characters in the PDF outlines, unlike
+ % Texinfo index files. So set that up.
+ \def\{{\lbracecharliteral}%
+ \def\}{\rbracecharliteral}%
+ \catcode`\\=\active \otherbackslash
+ \input \tocreadfilename
+ \endgroup
+ }
+ {\catcode`[=1 \catcode`]=2
+ \catcode`{=\other \catcode`}=\other
+ \gdef\lbracecharliteral[{]%
+ \gdef\rbracecharliteral[}]%
+ ]
+ %
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \ifx\p\space\else\addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \fi
+ \nextsp}
+ \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \ifnum\pdftexversion < 14
+ \let \startlink \pdfannotlink
+ \else
+ \let \startlink \pdfstartlink
+ \fi
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
+ \leavevmode\setcolor{\urlcolor}%
+ \startlink attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ \endgroup}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \setcolor{\linkcolor}#1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\else
+ % non-pdf mode
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\setcolor = \gobble
+ \let\pdfsetcolor = \gobble
+ \let\pdfmakeoutlines = \relax
+\fi % \ifx\pdfoutput
+
+
+\message{fonts,}
+
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+ \csname ten#1\endcsname % change the current font
+}
+
+% Select #1 fonts with the current style.
+%
+\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Unfortunately, we have to override this for titles and the like, since
+% in those cases "rm" is bold. Sigh.
+\def\rmisbold{\rm\def\curfontstyle{bf}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
+
+% Default leading.
+\newdimen\textleading \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+% can get a sort of poor man's double spacing by redefining this.
+\def\baselinefactor{1}
+%
+\def\setleading#1{%
+ \dimen0 = #1\relax
+ \normalbaselineskip = \baselinefactor\dimen0
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
+% PDF CMaps. See also LaTeX's t1.cmap.
+%
+% do nothing with this by default.
+\expandafter\let\csname cmapOT1\endcsname\gobble
+\expandafter\let\csname cmapOT1IT\endcsname\gobble
+\expandafter\let\csname cmapOT1TT\endcsname\gobble
+
+% if we are producing pdf, and we have \pdffontattr, then define cmaps.
+% (\pdffontattr was introduced many years ago, but people still run
+% older pdftex's; it's easy to conditionalize, so we do.)
+\ifpdf \ifx\pdffontattr\thisisundefined \else
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1-0)
+%%Title: (TeX-OT1-0 TeX OT1 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<23> <26> <0023>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+40 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+%
+% \cmapOT1IT
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1IT-0)
+%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1IT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1IT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<25> <26> <0025>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+42 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<23> <0023>
+<24> <00A3>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1IT\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+%
+% \cmapOT1TT
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1TT-0)
+%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1TT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1TT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+5 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<21> <26> <0021>
+<28> <5F> <0028>
+<61> <7E> <0061>
+endbfrange
+32 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <2191>
+<0C> <2193>
+<0D> <0027>
+<0E> <00A1>
+<0F> <00BF>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<20> <2423>
+<27> <2019>
+<60> <2018>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1TT\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+\fi\fi
+
+
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
+% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
+% empty to omit).
+\def\setfont#1#2#3#4#5{%
+ \font#1=\fontprefix#2#3 scaled #4
+ \csname cmap#5\endcsname#1%
+}
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
+% emacs-page end of cmaps
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\thisisundefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx} %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
+
+% Definitions for a main text size of 11pt. This is the default in
+% Texinfo.
+%
+\def\definetextfontsizexi{%
+% Text fonts (11.2pt, magstep1).
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1095}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstep1}{OT1}
+\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\titleecsize{2074}
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\def\chapnominalsize{17pt}
+\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
+\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
+\setfont\chapsf\sfbshape{17}{1000}{OT1}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+\def\chapecsize{1728}
+
+% Section fonts (14.4pt).
+\def\secnominalsize{14pt}
+\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep2}{OT1}
+\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}{OT1}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+\def\sececsize{1440}
+
+% Subsection fonts (13.15pt).
+\def\ssecnominalsize{13pt}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
+\setfont\ssecit\itbshape{10}{1315}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1315}{OT1}
+\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1315}{OT1}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled 1315
+\def\ssececsize{1200}
+
+% Reduced fonts for @acro in text (10pt).
+\def\reducednominalsize{10pt}
+\setfont\reducedrm\rmshape{10}{1000}{OT1}
+\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{1000}{OT1}
+\setfont\reducedit\itshape{10}{1000}{OT1IT}
+\setfont\reducedsl\slshape{10}{1000}{OT1}
+\setfont\reducedsf\sfshape{10}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{1000}{OT1}
+\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
+\font\reducedi=cmmi10
+\font\reducedsy=cmsy10
+\def\reducedecsize{1000}
+
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts % reset the current fonts
+\rm
+} % end of 11pt text font size definitions
+
+
+% Definitions to make the main text be 10pt Computer Modern, with
+% section, chapter, etc., sizes following suit. This is for the GNU
+% Press printing of the Emacs 22 manual. Maybe other manuals in the
+% future. Used with @smallbook, which sets the leading to 12pt.
+%
+\def\definetextfontsizex{%
+% Text fonts (10pt).
+\def\textnominalsize{10pt}
+\edef\mainmagstep{1000}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1000}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
+\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\titleecsize{2074}
+
+% Chapter fonts (14.4pt).
+\def\chapnominalsize{14pt}
+\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
+\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
+\let\chapbf\chaprm
+\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
+\font\chapi=cmmi12 scaled \magstep1
+\font\chapsy=cmsy10 scaled \magstep2
+\def\chapecsize{1440}
+
+% Section fonts (12pt).
+\def\secnominalsize{12pt}
+\setfont\secrm\rmbshape{12}{1000}{OT1}
+\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep1}{OT1}
+\setfont\sectt\ttbshape{12}{1000}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
+\setfont\secsf\sfbshape{12}{1000}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep1}{OT1}
+\font\seci=cmmi12
+\font\secsy=cmsy10 scaled \magstep1
+\def\sececsize{1200}
+
+% Subsection fonts (10pt).
+\def\ssecnominalsize{10pt}
+\setfont\ssecrm\rmbshape{10}{1000}{OT1}
+\setfont\ssecit\itbshape{10}{1000}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1000}{OT1}
+\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
+\setfont\ssecsf\sfbshape{10}{1000}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1000}{OT1}
+\font\sseci=cmmi10
+\font\ssecsy=cmsy10
+\def\ssececsize{1000}
+
+% Reduced fonts for @acro in text (9pt).
+\def\reducednominalsize{9pt}
+\setfont\reducedrm\rmshape{9}{1000}{OT1}
+\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{900}{OT1}
+\setfont\reducedit\itshape{9}{1000}{OT1IT}
+\setfont\reducedsl\slshape{9}{1000}{OT1}
+\setfont\reducedsf\sfshape{9}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{900}{OT1}
+\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
+\font\reducedi=cmmi9
+\font\reducedsy=cmsy9
+\def\reducedecsize{0900}
+
+\divide\parskip by 2 % reduce space between paragraphs
+\textleading = 12pt % line spacing for 10pt CM
+\textfonts % reset the current fonts
+\rm
+} % end of 10pt text font size definitions
+
+
+% We provide the user-level command
+% @fonttextsize 10
+% (or 11) to redefine the text font size. pt is assumed.
+%
+\def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
+%
+\parseargdef\fonttextsize{%
+ \def\textsizearg{#1}%
+ %\wlog{doing @fonttextsize \textsizearg}%
+ %
+ % Set \globaldefs so that documents can use this inside @tex, since
+ % makeinfo 4.8 does not support it, but we need it nonetheless.
+ %
+ \begingroup \globaldefs=1
+ \ifx\textsizearg\xword \definetextfontsizex
+ \else \ifx\textsizearg\xiword \definetextfontsizexi
+ \else
+ \errhelp=\EMsimple
+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
+ \fi\fi
+ \endgroup
+}
+
+
+% In order for the font changes to affect most math symbols and letters,
+% we have to define the \textfont of the standard families. Since
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
+%
+\def\resetmathfonts{%
+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+ \textfont\ttfam=\tentt \textfont\sffam=\tensf
+}
+
+% The font-changing commands redefine the meanings of \tenSTYLE, instead
+% of just \STYLE. We do this because \STYLE needs to also set the
+% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
+% \tenSTYLE to set the current font.
+%
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower). These relative commands are used in
+% the LaTeX logo and acronyms.
+%
+% This all needs generalizing, badly.
+%
+\def\textfonts{%
+ \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
+ \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
+ \let\tenttsl=\textttsl
+ \def\curfontsize{text}%
+ \def\lsize{reduced}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{\textleading}}
+\def\titlefonts{%
+ \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
+ \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
+ \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
+ \let\tenttsl=\titlettsl
+ \def\curfontsize{title}%
+ \def\lsize{chap}\def\lllsize{subsec}%
+ \resetmathfonts \setleading{27pt}}
+\def\titlefont#1{{\titlefonts\rmisbold #1}}
+\def\chapfonts{%
+ \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
+ \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+ \let\tenttsl=\chapttsl
+ \def\curfontsize{chap}%
+ \def\lsize{sec}\def\lllsize{text}%
+ \resetmathfonts \setleading{19pt}}
+\def\secfonts{%
+ \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
+ \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
+ \let\tenttsl=\secttsl
+ \def\curfontsize{sec}%
+ \def\lsize{subsec}\def\lllsize{reduced}%
+ \resetmathfonts \setleading{16pt}}
+\def\subsecfonts{%
+ \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
+ \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
+ \let\tenttsl=\ssecttsl
+ \def\curfontsize{ssec}%
+ \def\lsize{text}\def\lllsize{small}%
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts
+\def\reducedfonts{%
+ \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
+ \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
+ \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
+ \let\tenttsl=\reducedttsl
+ \def\curfontsize{reduced}%
+ \def\lsize{small}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallfonts{%
+ \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
+ \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
+ \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
+ \let\tenttsl=\smallttsl
+ \def\curfontsize{small}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallerfonts{%
+ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
+ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
+ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
+ \let\tenttsl=\smallerttsl
+ \def\curfontsize{smaller}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{9.5pt}}
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
+% Set the fonts to use with the @small... environments.
+\let\smallexamplefonts = \smallfonts
+
+% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
+% can fit this many characters:
+% 8.5x11=86 smallbook=72 a4=90 a5=69
+% If we use \scriptfonts (8pt), then we can fit this many characters:
+% 8.5x11=90+ smallbook=80 a4=90+ a5=77
+% For me, subjectively, the few extra characters that fit aren't worth
+% the additional smallness of 8pt. So I'm making the default 9pt.
+%
+% By the way, for comparison, here's what fits with @example (10pt):
+% 8.5x11=71 smallbook=60 a4=75 a5=58
+% --karl, 24jan03.
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\definetextfontsizexi
+
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+ \csname markup#1true\endcsname
+ \def\currentmarkupstyle{#1}%
+ \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+ \expandafter\def\expandafter\markupstylesetup
+ \expandafter{\markupstylesetup #1}%
+ \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+ \expandafter\let\expandafter \temp
+ \csname markupsetuplq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+ \expandafter\let\expandafter \temp
+ \csname markupsetuprq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+%
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \markupsetcodequoteright
+%
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+%
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not use regular directed right quote/apostrophe
+% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
+% The undirected quote is ugly, so don't make it the default, but it
+% works for pasting with more pdf viewers (at least evince), the
+% lilypond developers report. xpdf does work with the regular 0x27.
+%
+\def\codequoteright{%
+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+ '%
+ \else \char'15 \fi
+ \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+ % [Knuth] pp. 380,381,391
+ % \relax disables Spanish ligatures ?` and !` of \tt font.
+ \relax`%
+ \else \char'22 \fi
+ \else \char'22 \fi
+}
+
+% Commands to set the quote options.
+%
+\parseargdef\codequoteundirected{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxicodequoteundirected\endcsname
+ = t%
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxicodequoteundirected\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
+ \fi\fi
+}
+%
+\parseargdef\codequotebacktick{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxicodequotebacktick\endcsname
+ = t%
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxicodequotebacktick\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
+ \fi\fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
+
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+% Font commands.
+
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+ \ifusingtt
+ {{\ttsl #2}\let\next=\relax}%
+ {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+ \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
+
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+ \ifx\next,%
+ \else\ifx\next-%
+ \else\ifx\next.%
+ \else\ptexslash
+ \fi\fi\fi
+ \aftersmartic
+}
+
+% like \smartslanted except unconditionally uses \ttsl, and no ic.
+% @var is set to this for defun arguments.
+\def\ttslanted#1{{\ttsl #1}}
+
+% @cite is like \smartslanted except unconditionally use \sl. We never want
+% ttsl for book titles, do we?
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
+
+\def\aftersmartic{}
+\def\var#1{%
+ \let\saveaftersmartic = \aftersmartic
+ \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
+ \smartslanted{#1}%
+}
+
+\let\i=\smartitalic
+\let\slanted=\smartslanted
+\let\dfn=\smartslanted
+\let\emph=\smartitalic
+
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @b, explicit bold. Also @strong.
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
+% We can't just use \exhyphenpenalty, because that only has effect at
+% the end of a paragraph. Restore normal hyphenation at the end of the
+% group within which \nohyphenation is presumably called.
+%
+\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
+\def\restorehyphenation{\hyphenchar\font = `- }
+
+% Set sfcode to normal for the chars that usually have another value.
+% Can't use plain's \frenchspacing because it uses the `\x notation, and
+% sometimes \x has an active definition that messes things up.
+%
+\catcode`@=11
+ \def\plainfrenchspacing{%
+ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
+ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ }
+ \def\plainnonfrenchspacing{%
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
+ }
+\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
+
+% @t, explicit typewriter.
+\def\t#1{%
+ {\tt \rawbackslash \plainfrenchspacing #1}%
+ \null
+}
+
+% @samp.
+\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
+
+% ctrl is no longer a Texinfo command.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @file, @option are the same as @samp.
+\let\file=\samp
+\let\option=\samp
+
+% @code is a modification of @t,
+% which makes spaces the same size as normal in the surrounding text.
+\def\tclose#1{%
+ {%
+ % Change normal interword space to be same as for the current font.
+ \spaceskip = \fontdimen2\font
+ %
+ % Switch to typewriter.
+ \tt
+ %
+ % But `\ ' produces the large typewriter interword space.
+ \def\ {{\spaceskip = 0pt{} }}%
+ %
+ % Turn off hyphenation.
+ \nohyphenation
+ %
+ \rawbackslash
+ \plainfrenchspacing
+ #1%
+ }%
+ \null % reset spacefactor to 1000
+}
+
+% We *must* turn on hyphenation at `-' and `_' in @code.
+% Otherwise, it is too hard to avoid overfull hboxes
+% in the Emacs manual, the Library manual, etc.
+
+% Unfortunately, TeX uses one parameter (\hyphenchar) to control
+% both hyphenation at - and hyphenation within words.
+% We must therefore turn them both off (\tclose does that)
+% and arrange explicitly to hyphenate at a dash.
+% -- rms.
+{
+ \catcode`\-=\active \catcode`\_=\active
+ \catcode`\'=\active \catcode`\`=\active
+ \global\let'=\rq \global\let`=\lq % default definitions
+ %
+ \global\def\code{\begingroup
+ \setupmarkupstyle{code}%
+ % The following should really be moved into \setupmarkupstyle handlers.
+ \catcode\dashChar=\active \catcode\underChar=\active
+ \ifallowcodebreaks
+ \let-\codedash
+ \let_\codeunder
+ \else
+ \let-\realdash
+ \let_\realunder
+ \fi
+ \codex
+ }
+}
+
+\def\codex #1{\tclose{#1}\endgroup}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{%
+ % this is all so @math{@code{var_name}+1} can work. In math mode, _
+ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+ % will therefore expand the active definition of _, which is us
+ % (inside @code that is), therefore an endless loop.
+ \ifusingtt{\ifmmode
+ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+ \else\normalunderscore \fi
+ \discretionary{}{}{}}%
+ {\_}%
+}
+
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__. This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general. @allowcodebreaks provides a way to control this.
+%
+\newif\ifallowcodebreaks \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\keywordtrue
+ \allowcodebreakstrue
+ \else\ifx\txiarg\keywordfalse
+ \allowcodebreaksfalse
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
+ \fi\fi
+}
+
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself. First (mandatory) arg is the url.
+% (This \urefnobreak definition isn't used now, leaving it for a while
+% for comparison.)
+\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
+\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \code{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% This \urefbreak definition is the active one.
+\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
+\let\uref=\urefbreak
+\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
+\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \urefcode{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% Allow line breaks around only a few characters (only).
+\def\urefcatcodes{%
+ \catcode\ampChar=\active \catcode\dotChar=\active
+ \catcode\hashChar=\active \catcode\questChar=\active
+ \catcode\slashChar=\active
+}
+{
+ \urefcatcodes
+ %
+ \global\def\urefcode{\begingroup
+ \setupmarkupstyle{code}%
+ \urefcatcodes
+ \let&\urefcodeamp
+ \let.\urefcodedot
+ \let#\urefcodehash
+ \let?\urefcodequest
+ \let/\urefcodeslash
+ \codex
+ }
+ %
+ % By default, they are just regular characters.
+ \global\def&{\normalamp}
+ \global\def.{\normaldot}
+ \global\def#{\normalhash}
+ \global\def?{\normalquest}
+ \global\def/{\normalslash}
+}
+
+% we put a little stretch before and after the breakable chars, to help
+% line breaking of long url's. The unequal skips make look better in
+% cmtt at least, especially for dots.
+\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
+\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
+%
+\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
+\def\urefcodedot{\urefprestretch .\urefpoststretch}
+\def\urefcodehash{\urefprestretch \#\urefpoststretch}
+\def\urefcodequest{\urefprestretch ?\urefpoststretch}
+\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
+{
+ \catcode`\/=\active
+ \global\def\urefcodeslashfinish{%
+ \urefprestretch \slashChar
+ % Allow line break only after the final / in a sequence of
+ % slashes, to avoid line break between the slashes in http://.
+ \ifx\next/\else \urefpoststretch \fi
+ }
+}
+
+% One more complication: by default we'll break after the special
+% characters, but some people like to break before the special chars, so
+% allow that. Also allow no breaking at all, for manual control.
+%
+\parseargdef\urefbreakstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\wordnone
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordbefore
+ \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
+ \else\ifx\txiarg\wordafter
+ \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\wordafter{after}
+\def\wordbefore{before}
+\def\wordnone{none}
+
+\urefbreakstyle after
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+\else
+ \let\email=\uref
+\fi
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct'.
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
+
+% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+%
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+ {\selectfonts\lsize #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+ \null % reset \spacefactor=1000
+}
+
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
+%
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+ {\plainfrenchspacing #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+ \null % reset \spacefactor=1000
+}
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ $\finishmath
+}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \catcode`' = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ \let' = \ptexquoteright
+ }
+}
+
+% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
+% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
+% except specified as a normal braced arg, so no newlines to worry about.
+%
+\def\outfmtnametex{tex}
+%
+\def\inlinefmt#1{\doinlinefmt #1,\finish}
+\def\doinlinefmt#1,#2,\finish{%
+ \def\inlinefmtname{#1}%
+ \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
+}
+% For raw, must switch into @tex before parsing the argument, to avoid
+% setting catcodes prematurely. Doing it this way means that, for
+% example, @inlineraw{html, foo{bar} gets a parse error instead of being
+% ignored. But this isn't important because if people want a literal
+% *right* brace they would have to use a command anyway, so they may as
+% well use a command to get a left brace too. We could re-use the
+% delimiter character idea from \verb, but it seems like overkill.
+%
+\def\inlineraw{\tex \doinlineraw}
+\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
+\def\doinlinerawtwo#1,#2,\finish{%
+ \def\inlinerawname{#1}%
+ \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
+ \endgroup % close group opened by \tex.
+}
+
+
+\message{glyphs,}
+% and logos.
+
+% @@ prints an @, as does @atchar{}.
+\def\@{\char64 }
+\let\atchar=\@
+
+% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
+% Unless we're in typewriter, use \ecfont because the CM text fonts do
+% not have braces, and we don't want to switch into math.
+\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
+\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\let\{=\mylbrace \let\lbracechar=\{
+\let\}=\myrbrace \let\rbracechar=\}
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{%
+ \ifx\textnominalsize\xwordpt
+ % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+ % Revert to plain's \scriptsize, which is 7pt.
+ \count255=\the\fam $\fam\count255 \scriptstyle A$%
+ \else
+ % For 11pt, we can use our lllsize.
+ \selectfonts\lllsize A%
+ \fi
+ }%
+ \vss
+ }}%
+ \kern-.15em
+ \TeX
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em. So do
+% whichever is larger.
+%
+\def\dots{%
+ \leavevmode
+ \setbox0=\hbox{...}% get width of three periods
+ \ifdim\wd0 > 1.5em
+ \dimen0 = \wd0
+ \else
+ \dimen0 = 1.5em
+ \fi
+ \hbox to \dimen0{%
+ \hskip 0pt plus.25fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
+% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
+%
+\def\pounds{{\it\$}}
+
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+%
+% Although only regular is the truly official Euro symbol, we ignore
+% that. The Euro is designed to be slightly taller than the regular
+% font height.
+%
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+%
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+%
+% Also doesn't work in math. Do we need to do math with euro symbols?
+% Hope not.
+%
+%
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+ % We set the font at each command, rather than predefining it in
+ % \textfonts and the other font-switching commands, so that
+ % installations which never need the symbol don't have to have the
+ % font installed.
+ %
+ % There is only one designed size (nominal 10pt), so we always scale
+ % that to the current nominal size.
+ %
+ % By the way, simply using "at 1em" works for cmr10 and the like, but
+ % does not work for cmbx10 and other extended/shrunken fonts.
+ %
+ \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+ %
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+ \else
+ % regular:
+ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+ \fi
+ \thiseurofont
+}
+
+% Glyphs from the EC fonts. We don't use \let for the aliases, because
+% sometimes we redefine the original macro, and the alias should reflect
+% the redefinition.
+%
+% Use LaTeX names for the Icelandic letters.
+\def\DH{{\ecfont \char"D0}} % Eth
+\def\dh{{\ecfont \char"F0}} % eth
+\def\TH{{\ecfont \char"DE}} % Thorn
+\def\th{{\ecfont \char"FE}} % thorn
+%
+\def\guillemetleft{{\ecfont \char"13}}
+\def\guillemotleft{\guillemetleft}
+\def\guillemetright{{\ecfont \char"14}}
+\def\guillemotright{\guillemetright}
+\def\guilsinglleft{{\ecfont \char"0E}}
+\def\guilsinglright{{\ecfont \char"0F}}
+\def\quotedblbase{{\ecfont \char"12}}
+\def\quotesinglbase{{\ecfont \char"0D}}
+%
+% This positioning is not perfect (see the ogonek LaTeX package), but
+% we have the precomposed glyphs for the most common cases. We put the
+% tests to use those glyphs in the single \ogonek macro so we have fewer
+% dummy definitions to worry about for index entries, etc.
+%
+% ogonek is also used with other letters in Lithuanian (IOU), but using
+% the precomposed glyphs for those is not so easy since they aren't in
+% the same EC font.
+\def\ogonek#1{{%
+ \def\temp{#1}%
+ \ifx\temp\macrocharA\Aogonek
+ \else\ifx\temp\macrochara\aogonek
+ \else\ifx\temp\macrocharE\Eogonek
+ \else\ifx\temp\macrochare\eogonek
+ \else
+ \ecfont \setbox0=\hbox{#1}%
+ \ifdim\ht0=1ex\accent"0C #1%
+ \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
+ \fi
+ \fi\fi\fi\fi
+ }%
+}
+\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
+\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
+\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
+\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
+%
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
+\def\ecfont{%
+ % We can't distinguish serif/sans and italic/slanted, but this
+ % is used for crude hacks anyway (like adding French and German
+ % quotes to documents typeset with CM, where we lose kerning), so
+ % hopefully nobody will notice/care.
+ \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
+ \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
+ \thisecfont
+}
+
+% @registeredsymbol - R in a circle. The font for the R should really
+% be smaller yet, but lllsize is the best we can do for now.
+% Adapted from the plain.tex definition of \copyright.
+%
+\def\registeredsymbol{%
+ $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+ \hfil\crcr\Orb}}%
+ }$%
+}
+
+% @textdegree - the normal degrees sign.
+%
+\def\textdegree{$^\circ$}
+
+% Laurent Siebenmann reports \Orb undefined with:
+% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
+% so we'll define it if necessary.
+%
+\ifx\Orb\thisisundefined
+\def\Orb{\mathhexbox20D}
+\fi
+
+% Quotes.
+\chardef\quotedblleft="5C
+\chardef\quotedblright=`\"
+\chardef\quoteleft=`\`
+\chardef\quoteright=`\'
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page. Must do @settitle before @titlepage.
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+% Do an implicit @contents or @shortcontents after @end titlepage if the
+% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
+%
+\newif\ifsetcontentsaftertitlepage
+ \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
+\newif\ifsetshortcontentsaftertitlepage
+ \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+
+\parseargdef\shorttitlepage{%
+ \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
+
+\envdef\titlepage{%
+ % Open one extra group, as we want to close it in the middle of \Etitlepage.
+ \begingroup
+ \parindent=0pt \textfonts
+ % Leave some space at the very top of the page.
+ \vglue\titlepagetopglue
+ % No rule at page bottom unless we print one at the top with @title.
+ \finishedtitlepagetrue
+ %
+ % Most title ``pages'' are actually two pages long, with space
+ % at the top of the second. We don't want the ragged left on the second.
+ \let\oldpage = \page
+ \def\page{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ \let\page = \oldpage
+ \page
+ \null
+ }%
+}
+
+\def\Etitlepage{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ % It is important to do the page break before ending the group,
+ % because the headline and footline are only empty inside the group.
+ % If we use the new definition of \page, we always get a blank page
+ % after the title page, which we certainly don't want.
+ \oldpage
+ \endgroup
+ %
+ % Need this before the \...aftertitlepage checks so that if they are
+ % in effect the toc pages will come out with page numbers.
+ \HEADINGSon
+ %
+ % If they want short, they certainly want long too.
+ \ifsetshortcontentsaftertitlepage
+ \shortcontents
+ \contents
+ \global\let\shortcontents = \relax
+ \global\let\contents = \relax
+ \fi
+ %
+ \ifsetcontentsaftertitlepage
+ \contents
+ \global\let\contents = \relax
+ \global\let\shortcontents = \relax
+ \fi
+}
+
+\def\finishtitlepage{%
+ \vskip4pt \hrule height 2pt width \hsize
+ \vskip\titlepagebottomglue
+ \finishedtitlepagetrue
+}
+
+% Macros to be used within @titlepage:
+
+\let\subtitlerm=\tenrm
+\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+
+\parseargdef\title{%
+ \checkenv\titlepage
+ \leftline{\titlefonts\rmisbold #1}
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+}
+
+\parseargdef\subtitle{%
+ \checkenv\titlepage
+ {\subtitlefont \rightline{#1}}%
+}
+
+% @author should come last, but may come many times.
+% It can also be used inside @quotation.
+%
+\parseargdef\author{%
+ \def\temp{\quotation}%
+ \ifx\thisenv\temp
+ \def\quotationauthor{#1}% printed in \Equotation.
+ \else
+ \checkenv\titlepage
+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+ {\secfonts\rmisbold \leftline{#1}}%
+ \fi
+}
+
+
+% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks\evenheadline % headline on even pages
+\newtoks\oddheadline % headline on odd pages
+\newtoks\evenfootline % footline on even pages
+\newtoks\oddfootline % footline on odd pages
+
+% Now make TeX use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
+ \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
+ \else \the\evenfootline \fi}\HEADINGShook}
+\let\HEADINGShook=\relax
+
+% Commands to set those variables.
+% For example, this is what @headings on does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
+\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
+\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
+\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
+\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
+ \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+ %
+ % Leave some space for the footline. Hopefully ok to assume
+ % @evenfooting will not be used by itself.
+ \global\advance\pageheight by -12pt
+ \global\advance\vsize by -12pt
+}
+
+\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+
+% @evenheadingmarks top \thischapter <- chapter at the top of a page
+% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
+%
+% The same set of arguments for:
+%
+% @oddheadingmarks
+% @evenfootingmarks
+% @oddfootingmarks
+% @everyheadingmarks
+% @everyfootingmarks
+
+\def\evenheadingmarks{\headingmarks{even}{heading}}
+\def\oddheadingmarks{\headingmarks{odd}{heading}}
+\def\evenfootingmarks{\headingmarks{even}{footing}}
+\def\oddfootingmarks{\headingmarks{odd}{footing}}
+\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+ \headingmarks{odd}{heading}{#1} }
+\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+ \headingmarks{odd}{footing}{#1} }
+% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
+\def\headingmarks#1#2#3 {%
+ \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
+ \global\expandafter\let\csname get#1#2marks\endcsname \temp
+}
+
+\everyheadingmarks bottom
+\everyfootingmarks bottom
+
+% @headings double turns headings on for double-sided printing.
+% @headings single turns headings on for single-sided printing.
+% @headings off turns them off.
+% @headings on same as @headings double, retained for compatibility.
+% @headings after turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
+% @headings singleafter turns on single-sided headings after this page.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\headingsoff{% non-global headings elimination
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff % it's the default
+
+% When we turn headings on, set the page number to 1.
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSdouble{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+\let\contentsalignmacro = \chappager
+
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingle{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+\def\HEADINGSon{\HEADINGSdouble}
+
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\let\HEADINGSdoubleafter=\HEADINGSafter
+\def\HEADINGSdoublex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
+\def\HEADINGSsinglex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% Subroutines used in generating headings
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\thisisundefined
+\def\today{%
+ \number\day\space
+ \ifcase\month
+ \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
+ \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
+ \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
+ \fi
+ \space\number\year}
+\fi
+
+% @settitle line... specifies the title of the document, for headings.
+% It generates no output of its own.
+\def\thistitle{\putwordNoTitle}
+\def\settitle{\parsearg{\gdef\thistitle}}
+
+
+\message{tables,}
+% Tables -- @table, @ftable, @vtable, @item(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
+% these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\newif\ifitemxneedsnegativevskip
+
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\itemxpar \parsearg\itemzzz}
+
+\def\itemzzz #1{\begingroup %
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\tableindent
+ \setbox0=\hbox{\itemindicate{#1}}%
+ \itemindex{#1}%
+ \nobreak % This prevents a break before @itemx.
+ %
+ % If the item text does not fit in the space we have, put it on a line
+ % by itself, and do not allow a page break either before or after that
+ % line. We do not start a paragraph here because then if the next
+ % command is, e.g., @kindex, the whatsit would get put into the
+ % horizontal list on a line by itself, resulting in extra blank space.
+ \ifdim \wd0>\itemmax
+ %
+ % Make this a paragraph so we get the \parskip glue and wrapping,
+ % but leave it ragged-right.
+ \begingroup
+ \advance\leftskip by-\tableindent
+ \advance\hsize by\tableindent
+ \advance\rightskip by0pt plus1fil\relax
+ \leavevmode\unhbox0\par
+ \endgroup
+ %
+ % We're going to be starting a paragraph, but we don't want the
+ % \parskip glue -- logically it's part of the @item we just started.
+ \nobreak \vskip-\parskip
+ %
+ % Stop a page break at the \parskip glue coming up. However, if
+ % what follows is an environment such as @example, there will be no
+ % \parskip glue; then the negative vskip we just inserted would
+ % cause the example and the item to crash together. So we use this
+ % bizarre value of 10001 as a signal to \aboveenvbreak to insert
+ % \parskip glue after all. Section titles are handled this way also.
+ %
+ \penalty 10001
+ \endgroup
+ \itemxneedsnegativevskipfalse
+ \else
+ % The item text fits into the space. Start a paragraph, so that the
+ % following text (if any) will end up on the same line.
+ \noindent
+ % Do this with kerns and \unhbox so that if there is a footnote in
+ % the item text, it can migrate to the main vertical list and
+ % eventually be printed.
+ \nobreak\kern-\tableindent
+ \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
+ \unhbox0
+ \nobreak\kern\dimen0
+ \endgroup
+ \itemxneedsnegativevskiptrue
+ \fi
+}
+
+\def\item{\errmessage{@item while not in a list environment}}
+\def\itemx{\errmessage{@itemx while not in a list environment}}
+
+% @table, @ftable, @vtable.
+\envdef\table{%
+ \let\itemindex\gobble
+ \tablecheck{table}%
+}
+\envdef\ftable{%
+ \def\itemindex ##1{\doind {fn}{\code{##1}}}%
+ \tablecheck{ftable}%
+}
+\envdef\vtable{%
+ \def\itemindex ##1{\doind {vr}{\code{##1}}}%
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
+}
+\def\tablex#1{%
+ \def\itemindicate{#1}%
+ \parsearg\tabley
+}
+\def\tabley#1{%
+ {%
+ \makevalueexpandable
+ \edef\temp{\noexpand\tablez #1\space\space\space}%
+ \expandafter
+ }\temp \endtablez
+}
+\def\tablez #1 #2 #3 #4\endtablez{%
+ \aboveenvbreak
+ \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
+ \ifnum 0#2>0 \tableindent=#2\mil \fi
+ \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
+ \itemmax=\tableindent
+ \advance \itemmax by -\itemmargin
+ \advance \leftskip by \tableindent
+ \exdentamount=\tableindent
+ \parindent = 0pt
+ \parskip = \smallskipamount
+ \ifdim \parskip=0pt \parskip=2pt \fi
+ \let\item = \internalBitem
+ \let\itemx = \internalBitemx
+}
+\def\Etable{\endgraf\afterenvbreak}
+\let\Eftable\Etable
+\let\Evtable\Etable
+\let\Eitemize\Etable
+\let\Eenumerate\Etable
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\envdef\itemize{\parsearg\doitemize}
+
+\def\doitemize#1{%
+ \aboveenvbreak
+ \itemmax=\itemindent
+ \advance\itemmax by -\itemmargin
+ \advance\leftskip by \itemindent
+ \exdentamount=\itemindent
+ \parindent=0pt
+ \parskip=\smallskipamount
+ \ifdim\parskip=0pt \parskip=2pt \fi
+ %
+ % Try typesetting the item mark that if the document erroneously says
+ % something like @itemize @samp (intending @table), there's an error
+ % right away at the @itemize. It's not the best error message in the
+ % world, but it's better than leaving it to the @item. This means if
+ % the user wants an empty mark, they have to say @w{} not just @w.
+ \def\itemcontents{#1}%
+ \setbox0 = \hbox{\itemcontents}%
+ %
+ % @itemize with no arg is equivalent to @itemize @bullet.
+ \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ %
+ \let\item=\itemizeitem
+}
+
+% Definition of @item while inside @itemize and @enumerate.
+%
+\def\itemizeitem{%
+ \advance\itemno by 1 % for enumerations
+ {\let\par=\endgraf \smallbreak}% reasonable place to break
+ {%
+ % If the document has an @itemize directly after a section title, a
+ % \nobreak will be last on the list, and \sectionheading will have
+ % done a \vskip-\parskip. In that case, we don't want to zero
+ % parskip, or the item text will crash with the heading. On the
+ % other hand, when there is normal text preceding the item (as there
+ % usually is), we do want to zero parskip, or there would be too much
+ % space. In that case, we won't have a \nobreak before. At least
+ % that's the theory.
+ \ifnum\lastpenalty<10000 \parskip=0in \fi
+ \noindent
+ \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ %
+ \vadjust{\penalty 1200}}% not good to break after first line of item.
+ \flushcr
+}
+
+% \splitoff TOKENS\endmark defines \first to be the first token in
+% TOKENS, and \rest to be the remainder.
+%
+\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
+
+% Allow an optional argument of an uppercase letter, lowercase letter,
+% or number, to specify the first label in the enumerated list. No
+% argument is the same as `1'.
+%
+\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+ % If we were given no argument, pretend we were given `1'.
+ \def\thearg{#1}%
+ \ifx\thearg\empty \def\thearg{1}\fi
+ %
+ % Detect if the argument is a single token. If so, it might be a
+ % letter. Otherwise, the only valid thing it can be is a number.
+ % (We will always have one token, because of the test we just made.
+ % This is a good thing, since \splitoff doesn't work given nothing at
+ % all -- the first parameter is undelimited.)
+ \expandafter\splitoff\thearg\endmark
+ \ifx\rest\empty
+ % Only one token in the argument. It could still be anything.
+ % A ``lowercase letter'' is one whose \lccode is nonzero.
+ % An ``uppercase letter'' is one whose \lccode is both nonzero, and
+ % not equal to itself.
+ % Otherwise, we assume it's a number.
+ %
+ % We need the \relax at the end of the \ifnum lines to stop TeX from
+ % continuing to look for a <number>.
+ %
+ \ifnum\lccode\expandafter`\thearg=0\relax
+ \numericenumerate % a number (we hope)
+ \else
+ % It's a letter.
+ \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
+ \lowercaseenumerate % lowercase letter
+ \else
+ \uppercaseenumerate % uppercase letter
+ \fi
+ \fi
+ \else
+ % Multiple tokens in the argument. We hope it's a number.
+ \numericenumerate
+ \fi
+}
+
+% An @enumerate whose labels are integers. The starting integer is
+% given in \thearg.
+%
+\def\numericenumerate{%
+ \itemno = \thearg
+ \startenumeration{\the\itemno}%
+}
+
+% The starting (lowercase) letter is in \thearg.
+\def\lowercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more lowercase letters in @enumerate; get a bigger
+ alphabet}%
+ \fi
+ \char\lccode\itemno
+ }%
+}
+
+% The starting (uppercase) letter is in \thearg.
+\def\uppercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more uppercase letters in @enumerate; get a bigger
+ alphabet}
+ \fi
+ \char\uccode\itemno
+ }%
+}
+
+% Call \doitemize, adding a period to the first argument and supplying the
+% common last two arguments. Also subtract one from the initial value in
+% \itemno, since @item increments \itemno.
+%
+\def\startenumeration#1{%
+ \advance\itemno by -1
+ \doitemize{#1.}\flushcr
+}
+
+% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
+% to @enumerate.
+%
+\def\alphaenumerate{\enumerate{a}}
+\def\capsenumerate{\enumerate{A}}
+\def\Ealphaenumerate{\Eenumerate}
+\def\Ecapsenumerate{\Eenumerate}
+
+
+% @multitable macros
+% Amy Hendrickson, 8/18/94, 3/6/96
+%
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble. Width
+% can be specified either with sample text given in a template line,
+% or in percent of \hsize, the current width of text on page.
+
+% Table can continue over pages but will only break between lines.
+
+% To make preamble:
+%
+% Either define widths of columns in terms of percent of \hsize:
+% @multitable @columnfractions .25 .3 .45
+% @item ...
+%
+% Numbers following @columnfractions are the percent of the total
+% current hsize to be used for each column. You may use as many
+% columns as desired.
+
+
+% Or use a template:
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item ...
+% using the widest term desired in each column.
+
+% Each new table line starts with @item, each subsequent new column
+% starts with @tab. Empty columns may be produced by supplying @tab's
+% with nothing between them for as many times as empty columns are needed,
+% ie, @tab at tab@tab will produce two empty columns.
+
+% @item, @tab do not need to be on their own lines, but it will not hurt
+% if they are.
+
+% Sample multitable:
+
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item first col stuff @tab second col stuff @tab third col
+% @item
+% first col stuff
+% @tab
+% second col stuff
+% @tab
+% third col
+% @item first col stuff @tab second col stuff
+% @tab Many paragraphs of text may be used in any column.
+%
+% They will wrap at the width determined by the template.
+% @item at tab@tab This will be in third column.
+% @end multitable
+
+% Default dimensions may be reset by user.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+% to baseline.
+% 0pt means it depends on current normal line spacing.
+%
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
+
+% Macros used to set up halign preamble:
+%
+\let\endsetuptable\relax
+\def\xendsetuptable{\endsetuptable}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
+\newif\ifsetpercent
+
+% #1 is the @columnfraction, usually a decimal number like .5, but might
+% be just 1. We just use it, whatever it is.
+%
+\def\pickupwholefraction#1 {%
+ \global\advance\colcount by 1
+ \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
+ \setuptable
+}
+
+\newcount\colcount
+\def\setuptable#1{%
+ \def\firstarg{#1}%
+ \ifx\firstarg\xendsetuptable
+ \let\go = \relax
+ \else
+ \ifx\firstarg\xcolumnfractions
+ \global\setpercenttrue
+ \else
+ \ifsetpercent
+ \let\go\pickupwholefraction
+ \else
+ \global\advance\colcount by 1
+ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
+ % separator; typically that is always in the input, anyway.
+ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \fi
+ \fi
+ \ifx\go\pickupwholefraction
+ % Put the argument back for the \pickupwholefraction call, so
+ % we'll always have a period there to be parsed.
+ \def\go{\pickupwholefraction#1}%
+ \else
+ \let\go = \setuptable
+ \fi%
+ \fi
+ \go
+}
+
+% multitable-only commands.
+%
+% @headitem starts a heading row, which we typeset in bold.
+% Assignments have to be global since we are inside the implicit group
+% of an alignment entry. \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+ \checkenv\multitable
+ \crcr
+ \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+ \the\everytab % for the first item
+}%
+%
+% A \tab used to include \hskip1sp. But then the space in a template
+% line is not enough. That is bad. So let's go back to just `&' until
+% we again encounter the problem the 1sp was intended to solve.
+% --karl, nathan at acm.org, 20apr99.
+\def\tab{\checkenv\multitable &\the\everytab}%
+
+% @multitable ... @end multitable definitions:
+%
+\newtoks\everytab % insert after every tab.
+%
+\envdef\multitable{%
+ \vskip\parskip
+ \startsavinginserts
+ %
+ % @item within a multitable starts a normal row.
+ % We use \def instead of \let so that if one of the multitable entries
+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+ % \endtemplate) expanding \doitemize.
+ \def\item{\crcr}%
+ %
+ \tolerance=9500
+ \hbadness=9500
+ \setmultitablespacing
+ \parskip=\multitableparskip
+ \parindent=\multitableparindent
+ \overfullrule=0pt
+ \global\colcount=0
+ %
+ \everycr = {%
+ \noalign{%
+ \global\everytab={}%
+ \global\colcount=0 % Reset the column counter.
+ % Check for saved footnotes, etc.
+ \checkinserts
+ % Keeps underfull box messages off when table breaks over pages.
+ %\filbreak
+ % Maybe so, but it also creates really weird page breaks when the
+ % table breaks over pages. Wouldn't \vfil be better? Wait until the
+ % problem manifests itself, so it can be fixed for real --karl.
+ }%
+ }%
+ %
+ \parsearg\domultitable
+}
+\def\domultitable#1{%
+ % To parse everything between @multitable and @item:
+ \setuptable#1 \endsetuptable
+ %
+ % This preamble sets up a generic column definition, which will
+ % be used as many times as user calls for columns.
+ % \vtop will set a single line and will also let text wrap and
+ % continue for many paragraphs if desired.
+ \halign\bgroup &%
+ \global\advance\colcount by 1
+ \multistrut
+ \vtop{%
+ % Use the current \colcount to find the correct column width:
+ \hsize=\expandafter\csname col\the\colcount\endcsname
+ %
+ % In order to keep entries from bumping into each other
+ % we will add a \leftskip of \multitablecolspace to all columns after
+ % the first one.
+ %
+ % If a template has been used, we will add \multitablecolspace
+ % to the width of each template entry.
+ %
+ % If the user has set preamble in terms of percent of \hsize we will
+ % use that dimension as the width of the column, and the \leftskip
+ % will keep entries from bumping into each other. Table will start at
+ % left margin and final column will justify at right margin.
+ %
+ % Make sure we don't inherit \rightskip from the outer environment.
+ \rightskip=0pt
+ \ifnum\colcount=1
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
+ \else
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
+ % In either case we will make \leftskip=\multitablecolspace:
+ \leftskip=\multitablecolspace
+ \fi
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively
+ % marking characters.
+ \noindent\ignorespaces##\unskip\multistrut
+ }\cr
+}
+\def\Emultitable{%
+ \crcr
+ \egroup % end the \halign
+ \global\setpercentfalse
+}
+
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
+\ifdim\multitablelinespace=0pt
+\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
+\global\advance\multitablelinespace by-\ht0
+\fi
+% Test to see if parskip is larger than space between lines of
+% table. If not, do nothing.
+% If so, set to same dimension as multitablelinespace.
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
+ % than skip between lines in the table.
+\fi}
+
+
+\message{conditionals,}
+
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @ifnotxml always succeed. They currently do nothing; we don't
+% attempt to check whether the conditionals are properly nested. But we
+% have to remember that they are conditionals, so that @end doesn't
+% attempt to close an environment group.
+%
+\def\makecond#1{%
+ \expandafter\let\csname #1\endcsname = \relax
+ \expandafter\let\csname iscond.#1\endcsname = 1
+}
+\makecond{iftex}
+\makecond{ifnotdocbook}
+\makecond{ifnothtml}
+\makecond{ifnotinfo}
+\makecond{ifnotplaintext}
+\makecond{ifnotxml}
+
+% Ignore @ignore, @ifhtml, @ifinfo, and the like.
+%
+\def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\docbook{\doignore{docbook}}
+\def\html{\doignore{html}}
+\def\ifdocbook{\doignore{ifdocbook}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\ifplaintext{\doignore{ifplaintext}}
+\def\ifxml{\doignore{ifxml}}
+\def\ignore{\doignore{ignore}}
+\def\menu{\doignore{menu}}
+\def\xml{\doignore{xml}}
+
+% Ignore text until a line `@end #1', keeping track of nested conditionals.
+%
+% A count to remember the depth of nesting.
+\newcount\doignorecount
+
+\def\doignore#1{\begingroup
+ % Scan in ``verbatim'' mode:
+ \obeylines
+ \catcode`\@ = \other
+ \catcode`\{ = \other
+ \catcode`\} = \other
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \spaceisspace
+ %
+ % Count number of #1's that we've seen.
+ \doignorecount = 0
+ %
+ % Swallow text until we reach the matching `@end #1'.
+ \dodoignore{#1}%
+}
+
+{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
+ \obeylines %
+ %
+ \gdef\dodoignore#1{%
+ % #1 contains the command name as a string, e.g., `ifinfo'.
+ %
+ % Define a command to find the next `@end #1'.
+ \long\def\doignoretext##1^^M at end #1{%
+ \doignoretextyyy##1^^M@#1\_STOP_}%
+ %
+ % And this command to find another #1 command, at the beginning of a
+ % line. (Otherwise, we would consider a line `@c @ifset', for
+ % example, to count as an @ifset for nesting.)
+ \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
+ %
+ % And now expand that command.
+ \doignoretext ^^M%
+ }%
+}
+
+\def\doignoreyyy#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty % Nothing found.
+ \let\next\doignoretextzzz
+ \else % Found a nested condition, ...
+ \advance\doignorecount by 1
+ \let\next\doignoretextyyy % ..., look for another.
+ % If we're here, #1 ends with ^^M\ifinfo (for example).
+ \fi
+ \next #1% the token \_STOP_ is present just after this macro.
+}
+
+% We have to swallow the remaining "\_STOP_".
+%
+\def\doignoretextzzz#1{%
+ \ifnum\doignorecount = 0 % We have just found the outermost @end.
+ \let\next\enddoignore
+ \else % Still inside a nested condition.
+ \advance\doignorecount by -1
+ \let\next\doignoretext % Look for the next @end.
+ \fi
+ \next
+}
+
+% Finish off ignored text.
+{ \obeylines%
+ % Ignore anything after the last `@end #1'; this matters in verbatim
+ % environments, where otherwise the newline after an ignored conditional
+ % would result in a blank line in the output.
+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
+}
+
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it.
+% We rely on the fact that \parsearg sets \catcode`\ =10.
+%
+\parseargdef\set{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ {%
+ \makevalueexpandable
+ \def\temp{#2}%
+ \edef\next{\gdef\makecsname{SET#1}}%
+ \ifx\temp\empty
+ \next{}%
+ \else
+ \setzzz#2\endsetzzz
+ \fi
+ }%
+}
+% Remove the trailing space \setxxx inserted.
+\def\setzzz#1 \endsetzzz{\next{#1}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\parseargdef\clear{%
+ {%
+ \makevalueexpandable
+ \global\expandafter\let\csname SET#1\endcsname=\relax
+ }%
+}
+
+% @value{foo} gets the text saved in variable foo.
+\def\value{\begingroup\makevalueexpandable\valuexxx}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+{
+ \catcode`\- = \active \catcode`\_ = \active
+ %
+ \gdef\makevalueexpandable{%
+ \let\value = \expandablevalue
+ % We don't want these characters active, ...
+ \catcode`\-=\other \catcode`\_=\other
+ % ..., but we might end up with active ones in the argument if
+ % we're called from @code, as @code{@value{foo-bar_}}, though.
+ % So \let them to their normal equivalents.
+ \let-\realdash \let_\normalunderscore
+ }
+}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we call \makevalueexpandable in \indexdummies).
+% The command has to be fully expandable (if the variable is set), since
+% the result winds up in the index file. This means that if the
+% variable's value contains other Texinfo commands, it's almost certain
+% it will fail (although perhaps we could fix that with sufficient work
+% to do a one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {[No value for ``#1'']}%
+ \message{Variable `#1', used in @value, is not set.}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+\makecond{ifset}
+\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
+\def\doifset#1#2{%
+ {%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname SET#2\endcsname\relax
+ #1% If not set, redefine \next.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifsetfail{\doignore{ifset}}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+% The `\else' inside the `\doifset' parameter is a trick to reuse the
+% above code: if the variable is not set, do nothing, if it is set,
+% then redefine \next to \ifclearfail.
+%
+\makecond{ifclear}
+\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
+\def\ifclearfail{\doignore{ifclear}}
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory=\comment
+
+% @defininfoenclose.
+\let\definfoenclose=\comment
+
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+%
+\def\newindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
+ \noexpand\doindex{#1}}
+}
+
+% @defindex foo == \newindex{foo}
+%
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
+\def\newcodeindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{%
+ \noexpand\docodeindex{#1}}%
+}
+
+
+% @synindex foo bar makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+%
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+ % Only do \closeout if we haven't already done it, else we'll end up
+ % closing the target index.
+ \expandafter \ifx\csname donesynindex#2\endcsname \relax
+ % The \closeout helps reduce unnecessary open files; the limit on the
+ % Acorn RISC OS is a mere 16 files.
+ \expandafter\closeout\csname#2indfile\endcsname
+ \expandafter\let\csname donesynindex#2\endcsname = 1
+ \fi
+ % redefine \fooindfile:
+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+ \expandafter\let\csname#2indfile\endcsname=\temp
+ % redefine \fooindex:
+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+% and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
+%
+\def\indexdummies{%
+ \escapechar = `\\ % use backslash in output files.
+ \def\@{@}% change to @@ when we switch to @ as escape char in index files.
+ \def\ {\realbackslash\space }%
+ %
+ % Need these unexpandable (because we define \tt as a dummy)
+ % definitions when @{ or @} appear in index entry text. Also, more
+ % complicated, when \tex is in effect and \{ is a \delimiter again.
+ % We can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters. Perhaps we
+ % should define @lbrace and @rbrace commands a la @comma.
+ \def\{{{\tt\char123}}%
+ \def\}{{\tt\char125}}%
+ %
+ % I don't entirely understand this, but when an index entry is
+ % generated from a macro call, the \endinput which \scanmacro inserts
+ % causes processing to be prematurely terminated. This is,
+ % apparently, because \indexsorttmp is fully expanded, and \endinput
+ % is an expandable command. The redefinition below makes \endinput
+ % disappear altogether for that purpose -- although logging shows that
+ % processing continues to some further point. On the other hand, it
+ % seems \endinput does not hurt in the printed index arg, since that
+ % is still getting written without apparent harm.
+ %
+ % Sample source (mac-idx3.tex, reported by Graham Percival to
+ % help-texinfo, 22may06):
+ % @macro funindex {WORD}
+ % @findex xyz
+ % @end macro
+ % ...
+ % @funindex commtest
+ %
+ % The above is not enough to reproduce the bug, but it gives the flavor.
+ %
+ % Sample whatsit resulting:
+ % . at write3{\entry{xyz}{@folio }{@code {xyz at endinput }}}
+ %
+ % So:
+ \let\endinput = \empty
+ %
+ % Do the redefinitions.
+ \commondummies
+}
+
+% For the aux and toc files, @ is the escape character. So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files). When everything uses @,
+% this will be simpler.
+%
+\def\atdummies{%
+ \def\@{@@}%
+ \def\ {@ }%
+ \let\{ = \lbraceatcmd
+ \let\} = \rbraceatcmd
+ %
+ % Do the redefinitions.
+ \commondummies
+ \otherbackslash
+}
+
+% Called from \indexdummies and \atdummies.
+%
+\def\commondummies{%
+ %
+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
+ % preventing its expansion. This is used only for control words,
+ % not control letters, because the \space would be incorrect for
+ % control characters, but is needed to separate the control word
+ % from whatever follows.
+ %
+ % For control letters, we have \definedummyletter, which omits the
+ % space.
+ %
+ % These can be used both for control words that take an argument and
+ % those that do not. If it is followed by {arg} in the input, then
+ % that will dutifully get written to the index (or wherever).
+ %
+ \def\definedummyword ##1{\def##1{\string##1\space}}%
+ \def\definedummyletter##1{\def##1{\string##1}}%
+ \let\definedummyaccent\definedummyletter
+ %
+ \commondummiesnofonts
+ %
+ \definedummyletter\_%
+ \definedummyletter\-%
+ %
+ % Non-English letters.
+ \definedummyword\AA
+ \definedummyword\AE
+ \definedummyword\DH
+ \definedummyword\L
+ \definedummyword\O
+ \definedummyword\OE
+ \definedummyword\TH
+ \definedummyword\aa
+ \definedummyword\ae
+ \definedummyword\dh
+ \definedummyword\exclamdown
+ \definedummyword\l
+ \definedummyword\o
+ \definedummyword\oe
+ \definedummyword\ordf
+ \definedummyword\ordm
+ \definedummyword\questiondown
+ \definedummyword\ss
+ \definedummyword\th
+ %
+ % Although these internal commands shouldn't show up, sometimes they do.
+ \definedummyword\bf
+ \definedummyword\gtr
+ \definedummyword\hat
+ \definedummyword\less
+ \definedummyword\sf
+ \definedummyword\sl
+ \definedummyword\tclose
+ \definedummyword\tt
+ %
+ \definedummyword\LaTeX
+ \definedummyword\TeX
+ %
+ % Assorted special characters.
+ \definedummyword\arrow
+ \definedummyword\bullet
+ \definedummyword\comma
+ \definedummyword\copyright
+ \definedummyword\registeredsymbol
+ \definedummyword\dots
+ \definedummyword\enddots
+ \definedummyword\entrybreak
+ \definedummyword\equiv
+ \definedummyword\error
+ \definedummyword\euro
+ \definedummyword\expansion
+ \definedummyword\geq
+ \definedummyword\guillemetleft
+ \definedummyword\guillemetright
+ \definedummyword\guilsinglleft
+ \definedummyword\guilsinglright
+ \definedummyword\leq
+ \definedummyword\minus
+ \definedummyword\ogonek
+ \definedummyword\pounds
+ \definedummyword\point
+ \definedummyword\print
+ \definedummyword\quotedblbase
+ \definedummyword\quotedblleft
+ \definedummyword\quotedblright
+ \definedummyword\quoteleft
+ \definedummyword\quoteright
+ \definedummyword\quotesinglbase
+ \definedummyword\result
+ \definedummyword\textdegree
+ %
+ % We want to disable all macros so that they are not expanded by \write.
+ \macrolist
+ %
+ \normalturnoffactive
+ %
+ % Handle some cases of @value -- where it does not contain any
+ % (non-fully-expandable) commands.
+ \makevalueexpandable
+}
+
+% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+%
+\def\commondummiesnofonts{%
+ % Control letters and accents.
+ \definedummyletter\!%
+ \definedummyaccent\"%
+ \definedummyaccent\'%
+ \definedummyletter\*%
+ \definedummyaccent\,%
+ \definedummyletter\.%
+ \definedummyletter\/%
+ \definedummyletter\:%
+ \definedummyaccent\=%
+ \definedummyletter\?%
+ \definedummyaccent\^%
+ \definedummyaccent\`%
+ \definedummyaccent\~%
+ \definedummyword\u
+ \definedummyword\v
+ \definedummyword\H
+ \definedummyword\dotaccent
+ \definedummyword\ogonek
+ \definedummyword\ringaccent
+ \definedummyword\tieaccent
+ \definedummyword\ubaraccent
+ \definedummyword\udotaccent
+ \definedummyword\dotless
+ %
+ % Texinfo font commands.
+ \definedummyword\b
+ \definedummyword\i
+ \definedummyword\r
+ \definedummyword\sansserif
+ \definedummyword\sc
+ \definedummyword\slanted
+ \definedummyword\t
+ %
+ % Commands that take arguments.
+ \definedummyword\acronym
+ \definedummyword\anchor
+ \definedummyword\cite
+ \definedummyword\code
+ \definedummyword\command
+ \definedummyword\dfn
+ \definedummyword\dmn
+ \definedummyword\email
+ \definedummyword\emph
+ \definedummyword\env
+ \definedummyword\file
+ \definedummyword\indicateurl
+ \definedummyword\kbd
+ \definedummyword\key
+ \definedummyword\math
+ \definedummyword\option
+ \definedummyword\pxref
+ \definedummyword\ref
+ \definedummyword\samp
+ \definedummyword\strong
+ \definedummyword\tie
+ \definedummyword\uref
+ \definedummyword\url
+ \definedummyword\var
+ \definedummyword\verb
+ \definedummyword\w
+ \definedummyword\xref
+}
+
+% \indexnofonts is used when outputting the strings to sort the index
+% by, and when constructing control sequence names. It eliminates all
+% control sequences and just writes whatever the best ASCII sort string
+% would be for a given command (usually its argument).
+%
+\def\indexnofonts{%
+ % Accent commands should become @asis.
+ \def\definedummyaccent##1{\let##1\asis}%
+ % We can just ignore other control letters.
+ \def\definedummyletter##1{\let##1\empty}%
+ % All control words become @asis by default; overrides below.
+ \let\definedummyword\definedummyaccent
+ %
+ \commondummiesnofonts
+ %
+ % Don't no-op \tt, since it isn't a user-level command
+ % and is used in the definitions of the active chars like <, >, |, etc.
+ % Likewise with the other plain tex font commands.
+ %\let\tt=\asis
+ %
+ \def\ { }%
+ \def\@{@}%
+ \def\_{\normalunderscore}%
+ \def\-{}% @- shouldn't affect sorting
+ %
+ % Unfortunately, texindex is not prepared to handle braces in the
+ % content at all. So for index sorting, we map @{ and @} to strings
+ % starting with |, since that ASCII character is between ASCII { and }.
+ \def\{{|a}%
+ \def\}{|b}%
+ %
+ % Non-English letters.
+ \def\AA{AA}%
+ \def\AE{AE}%
+ \def\DH{DZZ}%
+ \def\L{L}%
+ \def\OE{OE}%
+ \def\O{O}%
+ \def\TH{ZZZ}%
+ \def\aa{aa}%
+ \def\ae{ae}%
+ \def\dh{dzz}%
+ \def\exclamdown{!}%
+ \def\l{l}%
+ \def\oe{oe}%
+ \def\ordf{a}%
+ \def\ordm{o}%
+ \def\o{o}%
+ \def\questiondown{?}%
+ \def\ss{ss}%
+ \def\th{zzz}%
+ %
+ \def\LaTeX{LaTeX}%
+ \def\TeX{TeX}%
+ %
+ % Assorted special characters.
+ % (The following {} will end up in the sort string, but that's ok.)
+ \def\arrow{->}%
+ \def\bullet{bullet}%
+ \def\comma{,}%
+ \def\copyright{copyright}%
+ \def\dots{...}%
+ \def\enddots{...}%
+ \def\equiv{==}%
+ \def\error{error}%
+ \def\euro{euro}%
+ \def\expansion{==>}%
+ \def\geq{>=}%
+ \def\guillemetleft{<<}%
+ \def\guillemetright{>>}%
+ \def\guilsinglleft{<}%
+ \def\guilsinglright{>}%
+ \def\leq{<=}%
+ \def\minus{-}%
+ \def\point{.}%
+ \def\pounds{pounds}%
+ \def\print{-|}%
+ \def\quotedblbase{"}%
+ \def\quotedblleft{"}%
+ \def\quotedblright{"}%
+ \def\quoteleft{`}%
+ \def\quoteright{'}%
+ \def\quotesinglbase{,}%
+ \def\registeredsymbol{R}%
+ \def\result{=>}%
+ \def\textdegree{o}%
+ %
+ \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+ \else \indexlquoteignore \fi
+ %
+ % We need to get rid of all macros, leaving only the arguments (if present).
+ % Of course this is not nearly correct, but it is the best we can do for now.
+ % makeinfo does not expand macros in the argument to @deffn, which ends up
+ % writing an index entry, and texindex isn't prepared for an index sort entry
+ % that starts with \.
+ %
+ % Since macro invocations are followed by braces, we can just redefine them
+ % to take a single TeX argument. The case of a macro invocation that
+ % goes to end-of-line is not handled.
+ %
+ \macrolist
+}
+
+% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
+% ignore left quotes in the sort term.
+{\catcode`\`=\active
+ \gdef\indexlquoteignore{\let`=\empty}}
+
+\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
+
+% Most index entries go through here, but \dosubind is the general case.
+% #1 is the index name, #2 is the entry text.
+\def\doind#1#2{\dosubind{#1}{#2}{}}
+
+% Workhorse for all \fooindexes.
+% #1 is name of index, #2 is stuff to put there, #3 is subentry --
+% empty if called from \doind, as we usually are (the main exception
+% is with most defuns, which call us directly).
+%
+\def\dosubind#1#2#3{%
+ \iflinks
+ {%
+ % Store the main index entry text (including the third arg).
+ \toks0 = {#2}%
+ % If third arg is present, precede it with a space.
+ \def\thirdarg{#3}%
+ \ifx\thirdarg\empty \else
+ \toks0 = \expandafter{\the\toks0 \space #3}%
+ \fi
+ %
+ \edef\writeto{\csname#1indfile\endcsname}%
+ %
+ \safewhatsit\dosubindwrite
+ }%
+ \fi
+}
+
+% Write the entry in \toks0 to the index file:
+%
+\def\dosubindwrite{%
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
+ \fi
+ %
+ % Remember, we are within a group.
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % Process the index entry with all font commands turned off, to
+ % get the string to sort by.
+ {\indexnofonts
+ \edef\temp{\the\toks0}% need full expansion
+ \xdef\indexsorttmp{\temp}%
+ }%
+ %
+ % Set up the complete index entry, with both the sort key and
+ % the original text, including any font commands. We write
+ % three arguments to \entry to the .?? file (four in the
+ % subentry case), texindex reduces to two when writing the .??s
+ % sorted result.
+ \edef\temp{%
+ \write\writeto{%
+ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ }%
+ \temp
+}
+
+% Take care of unwanted page breaks/skips around a whatsit:
+%
+% If a skip is the last thing on the list now, preserve it
+% by backing up by \lastskip, doing the \write, then inserting
+% the skip again. Otherwise, the whatsit generated by the
+% \write or \pdfdest will make \lastskip zero. The result is that
+% sequences like this:
+% @end defun
+% @tindex whatever
+% @defun ...
+% will have extra space inserted, because the \medbreak in the
+% start of the @defun won't see the skip inserted by the @end of
+% the previous defun.
+%
+% But don't do any of this if we're not in vertical mode. We
+% don't want to do a \vskip and prematurely end a paragraph.
+%
+% Avoid page breaks due to these extra skips, too.
+%
+% But wait, there is a catch there:
+% We'll have to check whether \lastskip is zero skip. \ifdim is not
+% sufficient for this purpose, as it ignores stretch and shrink parts
+% of the skip. The only way seems to be to check the textual
+% representation of the skip.
+%
+% The following is almost like \def\zeroskipmacro{0.0pt} except that
+% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
+%
+\edef\zeroskipmacro{\expandafter\the\csname z at skip\endcsname}
+%
+\newskip\whatsitskip
+\newcount\whatsitpenalty
+%
+% ..., ready, GO:
+%
+\def\safewhatsit#1{%
+\ifhmode
+ #1%
+\else
+ % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
+ \whatsitskip = \lastskip
+ \edef\lastskipmacro{\the\lastskip}%
+ \whatsitpenalty = \lastpenalty
+ %
+ % If \lastskip is nonzero, that means the last item was a
+ % skip. And since a skip is discardable, that means this
+ % -\whatsitskip glue we're inserting is preceded by a
+ % non-discardable item, therefore it is not a potential
+ % breakpoint, therefore no \nobreak needed.
+ \ifx\lastskipmacro\zeroskipmacro
+ \else
+ \vskip-\whatsitskip
+ \fi
+ %
+ #1%
+ %
+ \ifx\lastskipmacro\zeroskipmacro
+ % If \lastskip was zero, perhaps the last item was a penalty, and
+ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
+ % to re-insert the same penalty (values >10000 are used for various
+ % signals); since we just inserted a non-discardable item, any
+ % following glue (such as a \parskip) would be a breakpoint. For example:
+ %
+ % @deffn deffn-whatever
+ % @vindex index-whatever
+ % Description.
+ % would allow a break between the index-whatever whatsit
+ % and the "Description." paragraph.
+ \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
+ \else
+ % On the other hand, if we had a nonzero \lastskip,
+ % this make-up glue would be preceded by a non-discardable item
+ % (the whatsit from the \write), so we must insert a \nobreak.
+ \nobreak\vskip\whatsitskip
+ \fi
+\fi
+}
+
+% The index entry written in the file actually looks like
+% \entry {sortstring}{page}{topic}
+% or
+% \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+% \initial {c}
+% before the first topic whose initial is c
+% \entry {topic}{pagelist}
+% for a topic that is used without subtopics
+% \primary {topic}
+% for the beginning of a topic that is used with subtopics
+% \secondary {subtopic}{pagelist}
+% for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
+\parseargdef\printindex{\begingroup
+ \dobreak \chapheadingskip{10000}%
+ %
+ \smallfonts \rm
+ \tolerance = 9500
+ \plainfrenchspacing
+ \everypar = {}% don't want the \kern\-parindent from indentation suppression.
+ %
+ % See if the index file exists and is nonempty.
+ % Change catcode of @ here so that if the index file contains
+ % \initial {@}
+ % as its first line, TeX doesn't complain about mismatched braces
+ % (because it thinks @} is a control sequence).
+ \catcode`\@ = 11
+ \openin 1 \jobname.#1s
+ \ifeof 1
+ % \enddoublecolumns gets confused if there is no text in the index,
+ % and it loses the chapter title and the aux file entries for the
+ % index. The easiest way to prevent this problem is to make sure
+ % there is some text.
+ \putwordIndexNonexistent
+ \else
+ %
+ % If the index file exists but is empty, then \openin leaves \ifeof
+ % false. We have to make TeX try to read something from the file, so
+ % it can discover if there is anything in it.
+ \read 1 to \temp
+ \ifeof 1
+ \putwordIndexIsEmpty
+ \else
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \def\indexbackslash{\backslashcurfont}%
+ \catcode`\\ = 0
+ \escapechar = `\\
+ \begindoublecolumns
+ \input \jobname.#1s
+ \enddoublecolumns
+ \fi
+ \fi
+ \closein 1
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+\def\initial#1{{%
+ % Some minor font changes for the special characters.
+ \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+ %
+ % Remove any glue we may have, we'll be inserting our own.
+ \removelastskip
+ %
+ % We like breaks before the index initials, so insert a bonus.
+ \nobreak
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
+ %
+ % Typeset the initial. Making this add up to a whole number of
+ % baselineskips increases the chance of the dots lining up from column
+ % to column. It still won't often be perfect, because of the stretch
+ % we need before each entry, but it's better.
+ %
+ % No shrink because it confuses \balancecolumns.
+ \vskip 1.67\baselineskip plus .5\baselineskip
+ \leftline{\secbf #1}%
+ % Do our best not to break after the initial.
+ \nobreak
+ \vskip .33\baselineskip plus .1\baselineskip
+}}
+
+% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
+% then page number (#2) flushed to the right margin. It is used for index
+% and table of contents entries. The paragraph is indented by \leftskip.
+%
+% A straightforward implementation would start like this:
+% \def\entry#1#2{...
+% But this freezes the catcodes in the argument, and can cause problems to
+% @code, which sets - active. This problem was fixed by a kludge---
+% ``-'' was active throughout whole index, but this isn't really right.
+% The right solution is to prevent \entry from swallowing the whole text.
+% --kasal, 21nov03
+\def\entry{%
+ \begingroup
+ %
+ % Start a new paragraph if necessary, so our assignments below can't
+ % affect previous text.
+ \par
+ %
+ % Do not fill out the last line with white space.
+ \parfillskip = 0in
+ %
+ % No extra space above this paragraph.
+ \parskip = 0in
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % \hangindent is only relevant when the entry text and page number
+ % don't both fit on one line. In that case, bob suggests starting the
+ % dots pretty far over on the line. Unfortunately, a large
+ % indentation looks wrong when the entry text itself is broken across
+ % lines. So we use a small indentation and put up with long leaders.
+ %
+ % \hangafter is reset to 1 (which is the value we want) at the start
+ % of each paragraph, so we need not do anything with that.
+ \hangindent = 2em
+ %
+ % When the entry text needs to be broken, just fill out the first line
+ % with blank space.
+ \rightskip = 0pt plus1fil
+ %
+ % A bit of stretch before each entry for the benefit of balancing
+ % columns.
+ \vskip 0pt plus1pt
+ %
+ % When reading the text of entry, convert explicit line breaks
+ % from @* into spaces. The user might give these in long section
+ % titles, for instance.
+ \def\*{\unskip\space\ignorespaces}%
+ \def\entrybreak{\hfil\break}%
+ %
+ % Swallow the left brace of the text (first parameter):
+ \afterassignment\doentry
+ \let\temp =
+}
+\def\entrybreak{\unskip\space\ignorespaces}%
+\def\doentry{%
+ \bgroup % Instead of the swallowed brace.
+ \noindent
+ \aftergroup\finishentry
+ % And now comes the text of the entry.
+}
+\def\finishentry#1{%
+ % #1 is the page number.
+ %
+ % The following is kludged to not output a line of dots in the index if
+ % there are no page numbers. The next person who breaks this will be
+ % cursed by a Unix daemon.
+ \setbox\boxA = \hbox{#1}%
+ \ifdim\wd\boxA = 0pt
+ \ %
+ \else
+ %
+ % If we must, put the page number on a line of its own, and fill out
+ % this line with blank space. (The \hfil is overwhelmed with the
+ % fill leaders glue in \indexdotfill if the page number does fit.)
+ \hfil\penalty50
+ \null\nobreak\indexdotfill % Have leaders before the page number.
+ %
+ % The `\ ' here is removed by the implicit \unskip that TeX does as
+ % part of (the primitive) \par. Without it, a spurious underfull
+ % \hbox ensues.
+ \ifpdf
+ \pdfgettoks#1.%
+ \ \the\toksA
+ \else
+ \ #1%
+ \fi
+ \fi
+ \par
+ \endgroup
+}
+
+% Like plain.tex's \dotfill, except uses up at least 1 em.
+\def\indexdotfill{\cleaders
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+\def\secondary#1#2{{%
+ \parfillskip=0in
+ \parskip=0in
+ \hangindent=1in
+ \hangafter=1
+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ #2
+ \fi
+ \par
+}}
+
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
+
+\newbox\partialpage
+\newdimen\doublecolumnhsize
+
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % Grab any single-column material above us.
+ \output = {%
+ %
+ % Here is a possibility not foreseen in manmac: if we accumulate a
+ % whole lot of material, we might end up calling this \output
+ % routine twice in a row (see the doublecol-lose test, which is
+ % essentially a couple of indexes with @setchapternewpage off). In
+ % that case we just ship out what is in \partialpage with the normal
+ % output routine. Generally, \partialpage will be empty when this
+ % runs and this will be a no-op. See the indexspread.tex test case.
+ \ifvoid\partialpage \else
+ \onepageout{\pagecontents\partialpage}%
+ \fi
+ %
+ \global\setbox\partialpage = \vbox{%
+ % Unvbox the main output page.
+ \unvbox\PAGE
+ \kern-\topskip \kern\baselineskip
+ }%
+ }%
+ \eject % run that output routine to set \partialpage
+ %
+ % Use the double-column output routine for subsequent pages.
+ \output = {\doublecolumnout}%
+ %
+ % Change the page size parameters. We could do this once outside this
+ % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
+ % format, but then we repeat the same computation. Repeating a couple
+ % of assignments once per index is clearly meaningless for the
+ % execution time, so we may as well do it in one place.
+ %
+ % First we halve the line length, less a little for the gutter between
+ % the columns. We compute the gutter based on the line length, so it
+ % changes automatically with the paper format. The magic constant
+ % below is chosen so that the gutter has the same value (well, +-<1pt)
+ % as it did when we hard-coded it.
+ %
+ % We put the result in a separate register, \doublecolumhsize, so we
+ % can restore it in \pagesofar, after \hsize itself has (potentially)
+ % been clobbered.
+ %
+ \doublecolumnhsize = \hsize
+ \advance\doublecolumnhsize by -.04154\hsize
+ \divide\doublecolumnhsize by 2
+ \hsize = \doublecolumnhsize
+ %
+ % Double the \vsize as well. (We don't need a separate register here,
+ % since nobody clobbers \vsize.)
+ \vsize = 2\vsize
+}
+
+% The double-column output routine for all double-column pages except
+% the last.
+%
+\def\doublecolumnout{%
+ \splittopskip=\topskip \splitmaxdepth=\maxdepth
+ % Get the available space for the double columns -- the normal
+ % (undoubled) page height minus any material left over from the
+ % previous page.
+ \dimen@ = \vsize
+ \divide\dimen@ by 2
+ \advance\dimen@ by -\ht\partialpage
+ %
+ % box0 will be the left-hand column, box2 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255
+ \penalty\outputpenalty
+}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
+\def\pagesofar{%
+ \unvbox\partialpage
+ %
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize
+ \hbox to\pagewidth{\box0\hfil\box2}%
+}
+%
+% All done with double columns.
+\def\enddoublecolumns{%
+ % The following penalty ensures that the page builder is exercised
+ % _before_ we change the output routine. This is necessary in the
+ % following situation:
+ %
+ % The last section of the index consists only of a single entry.
+ % Before this section, \pagetotal is less than \pagegoal, so no
+ % break occurs before the last section starts. However, the last
+ % section, consisting of \initial and the single \entry, does not
+ % fit on the page and has to be broken off. Without the following
+ % penalty the page builder will not be exercised until \eject
+ % below, and by that time we'll already have changed the output
+ % routine to the \balancecolumns version, so the next-to-last
+ % double-column page will be processed with \balancecolumns, which
+ % is wrong: The two columns will go to the main vertical list, with
+ % the broken-off section in the recent contributions. As soon as
+ % the output routine finishes, TeX starts reconsidering the page
+ % break. The two columns and the broken-off section both fit on the
+ % page, because the two columns now take up only half of the page
+ % goal. When TeX sees \eject from below which follows the final
+ % section, it invokes the new output routine that we've set after
+ % \balancecolumns below; \onepageout will try to fit the two columns
+ % and the final section into the vbox of \pageheight (see
+ % \pagebody), causing an overfull box.
+ %
+ % Note that glue won't work here, because glue does not exercise the
+ % page builder, unlike penalties (see The TeXbook, pp. 280-281).
+ \penalty0
+ %
+ \output = {%
+ % Split the last of the double-column material. Leave it on the
+ % current page, no automatic page break.
+ \balancecolumns
+ %
+ % If we end up splitting too much material for the current page,
+ % though, there will be another page break right after this \output
+ % invocation ends. Having called \balancecolumns once, we do not
+ % want to call it again. Therefore, reset \output to its normal
+ % definition right away. (We hope \balancecolumns will never be
+ % called on to balance too much material, but if it is, this makes
+ % the output somewhat more palatable.)
+ \global\output = {\onepageout{\pagecontents\PAGE}}%
+ }%
+ \eject
+ \endgroup % started in \begindoublecolumns
+ %
+ % \pagegoal was set to the doubled \vsize above, since we restarted
+ % the current page. We're now back to normal single-column
+ % typesetting, so reset \pagegoal to the normal \vsize (after the
+ % \endgroup where \vsize got restored).
+ \pagegoal = \vsize
+}
+%
+% Called at the end of the double column material.
+\def\balancecolumns{%
+ \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2 % target to split to
+ %debug\message{final 2-column material height=\the\ht0, target=\the\dimen at .}%
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht3>\dimen@
+ \global\advance\dimen@ by 1pt
+ \repeat
+ }%
+ %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ %
+ \pagesofar
+}
+\catcode`\@ = \other
+
+
+\message{sectioning,}
+% Chapters, sections, etc.
+
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+ \chapoddpage
+ \null
+ \vskip.3\vsize % move it down on the page a bit
+ \begingroup
+ \noindent \titlefonts\rmisbold #1\par % the text
+ \let\lastnode=\empty % no node to associate with
+ \writetocentry{part}{#1}{}% but put it in the toc
+ \headingsoff % no headline or footline on the part page
+ \chapoddpage
+ \endgroup
+}
+
+% \unnumberedno is an oxymoron. But we count the unnumbered
+% sections so that we can refer to them unambiguously in the pdf
+% outlines by their "section number". We avoid collisions with chapter
+% numbers by starting them at 10000. (If a document ever has 10000
+% chapters, we're in trouble anyway, I'm sure.)
+\newcount\unnumberedno \unnumberedno = 10000
+\newcount\chapno
+\newcount\secno \secno=0
+\newcount\subsecno \subsecno=0
+\newcount\subsubsecno \subsubsecno=0
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount\appendixno \appendixno = `\@
+%
+% \def\appendixletter{\char\the\appendixno}
+% We do the following ugly conditional instead of the above simple
+% construct for the sake of pdftex, which needs the actual
+% letter in the expansion, not just typeset.
+%
+\def\appendixletter{%
+ \ifnum\appendixno=`A A%
+ \else\ifnum\appendixno=`B B%
+ \else\ifnum\appendixno=`C C%
+ \else\ifnum\appendixno=`D D%
+ \else\ifnum\appendixno=`E E%
+ \else\ifnum\appendixno=`F F%
+ \else\ifnum\appendixno=`G G%
+ \else\ifnum\appendixno=`H H%
+ \else\ifnum\appendixno=`I I%
+ \else\ifnum\appendixno=`J J%
+ \else\ifnum\appendixno=`K K%
+ \else\ifnum\appendixno=`L L%
+ \else\ifnum\appendixno=`M M%
+ \else\ifnum\appendixno=`N N%
+ \else\ifnum\appendixno=`O O%
+ \else\ifnum\appendixno=`P P%
+ \else\ifnum\appendixno=`Q Q%
+ \else\ifnum\appendixno=`R R%
+ \else\ifnum\appendixno=`S S%
+ \else\ifnum\appendixno=`T T%
+ \else\ifnum\appendixno=`U U%
+ \else\ifnum\appendixno=`V V%
+ \else\ifnum\appendixno=`W W%
+ \else\ifnum\appendixno=`X X%
+ \else\ifnum\appendixno=`Y Y%
+ \else\ifnum\appendixno=`Z Z%
+ % The \the is necessary, despite appearances, because \appendixletter is
+ % expanded while writing the .toc file. \char\appendixno is not
+ % expandable, thus it is written literally, thus all appendixes come out
+ % with the same letter (or @) in the toc without it.
+ \else\char\the\appendixno
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+% Each @chapter defines these (using marks) as the number+name, number
+% and name of the chapter. Page headings and footings can use
+% these. @section does likewise.
+\def\thischapter{}
+\def\thischapternum{}
+\def\thischaptername{}
+\def\thissection{}
+\def\thissectionnum{}
+\def\thissectionname{}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
+
+% @raisesections: treat @section as chapter, @subsection as section, etc.
+\def\raisesections{\global\advance\secbase by -1}
+\let\up=\raisesections % original BFox name
+
+% @lowersections: treat @chapter as section, @section as subsection, etc.
+\def\lowersections{\global\advance\secbase by 1}
+\let\down=\lowersections % original BFox name
+
+% we only have subsub.
+\chardef\maxseclevel = 3
+%
+% A numbered section within an unnumbered changes to unnumbered too.
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
+%
+% Trace whether the current chapter is an appendix or not:
+% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
+\def\chapheadtype{N}
+
+% Choose a heading macro
+% #1 is heading type
+% #2 is heading level
+% #3 is text for heading
+\def\genhead#1#2#3{%
+ % Compute the abs. sec. level:
+ \absseclevel=#2
+ \advance\absseclevel by \secbase
+ % Make sure \absseclevel doesn't fall outside the range:
+ \ifnum \absseclevel < 0
+ \absseclevel = 0
+ \else
+ \ifnum \absseclevel > 3
+ \absseclevel = 3
+ \fi
+ \fi
+ % The heading type:
+ \def\headtype{#1}%
+ \if \headtype U%
+ \ifnum \absseclevel < \unnlevel
+ \chardef\unnlevel = \absseclevel
+ \fi
+ \else
+ % Check for appendix sections:
+ \ifnum \absseclevel = 0
+ \edef\chapheadtype{\headtype}%
+ \else
+ \if \headtype A\if \chapheadtype N%
+ \errmessage{@appendix... within a non-appendix chapter}%
+ \fi\fi
+ \fi
+ % Check for numbered within unnumbered:
+ \ifnum \absseclevel > \unnlevel
+ \def\headtype{U}%
+ \else
+ \chardef\unnlevel = 3
+ \fi
+ \fi
+ % Now print the heading:
+ \if \headtype U%
+ \ifcase\absseclevel
+ \unnumberedzzz{#3}%
+ \or \unnumberedseczzz{#3}%
+ \or \unnumberedsubseczzz{#3}%
+ \or \unnumberedsubsubseczzz{#3}%
+ \fi
+ \else
+ \if \headtype A%
+ \ifcase\absseclevel
+ \appendixzzz{#3}%
+ \or \appendixsectionzzz{#3}%
+ \or \appendixsubseczzz{#3}%
+ \or \appendixsubsubseczzz{#3}%
+ \fi
+ \else
+ \ifcase\absseclevel
+ \chapterzzz{#3}%
+ \or \seczzz{#3}%
+ \or \numberedsubseczzz{#3}%
+ \or \numberedsubsubseczzz{#3}%
+ \fi
+ \fi
+ \fi
+ \suppressfirstparagraphindent
+}
+
+% an interface:
+\def\numhead{\genhead N}
+\def\apphead{\genhead A}
+\def\unnmhead{\genhead U}
+
+% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
+% all lower-level sectioning counters to zero.
+%
+% Also set \chaplevelprefix, which we prepend to @float sequence numbers
+% (e.g., figures), q.v. By default (before any chapter), that is empty.
+\let\chaplevelprefix = \empty
+%
+\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz#1{%
+ % section resetting is \global in case the chapter is in a group, such
+ % as an @include file.
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\chapno by 1
+ %
+ % Used for \float.
+ \gdef\chaplevelprefix{\the\chapno.}%
+ \resetallfloatnos
+ %
+ % \putwordChapter can contain complex things in translations.
+ \toks0=\expandafter{\putwordChapter}%
+ \message{\the\toks0 \space \the\chapno}%
+ %
+ % Write the actual heading.
+ \chapmacro{#1}{Ynumbered}{\the\chapno}%
+ %
+ % So @section and the like are numbered underneath this chapter.
+ \global\let\section = \numberedsec
+ \global\let\subsection = \numberedsubsec
+ \global\let\subsubsection = \numberedsubsubsec
+}
+
+\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
+%
+\def\appendixzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\appendixno by 1
+ \gdef\chaplevelprefix{\appendixletter.}%
+ \resetallfloatnos
+ %
+ % \putwordAppendix can contain complex things in translations.
+ \toks0=\expandafter{\putwordAppendix}%
+ \message{\the\toks0 \space \appendixletter}%
+ %
+ \chapmacro{#1}{Yappendix}{\appendixletter}%
+ %
+ \global\let\section = \appendixsec
+ \global\let\subsection = \appendixsubsec
+ \global\let\subsubsection = \appendixsubsubsec
+}
+
+% normally unnmhead0 calls unnumberedzzz:
+\outer\parseargdef\unnumbered{\unnmhead0{#1}}
+\def\unnumberedzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\unnumberedno by 1
+ %
+ % Since an unnumbered has no number, no prefix for figures.
+ \global\let\chaplevelprefix = \empty
+ \resetallfloatnos
+ %
+ % This used to be simply \message{#1}, but TeX fully expands the
+ % argument to \message. Therefore, if #1 contained @-commands, TeX
+ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
+ % expanded @cite (which turns out to cause errors because \cite is meant
+ % to be executed, not expanded).
+ %
+ % Anyway, we don't want the fully-expanded definition of @cite to appear
+ % as a result of the \message, we just want `@cite' itself. We use
+ % \the<toks register> to achieve this: TeX expands \the<toks> only once,
+ % simply yielding the contents of <toks register>. (We also do this for
+ % the toc entries.)
+ \toks0 = {#1}%
+ \message{(\the\toks0)}%
+ %
+ \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
+ %
+ \global\let\section = \unnumberedsec
+ \global\let\subsection = \unnumberedsubsec
+ \global\let\subsubsection = \unnumberedsubsubsec
+}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\parseargdef\centerchap{%
+ % Well, we could do the following in a group, but that would break
+ % an assumption that \chapmacro is called at the outermost level.
+ % Thus we are safer this way: --kasal, 24feb04
+ \let\centerparametersmaybe = \centerparameters
+ \unnmhead0{#1}%
+ \let\centerparametersmaybe = \relax
+}
+
+% @top is like @unnumbered.
+\let\top\unnumbered
+
+% Sections.
+%
+\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
+\def\seczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
+}
+
+% normally calls appendixsectionzzz:
+\outer\parseargdef\appendixsection{\apphead1{#1}}
+\def\appendixsectionzzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
+}
+\let\appendixsec\appendixsection
+
+% normally calls unnumberedseczzz:
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
+\def\unnumberedseczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
+}
+
+% Subsections.
+%
+% normally calls numberedsubseczzz:
+\outer\parseargdef\numberedsubsec{\numhead2{#1}}
+\def\numberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
+}
+
+% normally calls appendixsubseczzz:
+\outer\parseargdef\appendixsubsec{\apphead2{#1}}
+\def\appendixsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno}%
+}
+
+% normally calls unnumberedsubseczzz:
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
+\def\unnumberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno}%
+}
+
+% Subsubsections.
+%
+% normally numberedsubsubseczzz:
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
+\def\numberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynumbered}%
+ {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% normally appendixsubsubseczzz:
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
+\def\appendixsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% normally unnumberedsubsubseczzz:
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
+\def\unnumberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% These macros control what the section commands do, according
+% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
+% Define them by default for a numbered chapter.
+\let\section = \numberedsec
+\let\subsection = \numberedsubsec
+\let\subsubsection = \numberedsubsubsec
+
+% Define @majorheading, @heading and @subheading
+
+% NOTE on use of \vbox for chapter headings, section headings, and such:
+% 1) We use \vbox rather than the earlier \line to permit
+% overlong headings to fold.
+% 2) \hyphenpenalty is set to 10000 because hyphenation in a
+% heading is obnoxious; this forbids it.
+% 3) Likewise, headings look best if no \parindent is used, and
+% if justification is not attempted. Hence \raggedright.
+
+\def\majorheading{%
+ {\advance\chapheadingskip by 10pt \chapbreak }%
+ \parsearg\chapheadingzzz
+}
+
+\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
+\def\chapheadingzzz#1{%
+ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}%
+ \bigskip \par\penalty 200\relax
+ \suppressfirstparagraphindent
+}
+
+% @heading, @subheading, @subsubheading.
+\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+% Parameter controlling skip before chapter headings (if needed)
+\newskip\chapheadingskip
+
+% Define plain chapter starts, and page on/off switching for it.
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+% Because \domark is called before \chapoddpage, the filler page will
+% get the headings for the next chapter, which is wrong. But we don't
+% care -- we just disable all headings on the filler page.
+\def\chapoddpage{%
+ \chappager
+ \ifodd\pageno \else
+ \begingroup
+ \headingsoff
+ \null
+ \chappager
+ \endgroup
+ \fi
+}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager
+\global\def\HEADINGSon{\HEADINGSsingle}}
+
+\def\CHAPPAGodd{%
+\global\let\contentsalignmacro = \chapoddpage
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage
+\global\def\HEADINGSon{\HEADINGSdouble}}
+
+\CHAPPAGon
+
+% Chapter opening.
+%
+% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
+% Yappendix, Yomitfromtoc), #3 the chapter number.
+%
+% To test against our argument.
+\def\Ynothingkeyword{Ynothing}
+\def\Yomitfromtockeyword{Yomitfromtoc}
+\def\Yappendixkeyword{Yappendix}
+%
+\def\chapmacro#1#2#3{%
+ % Insert the first mark before the heading break (see notes for \domark).
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
+ \gdef\thissection{}}%
+ %
+ \def\temptype{#2}%
+ \ifx\temptype\Ynothingkeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{\thischaptername}}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{}}%
+ \else\ifx\temptype\Yappendixkeyword
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\appendixletter}%
+ % \noexpand\putwordAppendix avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
+ \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \else
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\the\chapno}%
+ % \noexpand\putwordChapter avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+ \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \fi\fi\fi
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
+ % Insert the chapter heading break.
+ \pchapsepmacro
+ %
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
+ %
+ {%
+ \chapfonts \rmisbold
+ %
+ % Have to define \lastsection before calling \donoderef, because the
+ % xref code eventually uses it. On the other hand, it has to be called
+ % after \pchapsepmacro, or the headline will change too soon.
+ \gdef\lastsection{#1}%
+ %
+ % Only insert the separating space if we have a chapter/appendix
+ % number, and don't print the unnumbered ``number''.
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unnchap}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
+ \def\toctype{omit}%
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
+ \def\toctype{app}%
+ \else
+ \setbox0 = \hbox{#3\enspace}%
+ \def\toctype{numchap}%
+ \fi\fi\fi
+ %
+ % Write the toc entry for this chapter. Must come before the
+ % \donoderef, because we include the current node name in the toc
+ % entry, and \donoderef resets it to empty.
+ \writetocentry{\toctype}{#1}{#3}%
+ %
+ % For pdftex, we have to write out the node definition (aka, make
+ % the pdfdest) after any page break, but before the actual text has
+ % been typeset. If the destination for the pdf outline is after the
+ % text, then jumping from the outline may wind up with the text not
+ % being visible, for instance under high magnification.
+ \donoderef{#2}%
+ %
+ % Typeset the actual heading.
+ \nobreak % Avoid page breaks at the interline glue.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
+ \hangindent=\wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
+ }%
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
+}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerparameters{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+}
+
+
+% I don't think this chapter style is supported any more, so I'm not
+% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
+%
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+%
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}\bigskip \par\nobreak
+}
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt
+ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+}
+\def\CHAPFopen{%
+ \global\let\chapmacro=\chfopen
+ \global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles. These macros combine the section number parts and
+% call the generic \sectionheading to do the printing.
+%
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
+
+% Subsection titles.
+\newskip\subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
+
+% Subsubsection titles.
+\def\subsubsecheadingskip{\subsecheadingskip}
+\def\subsubsecheadingbreak{\subsecheadingbreak}
+
+
+% Print any size, any type, section title.
+%
+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
+% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
+% section number.
+%
+\def\seckeyword{sec}
+%
+\def\sectionheading#1#2#3#4{%
+ {%
+ \checkenv{}% should not be in an environment.
+ %
+ % Switch to the right set of fonts.
+ \csname #2fonts\endcsname \rmisbold
+ %
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
+ %
+ % Insert first mark before the heading break (see notes for \domark).
+ \let\prevsectiondefs=\lastsectiondefs
+ \ifx\temptype\Ynothingkeyword
+ \ifx\sectionlevel\seckeyword
+ \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
+ \gdef\thissection{\thissectionname}}%
+ \fi
+ \else\ifx\temptype\Yomitfromtockeyword
+ % Don't redefine \thissection.
+ \else\ifx\temptype\Yappendixkeyword
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \else
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \fi\fi\fi
+ %
+ % Go into vertical mode. Usually we'll already be there, but we
+ % don't want the following whatsit to end up in a preceding paragraph
+ % if the document didn't happen to have a blank line.
+ \par
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
+ % Insert space above the heading.
+ \csname #2headingbreak\endcsname
+ %
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
+ %
+ % Only insert the space after the number if we have a section number.
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unn}%
+ \gdef\lastsection{#1}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ % for @headings -- no section number, don't include in toc,
+ % and don't redefine \lastsection.
+ \setbox0 = \hbox{}%
+ \def\toctype{omit}%
+ \let\sectionlevel=\empty
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{app}%
+ \gdef\lastsection{#1}%
+ \else
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{num}%
+ \gdef\lastsection{#1}%
+ \fi\fi\fi
+ %
+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
+ \writetocentry{\toctype\sectionlevel}{#1}{#4}%
+ %
+ % Write the node reference (= pdf destination for pdftex).
+ % Again, see comments in \chapmacro.
+ \donoderef{#3}%
+ %
+ % Interline glue will be inserted when the vbox is completed.
+ % That glue will be a valid breakpoint for the page, since it'll be
+ % preceded by a whatsit (usually from the \donoderef, or from the
+ % \writetocentry if there was no node). We don't want to allow that
+ % break, since then the whatsits could end up on page n while the
+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
+ \nobreak
+ %
+ % Output the actual section heading.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
+ \hangindent=\wd0 % zero if no section number
+ \unhbox0 #1}%
+ }%
+ % Add extra space after the heading -- half of whatever came above it.
+ % Don't allow stretch, though.
+ \kern .5 \csname #2headingskip\endcsname
+ %
+ % Do not let the kern be a potential breakpoint, as it would be if it
+ % was followed by glue.
+ \nobreak
+ %
+ % We'll almost certainly start a paragraph next, so don't let that
+ % glue accumulate. (Not a breakpoint because it's preceded by a
+ % discardable item.)
+ \vskip-\parskip
+ %
+ % This is purely so the last item on the list is a known \penalty >
+ % 10000. This is so \startdefun can avoid allowing breakpoints after
+ % section headings. Otherwise, it would insert a valid breakpoint between:
+ % @section sec-whatever
+ % @deffn def-whatever
+ \penalty 10001
+}
+
+
+\message{toc,}
+% Table of contents.
+\newwrite\tocfile
+
+% Write an entry to the toc file, opening it if necessary.
+% Called from @chapter, etc.
+%
+% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
+% We append the current node name (if any) and page number as additional
+% arguments for the \{chap,sec,...}entry macros which will eventually
+% read this. The node name is used in the pdf outlines as the
+% destination to jump to.
+%
+% We open the .toc file for writing here instead of at @setfilename (or
+% any other fixed time) so that @contents can be anywhere in the document.
+% But if #1 is `omit', then we don't do anything. This is used for the
+% table of contents chapter openings themselves.
+%
+\newif\iftocfileopened
+\def\omitkeyword{omit}%
+%
+\def\writetocentry#1#2#3{%
+ \edef\writetoctype{#1}%
+ \ifx\writetoctype\omitkeyword \else
+ \iftocfileopened\else
+ \immediate\openout\tocfile = \jobname.toc
+ \global\tocfileopenedtrue
+ \fi
+ %
+ \iflinks
+ {\atdummies
+ \edef\temp{%
+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+ \temp
+ }%
+ \fi
+ \fi
+ %
+ % Tell \shipout to create a pdf destination on each page, if we're
+ % writing pdf. These are used in the table of contents. We can't
+ % just write one on every page because the title pages are numbered
+ % 1 and 2 (the page numbers aren't printed), and so are the first
+ % two pages of the document. Thus, we'd have two destinations named
+ % `1', and two named `2'.
+ \ifpdf \global\pdfmakepagedesttrue \fi
+}
+
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care. This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+%
+\def\activecatcodes{%
+ \catcode`\"=\active
+ \catcode`\$=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\\=\active
+ \catcode`\^=\active
+ \catcode`\_=\active
+ \catcode`\|=\active
+ \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+ \setupdatafile
+ \activecatcodes
+ \input \tocreadfilename
+}
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\newcount\savepageno
+\newcount\lastnegativepageno \lastnegativepageno = -1
+
+% Prepare to read what we've written to \tocfile.
+%
+\def\startcontents#1{%
+ % If @setchapternewpage on, and @headings double, the contents should
+ % start on an odd page, unlike chapters. Thus, we maintain
+ % \contentsalignmacro in parallel with \pagealignmacro.
+ % From: Torbjorn Granlund <tege at matematik.su.se>
+ \contentsalignmacro
+ \immediate\closeout\tocfile
+ %
+ % Don't need to put `Contents' or `Short Contents' in the headline.
+ % It is abundantly clear what they are.
+ \chapmacro{#1}{Yomitfromtoc}{}%
+ %
+ \savepageno = \pageno
+ \begingroup % Set up to handle contents files properly.
+ \raggedbottom % Worry more about breakpoints than the bottom.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+ %
+ % Roman numerals for page numbers.
+ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
+}
+
+% redefined for the two-volume lispref. We always output on
+% \jobname.toc even if this is redefined.
+%
+\def\tocreadfilename{\jobname.toc}
+
+% Normal (long) toc.
+%
+\def\contents{%
+ \startcontents{\putwordTOC}%
+ \openin 1 \tocreadfilename\space
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \ifeof 1 \else
+ \pdfmakeoutlines
+ \fi
+ \closein 1
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+
+% And just the chapters.
+\def\summarycontents{%
+ \startcontents{\putwordShortTOC}%
+ %
+ \let\partentry = \shortpartentry
+ \let\numchapentry = \shortchapentry
+ \let\appentry = \shortchapentry
+ \let\unnchapentry = \shortunnchapentry
+ % We want a true roman here for the page numbers.
+ \secfonts
+ \let\rm=\shortcontrm \let\bf=\shortcontbf
+ \let\sl=\shortcontsl \let\tt=\shortconttt
+ \rm
+ \hyphenpenalty = 10000
+ \advance\baselineskip by 1pt % Open it up a little.
+ \def\numsecentry##1##2##3##4{}
+ \let\appsecentry = \numsecentry
+ \let\unnsecentry = \numsecentry
+ \let\numsubsecentry = \numsecentry
+ \let\appsubsecentry = \numsecentry
+ \let\unnsubsecentry = \numsecentry
+ \let\numsubsubsecentry = \numsecentry
+ \let\appsubsubsecentry = \numsecentry
+ \let\unnsubsubsecentry = \numsecentry
+ \openin 1 \tocreadfilename\space
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \closein 1
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+\let\shortcontents = \summarycontents
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
+%
+\def\shortchaplabel#1{%
+ % This space should be enough, since a single number is .5em, and the
+ % widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % But use \hss just in case.
+ % (This space doesn't include the extra space that gets added after
+ % the label; that gets put in by \shortchapentry above.)
+ %
+ % We'd like to right-justify chapter numbers, but that looks strange
+ % with appendix letters. And right-justifying numbers and
+ % left-justifying letters looks strange when there is less than 10
+ % chapters. Have to read the whole toc once to know how many chapters
+ % there are before deciding ...
+ \hbox to 1em{#1\hss}%
+}
+
+% These macros generate individual entries in the table of contents.
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+% Parts, in the main contents. Replace the part number, which doesn't
+% exist, with an empty box. Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+ \penalty-300
+ \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+ \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
+% Chapters, in the main contents.
+\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
+%
+% Chapters, in the short toc.
+% See comments in \dochapentry re vbox and related settings.
+\def\shortchapentry#1#2#3#4{%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+}
+
+% Appendices, in the main contents.
+% Need the word Appendix, and a fixed-size box.
+%
+\def\appendixbox#1{%
+ % We use M since it's probably the widest letter.
+ \setbox0 = \hbox{\putwordAppendix{} M}%
+ \hbox to \wd0{\putwordAppendix{} #1\hss}}
+%
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+
+% Unnumbered chapters.
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+
+% Sections.
+\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
+\let\appsecentry=\numsecentry
+\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
+
+% Subsections.
+\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsecentry=\numsubsecentry
+\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
+
+% And subsubsections.
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsubsecentry=\numsubsubsecentry
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
+
+% This parameter controls the indentation of the various levels.
+% Same as \defaultparindent.
+\newdimen\tocindent \tocindent = 15pt
+
+% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% page number.
+%
+% If the toc has to be broken over pages, we want it to be at chapters
+% if at all possible; hence the \penalty.
+\def\dochapentry#1#2{%
+ \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+ \begingroup
+ \chapentryfonts
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \endgroup
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+ \secentryfonts \leftskip=\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+ \subsecentryfonts \leftskip=2\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+ \subsubsecentryfonts \leftskip=3\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+% We use the same \entry macro as for the index entries.
+\let\tocentry = \entry
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\def\subsecentryfonts{\textfonts}
+\def\subsubsecentryfonts{\textfonts}
+
+
+\message{environments,}
+% @foo ... @end foo.
+
+% @tex ... @end tex escapes into raw TeX temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain @ character.
+
+\envdef\tex{%
+ \setupmarkupstyle{tex}%
+ \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+ \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
+ \catcode `\%=14
+ \catcode `\+=\other
+ \catcode `\"=\other
+ \catcode `\|=\other
+ \catcode `\<=\other
+ \catcode `\>=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
+ \escapechar=`\\
+ %
+ % ' is active in math mode (mathcode"8000). So reset it, and all our
+ % other math active characters (just in case), to plain's definitions.
+ \mathactive
+ %
+ \let\b=\ptexb
+ \let\bullet=\ptexbullet
+ \let\c=\ptexc
+ \let\,=\ptexcomma
+ \let\.=\ptexdot
+ \let\dots=\ptexdots
+ \let\equiv=\ptexequiv
+ \let\!=\ptexexclam
+ \let\i=\ptexi
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \let\{=\ptexlbrace
+ \let\+=\tabalign
+ \let\}=\ptexrbrace
+ \let\/=\ptexslash
+ \let\*=\ptexstar
+ \let\t=\ptext
+ \expandafter \let\csname top\endcsname=\ptextop % outer
+ \let\frenchspacing=\plainfrenchspacing
+ %
+ \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+ \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+ \def\@{@}%
+}
+% There is no need to define \Etex.
+
+% Define @lisp ... @end lisp.
+% @lisp environment forms a group so it can rebind things,
+% including the definition of @end lisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^^M gets inside @lisp, @example, and other
+% such environments. \null is better than a space, since it doesn't
+% have any width.
+\def\lisppar{\null\endgraf}
+
+% This space is always present above and below environments.
+\newskip\envskipamount \envskipamount = 0pt
+
+% Make spacing and below environment symmetrical. We use \parskip here
+% to help in doing that, since in @example-like environments \parskip
+% is reset to zero; thus the \afterenvbreak inserts no space -- but the
+% start of the next paragraph will insert \parskip.
+%
+\def\aboveenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
+ % it's not a good place to break if the last penalty was \nobreak
+ % or better ...
+ \ifnum\lastpenalty<10000 \penalty-50 \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
+\let\nonarrowing=\relax
+
+% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
+% environment contents.
+\font\circle=lcircle10
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+\circthick=\fontdimen8\circle
+%
+\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
+\def\ctr{{\hskip 6pt\circle\char'010}}
+\def\cbl{{\circle\char'012\hskip -6pt}}
+\def\cbr{{\hskip 6pt\circle\char'011}}
+\def\carttop{\hbox to \cartouter{\hskip\lskip
+ \ctl\leaders\hrule height\circthick\hfil\ctr
+ \hskip\rskip}}
+\def\cartbot{\hbox to \cartouter{\hskip\lskip
+ \cbl\leaders\hrule height\circthick\hfil\cbr
+ \hskip\rskip}}
+%
+\newskip\lskip\newskip\rskip
+
+\envdef\cartouche{%
+ \ifhmode\par\fi % can't be in the midst of a paragraph.
+ \startsavinginserts
+ \lskip=\leftskip \rskip=\rightskip
+ \leftskip=0pt\rightskip=0pt % we want these *outside*.
+ \cartinner=\hsize \advance\cartinner by-\lskip
+ \advance\cartinner by-\rskip
+ \cartouter=\hsize
+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+ % side, and for 6pt waste from
+ % each corner char, and rule thickness
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing = t%
+ %
+ % If this cartouche directly follows a sectioning command, we need the
+ % \parskip glue (backspaced over by default) or the cartouche can
+ % collide with the section heading.
+ \ifnum\lastpenalty>10000 \vskip\parskip \fi
+ %
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \kern3pt
+ \hsize=\cartinner
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+ \comment % For explanation, see the end of def\group.
+}
+\def\Ecartouche{%
+ \ifhmode\par\fi
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
+ \checkinserts
+}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\newdimen\nonfillparindent
+\def\nonfillstart{%
+ \aboveenvbreak
+ \hfuzz = 12pt % Don't be fussy
+ \sepspaces % Make spaces be word-separators rather than space tokens.
+ \let\par = \lisppar % don't ignore blank lines
+ \obeylines % each line of input is a line of output
+ \parskip = 0pt
+ % Turn off paragraph indentation but redefine \indent to emulate
+ % the normal \indent.
+ \nonfillparindent=\parindent
+ \parindent = 0pt
+ \let\indent\nonfillindent
+ %
+ \emergencystretch = 0pt % don't try to avoid overfull boxes
+ \ifx\nonarrowing\relax
+ \advance \leftskip by \lispnarrowing
+ \exdentamount=\lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \let\exdent=\nofillexdent
+}
+
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
+% If you want all examples etc. small: @set dispenvsize small.
+% If you want even small examples the full size: @set dispenvsize nosmall.
+% This affects the following displayed environments:
+% @example, @display, @format, @lisp
+%
+\def\smallword{small}
+\def\nosmallword{nosmall}
+\let\SETdispenvsize\relax
+\def\setnormaldispenv{%
+ \ifx\SETdispenvsize\smallword
+ % end paragraph for sake of leading, in case document has no blank
+ % line. This is redundant with what happens in \aboveenvbreak, but
+ % we need to do it before changing the fonts, and it's inconvenient
+ % to change the fonts afterward.
+ \ifnum \lastpenalty=10000 \else \endgraf \fi
+ \smallexamplefonts \rm
+ \fi
+}
+\def\setsmalldispenv{%
+ \ifx\SETdispenvsize\nosmallword
+ \else
+ \ifnum \lastpenalty=10000 \else \endgraf \fi
+ \smallexamplefonts \rm
+ \fi
+}
+
+% We often define two environments, @foo and @smallfoo.
+% Let's do it in one command. #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
+ \expandafter\let\csname E#1\endcsname \afterenvbreak
+ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
+}
+
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+ \makedispenvdef{#1}{#3}%
+ \makedispenvdef{#2}{#3}%
+}
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
+%
+% @smallexample and @smalllisp: use smaller fonts.
+% Originally contributed by Pavel at xerox.
+%
+\maketwodispenvdef{lisp}{example}{%
+ \nonfillstart
+ \tt\setupmarkupstyle{example}%
+ \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
+ \gobble % eat return
+}
+% @display/@smalldisplay: same as @lisp except keep current font.
+%
+\makedispenvdef{display}{%
+ \nonfillstart
+ \gobble
+}
+
+% @format/@smallformat: same as @display except don't narrow margins.
+%
+\makedispenvdef{format}{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+
+% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
+\envdef\flushleft{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+\let\Eflushleft = \afterenvbreak
+
+% @flushright.
+%
+\envdef\flushright{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \advance\leftskip by 0pt plus 1fill\relax
+ \gobble
+}
+\let\Eflushright = \afterenvbreak
+
+
+% @raggedright does more-or-less normal line breaking but no right
+% justification. From plain.tex.
+\envdef\raggedright{%
+ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+ \parindent=0pt \leftskip0pt plus2em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins. We keep \parskip nonzero in general, since
+% we're doing normal filling. So, when using \aboveenvbreak and
+% \afterenvbreak, temporarily make \parskip 0.
+%
+\makedispenvdef{quotation}{\quotationstart}
+%
+\def\quotationstart{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \advance\rightskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \parsearg\quotationlabel
+}
+
+% We have retained a nonzero parskip for the environment, since we're
+% doing normal filling.
+%
+\def\Equotation{%
+ \par
+ \ifx\quotationauthor\thisisundefined\else
+ % indent a bit.
+ \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
+ \fi
+ {\parskip=0pt \afterenvbreak}%
+}
+\def\Esmallquotation{\Equotation}
+
+% If we're given an argument, typeset it in bold with a colon after.
+\def\quotationlabel#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty \else
+ {\bf #1: }%
+ \fi
+}
+
+
+% LaTeX-like @verbatim... at end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> as delimiter,
+% we need the curly braces so that makeinfo sees the @verb command, eg:
+% `@verbx...x' would look like the '@verbx' command. --janneke at gnu.org
+%
+% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
+%
+% [Knuth] p.344; only we need to do the other characters Texinfo sets
+% active too. Otherwise, they get lost as the first character on a
+% verbatim line.
+\def\dospecials{%
+ \do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
+ \do\<\do\>\do\|\do\@\do+\do\"%
+ % Don't do the quotes -- if we do, @set txicodequoteundirected and
+ % @set txicodequotebacktick will not have effect on @verb and
+ % @verbatim, and ?` and !` ligatures won't get disabled.
+ %\do\`\do\'%
+}
+%
+% [Knuth] p. 380
+\def\uncatcodespecials{%
+ \def\do##1{\catcode`##1=\other}\dospecials}
+%
+% Setup for the @verb command.
+%
+% Eight spaces for a tab
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
+\endgroup
+%
+\def\setupverb{%
+ \tt % easiest (and conventionally used) font for verbatim
+ \def\par{\leavevmode\endgraf}%
+ \setupmarkupstyle{verb}%
+ \tabeightspaces
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+}
+
+% Setup for the @verbatim environment
+%
+% Real tab expansion.
+\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
+%
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs. The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group. Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset. Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
+%
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabexpand{%
+ \catcode`\^^I=\active
+ \def^^I{\leavevmode\egroup
+ \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+ \divide\dimen\verbbox by\tabw
+ \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+ \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
+ \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
+ }%
+ }
+\endgroup
+
+% start the verbatim environment.
+\def\setupverbatim{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \tt % easiest (and conventionally used) font for verbatim
+ % The \leavevmode here is for blank lines. Otherwise, we would
+ % never \starttabox and the \egroup would end verbatim mode.
+ \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
+ \tabexpand
+ \setupmarkupstyle{verbatim}%
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count.
+ % Must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+ \everypar{\starttabbox}%
+}
+
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters. Before first delimiter expect a
+% right brace, after last delimiter expect closing brace:
+%
+% \def\doverb'{'<char>#1<char>'}'{#1}
+%
+% [Knuth] p. 382; only eat outer {}
+\begingroup
+ \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
+ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
+\endgroup
+%
+\def\verb{\begingroup\setupverb\doverb}
+%
+%
+% Do the @verbatim magic: define the macro \doverbatim so that
+% the (first) argument ends when '@end verbatim' is reached, ie:
+%
+% \def\doverbatim#1 at end verbatim{#1}
+%
+% For Texinfo it's a lot easier than for LaTeX,
+% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
+% we need not redefine '\', '{' and '}'.
+%
+% Inspired by LaTeX's verbatim command set [latex.ltx]
+%
+\begingroup
+ \catcode`\ =\active
+ \obeylines %
+ % ignore everything up to the first ^^M, that's the newline at the end
+ % of the @verbatim input line itself. Otherwise we get an extra blank
+ % line in the output.
+ \xdef\doverbatim#1^^M#2 at end verbatim{#2\noexpand\end\gobble verbatim}%
+ % We really want {...\end verbatim} in the body of the macro, but
+ % without the active space; thus we have to use \xdef and \gobble.
+\endgroup
+%
+\envdef\verbatim{%
+ \setupverbatim\doverbatim
+}
+\let\Everbatim = \afterenvbreak
+
+
+% @verbatiminclude FILE - insert text of file in verbatim environment.
+%
+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
+%
+\def\doverbatiminclude#1{%
+ {%
+ \makevalueexpandable
+ \setupverbatim
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
+ \input #1
+ \afterenvbreak
+ }%
+}
+
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+%
+% We save the uninterpreted tokens, rather than creating a box.
+% Saving the text in a box would be much easier, but then all the
+% typesetting commands (@smallbook, font changes, etc.) have to be done
+% beforehand -- and a) we want @copying to be done first in the source
+% file; b) letting users define the frontmatter in as flexible order as
+% possible is very desirable.
+%
+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
+\def\docopying#1 at end copying{\endgroup\def\copyingtext{#1}}
+%
+\def\insertcopying{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\copyingtext
+ \endgroup
+}
+
+
+\message{defuns,}
+% @defun etc.
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+\newcount\defunpenalty
+
+% Start the processing of @deffn:
+\def\startdefun{%
+ \ifnum\lastpenalty<10000
+ \medbreak
+ \defunpenalty=10003 % Will keep this @deffn together with the
+ % following @def command, see below.
+ \else
+ % If there are two @def commands in a row, we'll have a \nobreak,
+ % which is there to keep the function description together with its
+ % header. But if there's nothing but headers, we need to allow a
+ % break somewhere. Check specifically for penalty 10002, inserted
+ % by \printdefunline, instead of 10000, since the sectioning
+ % commands also insert a nobreak penalty, and we don't want to allow
+ % a break between a section heading and a defun.
+ %
+ % As a further refinement, we avoid "club" headers by signalling
+ % with penalty of 10003 after the very first @deffn in the
+ % sequence (see above), and penalty of 10002 after any following
+ % @def command.
+ \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
+ %
+ % Similarly, after a section heading, do not allow a break.
+ % But do insert the glue.
+ \medskip % preceded by discardable penalty, so not a breakpoint
+ \fi
+ %
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+}
+
+\def\dodefunx#1{%
+ % First, check whether we are in the right environment:
+ \checkenv#1%
+ %
+ % As above, allow line break if we have multiple x headers in a row.
+ % It's not a great place, though.
+ \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
+ %
+ % And now, it's time to reuse the body of the original defun:
+ \expandafter\gobbledefun#1%
+}
+\def\gobbledefun#1\startdefun{}
+
+% \printdefunline \deffnheader{text}
+%
+\def\printdefunline#1#2{%
+ \begingroup
+ % call \deffnheader:
+ #1#2 \endheader
+ % common ending:
+ \interlinepenalty = 10000
+ \advance\rightskip by 0pt plus 1fil\relax
+ \endgraf
+ \nobreak\vskip -\parskip
+ \penalty\defunpenalty % signal to \startdefun and \dodefunx
+ % Some of the @defun-type tags do not enable magic parentheses,
+ % rendering the following check redundant. But we don't optimize.
+ \checkparencounts
+ \endgroup
+}
+
+\def\Edefun{\endgraf\medbreak}
+
+% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
+% the only thing remaining is to define \deffnheader.
+%
+\def\makedefun#1{%
+ \expandafter\let\csname E#1\endcsname = \Edefun
+ \edef\temp{\noexpand\domakedefun
+ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
+ \temp
+}
+
+% \domakedefun \deffn \deffnx \deffnheader
+%
+% Define \deffn and \deffnx, without parameters.
+% \deffnheader has to be defined explicitly.
+%
+\def\domakedefun#1#2#3{%
+ \envdef#1{%
+ \startdefun
+ \doingtypefnfalse % distinguish typed functions from all else
+ \parseargusing\activeparens{\printdefunline#3}%
+ }%
+ \def#2{\dodefunx#1}%
+ \def#3%
+}
+
+\newif\ifdoingtypefn % doing typed function?
+\newif\ifrettypeownline % typeset return type on its own line?
+
+% @deftypefnnewline on|off says whether the return type of typed functions
+% are printed on their own line. This affects @deftypefn, @deftypefun,
+% @deftypeop, and @deftypemethod.
+%
+\parseargdef\deftypefnnewline{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETtxideftypefnnl\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @txideftypefnnl value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+% Untyped functions:
+
+% @deffn category name args
+\makedefun{deffn}{\deffngeneral{}}
+
+% @deffn category class name args
+\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
+
+% \defopon {category on}class name args
+\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deffngeneral {subind}category name args
+%
+\def\deffngeneral#1#2 #3 #4\endheader{%
+ % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
+ \dosubind{fn}{\code{#3}}{#1}%
+ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+}
+
+% Typed functions:
+
+% @deftypefn category type name args
+\makedefun{deftypefn}{\deftypefngeneral{}}
+
+% @deftypeop category class type name args
+\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
+
+% \deftypeopon {category on}class type name args
+\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypefngeneral {subind}category type name args
+%
+\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{fn}{\code{#4}}{#1}%
+ \doingtypefntrue
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+% Typed variables:
+
+% @deftypevr category type var args
+\makedefun{deftypevr}{\deftypecvgeneral{}}
+
+% @deftypecv category class type var args
+\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
+
+% \deftypecvof {category of}class type var args
+\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypecvgeneral {subind}category type var args
+%
+\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{vr}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+% Untyped variables:
+
+% @defvr category var args
+\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
+
+% @defcv category class var args
+\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
+
+% \defcvof {category of}class var args
+\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+
+% Types:
+
+% @deftp category name args
+\makedefun{deftp}#1 #2 #3\endheader{%
+ \doind{tp}{\code{#2}}%
+ \defname{#1}{}{#2}\defunargs{#3\unskip}%
+}
+
+% Remaining @defun-like shortcuts:
+\makedefun{defun}{\deffnheader{\putwordDeffunc} }
+\makedefun{defmac}{\deffnheader{\putwordDefmac} }
+\makedefun{defspec}{\deffnheader{\putwordDefspec} }
+\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
+\makedefun{defvar}{\defvrheader{\putwordDefvar} }
+\makedefun{defopt}{\defvrheader{\putwordDefopt} }
+\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
+\makedefun{defmethod}{\defopon\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
+\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+
+% \defname, which formats the name of the @def (not the args).
+% #1 is the category, such as "Function".
+% #2 is the return type, if any.
+% #3 is the function name.
+%
+% We are followed by (but not passed) the arguments, if any.
+%
+\def\defname#1#2#3{%
+ \par
+ % Get the values of \leftskip and \rightskip as they were outside the @def...
+ \advance\leftskip by -\defbodyindent
+ %
+ % Determine if we are typesetting the return type of a typed function
+ % on a line by itself.
+ \rettypeownlinefalse
+ \ifdoingtypefn % doing a typed function specifically?
+ % then check user option for putting return type on its own line:
+ \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
+ \rettypeownlinetrue
+ \fi
+ \fi
+ %
+ % How we'll format the category name. Putting it in brackets helps
+ % distinguish it from the body text that may end up on the next line
+ % just below it.
+ \def\temp{#1}%
+ \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
+ %
+ % Figure out line sizes for the paragraph shape. We'll always have at
+ % least two.
+ \tempnum = 2
+ %
+ % The first line needs space for \box0; but if \rightskip is nonzero,
+ % we need only space for the part of \box0 which exceeds it:
+ \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ %
+ % If doing a return type on its own line, we'll have another line.
+ \ifrettypeownline
+ \advance\tempnum by 1
+ \def\maybeshapeline{0in \hsize}%
+ \else
+ \def\maybeshapeline{}%
+ \fi
+ %
+ % The continuations:
+ \dimen2=\hsize \advance\dimen2 by -\defargsindent
+ %
+ % The final paragraph shape:
+ \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
+ %
+ % Put the category name at the right margin.
+ \noindent
+ \hbox to 0pt{%
+ \hfil\box0 \kern-\hsize
+ % \hsize has to be shortened this way:
+ \kern\leftskip
+ % Intentionally do not respect \rightskip, since we need the space.
+ }%
+ %
+ % Allow all lines to be underfull without complaint:
+ \tolerance=10000 \hbadness=10000
+ \exdentamount=\defbodyindent
+ {%
+ % defun fonts. We use typewriter by default (used to be bold) because:
+ % . we're printing identifiers, they should be in tt in principle.
+ % . in languages with many accents, such as Czech or French, it's
+ % common to leave accents off identifiers. The result looks ok in
+ % tt, but exceedingly strange in rm.
+ % . we don't want -- and --- to be treated as ligatures.
+ % . this still does not fix the ?` and !` ligatures, but so far no
+ % one has made identifiers using them :).
+ \df \tt
+ \def\temp{#2}% text of the return type
+ \ifx\temp\empty\else
+ \tclose{\temp}% typeset the return type
+ \ifrettypeownline
+ % put return type on its own line; prohibit line break following:
+ \hfil\vadjust{\nobreak}\break
+ \else
+ \space % type on same line, so just followed by a space
+ \fi
+ \fi % no return type
+ #3% output function name
+ }%
+ {\rm\enskip}% hskip 0.5 em of \tenrm
+ %
+ \boldbrax
+ % arguments will be output next, if any.
+}
+
+% Print arguments in slanted roman (not ttsl), inconsistently with using
+% tt for the name. This is because literal text is sometimes needed in
+% the argument list (groff manual), and ttsl and tt are not very
+% distinguishable. Prevent hyphenation at `-' chars.
+%
+\def\defunargs#1{%
+ % use sl by default (not ttsl),
+ % tt for the names.
+ \df \sl \hyphenchar\font=0
+ %
+ % On the other hand, if an argument has two dashes (for instance), we
+ % want a way to get ttsl. Let's try @var for that.
+ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
+ #1%
+ \sl\hyphenchar\font=45
+}
+
+% We want ()&[] to print specially on the defun line.
+%
+\def\activeparens{%
+ \catcode`\(=\active \catcode`\)=\active
+ \catcode`\[=\active \catcode`\]=\active
+ \catcode`\&=\active
+}
+
+% Make control sequences which act like normal parenthesis chars.
+\let\lparen = ( \let\rparen = )
+
+% Be sure that we always have a definition for `(', etc. For example,
+% if the fn name has parens in it, \boldbrax will not be in effect yet,
+% so TeX would otherwise complain about undefined control sequence.
+{
+ \activeparens
+ \global\let(=\lparen \global\let)=\rparen
+ \global\let[=\lbrack \global\let]=\rbrack
+ \global\let& = \&
+
+ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+ \gdef\magicamp{\let&=\amprm}
+}
+
+\newcount\parencount
+
+% If we encounter &foo, then turn on ()-hacking afterwards
+\newif\ifampseen
+\def\amprm#1 {\ampseentrue{\bf\ }}
+
+\def\parenfont{%
+ \ifampseen
+ % At the first level, print parens in roman,
+ % otherwise use the default font.
+ \ifnum \parencount=1 \rm \fi
+ \else
+ % The \sf parens (in \boldbrax) actually are a little bolder than
+ % the contained text. This is especially needed for [ and ] .
+ \sf
+ \fi
+}
+\def\infirstlevel#1{%
+ \ifampseen
+ \ifnum\parencount=1
+ #1%
+ \fi
+ \fi
+}
+\def\bfafterword#1 {#1 \bf}
+
+\def\opnr{%
+ \global\advance\parencount by 1
+ {\parenfont(}%
+ \infirstlevel \bfafterword
+}
+\def\clnr{%
+ {\parenfont)}%
+ \infirstlevel \sl
+ \global\advance\parencount by -1
+}
+
+\newcount\brackcount
+\def\lbrb{%
+ \global\advance\brackcount by 1
+ {\bf[}%
+}
+\def\rbrb{%
+ {\bf]}%
+ \global\advance\brackcount by -1
+}
+
+\def\checkparencounts{%
+ \ifnum\parencount=0 \else \badparencount \fi
+ \ifnum\brackcount=0 \else \badbrackcount \fi
+}
+% these should not use \errmessage; the glibc manual, at least, actually
+% has such constructs (when documenting function pointers).
+\def\badparencount{%
+ \message{Warning: unbalanced parentheses in @def...}%
+ \global\parencount=0
+}
+\def\badbrackcount{%
+ \message{Warning: unbalanced square brackets in @def...}%
+ \global\brackcount=0
+}
+
+
+\message{macros,}
+% @macro.
+
+% To do this right we need a feature of e-TeX, \scantokens,
+% which we arrange to emulate with a temporary file in ordinary TeX.
+\ifx\eTeXversion\thisisundefined
+ \newwrite\macscribble
+ \def\scantokens#1{%
+ \toks0={#1}%
+ \immediate\openout\macscribble=\jobname.tmp
+ \immediate\write\macscribble{\the\toks0}%
+ \immediate\closeout\macscribble
+ \input \jobname.tmp
+ }
+\fi
+
+\def\scanmacro#1{\begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ %
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ %
+ % ... and for \example:
+ \spaceisspace
+ %
+ % The \empty here causes a following catcode 5 newline to be eaten as
+ % part of reading whitespace after a control sequence. It does not
+ % eat a catcode 13 newline. There's no good way to handle the two
+ % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
+ % would then have different behavior). See the Macro Details node in
+ % the manual for the workaround we recommend for macros and
+ % line-oriented commands.
+ %
+ \scantokens{#1\empty}%
+\endgroup}
+
+\def\scanexp#1{%
+ \edef\temp{\noexpand\scanmacro{#1}}%
+ \temp
+}
+
+\newcount\paramno % Count of parameters
+\newtoks\macname % Macro name
+\newif\ifrecursive % Is it recursive?
+
+% List of all defined macros in the form
+% \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \xdef\macrolist{\the\toks0}%
+}
+
+% Utility routines.
+% This does \let #1 = #2, with \csnames; that is,
+% \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+%
+\def\cslet#1#2{%
+ \expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#2\endcsname
+}
+
+% Trim leading and trailing spaces off a string.
+% Concepts from aro-bend problem 15 (see CTAN).
+{\catcode`\@=11
+\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
+\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
+\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
+\def\unbrace#1{#1}
+\unbrace{\gdef\trim@@@ #1 } #2@{#1}
+}
+
+% Trim a single trailing ^^M off a string.
+{\catcode`\^^M=\other \catcode`\Q=3%
+\gdef\eatcr #1{\eatcra #1Q^^MQ}%
+\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
+\gdef\eatcrb#1Q#2Q{#1}%
+}
+
+% Macro bodies are absorbed as an argument in a context where
+% all characters are catcode 10, 11 or 12, except \ which is active
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
+% Non-ASCII encodings make 8-bit characters active, so un-activate
+% them to avoid their expansion. Must do this non-globally, to
+% confine the change to the current group.
+%
+% It's necessary to have hard CRs when the macro is executed. This is
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% body, and then making it the \newlinechar in \scanmacro.
+%
+\def\scanctxt{% used as subroutine
+ \catcode`\"=\other
+ \catcode`\+=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\~=\other
+ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
+}
+
+\def\scanargctxt{% used for copying and captions, not macros.
+ \scanctxt
+ \catcode`\\=\other
+ \catcode`\^^M=\other
+}
+
+\def\macrobodyctxt{% used for @macro definitions
+ \scanctxt
+ \catcode`\{=\other
+ \catcode`\}=\other
+ \catcode`\^^M=\other
+ \usembodybackslash
+}
+
+\def\macroargctxt{% used when scanning invocations
+ \scanctxt
+ \catcode`\\=0
+}
+% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }. Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+%
+% We already have @{ and @}. For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+%
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent. Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
+
+
+% \mbodybackslash is the definition of \ in @macro bodies.
+% It maps \foo\ => \csname macarg.foo\endcsname => #N
+% where N is the macro parameter number.
+% We define \csname macarg.\endcsname to be \realbackslash, so
+% \\ in macro replacement text gets you a backslash.
+%
+{\catcode`@=0 @catcode`@\=@active
+ @gdef at usembodybackslash{@let\=@mbodybackslash}
+ @gdef at mbodybackslash#1\{@csname macarg.#1 at endcsname}
+}
+\expandafter\def\csname macarg.\endcsname{\realbackslash}
+
+\def\margbackslash#1{\char`\#1 }
+
+\def\macro{\recursivefalse\parsearg\macroxxx}
+\def\rmacro{\recursivetrue\parsearg\macroxxx}
+
+\def\macroxxx#1{%
+ \getargs{#1}% now \macname is the macname and \argl the arglist
+ \ifx\argl\empty % no arguments
+ \paramno=0\relax
+ \else
+ \expandafter\parsemargdef \argl;%
+ \if\paramno>256\relax
+ \ifx\eTeXversion\thisisundefined
+ \errhelp = \EMsimple
+ \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
+ \fi
+ \fi
+ \fi
+ \if1\csname ismacro.\the\macname\endcsname
+ \message{Warning: redefining \the\macname}%
+ \else
+ \expandafter\ifx\csname \the\macname\endcsname \relax
+ \else \errmessage{Macro name \the\macname\space already defined}\fi
+ \global\cslet{macsave.\the\macname}{\the\macname}%
+ \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
+ \addtomacrolist{\the\macname}%
+ \fi
+ \begingroup \macrobodyctxt
+ \ifrecursive \expandafter\parsermacbody
+ \else \expandafter\parsemacbody
+ \fi}
+
+\parseargdef\unmacro{%
+ \if1\csname ismacro.#1\endcsname
+ \global\cslet{#1}{macsave.#1}%
+ \global\expandafter\let \csname ismacro.#1\endcsname=0%
+ % Remove the macro name from \macrolist:
+ \begingroup
+ \expandafter\let\csname#1\endcsname \relax
+ \let\definedummyword\unmacrodo
+ \xdef\macrolist{\macrolist}%
+ \endgroup
+ \else
+ \errmessage{Macro #1 not defined}%
+ \fi
+}
+
+% Called by \do from \dounmacro on each macro. The idea is to omit any
+% macro definitions that have been changed to \relax.
+%
+\def\unmacrodo#1{%
+ \ifx #1\relax
+ % remove this
+ \else
+ \noexpand\definedummyword \noexpand#1%
+ \fi
+}
+
+% This makes use of the obscure feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
+\def\getargs#1{\getargsxxx#1{}}
+\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
+\def\getmacname#1 #2\relax{\macname={#1}}
+\def\getmacargs#1{\def\argl{#1}}
+
+% For macro processing make @ a letter so that we can make Texinfo private macro names.
+\edef\texiatcatcode{\the\catcode`\@}
+\catcode `@=11\relax
+
+% Parse the optional {params} list. Set up \paramno and \paramlist
+% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
+% in the params list to some hook where the argument si to be expanded. If
+% there are less than 10 arguments that hook is to be replaced by ##N where N
+% is the position in that list, that is to say the macro arguments are to be
+% defined `a la TeX in the macro body.
+%
+% That gets used by \mbodybackslash (above).
+%
+% We need to get `macro parameter char #' into several definitions.
+% The technique used is stolen from LaTeX: let \hash be something
+% unexpandable, insert that wherever you need a #, and then redefine
+% it to # just before using the token list produced.
+%
+% The same technique is used to protect \eatspaces till just before
+% the macro is used.
+%
+% If there are 10 or more arguments, a different technique is used, where the
+% hook remains in the body, and when macro is to be expanded the body is
+% processed again to replace the arguments.
+%
+% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
+% argument N value and then \edef the body (nothing else will expand because of
+% the catcode regime underwhich the body was input).
+%
+% If you compile with TeX (not eTeX), and you have macros with 10 or more
+% arguments, you need that no macro has more than 256 arguments, otherwise an
+% error is produced.
+\def\parsemargdef#1;{%
+ \paramno=0\def\paramlist{}%
+ \let\hash\relax
+ \let\xeatspaces\relax
+ \parsemargdefxxx#1,;,%
+ % In case that there are 10 or more arguments we parse again the arguments
+ % list to set new definitions for the \macarg.BLAH macros corresponding to
+ % each BLAH argument. It was anyhow needed to parse already once this list
+ % in order to count the arguments, and as macros with at most 9 arguments
+ % are by far more frequent than macro with 10 or more arguments, defining
+ % twice the \macarg.BLAH macros does not cost too much processing power.
+ \ifnum\paramno<10\relax\else
+ \paramno0\relax
+ \parsemmanyargdef@@#1,;,% 10 or more arguments
+ \fi
+}
+\def\parsemargdefxxx#1,{%
+ \if#1;\let\next=\relax
+ \else \let\next=\parsemargdefxxx
+ \advance\paramno by 1
+ \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+ {\xeatspaces{\hash\the\paramno}}%
+ \edef\paramlist{\paramlist\hash\the\paramno,}%
+ \fi\next}
+
+\def\parsemmanyargdef@@#1,{%
+ \if#1;\let\next=\relax
+ \else
+ \let\next=\parsemmanyargdef@@
+ \edef\tempb{\eatspaces{#1}}%
+ \expandafter\def\expandafter\tempa
+ \expandafter{\csname macarg.\tempb\endcsname}%
+ % Note that we need some extra \noexpand\noexpand, this is because we
+ % don't want \the to be expanded in the \parsermacbody as it uses an
+ % \xdef .
+ \expandafter\edef\tempa
+ {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
+ \advance\paramno by 1\relax
+ \fi\next}
+
+% These two commands read recursive and nonrecursive macro bodies.
+% (They're different since rec and nonrec macros end differently.)
+%
+
+\catcode `\@\texiatcatcode
+\long\def\parsemacbody#1 at end macro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\long\def\parsermacbody#1 at end rmacro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\catcode `\@=11\relax
+
+\let\endargs@\relax
+\let\nil@\relax
+\def\nilm@{\nil@}%
+\long\def\nillm@{\nil@}%
+
+% This macro is expanded during the Texinfo macro expansion, not during its
+% definition. It gets all the arguments values and assigns them to macros
+% macarg.ARGNAME
+%
+% #1 is the macro name
+% #2 is the list of argument names
+% #3 is the list of argument values
+\def\getargvals@#1#2#3{%
+ \def\macargdeflist@{}%
+ \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
+ \def\paramlist{#2,\nil@}%
+ \def\macroname{#1}%
+ \begingroup
+ \macroargctxt
+ \def\argvaluelist{#3,\nil@}%
+ \def\@tempa{#3}%
+ \ifx\@tempa\empty
+ \setemptyargvalues@
+ \else
+ \getargvals@@
+ \fi
+}
+
+%
+\def\getargvals@@{%
+ \ifx\paramlist\nilm@
+ % Some sanity check needed here that \argvaluelist is also empty.
+ \ifx\argvaluelist\nillm@
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Too many arguments in macro `\macroname'!}%
+ \fi
+ \let\next\macargexpandinbody@
+ \else
+ \ifx\argvaluelist\nillm@
+ % No more arguments values passed to macro. Set remaining named-arg
+ % macros to empty.
+ \let\next\setemptyargvalues@
+ \else
+ % pop current arg name into \@tempb
+ \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\paramlist}%
+ % pop current argument value into \@tempc
+ \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
+ \expandafter\@tempa\expandafter{\argvaluelist}%
+ % Here \@tempb is the current arg name and \@tempc is the current arg value.
+ % First place the new argument macro definition into \@tempd
+ \expandafter\macname\expandafter{\@tempc}%
+ \expandafter\let\csname macarg.\@tempb\endcsname\relax
+ \expandafter\def\expandafter\@tempe\expandafter{%
+ \csname macarg.\@tempb\endcsname}%
+ \edef\@tempd{\long\def\@tempe{\the\macname}}%
+ \push@\@tempd\macargdeflist@
+ \let\next\getargvals@@
+ \fi
+ \fi
+ \next
+}
+
+\def\push@#1#2{%
+ \expandafter\expandafter\expandafter\def
+ \expandafter\expandafter\expandafter#2%
+ \expandafter\expandafter\expandafter{%
+ \expandafter#1#2}%
+}
+
+% Replace arguments by their values in the macro body, and place the result
+% in macro \@tempa
+\def\macvalstoargs@{%
+ % To do this we use the property that token registers that are \the'ed
+ % within an \edef expand only once. So we are going to place all argument
+ % values into respective token registers.
+ %
+ % First we save the token context, and initialize argument numbering.
+ \begingroup
+ \paramno0\relax
+ % Then, for each argument number #N, we place the corresponding argument
+ % value into a new token list register \toks#N
+ \expandafter\putargsintokens@\saveparamlist@,;,%
+ % Then, we expand the body so that argument are replaced by their
+ % values. The trick for values not to be expanded themselves is that they
+ % are within tokens and that tokens expand only once in an \edef .
+ \edef\@tempc{\csname mac.\macroname .body\endcsname}%
+ % Now we restore the token stack pointer to free the token list registers
+ % which we have used, but we make sure that expanded body is saved after
+ % group.
+ \expandafter
+ \endgroup
+ \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
+ }
+
+\def\macargexpandinbody@{%
+ %% Define the named-macro outside of this group and then close this group.
+ \expandafter
+ \endgroup
+ \macargdeflist@
+ % First the replace in body the macro arguments by their values, the result
+ % is in \@tempa .
+ \macvalstoargs@
+ % Then we point at the \norecurse or \gobble (for recursive) macro value
+ % with \@tempb .
+ \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
+ % Depending on whether it is recursive or not, we need some tailing
+ % \egroup .
+ \ifx\@tempb\gobble
+ \let\@tempc\relax
+ \else
+ \let\@tempc\egroup
+ \fi
+ % And now we do the real job:
+ \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
+ \@tempd
+}
+
+\def\putargsintokens@#1,{%
+ \if#1;\let\next\relax
+ \else
+ \let\next\putargsintokens@
+ % First we allocate the new token list register, and give it a temporary
+ % alias \@tempb .
+ \toksdef\@tempb\the\paramno
+ % Then we place the argument value into that token list register.
+ \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
+ \expandafter\@tempb\expandafter{\@tempa}%
+ \advance\paramno by 1\relax
+ \fi
+ \next
+}
+
+% Save the token stack pointer into macro #1
+\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
+% Restore the token stack pointer from number in macro #1
+\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
+% newtoks that can be used non \outer .
+\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
+
+% Tailing missing arguments are set to empty
+\def\setemptyargvalues@{%
+ \ifx\paramlist\nilm@
+ \let\next\macargexpandinbody@
+ \else
+ \expandafter\setemptyargvaluesparser@\paramlist\endargs@
+ \let\next\setemptyargvalues@
+ \fi
+ \next
+}
+
+\def\setemptyargvaluesparser@#1,#2\endargs@{%
+ \expandafter\def\expandafter\@tempa\expandafter{%
+ \expandafter\def\csname macarg.#1\endcsname{}}%
+ \push@\@tempa\macargdeflist@
+ \def\paramlist{#2}%
+}
+
+% #1 is the element target macro
+% #2 is the list macro
+% #3,#4\endargs@ is the list value
+\def\pop@#1#2#3,#4\endargs@{%
+ \def#1{#3}%
+ \def#2{#4}%
+}
+\long\def\longpop@#1#2#3,#4\endargs@{%
+ \long\def#1{#3}%
+ \long\def#2{#4}%
+}
+
+% This defines a Texinfo @macro. There are eight cases: recursive and
+% nonrecursive macros of zero, one, up to nine, and many arguments.
+% Much magic with \expandafter here.
+% \xdef is used so that macro definitions will survive the file
+% they're defined in; @include reads the file inside a group.
+%
+\def\defmacro{%
+ \let\hash=##% convert placeholders to macro parameter chars
+ \ifrecursive
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\scanmacro{\temp}}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup\noexpand\scanmacro{\temp}}%
+ \else
+ \ifnum\paramno<10\relax % at most 9
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \else % 10 or more
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
+ \fi
+ \fi
+ \else
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % at most 9
+ \ifnum\paramno<10\relax
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % 10 or more:
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\getargvals@{\the\macname}{\argl}%
+ }%
+ \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
+ \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
+ \fi
+ \fi
+ \fi}
+
+\catcode `\@\texiatcatcode\relax
+
+\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
+
+% \braceorline decides whether the next nonwhitespace character is a
+% {. If so it reads up to the closing }, if not, it reads the whole
+% line. Whatever was read is then fed to the next control sequence
+% as an argument (by \parsebrace or \parsearg).
+%
+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorlinexxx{%
+ \ifx\nchar\bgroup\else
+ \expandafter\parsearg
+ \fi \macnamexxx}
+
+
+% @alias.
+% We need some trickery to remove the optional spaces around the equal
+% sign. Make them active and then expand them all to nothing.
+%
+\def\alias{\parseargusing\obeyspaces\aliasxxx}
+\def\aliasxxx #1{\aliasyyy#1\relax}
+\def\aliasyyy #1=#2\relax{%
+ {%
+ \expandafter\let\obeyedspace=\empty
+ \addtomacrolist{#1}%
+ \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
+ }%
+ \next
+}
+
+
+\message{cross references,}
+
+\newwrite\auxfile
+\newif\ifhavexrefs % True if xref values are known.
+\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+
+% @inforef is relatively simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{%
+ \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
+% @node's only job in TeX is to define \lastnode, which is used in
+% cross-references. The @node line might or might not have commas, and
+% might or might not have spaces before the first comma, like:
+% @node foo , bar , ...
+% We don't want such trailing spaces in the node name.
+%
+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
+%
+% also remove a trailing comma, in case of something like this:
+% @node Help-Cross, , , Cross-refs
+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+
+\let\nwnode=\node
+\let\lastnode=\empty
+
+% Write a cross-reference definition for the current node. #1 is the
+% type (Ynumbered, Yappendix, Ynothing).
+%
+\def\donoderef#1{%
+ \ifx\lastnode\empty\else
+ \setref{\lastnode}{#1}%
+ \global\let\lastnode=\empty
+ \fi
+}
+
+% @anchor{NAME} -- define xref target at arbitrary point.
+%
+\newcount\savesfregister
+%
+\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
+\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
+\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+
+% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
+% anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name taken from \lastsection,
+% or the anchor name.
+% 2) NAME-snt - section number and type, passed as the SNT arg, or
+% empty for anchors.
+% 3) NAME-pg - the page number.
+%
+% This is called from \donoderef, \anchor, and \dofloat. In the case of
+% floats, there is an additional part, which is not written here:
+% 4) NAME-lof - the text as it should appear in a @listoffloats.
+%
+\def\setref#1#2{%
+ \pdfmkdest{#1}%
+ \iflinks
+ {%
+ \atdummies % preserve commands, but don't expand them
+ \edef\writexrdef##1##2{%
+ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
+ ##1}{##2}}% these are parameters of \writexrdef
+ }%
+ \toks0 = \expandafter{\lastsection}%
+ \immediate \writexrdef{title}{\the\toks0 }%
+ \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
+ }%
+ \fi
+}
+
+% @xrefautosectiontitle on|off says whether @section(ing) names are used
+% automatically in xrefs, if the third arg is not explicitly specified.
+% This was provided as a "secret" @set xref-automatic-section-title
+% variable, now it's official.
+%
+\parseargdef\xrefautomaticsectiontitle{%
+ \def\temp{#1}%
+ \ifx\temp\onword
+ \expandafter\let\csname SETxref-automatic-section-title\endcsname
+ = \empty
+ \else\ifx\temp\offword
+ \expandafter\let\csname SETxref-automatic-section-title\endcsname
+ = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
+ must be on|off}%
+ \fi\fi
+}
+
+
+% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
+% the node name, #2 the name of the Info cross-reference, #3 the printed
+% node name, #4 the name of the Info file, #5 the name of the printed
+% manual. All but the node name can be omitted.
+%
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+ \unsepspaces
+ \def\printedmanual{\ignorespaces #5}%
+ \def\printedrefname{\ignorespaces #3}%
+ \setbox1=\hbox{\printedmanual\unskip}%
+ \setbox0=\hbox{\printedrefname\unskip}%
+ \ifdim \wd0 = 0pt
+ % No printed node name was explicitly given.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
+ % Use the node name inside the square brackets.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ % Use the actual chapter/section title appear inside
+ % the square brackets. Use the real section title if we have it.
+ \ifdim \wd1 > 0pt
+ % It is in another manual, so we don't have it.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We know the real title if we have the xref values.
+ \def\printedrefname{\refx{#1-title}{}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printedrefname{\ignorespaces #1}%
+ \fi%
+ \fi
+ \fi
+ \fi
+ %
+ % Make link in pdf output.
+ \ifpdf
+ {\indexnofonts
+ \turnoffactive
+ % This expands tokens, so do it after making catcode changes, so _
+ % etc. don't get their TeX definitions.
+ \getfilename{#4}%
+ %
+ \edef\pdfxrefdest{#1}%
+ \txiescapepdf\pdfxrefdest
+ %
+ \leavevmode
+ \startlink attr{/Border [0 0 0]}%
+ \ifnum\filenamelength>0
+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
+ \else
+ goto name{\pdfmkpgn{\pdfxrefdest}}%
+ \fi
+ }%
+ \setcolor{\linkcolor}%
+ \fi
+ %
+ % Float references are printed completely differently: "Figure 1.2"
+ % instead of "[somenode], p.3". We distinguish them by the
+ % LABEL-title being set to a magic string.
+ {%
+ % Have to otherify everything special to allow the \csname to
+ % include an _ in the xref name, etc.
+ \indexnofonts
+ \turnoffactive
+ \expandafter\global\expandafter\let\expandafter\Xthisreftitle
+ \csname XR#1-title\endcsname
+ }%
+ \iffloat\Xthisreftitle
+ % If the user specified the print name (third arg) to the ref,
+ % print it instead of our usual "Figure 1.2".
+ \ifdim\wd0 = 0pt
+ \refx{#1-snt}{}%
+ \else
+ \printedrefname
+ \fi
+ %
+ % if the user also gave the printed manual name (fifth arg), append
+ % "in MANUALNAME".
+ \ifdim \wd1 > 0pt
+ \space \putwordin{} \cite{\printedmanual}%
+ \fi
+ \else
+ % node/anchor (non-float) references.
+ %
+ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
+ % insert empty discretionaries after hyphens, which means that it will
+ % not find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens, this
+ % is a loss. Therefore, we give the text of the node name again, so it
+ % is as if TeX is seeing it for the first time.
+ \ifdim \wd1 > 0pt
+ \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ \else
+ % _ (for example) has to be the character _ for the purposes of the
+ % control sequence corresponding to the node, but it has to expand
+ % into the usual \leavevmode...\vrule stuff for purposes of
+ % printing. So we \turnoffactive for the \refx-snt, back on for the
+ % printing, back off for the \refx-pg.
+ {\turnoffactive
+ % Only output a following space if the -snt ref is nonempty; for
+ % @unnumbered and @anchor, it won't be.
+ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
+ \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+ }%
+ % output the `[mynode]' via a macro so it can be overridden.
+ \xrefprintnodename\printedrefname
+ %
+ % But we always want a comma and a space:
+ ,\space
+ %
+ % output the `page 3'.
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% This macro is called from \xrefX for the `[nodename]' part of xref
+% output. It's a separate macro only so it can be changed more easily,
+% since square brackets don't work well in some documents. Particularly
+% one that Bob is working on :).
+%
+\def\xrefprintnodename#1{[#1]}
+
+% Things referred to by \setref.
+%
+\def\Ynothing{}
+\def\Yomitfromtoc{}
+\def\Ynumbered{%
+ \ifnum\secno=0
+ \putwordChapter at tie \the\chapno
+ \else \ifnum\subsecno=0
+ \putwordSection at tie \the\chapno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection at tie \the\chapno.\the\secno.\the\subsecno
+ \else
+ \putwordSection at tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+\def\Yappendix{%
+ \ifnum\secno=0
+ \putwordAppendix at tie @char\the\appendixno{}%
+ \else \ifnum\subsecno=0
+ \putwordSection at tie @char\the\appendixno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection at tie @char\the\appendixno.\the\secno.\the\subsecno
+ \else
+ \putwordSection at tie
+ @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+
+% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
+% If its value is nonempty, SUFFIX is output afterward.
+%
+\def\refx#1#2{%
+ {%
+ \indexnofonts
+ \otherbackslash
+ \expandafter\global\expandafter\let\expandafter\thisrefX
+ \csname XR#1\endcsname
+ }%
+ \ifx\thisrefX\relax
+ % If not defined, say something at least.
+ \angleleft un\-de\-fined\angleright
+ \iflinks
+ \ifhavexrefs
+ {\toks0 = {#1}% avoid expansion of possibly-complex value
+ \message{\linenumber Undefined cross reference `\the\toks0'.}}%
+ \else
+ \ifwarnedxrefs\else
+ \global\warnedxrefstrue
+ \message{Cross reference values unknown; you must run TeX again.}%
+ \fi
+ \fi
+ \fi
+ \else
+ % It's defined, so just use it.
+ \thisrefX
+ \fi
+ #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file. Usually it's
+% just a \def (we prepend XR to the control sequence name to avoid
+% collisions). But if this is a float type, we have more work to do.
+%
+\def\xrdef#1#2{%
+ {% The node name might contain 8-bit characters, which in our current
+ % implementation are changed to commands like @'e. Don't let these
+ % mess up the control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safexrefname{#1}%
+ }%
+ %
+ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
+ %
+ % Was that xref control sequence that we just defined for a float?
+ \expandafter\iffloat\csname XR\safexrefname\endcsname
+ % it was a float, and we have the (safe) float type in \iffloattype.
+ \expandafter\let\expandafter\floatlist
+ \csname floatlist\iffloattype\endcsname
+ %
+ % Is this the first time we've seen this float type?
+ \expandafter\ifx\floatlist\relax
+ \toks0 = {\do}% yes, so just \do
+ \else
+ % had it before, so preserve previous elements in list.
+ \toks0 = \expandafter{\floatlist\do}%
+ \fi
+ %
+ % Remember this xref in the control sequence \floatlistFLOATTYPE,
+ % for later use in \listoffloats.
+ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
+ {\safexrefname}}%
+ \fi
+}
+
+% Read the last existing aux file, if any. No error if none exists.
+%
+\def\tryauxfile{%
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \readdatafile{aux}%
+ \global\havexrefstrue
+ \fi
+ \closein 1
+}
+
+\def\setupdatafile{%
+ \catcode`\^^@=\other
+ \catcode`\^^A=\other
+ \catcode`\^^B=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\^^K=\other
+ \catcode`\^^L=\other
+ \catcode`\^^N=\other
+ \catcode`\^^P=\other
+ \catcode`\^^Q=\other
+ \catcode`\^^R=\other
+ \catcode`\^^S=\other
+ \catcode`\^^T=\other
+ \catcode`\^^U=\other
+ \catcode`\^^V=\other
+ \catcode`\^^W=\other
+ \catcode`\^^X=\other
+ \catcode`\^^Z=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
+ % in xref tags, i.e., node names. But since ^^e4 notation isn't
+ % supported in the main text, it doesn't seem desirable. Furthermore,
+ % that is not enough: for node names that actually contain a ^
+ % character, we would end up writing a line like this: 'xrdef {'hat
+ % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+ % argument, and \hat is not an expandable control sequence. It could
+ % all be worked out, but why? Either we support ^^ or we don't.
+ %
+ % The other change necessary for this was to define \auxhat:
+ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+ % and then to call \auxhat in \setq.
+ %
+ \catcode`\^=\other
+ %
+ % Special characters. Should be turned off anyway, but...
+ \catcode`\~=\other
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ \catcode`\%=\other
+ \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+ %
+ % This is to support \ in node names and titles, since the \
+ % characters end up in a \csname. It's easier than
+ % leaving it active and making its active definition an actual \
+ % character. What I don't understand is why it works in the *value*
+ % of the xrdef. Seems like it should be a catcode12 \, and that
+ % should not typeset properly. But it works, so I'm moving on for
+ % now. --karl, 15jan04.
+ \catcode`\\=\other
+ %
+ % Make the characters 128-255 be printing characters.
+ {%
+ \count1=128
+ \def\loop{%
+ \catcode\count1=\other
+ \advance\count1 by 1
+ \ifnum \count1<256 \loop \fi
+ }%
+ }%
+ %
+ % @ is our escape character in .aux files, and we need braces.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\@=0
+}
+
+\def\readdatafile#1{%
+\begingroup
+ \setupdatafile
+ \input\jobname.#1
+\endgroup}
+
+
+\message{insertions,}
+% including footnotes.
+
+\newcount \footnoteno
+
+% The trailing space in the following definition for supereject is
+% vital for proper filling; pages come out unaligned when you do a
+% pagealignmacro call if that space before the closing brace is
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+% @footnotestyle is meaningful for Info output only.
+\let\footnotestyle=\comment
+
+{\catcode `\@=11
+%
+% Auto-number footnotes. Otherwise like plain.
+\gdef\footnote{%
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \global\advance\footnoteno by \@ne
+ \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % In case the footnote comes at the end of a sentence, preserve the
+ % extra spacing after we do the footnote number.
+ \let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
+ %
+ % Remove inadvertent blank space before typesetting the footnote number.
+ \unskip
+ \thisfootno\@sf
+ \dofootnote
+}%
+
+% Don't bother with the trickery in plain.tex to not require the
+% footnote text as a parameter. Our footnotes don't need to be so general.
+%
+% Oh yes, they do; otherwise, @ifset (and anything else that uses
+% \parseargline) fails inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\gdef\dofootnote{%
+ \insert\footins\bgroup
+ % We want to typeset this text as a normal paragraph, even if the
+ % footnote reference occurs in (for example) a display environment.
+ % So reset some parameters.
+ \hsize=\pagewidth
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty\@MM
+ \leftskip\z at skip
+ \rightskip\z at skip
+ \spaceskip\z at skip
+ \xspaceskip\z at skip
+ \parindent\defaultparindent
+ %
+ \smallfonts \rm
+ %
+ % Because we use hanging indentation in footnotes, a @noindent appears
+ % to exdent this text, so make it be a no-op. makeinfo does not use
+ % hanging indentation so @noindent can still be needed within footnote
+ % text after an @example or the like (not that this is good style).
+ \let\noindent = \relax
+ %
+ % Hang the footnote text off the number. Use \everypar in case the
+ % footnote extends for more than one paragraph.
+ \everypar = {\hang}%
+ \textindent{\thisfootno}%
+ %
+ % Don't crash into the line above the footnote text. Since this
+ % expands into a box, it must come within the paragraph, lest it
+ % provide a place where TeX can split the footnote.
+ \footstrut
+ %
+ % Invoke rest of plain TeX footnote routine.
+ \futurelet\next\fo at t
+}
+}%end \catcode `\@=11
+
+% In case a @footnote appears in a vbox, save the footnote text and create
+% the real \insert just after the vbox finished. Otherwise, the insertion
+% would be lost.
+% Similarly, if a @footnote appears inside an alignment, save the footnote
+% text to a box and make the \insert when a row of the table is finished.
+% And the same can be done for other insert classes. --kasal, 16nov03.
+
+% Replace the \insert primitive by a cheating macro.
+% Deeper inside, just make sure that the saved insertions are not spilled
+% out prematurely.
+%
+\def\startsavinginserts{%
+ \ifx \insert\ptexinsert
+ \let\insert\saveinsert
+ \else
+ \let\checkinserts\relax
+ \fi
+}
+
+% This \insert replacement works for both \insert\footins{foo} and
+% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
+%
+\def\saveinsert#1{%
+ \edef\next{\noexpand\savetobox \makeSAVEname#1}%
+ \afterassignment\next
+ % swallow the left brace
+ \let\temp =
+}
+\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
+\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
+
+\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
+
+\def\placesaveins#1{%
+ \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
+ {\box#1}%
+}
+
+% eat @SAVE -- beware, all of them have catcode \other:
+{
+ \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
+ \gdef\gobblesave @SAVE{}
+}
+
+% initialization:
+\def\newsaveins #1{%
+ \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
+ \next
+}
+\def\newsaveinsX #1{%
+ \csname newbox\endcsname #1%
+ \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
+ \checksaveins #1}%
+}
+
+% initialize:
+\let\checkinserts\empty
+\newsaveins\footins
+\newsaveins\margin
+
+
+% @image. We use the macros from epsf.tex to support this.
+% If epsf.tex is not installed and @image is used, we complain.
+%
+% Check for and read epsf.tex up front. If we read it only at @image
+% time, we might be inside a group, and then its definitions would get
+% undone and the next image would fail.
+\openin 1 = epsf.tex
+\ifeof 1 \else
+ % Do not bother showing banner with epsf.tex v2.7k (available in
+ % doc/epsf.tex and on ctan).
+ \def\epsfannounce{\toks0 = }%
+ \input epsf.tex
+\fi
+\closein 1
+%
+% We will only complain once about lack of epsf.tex.
+\newif\ifwarnednoepsf
+\newhelp\noepsfhelp{epsf.tex must be installed for images to
+ work. It is also included in the Texinfo distribution, or you can get
+ it from ftp://tug.org/tex/epsf.tex.}
+%
+\def\image#1{%
+ \ifx\epsfbox\thisiundefined
+ \ifwarnednoepsf \else
+ \errhelp = \noepsfhelp
+ \errmessage{epsf.tex not found, images will be ignored}%
+ \global\warnednoepsftrue
+ \fi
+ \else
+ \imagexxx #1,,,,,\finish
+ \fi
+}
+%
+% Arguments to @image:
+% #1 is (mandatory) image filename; we tack on .eps extension.
+% #2 is (optional) width, #3 is (optional) height.
+% #4 is (ignored optional) html alt text.
+% #5 is (ignored optional) extension.
+% #6 is just the usual extra ignored arg for parsing stuff.
+\newif\ifimagevmode
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
+ \catcode`\^^M = 5 % in case we're inside an example
+ \normalturnoffactive % allow _ et al. in names
+ % If the image is by itself, center it.
+ \ifvmode
+ \imagevmodetrue
+ \nobreak\medskip
+ % Usually we'll have text after the image which will insert
+ % \parskip glue, so insert it here too to equalize the space
+ % above and below.
+ \nobreak\vskip\parskip
+ \nobreak
+ \fi
+ %
+ % Leave vertical mode so that indentation from an enclosing
+ % environment such as @quotation is respected. On the other hand, if
+ % it's at the top level, we don't want the normal paragraph indentation.
+ \noindent
+ %
+ % Output the image.
+ \ifpdf
+ \dopdfimage{#1}{#2}{#3}%
+ \else
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \epsfbox{#1.eps}%
+ \fi
+ %
+ \ifimagevmode \medskip \fi % space after the standalone image
+\endgroup}
+
+
+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
+% etc. We don't actually implement floating yet, we always include the
+% float "here". But it seemed the best name for the future.
+%
+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
+
+% There may be a space before second and/or third parameter; delete it.
+\def\eatcommaspace#1, {#1,}
+
+% #1 is the optional FLOATTYPE, the text label for this float, typically
+% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
+% this float will not be numbered and cannot be referred to.
+%
+% #2 is the optional xref label. Also must be present for the float to
+% be referable.
+%
+% #3 is the optional positioning argument; for now, it is ignored. It
+% will somehow specify the positions allowed to float to (here, top, bottom).
+%
+% We keep a separate counter for each FLOATTYPE, which we reset at each
+% chapter-level command.
+\let\resetallfloatnos=\empty
+%
+\def\dofloat#1,#2,#3,#4\finish{%
+ \let\thiscaption=\empty
+ \let\thisshortcaption=\empty
+ %
+ % don't lose footnotes inside @float.
+ %
+ % BEWARE: when the floats start float, we have to issue warning whenever an
+ % insert appears inside a float which could possibly float. --kasal, 26may04
+ %
+ \startsavinginserts
+ %
+ % We can't be used inside a paragraph.
+ \par
+ %
+ \vtop\bgroup
+ \def\floattype{#1}%
+ \def\floatlabel{#2}%
+ \def\floatloc{#3}% we do nothing with this yet.
+ %
+ \ifx\floattype\empty
+ \let\safefloattype=\empty
+ \else
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ \fi
+ %
+ % If label is given but no type, we handle that as the empty type.
+ \ifx\floatlabel\empty \else
+ % We want each FLOATTYPE to be numbered separately (Figure 1,
+ % Table 1, Figure 2, ...). (And if no label, no number.)
+ %
+ \expandafter\getfloatno\csname\safefloattype floatno\endcsname
+ \global\advance\floatno by 1
+ %
+ {%
+ % This magic value for \lastsection is output by \setref as the
+ % XREFLABEL-title value. \xrefX uses it to distinguish float
+ % labels (which have a completely different output format) from
+ % node and anchor labels. And \xrdef uses it to construct the
+ % lists of floats.
+ %
+ \edef\lastsection{\floatmagic=\safefloattype}%
+ \setref{\floatlabel}{Yfloat}%
+ }%
+ \fi
+ %
+ % start with \parskip glue, I guess.
+ \vskip\parskip
+ %
+ % Don't suppress indentation if a float happens to start a section.
+ \restorefirstparagraphindent
+}
+
+% we have these possibilities:
+% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
+% @float Foo,lbl & no caption: Foo 1.1
+% @float Foo & @caption{Cap}: Foo: Cap
+% @float Foo & no caption: Foo
+% @float ,lbl & Caption{Cap}: 1.1: Cap
+% @float ,lbl & no caption: 1.1
+% @float & @caption{Cap}: Cap
+% @float & no caption:
+%
+\def\Efloat{%
+ \let\floatident = \empty
+ %
+ % In all cases, if we have a float type, it comes first.
+ \ifx\floattype\empty \else \def\floatident{\floattype}\fi
+ %
+ % If we have an xref label, the number comes next.
+ \ifx\floatlabel\empty \else
+ \ifx\floattype\empty \else % if also had float type, need tie first.
+ \appendtomacro\floatident{\tie}%
+ \fi
+ % the number.
+ \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
+ \fi
+ %
+ % Start the printed caption with what we've constructed in
+ % \floatident, but keep it separate; we need \floatident again.
+ \let\captionline = \floatident
+ %
+ \ifx\thiscaption\empty \else
+ \ifx\floatident\empty \else
+ \appendtomacro\captionline{: }% had ident, so need a colon between
+ \fi
+ %
+ % caption text.
+ \appendtomacro\captionline{\scanexp\thiscaption}%
+ \fi
+ %
+ % If we have anything to print, print it, with space before.
+ % Eventually this needs to become an \insert.
+ \ifx\captionline\empty \else
+ \vskip.5\parskip
+ \captionline
+ %
+ % Space below caption.
+ \vskip\parskip
+ \fi
+ %
+ % If have an xref label, write the list of floats info. Do this
+ % after the caption, to avoid chance of it being a breakpoint.
+ \ifx\floatlabel\empty \else
+ % Write the text that goes in the lof to the aux file as
+ % \floatlabel-lof. Besides \floatident, we include the short
+ % caption if specified, else the full caption if specified, else nothing.
+ {%
+ \atdummies
+ %
+ % since we read the caption text in the macro world, where ^^M
+ % is turned into a normal character, we have to scan it back, so
+ % we don't write the literal three characters "^^M" into the aux file.
+ \scanexp{%
+ \xdef\noexpand\gtemp{%
+ \ifx\thisshortcaption\empty
+ \thiscaption
+ \else
+ \thisshortcaption
+ \fi
+ }%
+ }%
+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
+ }%
+ \fi
+ \egroup % end of \vtop
+ %
+ % place the captured inserts
+ %
+ % BEWARE: when the floats start floating, we have to issue warning
+ % whenever an insert appears inside a float which could possibly
+ % float. --kasal, 26may04
+ %
+ \checkinserts
+}
+
+% Append the tokens #2 to the definition of macro #1, not expanding either.
+%
+\def\appendtomacro#1#2{%
+ \expandafter\def\expandafter#1\expandafter{#1#2}%
+}
+
+% @caption, @shortcaption
+%
+\def\caption{\docaption\thiscaption}
+\def\shortcaption{\docaption\thisshortcaption}
+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
+\def\defcaption#1#2{\egroup \def#1{#2}}
+
+% The parameter is the control sequence identifying the counter we are
+% going to use. Create it if it doesn't exist and assign it to \floatno.
+\def\getfloatno#1{%
+ \ifx#1\relax
+ % Haven't seen this figure type before.
+ \csname newcount\endcsname #1%
+ %
+ % Remember to reset this floatno at the next chap.
+ \expandafter\gdef\expandafter\resetallfloatnos
+ \expandafter{\resetallfloatnos #1=0 }%
+ \fi
+ \let\floatno#1%
+}
+
+% \setref calls this to get the XREFLABEL-snt value. We want an @xref
+% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
+% first read the @float command.
+%
+\def\Yfloat{\floattype at tie \chaplevelprefix\the\floatno}%
+
+% Magic string used for the XREFLABEL-title value, so \xrefX can
+% distinguish floats from other xref types.
+\def\floatmagic{!!float!!}
+
+% #1 is the control sequence we are passed; we expand into a conditional
+% which is true if #1 represents a float ref. That is, the magic
+% \lastsection value which we \setref above.
+%
+\def\iffloat#1{\expandafter\doiffloat#1==\finish}
+%
+% #1 is (maybe) the \floatmagic string. If so, #2 will be the
+% (safe) float type for this float. We set \iffloattype to #2.
+%
+\def\doiffloat#1=#2=#3\finish{%
+ \def\temp{#1}%
+ \def\iffloattype{#2}%
+ \ifx\temp\floatmagic
+}
+
+% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
+%
+\parseargdef\listoffloats{%
+ \def\floattype{#1}% floattype
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ %
+ % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
+ \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
+ \ifhavexrefs
+ % if the user said @listoffloats foo but never @float foo.
+ \message{\linenumber No `\safefloattype' floats to list.}%
+ \fi
+ \else
+ \begingroup
+ \leftskip=\tocindent % indent these entries like a toc
+ \let\do=\listoffloatsdo
+ \csname floatlist\safefloattype\endcsname
+ \endgroup
+ \fi
+}
+
+% This is called on each entry in a list of floats. We're passed the
+% xref label, in the form LABEL-title, which is how we save it in the
+% aux file. We strip off the -title and look up \XRLABEL-lof, which
+% has the text we're supposed to typeset here.
+%
+% Figures without xref labels will not be included in the list (since
+% they won't appear in the aux file).
+%
+\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
+\def\listoffloatsdoentry#1-title\finish{{%
+ % Can't fully expand XR#1-lof because it can contain anything. Just
+ % pass the control sequence. On the other hand, XR#1-pg is just the
+ % page number, and we want to fully expand that so we can get a link
+ % in pdf output.
+ \toksA = \expandafter{\csname XR#1-lof\endcsname}%
+ %
+ % use the same \entry macro we use to generate the TOC and index.
+ \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
+ \writeentry
+}}
+
+
+\message{localization,}
+
+% For single-language documents, @documentlanguage is usually given very
+% early, just after @documentencoding. Single argument is the language
+% (de) or locale (de_DE) abbreviation.
+%
+{
+ \catcode`\_ = \active
+ \globaldefs=1
+\parseargdef\documentlanguage{\begingroup
+ \let_=\normalunderscore % normal _ character for filenames
+ \tex % read txi-??.tex file in plain TeX.
+ % Read the file by the name they passed if it exists.
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \documentlanguagetrywithoutunderscore{#1_\finish}%
+ \else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
+ \input txi-#1.tex
+ \fi
+ \closein 1
+ \endgroup % end raw TeX
+\endgroup}
+%
+% If they passed de_DE, and txi-de_DE.tex doesn't exist,
+% try txi-de.tex.
+%
+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
+ \input txi-#1.tex
+ \fi
+ \closein 1
+}
+}% end of special _ catcode
+%
+\newhelp\nolanghelp{The given language definition file cannot be found or
+is empty. Maybe you need to install it? Putting it in the current
+directory should work if nowhere else does.}
+
+% This macro is called from txi-??.tex files; the first argument is the
+% \language name to set (without the "\lang@" prefix), the second and
+% third args are \{left,right}hyphenmin.
+%
+% The language names to pass are determined when the format is built.
+% See the etex.log file created at that time, e.g.,
+% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
+%
+% With TeX Live 2008, etex now includes hyphenation patterns for all
+% available languages. This means we can support hyphenation in
+% Texinfo, at least to some extent. (This still doesn't solve the
+% accented characters problem.)
+%
+\catcode`@=11
+\def\txisetlanguage#1#2#3{%
+ % do not set the language if the name is undefined in the current TeX.
+ \expandafter\ifx\csname lang@#1\endcsname \relax
+ \message{no patterns for #1}%
+ \else
+ \global\language = \csname lang@#1\endcsname
+ \fi
+ % but there is no harm in adjusting the hyphenmin values regardless.
+ \global\lefthyphenmin = #2\relax
+ \global\righthyphenmin = #3\relax
+}
+
+% Helpers for encodings.
+% Set the catcode of characters 128 through 255 to the specified number.
+%
+\def\setnonasciicharscatcode#1{%
+ \count255=128
+ \loop\ifnum\count255<256
+ \global\catcode\count255=#1\relax
+ \advance\count255 by 1
+ \repeat
+}
+
+\def\setnonasciicharscatcodenonglobal#1{%
+ \count255=128
+ \loop\ifnum\count255<256
+ \catcode\count255=#1\relax
+ \advance\count255 by 1
+ \repeat
+}
+
+% @documentencoding sets the definition of non-ASCII characters
+% according to the specified encoding.
+%
+\parseargdef\documentencoding{%
+ % Encoding being declared for the document.
+ \def\declaredencoding{\csname #1.enc\endcsname}%
+ %
+ % Supported encodings: names converted to tokens in order to be able
+ % to compare them with \ifx.
+ \def\ascii{\csname US-ASCII.enc\endcsname}%
+ \def\latnine{\csname ISO-8859-15.enc\endcsname}%
+ \def\latone{\csname ISO-8859-1.enc\endcsname}%
+ \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
+ \def\utfeight{\csname UTF-8.enc\endcsname}%
+ %
+ \ifx \declaredencoding \ascii
+ \asciichardefs
+ %
+ \else \ifx \declaredencoding \lattwo
+ \setnonasciicharscatcode\active
+ \lattwochardefs
+ %
+ \else \ifx \declaredencoding \latone
+ \setnonasciicharscatcode\active
+ \latonechardefs
+ %
+ \else \ifx \declaredencoding \latnine
+ \setnonasciicharscatcode\active
+ \latninechardefs
+ %
+ \else \ifx \declaredencoding \utfeight
+ \setnonasciicharscatcode\active
+ \utfeightchardefs
+ %
+ \else
+ \message{Unknown document encoding #1, ignoring.}%
+ %
+ \fi % utfeight
+ \fi % latnine
+ \fi % latone
+ \fi % lattwo
+ \fi % ascii
+}
+
+% A message to be logged when using a character that isn't available
+% the default font encoding (OT1).
+%
+\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+
+% Take account of \c (plain) vs. \, (Texinfo) difference.
+\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
+
+% First, make active non-ASCII characters in order for them to be
+% correctly categorized when TeX reads the replacement text of
+% macros containing the character definitions.
+\setnonasciicharscatcode\active
+%
+% Latin1 (ISO-8859-1) character definitions.
+\def\latonechardefs{%
+ \gdef^^a0{\tie}
+ \gdef^^a1{\exclamdown}
+ \gdef^^a2{\missingcharmsg{CENT SIGN}}
+ \gdef^^a3{{\pounds}}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\missingcharmsg{YEN SIGN}}
+ \gdef^^a6{\missingcharmsg{BROKEN BAR}}
+ \gdef^^a7{\S}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\copyright}
+ \gdef^^aa{\ordf}
+ \gdef^^ab{\guillemetleft}
+ \gdef^^ac{$\lnot$}
+ \gdef^^ad{\-}
+ \gdef^^ae{\registeredsymbol}
+ \gdef^^af{\={}}
+ %
+ \gdef^^b0{\textdegree}
+ \gdef^^b1{$\pm$}
+ \gdef^^b2{$^2$}
+ \gdef^^b3{$^3$}
+ \gdef^^b4{\'{}}
+ \gdef^^b5{$\mu$}
+ \gdef^^b6{\P}
+ %
+ \gdef^^b7{$^.$}
+ \gdef^^b8{\cedilla\ }
+ \gdef^^b9{$^1$}
+ \gdef^^ba{\ordm}
+ %
+ \gdef^^bb{\guillemetright}
+ \gdef^^bc{$1\over4$}
+ \gdef^^bd{$1\over2$}
+ \gdef^^be{$3\over4$}
+ \gdef^^bf{\questiondown}
+ %
+ \gdef^^c0{\`A}
+ \gdef^^c1{\'A}
+ \gdef^^c2{\^A}
+ \gdef^^c3{\~A}
+ \gdef^^c4{\"A}
+ \gdef^^c5{\ringaccent A}
+ \gdef^^c6{\AE}
+ \gdef^^c7{\cedilla C}
+ \gdef^^c8{\`E}
+ \gdef^^c9{\'E}
+ \gdef^^ca{\^E}
+ \gdef^^cb{\"E}
+ \gdef^^cc{\`I}
+ \gdef^^cd{\'I}
+ \gdef^^ce{\^I}
+ \gdef^^cf{\"I}
+ %
+ \gdef^^d0{\DH}
+ \gdef^^d1{\~N}
+ \gdef^^d2{\`O}
+ \gdef^^d3{\'O}
+ \gdef^^d4{\^O}
+ \gdef^^d5{\~O}
+ \gdef^^d6{\"O}
+ \gdef^^d7{$\times$}
+ \gdef^^d8{\O}
+ \gdef^^d9{\`U}
+ \gdef^^da{\'U}
+ \gdef^^db{\^U}
+ \gdef^^dc{\"U}
+ \gdef^^dd{\'Y}
+ \gdef^^de{\TH}
+ \gdef^^df{\ss}
+ %
+ \gdef^^e0{\`a}
+ \gdef^^e1{\'a}
+ \gdef^^e2{\^a}
+ \gdef^^e3{\~a}
+ \gdef^^e4{\"a}
+ \gdef^^e5{\ringaccent a}
+ \gdef^^e6{\ae}
+ \gdef^^e7{\cedilla c}
+ \gdef^^e8{\`e}
+ \gdef^^e9{\'e}
+ \gdef^^ea{\^e}
+ \gdef^^eb{\"e}
+ \gdef^^ec{\`{\dotless i}}
+ \gdef^^ed{\'{\dotless i}}
+ \gdef^^ee{\^{\dotless i}}
+ \gdef^^ef{\"{\dotless i}}
+ %
+ \gdef^^f0{\dh}
+ \gdef^^f1{\~n}
+ \gdef^^f2{\`o}
+ \gdef^^f3{\'o}
+ \gdef^^f4{\^o}
+ \gdef^^f5{\~o}
+ \gdef^^f6{\"o}
+ \gdef^^f7{$\div$}
+ \gdef^^f8{\o}
+ \gdef^^f9{\`u}
+ \gdef^^fa{\'u}
+ \gdef^^fb{\^u}
+ \gdef^^fc{\"u}
+ \gdef^^fd{\'y}
+ \gdef^^fe{\th}
+ \gdef^^ff{\"y}
+}
+
+% Latin9 (ISO-8859-15) encoding character definitions.
+\def\latninechardefs{%
+ % Encoding is almost identical to Latin1.
+ \latonechardefs
+ %
+ \gdef^^a4{\euro}
+ \gdef^^a6{\v S}
+ \gdef^^a8{\v s}
+ \gdef^^b4{\v Z}
+ \gdef^^b8{\v z}
+ \gdef^^bc{\OE}
+ \gdef^^bd{\oe}
+ \gdef^^be{\"Y}
+}
+
+% Latin2 (ISO-8859-2) character definitions.
+\def\lattwochardefs{%
+ \gdef^^a0{\tie}
+ \gdef^^a1{\ogonek{A}}
+ \gdef^^a2{\u{}}
+ \gdef^^a3{\L}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\v L}
+ \gdef^^a6{\'S}
+ \gdef^^a7{\S}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\v S}
+ \gdef^^aa{\cedilla S}
+ \gdef^^ab{\v T}
+ \gdef^^ac{\'Z}
+ \gdef^^ad{\-}
+ \gdef^^ae{\v Z}
+ \gdef^^af{\dotaccent Z}
+ %
+ \gdef^^b0{\textdegree}
+ \gdef^^b1{\ogonek{a}}
+ \gdef^^b2{\ogonek{ }}
+ \gdef^^b3{\l}
+ \gdef^^b4{\'{}}
+ \gdef^^b5{\v l}
+ \gdef^^b6{\'s}
+ \gdef^^b7{\v{}}
+ \gdef^^b8{\cedilla\ }
+ \gdef^^b9{\v s}
+ \gdef^^ba{\cedilla s}
+ \gdef^^bb{\v t}
+ \gdef^^bc{\'z}
+ \gdef^^bd{\H{}}
+ \gdef^^be{\v z}
+ \gdef^^bf{\dotaccent z}
+ %
+ \gdef^^c0{\'R}
+ \gdef^^c1{\'A}
+ \gdef^^c2{\^A}
+ \gdef^^c3{\u A}
+ \gdef^^c4{\"A}
+ \gdef^^c5{\'L}
+ \gdef^^c6{\'C}
+ \gdef^^c7{\cedilla C}
+ \gdef^^c8{\v C}
+ \gdef^^c9{\'E}
+ \gdef^^ca{\ogonek{E}}
+ \gdef^^cb{\"E}
+ \gdef^^cc{\v E}
+ \gdef^^cd{\'I}
+ \gdef^^ce{\^I}
+ \gdef^^cf{\v D}
+ %
+ \gdef^^d0{\DH}
+ \gdef^^d1{\'N}
+ \gdef^^d2{\v N}
+ \gdef^^d3{\'O}
+ \gdef^^d4{\^O}
+ \gdef^^d5{\H O}
+ \gdef^^d6{\"O}
+ \gdef^^d7{$\times$}
+ \gdef^^d8{\v R}
+ \gdef^^d9{\ringaccent U}
+ \gdef^^da{\'U}
+ \gdef^^db{\H U}
+ \gdef^^dc{\"U}
+ \gdef^^dd{\'Y}
+ \gdef^^de{\cedilla T}
+ \gdef^^df{\ss}
+ %
+ \gdef^^e0{\'r}
+ \gdef^^e1{\'a}
+ \gdef^^e2{\^a}
+ \gdef^^e3{\u a}
+ \gdef^^e4{\"a}
+ \gdef^^e5{\'l}
+ \gdef^^e6{\'c}
+ \gdef^^e7{\cedilla c}
+ \gdef^^e8{\v c}
+ \gdef^^e9{\'e}
+ \gdef^^ea{\ogonek{e}}
+ \gdef^^eb{\"e}
+ \gdef^^ec{\v e}
+ \gdef^^ed{\'{\dotless{i}}}
+ \gdef^^ee{\^{\dotless{i}}}
+ \gdef^^ef{\v d}
+ %
+ \gdef^^f0{\dh}
+ \gdef^^f1{\'n}
+ \gdef^^f2{\v n}
+ \gdef^^f3{\'o}
+ \gdef^^f4{\^o}
+ \gdef^^f5{\H o}
+ \gdef^^f6{\"o}
+ \gdef^^f7{$\div$}
+ \gdef^^f8{\v r}
+ \gdef^^f9{\ringaccent u}
+ \gdef^^fa{\'u}
+ \gdef^^fb{\H u}
+ \gdef^^fc{\"u}
+ \gdef^^fd{\'y}
+ \gdef^^fe{\cedilla t}
+ \gdef^^ff{\dotaccent{}}
+}
+
+% UTF-8 character definitions.
+%
+% This code to support UTF-8 is based on LaTeX's utf8.def, with some
+% changes for Texinfo conventions. It is included here under the GPL by
+% permission from Frank Mittelbach and the LaTeX team.
+%
+\newcount\countUTFx
+\newcount\countUTFy
+\newcount\countUTFz
+
+\gdef\UTFviiiTwoOctets#1#2{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\endcsname}
+%
+\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
+%
+\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
+
+\gdef\UTFviiiDefined#1{%
+ \ifx #1\relax
+ \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+ \else
+ \expandafter #1%
+ \fi
+}
+
+\begingroup
+ \catcode`\~13
+ \catcode`\"12
+
+ \def\UTFviiiLoop{%
+ \global\catcode\countUTFx\active
+ \uccode`\~\countUTFx
+ \uppercase\expandafter{\UTFviiiTmp}%
+ \advance\countUTFx by 1
+ \ifnum\countUTFx < \countUTFy
+ \expandafter\UTFviiiLoop
+ \fi}
+
+ \countUTFx = "C2
+ \countUTFy = "E0
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+ \UTFviiiLoop
+
+ \countUTFx = "E0
+ \countUTFy = "F0
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+ \UTFviiiLoop
+
+ \countUTFx = "F0
+ \countUTFy = "F4
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+ \UTFviiiLoop
+\endgroup
+
+\begingroup
+ \catcode`\"=12
+ \catcode`\<=12
+ \catcode`\.=12
+ \catcode`\,=12
+ \catcode`\;=12
+ \catcode`\!=12
+ \catcode`\~=13
+
+ \gdef\DeclareUnicodeCharacter#1#2{%
+ \countUTFz = "#1\relax
+ %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+ \begingroup
+ \parseXMLCharref
+ \def\UTFviiiTwoOctets##1##2{%
+ \csname u8:##1\string ##2\endcsname}%
+ \def\UTFviiiThreeOctets##1##2##3{%
+ \csname u8:##1\string ##2\string ##3\endcsname}%
+ \def\UTFviiiFourOctets##1##2##3##4{%
+ \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter
+ \gdef\UTFviiiTmp{#2}%
+ \endgroup}
+
+ \gdef\parseXMLCharref{%
+ \ifnum\countUTFz < "A0\relax
+ \errhelp = \EMsimple
+ \errmessage{Cannot define Unicode char value < 00A0}%
+ \else\ifnum\countUTFz < "800\relax
+ \parseUTFviiiA,%
+ \parseUTFviiiB C\UTFviiiTwoOctets.,%
+ \else\ifnum\countUTFz < "10000\relax
+ \parseUTFviiiA;%
+ \parseUTFviiiA,%
+ \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+ \else
+ \parseUTFviiiA;%
+ \parseUTFviiiA,%
+ \parseUTFviiiA!%
+ \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+ \fi\fi\fi
+ }
+
+ \gdef\parseUTFviiiA#1{%
+ \countUTFx = \countUTFz
+ \divide\countUTFz by 64
+ \countUTFy = \countUTFz
+ \multiply\countUTFz by 64
+ \advance\countUTFx by -\countUTFz
+ \advance\countUTFx by 128
+ \uccode `#1\countUTFx
+ \countUTFz = \countUTFy}
+
+ \gdef\parseUTFviiiB#1#2#3#4{%
+ \advance\countUTFz by "#10\relax
+ \uccode `#3\countUTFz
+ \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
+\endgroup
+
+\def\utfeightchardefs{%
+ \DeclareUnicodeCharacter{00A0}{\tie}
+ \DeclareUnicodeCharacter{00A1}{\exclamdown}
+ \DeclareUnicodeCharacter{00A3}{\pounds}
+ \DeclareUnicodeCharacter{00A8}{\"{ }}
+ \DeclareUnicodeCharacter{00A9}{\copyright}
+ \DeclareUnicodeCharacter{00AA}{\ordf}
+ \DeclareUnicodeCharacter{00AB}{\guillemetleft}
+ \DeclareUnicodeCharacter{00AD}{\-}
+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
+ \DeclareUnicodeCharacter{00AF}{\={ }}
+
+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
+ \DeclareUnicodeCharacter{00B4}{\'{ }}
+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
+ \DeclareUnicodeCharacter{00BA}{\ordm}
+ \DeclareUnicodeCharacter{00BB}{\guillemetright}
+ \DeclareUnicodeCharacter{00BF}{\questiondown}
+
+ \DeclareUnicodeCharacter{00C0}{\`A}
+ \DeclareUnicodeCharacter{00C1}{\'A}
+ \DeclareUnicodeCharacter{00C2}{\^A}
+ \DeclareUnicodeCharacter{00C3}{\~A}
+ \DeclareUnicodeCharacter{00C4}{\"A}
+ \DeclareUnicodeCharacter{00C5}{\AA}
+ \DeclareUnicodeCharacter{00C6}{\AE}
+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
+ \DeclareUnicodeCharacter{00C8}{\`E}
+ \DeclareUnicodeCharacter{00C9}{\'E}
+ \DeclareUnicodeCharacter{00CA}{\^E}
+ \DeclareUnicodeCharacter{00CB}{\"E}
+ \DeclareUnicodeCharacter{00CC}{\`I}
+ \DeclareUnicodeCharacter{00CD}{\'I}
+ \DeclareUnicodeCharacter{00CE}{\^I}
+ \DeclareUnicodeCharacter{00CF}{\"I}
+
+ \DeclareUnicodeCharacter{00D0}{\DH}
+ \DeclareUnicodeCharacter{00D1}{\~N}
+ \DeclareUnicodeCharacter{00D2}{\`O}
+ \DeclareUnicodeCharacter{00D3}{\'O}
+ \DeclareUnicodeCharacter{00D4}{\^O}
+ \DeclareUnicodeCharacter{00D5}{\~O}
+ \DeclareUnicodeCharacter{00D6}{\"O}
+ \DeclareUnicodeCharacter{00D8}{\O}
+ \DeclareUnicodeCharacter{00D9}{\`U}
+ \DeclareUnicodeCharacter{00DA}{\'U}
+ \DeclareUnicodeCharacter{00DB}{\^U}
+ \DeclareUnicodeCharacter{00DC}{\"U}
+ \DeclareUnicodeCharacter{00DD}{\'Y}
+ \DeclareUnicodeCharacter{00DE}{\TH}
+ \DeclareUnicodeCharacter{00DF}{\ss}
+
+ \DeclareUnicodeCharacter{00E0}{\`a}
+ \DeclareUnicodeCharacter{00E1}{\'a}
+ \DeclareUnicodeCharacter{00E2}{\^a}
+ \DeclareUnicodeCharacter{00E3}{\~a}
+ \DeclareUnicodeCharacter{00E4}{\"a}
+ \DeclareUnicodeCharacter{00E5}{\aa}
+ \DeclareUnicodeCharacter{00E6}{\ae}
+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
+ \DeclareUnicodeCharacter{00E8}{\`e}
+ \DeclareUnicodeCharacter{00E9}{\'e}
+ \DeclareUnicodeCharacter{00EA}{\^e}
+ \DeclareUnicodeCharacter{00EB}{\"e}
+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+
+ \DeclareUnicodeCharacter{00F0}{\dh}
+ \DeclareUnicodeCharacter{00F1}{\~n}
+ \DeclareUnicodeCharacter{00F2}{\`o}
+ \DeclareUnicodeCharacter{00F3}{\'o}
+ \DeclareUnicodeCharacter{00F4}{\^o}
+ \DeclareUnicodeCharacter{00F5}{\~o}
+ \DeclareUnicodeCharacter{00F6}{\"o}
+ \DeclareUnicodeCharacter{00F8}{\o}
+ \DeclareUnicodeCharacter{00F9}{\`u}
+ \DeclareUnicodeCharacter{00FA}{\'u}
+ \DeclareUnicodeCharacter{00FB}{\^u}
+ \DeclareUnicodeCharacter{00FC}{\"u}
+ \DeclareUnicodeCharacter{00FD}{\'y}
+ \DeclareUnicodeCharacter{00FE}{\th}
+ \DeclareUnicodeCharacter{00FF}{\"y}
+
+ \DeclareUnicodeCharacter{0100}{\=A}
+ \DeclareUnicodeCharacter{0101}{\=a}
+ \DeclareUnicodeCharacter{0102}{\u{A}}
+ \DeclareUnicodeCharacter{0103}{\u{a}}
+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}
+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}
+ \DeclareUnicodeCharacter{0106}{\'C}
+ \DeclareUnicodeCharacter{0107}{\'c}
+ \DeclareUnicodeCharacter{0108}{\^C}
+ \DeclareUnicodeCharacter{0109}{\^c}
+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}
+ \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
+ \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
+ \DeclareUnicodeCharacter{010C}{\v{C}}
+ \DeclareUnicodeCharacter{010D}{\v{c}}
+ \DeclareUnicodeCharacter{010E}{\v{D}}
+
+ \DeclareUnicodeCharacter{0112}{\=E}
+ \DeclareUnicodeCharacter{0113}{\=e}
+ \DeclareUnicodeCharacter{0114}{\u{E}}
+ \DeclareUnicodeCharacter{0115}{\u{e}}
+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
+ \DeclareUnicodeCharacter{011A}{\v{E}}
+ \DeclareUnicodeCharacter{011B}{\v{e}}
+ \DeclareUnicodeCharacter{011C}{\^G}
+ \DeclareUnicodeCharacter{011D}{\^g}
+ \DeclareUnicodeCharacter{011E}{\u{G}}
+ \DeclareUnicodeCharacter{011F}{\u{g}}
+
+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
+ \DeclareUnicodeCharacter{0124}{\^H}
+ \DeclareUnicodeCharacter{0125}{\^h}
+ \DeclareUnicodeCharacter{0128}{\~I}
+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
+ \DeclareUnicodeCharacter{012A}{\=I}
+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
+ \DeclareUnicodeCharacter{012C}{\u{I}}
+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
+
+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
+ \DeclareUnicodeCharacter{0131}{\dotless{i}}
+ \DeclareUnicodeCharacter{0132}{IJ}
+ \DeclareUnicodeCharacter{0133}{ij}
+ \DeclareUnicodeCharacter{0134}{\^J}
+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
+ \DeclareUnicodeCharacter{0139}{\'L}
+ \DeclareUnicodeCharacter{013A}{\'l}
+
+ \DeclareUnicodeCharacter{0141}{\L}
+ \DeclareUnicodeCharacter{0142}{\l}
+ \DeclareUnicodeCharacter{0143}{\'N}
+ \DeclareUnicodeCharacter{0144}{\'n}
+ \DeclareUnicodeCharacter{0147}{\v{N}}
+ \DeclareUnicodeCharacter{0148}{\v{n}}
+ \DeclareUnicodeCharacter{014C}{\=O}
+ \DeclareUnicodeCharacter{014D}{\=o}
+ \DeclareUnicodeCharacter{014E}{\u{O}}
+ \DeclareUnicodeCharacter{014F}{\u{o}}
+
+ \DeclareUnicodeCharacter{0150}{\H{O}}
+ \DeclareUnicodeCharacter{0151}{\H{o}}
+ \DeclareUnicodeCharacter{0152}{\OE}
+ \DeclareUnicodeCharacter{0153}{\oe}
+ \DeclareUnicodeCharacter{0154}{\'R}
+ \DeclareUnicodeCharacter{0155}{\'r}
+ \DeclareUnicodeCharacter{0158}{\v{R}}
+ \DeclareUnicodeCharacter{0159}{\v{r}}
+ \DeclareUnicodeCharacter{015A}{\'S}
+ \DeclareUnicodeCharacter{015B}{\'s}
+ \DeclareUnicodeCharacter{015C}{\^S}
+ \DeclareUnicodeCharacter{015D}{\^s}
+ \DeclareUnicodeCharacter{015E}{\cedilla{S}}
+ \DeclareUnicodeCharacter{015F}{\cedilla{s}}
+
+ \DeclareUnicodeCharacter{0160}{\v{S}}
+ \DeclareUnicodeCharacter{0161}{\v{s}}
+ \DeclareUnicodeCharacter{0162}{\cedilla{t}}
+ \DeclareUnicodeCharacter{0163}{\cedilla{T}}
+ \DeclareUnicodeCharacter{0164}{\v{T}}
+
+ \DeclareUnicodeCharacter{0168}{\~U}
+ \DeclareUnicodeCharacter{0169}{\~u}
+ \DeclareUnicodeCharacter{016A}{\=U}
+ \DeclareUnicodeCharacter{016B}{\=u}
+ \DeclareUnicodeCharacter{016C}{\u{U}}
+ \DeclareUnicodeCharacter{016D}{\u{u}}
+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
+
+ \DeclareUnicodeCharacter{0170}{\H{U}}
+ \DeclareUnicodeCharacter{0171}{\H{u}}
+ \DeclareUnicodeCharacter{0174}{\^W}
+ \DeclareUnicodeCharacter{0175}{\^w}
+ \DeclareUnicodeCharacter{0176}{\^Y}
+ \DeclareUnicodeCharacter{0177}{\^y}
+ \DeclareUnicodeCharacter{0178}{\"Y}
+ \DeclareUnicodeCharacter{0179}{\'Z}
+ \DeclareUnicodeCharacter{017A}{\'z}
+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
+ \DeclareUnicodeCharacter{017D}{\v{Z}}
+ \DeclareUnicodeCharacter{017E}{\v{z}}
+
+ \DeclareUnicodeCharacter{01C4}{D\v{Z}}
+ \DeclareUnicodeCharacter{01C5}{D\v{z}}
+ \DeclareUnicodeCharacter{01C6}{d\v{z}}
+ \DeclareUnicodeCharacter{01C7}{LJ}
+ \DeclareUnicodeCharacter{01C8}{Lj}
+ \DeclareUnicodeCharacter{01C9}{lj}
+ \DeclareUnicodeCharacter{01CA}{NJ}
+ \DeclareUnicodeCharacter{01CB}{Nj}
+ \DeclareUnicodeCharacter{01CC}{nj}
+ \DeclareUnicodeCharacter{01CD}{\v{A}}
+ \DeclareUnicodeCharacter{01CE}{\v{a}}
+ \DeclareUnicodeCharacter{01CF}{\v{I}}
+
+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
+ \DeclareUnicodeCharacter{01D1}{\v{O}}
+ \DeclareUnicodeCharacter{01D2}{\v{o}}
+ \DeclareUnicodeCharacter{01D3}{\v{U}}
+ \DeclareUnicodeCharacter{01D4}{\v{u}}
+
+ \DeclareUnicodeCharacter{01E2}{\={\AE}}
+ \DeclareUnicodeCharacter{01E3}{\={\ae}}
+ \DeclareUnicodeCharacter{01E6}{\v{G}}
+ \DeclareUnicodeCharacter{01E7}{\v{g}}
+ \DeclareUnicodeCharacter{01E8}{\v{K}}
+ \DeclareUnicodeCharacter{01E9}{\v{k}}
+
+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
+ \DeclareUnicodeCharacter{01F1}{DZ}
+ \DeclareUnicodeCharacter{01F2}{Dz}
+ \DeclareUnicodeCharacter{01F3}{dz}
+ \DeclareUnicodeCharacter{01F4}{\'G}
+ \DeclareUnicodeCharacter{01F5}{\'g}
+ \DeclareUnicodeCharacter{01F8}{\`N}
+ \DeclareUnicodeCharacter{01F9}{\`n}
+ \DeclareUnicodeCharacter{01FC}{\'{\AE}}
+ \DeclareUnicodeCharacter{01FD}{\'{\ae}}
+ \DeclareUnicodeCharacter{01FE}{\'{\O}}
+ \DeclareUnicodeCharacter{01FF}{\'{\o}}
+
+ \DeclareUnicodeCharacter{021E}{\v{H}}
+ \DeclareUnicodeCharacter{021F}{\v{h}}
+
+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
+ \DeclareUnicodeCharacter{0228}{\cedilla{E}}
+ \DeclareUnicodeCharacter{0229}{\cedilla{e}}
+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
+
+ \DeclareUnicodeCharacter{0232}{\=Y}
+ \DeclareUnicodeCharacter{0233}{\=y}
+ \DeclareUnicodeCharacter{0237}{\dotless{j}}
+
+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
+
+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
+
+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
+
+ \DeclareUnicodeCharacter{1E20}{\=G}
+ \DeclareUnicodeCharacter{1E21}{\=g}
+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
+ \DeclareUnicodeCharacter{1E26}{\"H}
+ \DeclareUnicodeCharacter{1E27}{\"h}
+
+ \DeclareUnicodeCharacter{1E30}{\'K}
+ \DeclareUnicodeCharacter{1E31}{\'k}
+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
+ \DeclareUnicodeCharacter{1E3E}{\'M}
+ \DeclareUnicodeCharacter{1E3F}{\'m}
+
+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
+
+ \DeclareUnicodeCharacter{1E54}{\'P}
+ \DeclareUnicodeCharacter{1E55}{\'p}
+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
+
+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
+
+ \DeclareUnicodeCharacter{1E7C}{\~V}
+ \DeclareUnicodeCharacter{1E7D}{\~v}
+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
+
+ \DeclareUnicodeCharacter{1E80}{\`W}
+ \DeclareUnicodeCharacter{1E81}{\`w}
+ \DeclareUnicodeCharacter{1E82}{\'W}
+ \DeclareUnicodeCharacter{1E83}{\'w}
+ \DeclareUnicodeCharacter{1E84}{\"W}
+ \DeclareUnicodeCharacter{1E85}{\"w}
+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
+ \DeclareUnicodeCharacter{1E8C}{\"X}
+ \DeclareUnicodeCharacter{1E8D}{\"x}
+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
+
+ \DeclareUnicodeCharacter{1E90}{\^Z}
+ \DeclareUnicodeCharacter{1E91}{\^z}
+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
+ \DeclareUnicodeCharacter{1E97}{\"t}
+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
+
+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
+
+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
+ \DeclareUnicodeCharacter{1EBC}{\~E}
+ \DeclareUnicodeCharacter{1EBD}{\~e}
+
+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
+
+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
+
+ \DeclareUnicodeCharacter{1EF2}{\`Y}
+ \DeclareUnicodeCharacter{1EF3}{\`y}
+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
+
+ \DeclareUnicodeCharacter{1EF8}{\~Y}
+ \DeclareUnicodeCharacter{1EF9}{\~y}
+
+ \DeclareUnicodeCharacter{2013}{--}
+ \DeclareUnicodeCharacter{2014}{---}
+ \DeclareUnicodeCharacter{2018}{\quoteleft}
+ \DeclareUnicodeCharacter{2019}{\quoteright}
+ \DeclareUnicodeCharacter{201A}{\quotesinglbase}
+ \DeclareUnicodeCharacter{201C}{\quotedblleft}
+ \DeclareUnicodeCharacter{201D}{\quotedblright}
+ \DeclareUnicodeCharacter{201E}{\quotedblbase}
+ \DeclareUnicodeCharacter{2022}{\bullet}
+ \DeclareUnicodeCharacter{2026}{\dots}
+ \DeclareUnicodeCharacter{2039}{\guilsinglleft}
+ \DeclareUnicodeCharacter{203A}{\guilsinglright}
+ \DeclareUnicodeCharacter{20AC}{\euro}
+
+ \DeclareUnicodeCharacter{2192}{\expansion}
+ \DeclareUnicodeCharacter{21D2}{\result}
+
+ \DeclareUnicodeCharacter{2212}{\minus}
+ \DeclareUnicodeCharacter{2217}{\point}
+ \DeclareUnicodeCharacter{2261}{\equiv}
+}% end of \utfeightchardefs
+
+
+% US-ASCII character definitions.
+\def\asciichardefs{% nothing need be done
+ \relax
+}
+
+% Make non-ASCII characters printable again for compatibility with
+% existing Texinfo documents that may use them, even without declaring a
+% document encoding.
+%
+\setnonasciicharscatcode \other
+
+
+\message{formatting,}
+
+\newdimen\defaultparindent \defaultparindent = 15pt
+
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
+% Prevent underfull vbox error messages.
+\vbadness = 10000
+
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
+
+% Following George Bush, get rid of widows and orphans.
+\widowpenalty=10000
+\clubpenalty=10000
+
+% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
+% using an old version of TeX, don't do anything. We want the amount of
+% stretch added to depend on the line length, hence the dependence on
+% \hsize. We call this whenever the paper size is set.
+%
+\def\setemergencystretch{%
+ \ifx\emergencystretch\thisisundefined
+ % Allow us to assign to \emergencystretch anyway.
+ \def\emergencystretch{\dimen0}%
+ \else
+ \emergencystretch = .15\hsize
+ \fi
+}
+
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
+%
+% We also call \setleading{\textleading}, so the caller should define
+% \textleading. The caller should also set \parskip.
+%
+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
+ \voffset = #3\relax
+ \topskip = #6\relax
+ \splittopskip = \topskip
+ %
+ \vsize = #1\relax
+ \advance\vsize by \topskip
+ \outervsize = \vsize
+ \advance\outervsize by 2\topandbottommargin
+ \pageheight = \vsize
+ %
+ \hsize = #2\relax
+ \outerhsize = \hsize
+ \advance\outerhsize by 0.5in
+ \pagewidth = \hsize
+ %
+ \normaloffset = #4\relax
+ \bindingoffset = #5\relax
+ %
+ \ifpdf
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ % if we don't reset these, they will remain at "1 true in" of
+ % whatever layout pdftex was dumped with.
+ \pdfhorigin = 1 true in
+ \pdfvorigin = 1 true in
+ \fi
+ %
+ \setleading{\textleading}
+ %
+ \parindent = \defaultparindent
+ \setemergencystretch
+}
+
+% @letterpaper (the default).
+\def\letterpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % If page is nothing but text, make it come out even.
+ \internalpagesizes{607.2pt}{6in}% that's 46 lines
+ {\voffset}{.25in}%
+ {\bindingoffset}{36pt}%
+ {11in}{8.5in}%
+}}
+
+% Use @smallbook to reset parameters for 7x9.25 trim size.
+\def\smallbook{{\globaldefs = 1
+ \parskip = 2pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.5in}{5in}%
+ {-.2in}{0in}%
+ {\bindingoffset}{16pt}%
+ {9.25in}{7in}%
+ %
+ \lispnarrowing = 0.3in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .5cm
+}}
+
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+ \parskip = 1.5pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.4in}{4.8in}%
+ {-.2in}{-.4in}%
+ {0pt}{14pt}%
+ {9in}{6in}%
+ %
+ \lispnarrowing = 0.25in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .4cm
+}}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % Double-side printing via postscript on Laserjet 4050
+ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
+ % To change the settings for a different printer or situation, adjust
+ % \normaloffset until the front-side and back-side texts align. Then
+ % do the same for \bindingoffset. You can set these for testing in
+ % your texinfo source file like this:
+ % @tex
+ % \global\normaloffset = -6mm
+ % \global\bindingoffset = 10mm
+ % @end tex
+ \internalpagesizes{673.2pt}{160mm}% that's 51 lines
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{44pt}%
+ {297mm}{210mm}%
+ %
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 5mm
+}}
+
+% Use @afivepaper to print on European A5 paper.
+% From romildo at urano.iceb.ufop.br, 2 July 2000.
+% He also recommends making @example and @lisp be small.
+\def\afivepaper{{\globaldefs = 1
+ \parskip = 2pt plus 1pt minus 0.1pt
+ \textleading = 12.5pt
+ %
+ \internalpagesizes{160mm}{120mm}%
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{8pt}%
+ {210mm}{148mm}%
+ %
+ \lispnarrowing = 0.2in
+ \tolerance = 800
+ \hfuzz = 1.2pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 2mm
+ \tableindent = 12mm
+}}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper.
+\def\afourlatex{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{237mm}{150mm}%
+ {\voffset}{4.6mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ %
+ % Must explicitly reset to 0 because we call \afourpaper.
+ \globaldefs = 0
+}}
+
+% Use @afourwide to print on A4 paper in landscape format.
+\def\afourwide{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{241mm}{165mm}%
+ {\voffset}{-2.95mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ \globaldefs = 0
+}}
+
+% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
+% Perhaps we should allow setting the margins, \topskip, \parskip,
+% and/or leading, also. Or perhaps we should compute them somehow.
+%
+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
+\def\pagesizesyyy#1,#2,#3\finish{{%
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
+ \globaldefs = 1
+ %
+ \parskip = 3pt plus 2pt minus 1pt
+ \setleading{\textleading}%
+ %
+ \dimen0 = #1\relax
+ \advance\dimen0 by \voffset
+ %
+ \dimen2 = \hsize
+ \advance\dimen2 by \normaloffset
+ %
+ \internalpagesizes{#1}{\hsize}%
+ {\voffset}{\normaloffset}%
+ {\bindingoffset}{44pt}%
+ {\dimen0}{\dimen2}%
+}}
+
+% Set default to letter.
+%
+\letterpaper
+
+
+\message{and turning on texinfo input format.}
+
+\def^^L{\par} % remove \outer, so ^L can appear in an @comment
+
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
+% Define macros to output various characters with catcode for normal text.
+\catcode`\"=\other \def\normaldoublequote{"}
+\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
+\catcode`\+=\other \def\normalplus{+}
+\catcode`\<=\other \def\normalless{<}
+\catcode`\>=\other \def\normalgreater{>}
+\catcode`\^=\other \def\normalcaret{^}
+\catcode`\_=\other \def\normalunderscore{_}
+\catcode`\|=\other \def\normalverticalbar{|}
+\catcode`\~=\other \def\normaltilde{~}
+
+% This macro is used to make a character print one way in \tt
+% (where it can probably be output as-is), and another way in other fonts,
+% where something hairier probably needs to be done.
+%
+% #1 is what to print if we are indeed using \tt; #2 is what to print
+% otherwise. Since all the Computer Modern typewriter fonts have zero
+% interword stretch (and shrink), and it is reasonable to expect all
+% typewriter fonts to have this, we can check that font parameter.
+%
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary).
+% Most of these we simply print from the \tt font, but for some, we can
+% use math or other variants that look better in normal text.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt\char34}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt\char126}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+
+\catcode`\|=\active
+\def|{{\tt\char124}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% Used sometimes to turn off (effectively) the active characters even after
+% parsing them.
+\def\turnoffactive{%
+ \normalturnoffactive
+ \otherbackslash
+}
+
+\catcode`\@=0
+
+% \backslashcurfont outputs one backslash character in current font,
+% as in \char`\\.
+\global\chardef\backslashcurfont=`\\
+\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef at realbackslash{\} @gdef at doublebackslash{\\}}
+
+% In texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active % @ for escape char from now on.
+
+% The story here is that in math mode, the \char of \backslashcurfont
+% ends up printing the roman \ from the math symbol font (because \char
+% in math mode uses the \mathcode, and plain.tex sets
+% \mathcode`\\="026E). It seems better for @backslashchar{} to always
+% print a typewriter backslash, hence we use an explicit \mathchar,
+% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
+% ignored family value; char position "5C). We can't use " for the
+% usual hex value because it has already been made active.
+ at def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
+ at let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
+
+% On startup, @fixbackslash assigns:
+% @let \ = @normalbackslash
+% \rawbackslash defines an active \ to do \backslashcurfont.
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other. We switch back and forth between these.
+ at gdef@rawbackslash{@let\=@backslashcurfont}
+ at gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+ at def@normalturnoffactive{%
+ @let"=@normaldoublequote
+ @let$=@normaldollar %$ font-lock fix
+ @let+=@normalplus
+ @let<=@normalless
+ @let>=@normalgreater
+ @let\=@normalbackslash
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let~=@normaltilde
+ @markupsetuplqdefault
+ @markupsetuprqdefault
+ @unsepspaces
+}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+ at otherifyactive
+
+% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
+% That is what \eatinput is for; after that, the `\' should revert to printing
+% a backslash.
+%
+ at gdef@eatinput input texinfo{@fixbackslash}
+ at global@let\ = @eatinput
+
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\' in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also turn back on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+ at gdef@fixbackslash{%
+ @ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active
+ @catcode`@_=@active
+}
+
+% Say @foo, not \foo, in error messages.
+ at escapechar = `@@
+
+% These (along with & and #) are made active for url-breaking, so need
+% active definitions as the normal characters.
+ at def@normaldot{.}
+ at def@normalquest{?}
+ at def@normalslash{/}
+
+% These look ok in all fonts, so just make them not special.
+% @hashchar{} gets its own user-level command, because of #line.
+ at catcode`@& = @other @def at normalamp{&}
+ at catcode`@# = @other @def at normalhash{#}
+ at catcode`@% = @other @def at normalpercent{%}
+
+ at let @hashchar = @normalhash
+
+ at c Finally, make ` and ' active, so that txicodequoteundirected and
+ at c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
+ at c don't make ` and ' active, @code will not get them as active chars.
+ at c Do this last of all since we use ` in the previous @catcode assignments.
+ at catcode`@'=@active
+ at catcode`@`=@active
+ at markupsetuplqdefault
+ at markupsetuprqdefault
+
+ at c Local variables:
+ at c eval: (add-hook 'write-file-hooks 'time-stamp)
+ at c page-delimiter: "^\\\\message"
+ at c time-stamp-start: "def\\\\texinfoversion{"
+ at c time-stamp-format: "%:y-%02m-%02d.%02H"
+ at c time-stamp-end: "}"
+ at c End:
+
+ at c vim:sw=2:
+
+ at ignore
+ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
+ at end ignore
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644
index 0000000..bb7d922
--- /dev/null
+++ b/build/Makefile.am
@@ -0,0 +1,26 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2010 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+EXTRA_DIST = \
+ svn_release_number.sh
+
+DISTCLEANFILES = \
+ ape.spec
diff --git a/build/Makefile.in b/build/Makefile.in
new file mode 100644
index 0000000..1ef3d2b
--- /dev/null
+++ b/build/Makefile.in
@@ -0,0 +1,382 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = build
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ape.spec.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ape.spec
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+EXTRA_DIST = \
+ svn_release_number.sh
+
+DISTCLEANFILES = \
+ ape.spec
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu build/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu build/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ape.spec: $(top_builddir)/config.status $(srcdir)/ape.spec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/build/ape.spec.in b/build/ape.spec.in
new file mode 100644
index 0000000..390bfd5
--- /dev/null
+++ b/build/ape.spec.in
@@ -0,0 +1,92 @@
+## Copyright (C) 2008-2010 M. Oliveira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: ape.spec.in 778 2013-07-11 15:49:39Z micael $
+
+# RPM spec file for @PACKAGE at .
+# This file is used to build Redhat Package Manager packages for the
+# @PACKAGE at . Such packages make it easy to install and uninstall
+# the library and related files from binaries or source.
+#
+# This spec file is for version @VERSION@ of @PACKAGE@; the appropriate
+# version numbers are automatically substituted in to @PACKAGE at .spec.in
+# by the configure script. However, @PACKAGE at .spec.in may need to be
+# modified for future releases, if the list of installed files
+# or build commands change.
+#
+# RPM. To build, use the command: rpm --clean -ba @PACKAGE at .spec
+#
+# Alternatively, you can just use 'make rpm'.
+#
+Name: @PACKAGE@
+Summary: atomic DFT code, pseudopotential generator
+Version: @VERSION@
+Release: 1
+License: GPL 2.0
+Group: Applications/Scientific
+BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+Source: http://www.tddft.org/programs/APE/download/%{name}-%{version}.tar.gz
+URL: http://www.tddft.org/programs/APE
+Requires(post): info
+Requires(preun): info
+
+%description
+APE is a computer package designed to generate and test
+norm-conserving pseudopotentials within Density Functional
+Theory. The generated pseudo-potentials can be either non-
+relativistic, scalar relativistic or fully relativistic and can
+explicitly include semi-core states. A wide range of
+exchange-correlation functionals is included.
+
+%prep
+%setup -q
+
+%build
+%configure \
+ FC="@FC@" \
+ FCFLAGS="@FCFLAGS@" \
+ CFLAGS="@CFLAGS@" \
+ CPPFLAGS="@CPPFLAGS@" \
+ LDFLAGS="@LDFLAGS@" \
+ GSL_CFLAGS="@GSL_CFLAGS@" \
+ GSL_CONFIG="@GSL_CONFIG@" \
+ GSL_LIBS="@GSL_LIBS@"
+make
+(cd doc; make ape.pdf)
+
+%install
+rm -rf ${RPM_BUILD_ROOT}
+make install DESTDIR=${RPM_BUILD_ROOT}
+rm -f $RPM_BUILD_ROOT/usr/share/info/dir
+
+%clean
+rm -rf ${RPM_BUILD_ROOT}
+
+%post
+/sbin/install-info %{_infodir}/ape.info %{_infodir}/dir || :
+
+%preun
+if [ $1 = 0 ] ; then
+/sbin/install-info --delete %{_infodir}/ape.info.gz %{_infodir}/dir || :
+fi
+
+%files
+%defattr(-,root,root,0755)
+%doc README NEWS COPYING AUTHORS doc/ape.pdf
+%{_bindir}/*
+%{_datadir}/ape/*
+%{_infodir}/ape.info.gz
diff --git a/build/svn_release_number.sh b/build/svn_release_number.sh
new file mode 100755
index 0000000..2d6ae2f
--- /dev/null
+++ b/build/svn_release_number.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# $Id: svn_release_number.sh 540 2010-11-09 17:53:26Z micael $
+
+# this is meant to be called from octopus/src/Makefile.am
+cd `dirname "$0"`/..
+if [ -x "$(which svn)" ] && svn info > /dev/null 2>&1 ; then
+ svn info | grep Revision | awk -F: '{print $2}' | tr -d [:space:]
+else
+ find . -type f ! -name ChangeLog ! -name \*.svn\* \
+ ! -name \*.o ! -name \*.a ! -name \*.so \
+ -exec grep '$Id:' \{\} \; \
+ | grep '$Id: ' \
+ | tr -d \#\!\* | awk '{print $3,"["$2,$4"]"}' \
+ | grep -v 'qw(' | sort -n | tail -1
+
+fi
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..0fc608f
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,129 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* date when configure was launched */
+#undef BUILD_TIME
+
+/* C compiler */
+#undef CC
+
+/* C compiler */
+#undef CFLAGS
+
+/* The type of a C pointer */
+#undef C_POINTER
+
+/* Fortran compiler */
+#undef FC
+
+/* Fortran compiler */
+#undef FCFLAGS
+
+/* Define to dummy `main' function (if any) required to link to the Fortran
+ libraries. */
+#undef FC_DUMMY_MAIN
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+#undef FC_DUMMY_MAIN_EQ_F77
+
+/* Define to a macro mangling the given C identifier (in lower and upper
+ case), which must not contain underscores, for linking with Fortran. */
+#undef FC_FUNC
+
+/* As FC_FUNC, but for C identifiers containing underscores. */
+#undef FC_FUNC_
+
+/* Define to 1 if you have the <assert.h> header file. */
+#undef HAVE_ASSERT_H
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#undef HAVE_CTYPE_H
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Defined if you have the LIBXC library. */
+#undef HAVE_LIBXC
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Defined if you have the PSPIO library. */
+#undef HAVE_PSPIO
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* subversion revision number */
+#undef LATEST_SVN
+
+/* Defined the LIBXC version. */
+#undef LIBXC_VERSION
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of a C pointer */
+#undef POINTER_SIZE
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
diff --git a/configure b/configure
new file mode 100755
index 0000000..8dca728
--- /dev/null
+++ b/configure
@@ -0,0 +1,7837 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for APE 2.2.0.
+#
+# Report bugs to <ape-users at tddft.org>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf at gnu.org and
+$0: ape-users at tddft.org about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='APE'
+PACKAGE_TARNAME='ape'
+PACKAGE_VERSION='2.2.0'
+PACKAGE_STRING='APE 2.2.0'
+PACKAGE_BUGREPORT='ape-users at tddft.org'
+PACKAGE_URL=''
+
+ac_unique_file="src/global.F90"
+ac_default_prefix=$HOME
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+enable_option_checking=no
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+LINK
+subdirs
+LIBS_PSPIO
+FCFLAGS_PSPIO
+LIBS_LIBXC
+FCFLAGS_LIBXC
+GSL_LIBS
+GSL_CFLAGS
+GSL_CONFIG
+F90_MODULE_FLAG
+FCLIBS
+FCCPP
+FCFLAGS_f90
+ac_ct_FC
+FCFLAGS
+FC
+EGREP
+GREP
+CPP
+PKGCONFIG
+RANLIB
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+with_gsl_prefix
+with_gsl_exec_prefix
+enable_gsltest
+with_libxc_prefix
+with_libxc_include
+with_pspio_prefix
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+FC
+FCFLAGS'
+ac_subdirs_all='libstring_f'
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures APE 2.2.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/ape]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of APE 2.2.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --disable-gsltest Do not try to compile and run a test GSL program
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gsl-prefix=PFX Prefix where GSL is installed (optional)
+ --with-gsl-exec-prefix=PFX Exec prefix where GSL is installed (optional)
+ --with-libxc-prefix=DIR Directory where libxc was installed.
+ --with-libxc-include=DIR
+ Directory where libxc Fortran headers were
+ installed.
+ --with-pspio-prefix=DIR Directory where pspio was installed.
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ FC Fortran compiler command
+ FCFLAGS Fortran compiler flags
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <ape-users at tddft.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+APE configure 2.2.0
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval \${$3+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ---------------------------------- ##
+## Report this to ape-users at tddft.org ##
+## ---------------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_fc_try_compile LINENO
+# ---------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_fc_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_fc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_fc_try_compile
+
+# ac_fn_fc_try_link LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_fc_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_fc_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_fc_try_link
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by APE $as_me 2.2.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+am__api_version='1.12'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='ape'
+ VERSION='2.2.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+# Installation prefix by default
+
+
+# who am i
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+for ac_prog in pkg-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PKGCONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PKGCONFIG"; then
+ ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PKGCONFIG="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PKGCONFIG=$ac_cv_prog_PKGCONFIG
+if test -n "$PKGCONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
+$as_echo "$PKGCONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PKGCONFIG" && break
+done
+
+
+# Checks for header files.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in assert.h ctype.h math.h stdio.h stdlib.h string.h strings.h sys/stat.h sys/time.h sys/types.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for library functions.
+for ac_func in getcwd gettimeofday mkdir
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this sort of thing. */
+ typedef int charset[2];
+ const charset cs = { 0, 0 };
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_const=yes
+else
+ ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+
+# Checks for size of pointer
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the size of a pointer" >&5
+$as_echo_n "checking for the size of a pointer... " >&6; }
+
+ if test -z "$POINTER_SIZE"; then
+ cat >pointertest.c <<EOF
+#include <stdio.h>
+void main()
+{
+ printf("%ld", sizeof(void *));
+}
+EOF
+ ac_try='$CC $CFLAGS -o pointertest.x pointertest.c 1>&5'
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ ac_try=""
+ else
+ echo "configure: failed program was:" >&5
+ cat pointertest.c >&5
+ rm -f pointertest*
+ as_fn_error $? "failed to compile c program to find the size of a pointer" "$LINENO" 5
+ fi
+ ac_pointersize=`./pointertest.x`;
+ rm -f pointertest*
+
+cat >>confdefs.h <<_ACEOF
+#define POINTER_SIZE ${ac_pointersize}
+_ACEOF
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_pointersize} bytes" >&5
+$as_echo "${ac_pointersize} bytes" >&6; }
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define C_POINTER integer(${ac_pointersize})
+_ACEOF
+
+
+# try to find out what is the default Fortran 95 compiler
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_FC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$FC"; then
+ ac_cv_prog_FC="$FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+FC=$ac_cv_prog_FC
+if test -n "$FC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
+$as_echo "$FC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$FC" && break
+ done
+fi
+if test -z "$FC"; then
+ ac_ct_FC=$FC
+ for ac_prog in xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_FC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_FC"; then
+ ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_FC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FC=$ac_cv_prog_ac_ct_FC
+if test -n "$ac_ct_FC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
+$as_echo "$ac_ct_FC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_FC" && break
+done
+
+ if test "x$ac_ct_FC" = x; then
+ FC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ FC=$ac_ct_FC
+ fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file. (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
+if ${ac_cv_fc_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+#ifndef __GNUC__
+ choke me
+#endif
+
+ end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_fc_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
+$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FCFLAGS=${FCFLAGS+set}
+ac_save_FCFLAGS=$FCFLAGS
+FCFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
+$as_echo_n "checking whether $FC accepts -g... " >&6; }
+if ${ac_cv_prog_fc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ FCFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+ ac_cv_prog_fc_g=yes
+else
+ ac_cv_prog_fc_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
+$as_echo "$ac_cv_prog_fc_g" >&6; }
+if test "$ac_test_FCFLAGS" = set; then
+ FCFLAGS=$ac_save_FCFLAGS
+elif test $ac_cv_prog_fc_g = yes; then
+ if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+ FCFLAGS="-g -O2"
+ else
+ FCFLAGS="-g"
+ fi
+else
+ if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+ FCFLAGS="-O2"
+ else
+ FCFLAGS=
+ fi
+fi
+
+if test $ac_compiler_gnu = yes; then
+ GFC=yes
+else
+ GFC=
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran flag to compile .f90 files" >&5
+$as_echo_n "checking for Fortran flag to compile .f90 files... " >&6; }
+if ${ac_cv_fc_srcext_f90+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=f90
+ac_fcflags_srcext_save=$ac_fcflags_srcext
+ac_fcflags_srcext=
+ac_cv_fc_srcext_f90=unknown
+case $ac_ext in #(
+ [fF]77) ac_try=f77;; #(
+ *) ac_try=f95;;
+esac
+for ac_flag in none -qsuffix=f=f90 -Tf "-x $ac_try"; do
+ test "x$ac_flag" != xnone && ac_fcflags_srcext="$ac_flag"
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+ ac_cv_fc_srcext_f90=$ac_flag; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest.$ac_objext conftest.f90
+ac_fcflags_srcext=$ac_fcflags_srcext_save
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_srcext_f90" >&5
+$as_echo "$ac_cv_fc_srcext_f90" >&6; }
+if test "x$ac_cv_fc_srcext_f90" = xunknown; then
+ as_fn_error $? "Fortran could not compile .f90 files" "$LINENO" 5
+else
+ ac_fc_srcext=f90
+ if test "x$ac_cv_fc_srcext_f90" = xnone; then
+ ac_fcflags_srcext=""
+ FCFLAGS_f90=""
+ else
+ ac_fcflags_srcext=$ac_cv_fc_srcext_f90
+ FCFLAGS_f90=$ac_cv_fc_srcext_f90
+ fi
+
+
+fi
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+# APE needs the preprocessor. The result goes to FCCPP
+# this is a hack, and should be changed in the future
+
+ # this should not be hardwired
+ if test -z "$FCCPP"; then FCCPP="/lib/cpp -C -ansi"; fi
+
+
+
+# how Fortran mangles function names
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get verbose linking output from $FC" >&5
+$as_echo_n "checking how to get verbose linking output from $FC... " >&6; }
+if ${ac_cv_prog_fc_v+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+ ac_cv_prog_fc_v=
+# Try some options frequently used verbose output
+for ac_verb in -v -verbose --verbose -V -\#\#\#; do
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FCFLAGS=$FCFLAGS
+FCFLAGS="$FCFLAGS $ac_verb"
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
+ sed '/^Driving:/d; /^Configured with:/d;
+ '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
+$as_echo "$ac_fc_v_output" >&5
+FCFLAGS=$ac_save_FCFLAGS
+
+rm -rf conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_fc_v_output="`echo $ac_fc_v_output |
+ grep 'LPATH is:' |
+ sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+# that detects unbalanced quotes in FLIBS should be implemented
+# and (ugh) tested at some point.
+case $ac_fc_v_output in
+ # With xlf replace commas with spaces,
+ # and remove "-link" and closing parenthesis.
+ *xlfentry*)
+ ac_fc_v_output=`echo $ac_fc_v_output |
+ sed '
+ s/,/ /g
+ s/ -link / /g
+ s/) *$//
+ '
+ ` ;;
+
+ # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+ # $LIBS confuse us, and the libraries appear later in the output anyway).
+ *mGLOB_options_string*)
+ ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+ # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+ # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+ # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+ *-cmdline\ * | *-ignore\ * | *-def\ *)
+ ac_fc_v_output=`echo $ac_fc_v_output | sed "\
+ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g
+ s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g
+ s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;;
+
+ # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
+ *fort77*f2c*gcc*)
+ ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n '
+ /:[ ]\+Running[ ]\{1,\}"gcc"/{
+ /"-c"/d
+ /[.]c"*/d
+ s/^.*"gcc"/"gcc"/
+ s/"//gp
+ }'` ;;
+
+ # If we are using Cray Fortran then delete quotes.
+ *cft90*)
+ ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
+esac
+
+
+ # look for -l* and *.a constructs in the output
+ for ac_arg in $ac_fc_v_output; do
+ case $ac_arg in
+ [\\/]*.a | ?:[\\/]*.a | -[lLRu]*)
+ ac_cv_prog_fc_v=$ac_verb
+ break 2 ;;
+ esac
+ done
+done
+if test -z "$ac_cv_prog_fc_v"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine how to obtain linking information from $FC" >&5
+$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;}
+fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: compilation failed" >&5
+$as_echo "$as_me: WARNING: compilation failed" >&2;}
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_v" >&5
+$as_echo "$ac_cv_prog_fc_v" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran libraries of $FC" >&5
+$as_echo_n "checking for Fortran libraries of $FC... " >&6; }
+if ${ac_cv_fc_libs+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$FCLIBS" != "x"; then
+ ac_cv_fc_libs="$FCLIBS" # Let the user override the test.
+else
+
+cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+
+# Compile and link our simple test program by passing a flag (argument
+# 1 to this macro) to the Fortran compiler in order to get
+# "verbose" output that we can then parse for the Fortran linker
+# flags.
+ac_save_FCFLAGS=$FCFLAGS
+FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v"
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:${as_lineno-$LINENO}: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
+ sed '/^Driving:/d; /^Configured with:/d;
+ '"/^[_$as_cr_Letters][_$as_cr_alnum]*=/d"`
+$as_echo "$ac_fc_v_output" >&5
+FCFLAGS=$ac_save_FCFLAGS
+
+rm -rf conftest*
+
+# On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where
+# /foo, /bar, and /baz are search directories for the Fortran linker.
+# Here, we change these into -L/foo -L/bar -L/baz (and put it first):
+ac_fc_v_output="`echo $ac_fc_v_output |
+ grep 'LPATH is:' |
+ sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_v_output"
+
+# FIXME: we keep getting bitten by quoted arguments; a more general fix
+# that detects unbalanced quotes in FLIBS should be implemented
+# and (ugh) tested at some point.
+case $ac_fc_v_output in
+ # With xlf replace commas with spaces,
+ # and remove "-link" and closing parenthesis.
+ *xlfentry*)
+ ac_fc_v_output=`echo $ac_fc_v_output |
+ sed '
+ s/,/ /g
+ s/ -link / /g
+ s/) *$//
+ '
+ ` ;;
+
+ # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted
+ # $LIBS confuse us, and the libraries appear later in the output anyway).
+ *mGLOB_options_string*)
+ ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"-mGLOB[^"]*"/ /g'` ;;
+
+ # Portland Group compiler has singly- or doubly-quoted -cmdline argument
+ # Singly-quoted arguments were reported for versions 5.2-4 and 6.0-4.
+ # Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
+ *-cmdline\ * | *-ignore\ * | *-def\ *)
+ ac_fc_v_output=`echo $ac_fc_v_output | sed "\
+ s/-cmdline *'[^']*'/ /g; s/-cmdline *\"[^\"]*\"/ /g
+ s/-ignore *'[^']*'/ /g; s/-ignore *\"[^\"]*\"/ /g
+ s/-def *'[^']*'/ /g; s/-def *\"[^\"]*\"/ /g"` ;;
+
+ # If we are using fort77 (the f2c wrapper) then filter output and delete quotes.
+ *fort77*f2c*gcc*)
+ ac_fc_v_output=`echo "$ac_fc_v_output" | sed -n '
+ /:[ ]\+Running[ ]\{1,\}"gcc"/{
+ /"-c"/d
+ /[.]c"*/d
+ s/^.*"gcc"/"gcc"/
+ s/"//gp
+ }'` ;;
+
+ # If we are using Cray Fortran then delete quotes.
+ *cft90*)
+ ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
+esac
+
+
+
+ac_cv_fc_libs=
+
+# Save positional arguments (if any)
+ac_save_positional="$@"
+
+set X $ac_fc_v_output
+while test $# != 1; do
+ shift
+ ac_arg=$1
+ case $ac_arg in
+ [\\/]*.a | ?:[\\/]*.a)
+ ac_exists=false
+ for ac_i in $ac_cv_fc_libs; do
+ if test x"$ac_arg" = x"$ac_i"; then
+ ac_exists=true
+ break
+ fi
+ done
+
+ if test x"$ac_exists" = xtrue; then :
+
+else
+ ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+fi
+ ;;
+ -bI:*)
+ ac_exists=false
+ for ac_i in $ac_cv_fc_libs; do
+ if test x"$ac_arg" = x"$ac_i"; then
+ ac_exists=true
+ break
+ fi
+ done
+
+ if test x"$ac_exists" = xtrue; then :
+
+else
+ if test "$ac_compiler_gnu" = yes; then
+ for ac_link_opt in $ac_arg; do
+ ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
+ done
+else
+ ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+fi
+fi
+ ;;
+ # Ignore these flags.
+ -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
+ |-LANG:=* | -LIST:* | -LNO:* | -link)
+ ;;
+ -lkernel32)
+ case $host_os in
+ *cygwin*) ;;
+ *) ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+ ;;
+ esac
+ ;;
+ -[LRuYz])
+ # These flags, when seen by themselves, take an argument.
+ # We remove the space between option and argument and re-iterate
+ # unless we find an empty arg or a new option (starting with -)
+ case $2 in
+ "" | -*);;
+ *)
+ ac_arg="$ac_arg$2"
+ shift; shift
+ set X $ac_arg "$@"
+ ;;
+ esac
+ ;;
+ -YP,*)
+ for ac_j in `$as_echo "$ac_arg" | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
+ ac_exists=false
+ for ac_i in $ac_cv_fc_libs; do
+ if test x"$ac_j" = x"$ac_i"; then
+ ac_exists=true
+ break
+ fi
+ done
+
+ if test x"$ac_exists" = xtrue; then :
+
+else
+ ac_arg="$ac_arg $ac_j"
+ ac_cv_fc_libs="$ac_cv_fc_libs $ac_j"
+fi
+ done
+ ;;
+ -[lLR]*)
+ ac_exists=false
+ for ac_i in $ac_cv_fc_libs; do
+ if test x"$ac_arg" = x"$ac_i"; then
+ ac_exists=true
+ break
+ fi
+ done
+
+ if test x"$ac_exists" = xtrue; then :
+
+else
+ ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+fi
+ ;;
+ -zallextract*| -zdefaultextract)
+ ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+ ;;
+ # Ignore everything else.
+ esac
+done
+# restore positional arguments
+set X $ac_save_positional; shift
+
+# We only consider "LD_RUN_PATH" on Solaris systems. If this is seen,
+# then we insist that the "run path" must be an absolute path (i.e. it
+# must begin with a "/").
+case `(uname -sr) 2>/dev/null` in
+ "SunOS 5"*)
+ ac_ld_run_path=`$as_echo "$ac_fc_v_output" |
+ sed -n 's,^.*LD_RUN_PATH *= *\(/[^ ]*\).*$,-R\1,p'`
+ test "x$ac_ld_run_path" != x &&
+ if test "$ac_compiler_gnu" = yes; then
+ for ac_link_opt in $ac_ld_run_path; do
+ ac_cv_fc_libs="$ac_cv_fc_libs -Xlinker $ac_link_opt"
+ done
+else
+ ac_cv_fc_libs="$ac_cv_fc_libs $ac_ld_run_path"
+fi
+ ;;
+esac
+fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_libs" >&5
+$as_echo "$ac_cv_fc_libs" >&6; }
+FCLIBS="$ac_cv_fc_libs"
+
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dummy main to link with Fortran libraries" >&5
+$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; }
+if ${ac_cv_fc_dummy_main+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_fc_dm_save_LIBS=$LIBS
+ LIBS="$LIBS $FCLIBS"
+ ac_fortran_dm_var=FC_DUMMY_MAIN
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ # First, try linking without a dummy main:
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_fortran_dummy_main=none
+else
+ ac_cv_fortran_dummy_main=unknown
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ if test $ac_cv_fortran_dummy_main = unknown; then
+ for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define $ac_fortran_dm_var $ac_func
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_fortran_dummy_main=$ac_func; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ fi
+ ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+ ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main
+ rm -rf conftest*
+ LIBS=$ac_fc_dm_save_LIBS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_dummy_main" >&5
+$as_echo "$ac_cv_fc_dummy_main" >&6; }
+FC_DUMMY_MAIN=$ac_cv_fc_dummy_main
+if test "$FC_DUMMY_MAIN" != unknown; then :
+ if test $FC_DUMMY_MAIN != none; then
+
+cat >>confdefs.h <<_ACEOF
+#define FC_DUMMY_MAIN $FC_DUMMY_MAIN
+_ACEOF
+
+ if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
+
+$as_echo "#define FC_DUMMY_MAIN_EQ_F77 1" >>confdefs.h
+
+ fi
+fi
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "linking to Fortran libraries from C fails
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran name-mangling scheme" >&5
+$as_echo_n "checking for Fortran name-mangling scheme... " >&6; }
+if ${ac_cv_fc_mangling+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.$ac_ext <<_ACEOF
+ subroutine foobar()
+ return
+ end
+ subroutine foo_bar()
+ return
+ end
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+ mv conftest.$ac_objext cfortran_test.$ac_objext
+
+ ac_save_LIBS=$LIBS
+ LIBS="cfortran_test.$ac_objext $LIBS $FCLIBS"
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_success=no
+ for ac_foobar in foobar FOOBAR; do
+ for ac_underscore in "" "_"; do
+ ac_func="$ac_foobar$ac_underscore"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_success=yes; break 2
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ done
+ ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+ if test "$ac_success" = "yes"; then
+ case $ac_foobar in
+ foobar)
+ ac_case=lower
+ ac_foo_bar=foo_bar
+ ;;
+ FOOBAR)
+ ac_case=upper
+ ac_foo_bar=FOO_BAR
+ ;;
+ esac
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ ac_success_extra=no
+ for ac_extra in "" "_"; do
+ ac_func="$ac_foo_bar$ac_underscore$ac_extra"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_success_extra=yes; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+ if test "$ac_success_extra" = "yes"; then
+ ac_cv_fc_mangling="$ac_case case"
+ if test -z "$ac_underscore"; then
+ ac_cv_fc_mangling="$ac_cv_fc_mangling, no underscore"
+ else
+ ac_cv_fc_mangling="$ac_cv_fc_mangling, underscore"
+ fi
+ if test -z "$ac_extra"; then
+ ac_cv_fc_mangling="$ac_cv_fc_mangling, no extra underscore"
+ else
+ ac_cv_fc_mangling="$ac_cv_fc_mangling, extra underscore"
+ fi
+ else
+ ac_cv_fc_mangling="unknown"
+ fi
+ else
+ ac_cv_fc_mangling="unknown"
+ fi
+
+ LIBS=$ac_save_LIBS
+ rm -rf conftest*
+ rm -f cfortran_test*
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compile a simple Fortran program
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_mangling" >&5
+$as_echo "$ac_cv_fc_mangling" >&6; }
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+case $ac_cv_fc_mangling in
+ "lower case, no underscore, no extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) name" >>confdefs.h
+ ;;
+ "lower case, no underscore, extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) name" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h
+ ;;
+ "lower case, underscore, no extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) name ## _" >>confdefs.h
+ ;;
+ "lower case, underscore, extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) name ## _" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) name ## __" >>confdefs.h
+ ;;
+ "upper case, no underscore, no extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) NAME" >>confdefs.h
+ ;;
+ "upper case, no underscore, extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) NAME" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h
+ ;;
+ "upper case, underscore, no extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) NAME ## _" >>confdefs.h
+ ;;
+ "upper case, underscore, extra underscore")
+ $as_echo "#define FC_FUNC(name,NAME) NAME ## _" >>confdefs.h
+
+ $as_echo "#define FC_FUNC_(name,NAME) NAME ## __" >>confdefs.h
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown Fortran name-mangling scheme" >&5
+$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
+ ;;
+esac
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+# check flag to include module path
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fortran 90 modules inclusion flag" >&5
+$as_echo_n "checking fortran 90 modules inclusion flag... " >&6; }
+if ${ax_cv_f90_modflag+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+i=0
+while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
+ i=`expr $i + 1`
+done
+mkdir tmpdir_$i
+cd tmpdir_$i
+cat > conftest.$ac_ext <<_ACEOF
+module conftest_module
+ contains
+ subroutine conftest_routine
+ write(*,'(a)') 'gotcha!'
+ end subroutine conftest_routine
+ end module conftest_module
+
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+cd ..
+ax_cv_f90_modflag="not found"
+for ax_flag in "-I " "-I" "-M" "-p"; do
+ if test "$ax_cv_f90_modflag" = "not found" ; then
+ ax_save_FCFLAGS="$FCFLAGS"
+ FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i"
+ cat > conftest.$ac_ext <<_ACEOF
+program conftest_program
+ use conftest_module
+ call conftest_routine
+ end program conftest_program
+
+_ACEOF
+if ac_fn_fc_try_compile "$LINENO"; then :
+ ax_cv_f90_modflag="$ax_flag"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ FCFLAGS="$ax_save_FCFLAGS"
+ fi
+done
+rm -fr tmpdir_$i
+if test "$ax_flag" = "not found" ; then
+ as_fn_error $? "unable to find compiler flag for modules inclusion" "$LINENO" 5
+fi
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_f90_modflag" >&5
+$as_echo "$ax_cv_f90_modflag" >&6; }
+F90_MODULE_FLAG=$ax_cv_f90_modflag
+
+
+# check for GSL
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check whether --with-gsl-prefix was given.
+if test "${with_gsl_prefix+set}" = set; then :
+ withval=$with_gsl_prefix; gsl_prefix="$withval"
+else
+ gsl_prefix=""
+fi
+
+
+# Check whether --with-gsl-exec-prefix was given.
+if test "${with_gsl_exec_prefix+set}" = set; then :
+ withval=$with_gsl_exec_prefix; gsl_exec_prefix="$withval"
+else
+ gsl_exec_prefix=""
+fi
+
+# Check whether --enable-gsltest was given.
+if test "${enable_gsltest+set}" = set; then :
+ enableval=$enable_gsltest;
+else
+ enable_gsltest=yes
+fi
+
+
+ if test "x${GSL_CONFIG+set}" != xset ; then
+ if test "x$gsl_prefix" != x ; then
+ GSL_CONFIG="$gsl_prefix/bin/gsl-config"
+ fi
+ if test "x$gsl_exec_prefix" != x ; then
+ GSL_CONFIG="$gsl_exec_prefix/bin/gsl-config"
+ fi
+ fi
+
+ # Extract the first word of "gsl-config", so it can be a program name with args.
+set dummy gsl-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GSL_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GSL_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_GSL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GSL_CONFIG" && ac_cv_path_GSL_CONFIG="no"
+ ;;
+esac
+fi
+GSL_CONFIG=$ac_cv_path_GSL_CONFIG
+if test -n "$GSL_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSL_CONFIG" >&5
+$as_echo "$GSL_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ min_gsl_version=1.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSL - version >= $min_gsl_version" >&5
+$as_echo_n "checking for GSL - version >= $min_gsl_version... " >&6; }
+ no_gsl=""
+ if test "$GSL_CONFIG" = "no" ; then
+ no_gsl=yes
+ else
+ GSL_CFLAGS=`$GSL_CONFIG --cflags`
+ GSL_LIBS=`$GSL_CONFIG --libs`
+
+ gsl_major_version=`$GSL_CONFIG --version | \
+ sed 's/^\([0-9]*\).*/\1/'`
+ if test "x${gsl_major_version}" = "x" ; then
+ gsl_major_version=0
+ fi
+
+ gsl_minor_version=`$GSL_CONFIG --version | \
+ sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\2/'`
+ if test "x${gsl_minor_version}" = "x" ; then
+ gsl_minor_version=0
+ fi
+
+ gsl_micro_version=`$GSL_CONFIG --version | \
+ sed 's/^\([0-9]*\)\.\{0,1\}\([0-9]*\)\.\{0,1\}\([0-9]*\).*/\3/'`
+ if test "x${gsl_micro_version}" = "x" ; then
+ gsl_micro_version=0
+ fi
+
+ if test "x$enable_gsltest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GSL_CFLAGS"
+ LIBS="$LIBS $GSL_LIBS"
+
+ rm -f conf.gsltest
+ if test "$cross_compiling" = yes; then :
+ echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+char* my_strdup (const char *str);
+
+char*
+my_strdup (const char *str)
+{
+ char *new_str;
+
+ if (str)
+ {
+ new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
+ strcpy (new_str, str);
+ }
+ else
+ new_str = NULL;
+
+ return new_str;
+}
+
+int main (void)
+{
+ int major = 0, minor = 0, micro = 0;
+ int n;
+ char *tmp_version;
+
+ system ("touch conf.gsltest");
+
+ /* HP/UX 9 (%@#!) writes to sscanf strings */
+ tmp_version = my_strdup("$min_gsl_version");
+
+ n = sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) ;
+
+ if (n != 2 && n != 3) {
+ printf("%s, bad version string\n", "$min_gsl_version");
+ exit(1);
+ }
+
+ if (($gsl_major_version > major) ||
+ (($gsl_major_version == major) && ($gsl_minor_version > minor)) ||
+ (($gsl_major_version == major) && ($gsl_minor_version == minor) && ($gsl_micro_version >= micro)))
+ {
+ exit(0);
+ }
+ else
+ {
+ exit(1);
+ }
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ no_gsl=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_gsl" = x ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$CFLAGS $GSL_CFLAGS"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ if test "$GSL_CONFIG" = "no" ; then
+ echo "*** The gsl-config script installed by GSL could not be found"
+ echo "*** If GSL was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the GSL_CONFIG environment variable to the"
+ echo "*** full path to gsl-config."
+ else
+ if test -f conf.gsltest ; then
+ :
+ else
+ echo "*** Could not run GSL test program, checking why..."
+ CFLAGS="$CFLAGS $GSL_CFLAGS"
+ LIBS="$LIBS $GSL_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GSL or finding the wrong"
+ echo "*** version of GSL. If it is not finding GSL, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means GSL was incorrectly installed"
+ echo "*** or that you have moved GSL since it was installed. In the latter case, you"
+ echo "*** may want to edit the gsl-config script: $GSL_CONFIG"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+# GSL_CFLAGS=""
+# GSL_LIBS=""
+ as_fn_error $? "could not find required gsl library" "$LINENO" 5
+ fi
+
+
+ rm -f conf.gsltest
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+
+
+#Check for libxc
+
+acx_libxc_ok=no
+
+
+# Check whether --with-libxc-prefix was given.
+if test "${with_libxc_prefix+set}" = set; then :
+ withval=$with_libxc_prefix;
+fi
+
+
+# Set FCFLAGS_LIBXC only if not set from environment
+if test x"$FCFLAGS_LIBXC" = x; then
+ case $with_libxc_prefix in
+ "") FCFLAGS_LIBXC="-I/usr/include" ;;
+ *) FCFLAGS_LIBXC="$ax_cv_f90_modflag$with_libxc_prefix/include" ;;
+ esac
+fi
+
+
+# Check whether --with-libxc-include was given.
+if test "${with_libxc_include+set}" = set; then :
+ withval=$with_libxc_include;
+fi
+
+case $with_libxc_include in
+ "") ;;
+ *) FCFLAGS_LIBXC="$ax_cv_f90_modflag$with_libxc_include" ;;
+esac
+
+acx_libxc_save_LIBS="$LIBS"
+acx_libxc_save_FCFLAGS="$FCFLAGS"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxc" >&5
+$as_echo_n "checking for libxc... " >&6; }
+
+testprog=" program main
+
+ use xc_f90_lib_m
+ implicit none
+
+ integer :: i
+ i = XC_EXCHANGE
+
+ end"
+
+
+FCFLAGS="$FCFLAGS_LIBXC $acx_libxc_save_FCFLAGS"
+
+# set from environment variable, if not blank
+if test ! -z "$LIBS_LIBXC"; then
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+$testprog
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+# static linkage, separate Fortran interface
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="$with_libxc_prefix/lib/libxcf90.a $with_libxc_prefix/lib/libxc.a"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+$testprog
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+# dynamic linkage, separate Fortran interface
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="-L$with_libxc_prefix/lib -lxcf90 -lxc"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+$testprog
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+# static linkage, combined Fortran interface (libxc pre-r10730)
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="$with_libxc_prefix/lib/libxc.a"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+$testprog
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+# dynamic linkage, combined Fortran interface (libxc pre-r10730)
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="-L$with_libxc_prefix/lib -lxc"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+$testprog
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+testprog_20=" program main
+
+ use xc_f90_lib_m
+ implicit none
+ integer :: major
+ integer :: minor
+ call xc_f90_version(major, minor)
+ end"
+
+testprog_12=" program main
+
+ use xc_f90_lib_m
+ implicit none
+
+ integer :: i
+ i = XC_GGA_X_AIRY
+ end"
+
+testprog_11=" program main
+
+ use xc_f90_lib_m
+ implicit none
+
+ integer :: i
+ i = XC_KINETIC
+ end"
+
+if test x"$acx_libxc_ok" = xyes; then
+cat > conftest.$ac_ext <<_ACEOF
+$testprog_11
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_version=110
+else
+ acx_libxc_version=100
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+cat > conftest.$ac_ext <<_ACEOF
+$testprog_12
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_version=120
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+cat > conftest.$ac_ext <<_ACEOF
+$testprog_20
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_libxc_version=200
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define LIBXC_VERSION $acx_libxc_version
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_libxc_ok ($FCFLAGS_LIBXC $LIBS_LIBXC)" >&5
+$as_echo "$acx_libxc_ok ($FCFLAGS_LIBXC $LIBS_LIBXC)" >&6; }
+
+if test x"$acx_libxc_ok" = xyes; then
+
+$as_echo "#define HAVE_LIBXC 1" >>confdefs.h
+
+else
+ as_fn_error $? "Could not find required libxc library ( >= v 1.0.0)." "$LINENO" 5
+fi
+
+
+
+FCFLAGS="$acx_libxc_save_FCFLAGS"
+LIBS="$acx_libxc_save_LIBS"
+
+
+#Check for pspio
+
+acx_pspio_ok=no
+FCFLAGS_PSPIO=""
+LIBS_PSPIO=""
+
+acx_pspio_save_LIBS="$LIBS"
+acx_pspio_save_FCFLAGS="$FCFLAGS"
+
+if test "$PKGCONFIG" != ""; then
+ PSPIO_PREFIX=`$PKGCONFIG --variable=prefix pspio`
+else
+ PSPIO_PREFIX=/usr
+fi
+
+# Check whether --with-pspio-prefix was given.
+if test "${with_pspio_prefix+set}" = set; then :
+ withval=$with_pspio_prefix;
+else
+ with_pspio_prefix=$PSPIO_PREFIX
+fi
+
+case $with_pspio_prefix in
+ no ) acx_pspio_ok=disable ;;
+ *) LIBS_PSPIO="-L$with_pspio_prefix/lib -lpspio"; FCFLAGS_PSPIO="$ax_cv_f90_modflag$with_pspio_prefix/include" ;;
+esac
+
+if test "$acx_pspio_ok" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pspio" >&5
+$as_echo_n "checking for pspio... " >&6; }
+ # If the location has been passed with --with-pspio-prefix just test this
+ if test "$LIBS_PSPIO"; then
+ pspio_fcflags="$FCFLAGS_PSPIO"; pspio_libs="$LIBS_PSPIO"
+ FCFLAGS="$pspio_fcflags $acx_pspio_save_FCFLAGS $GSL_CFLAGS"
+ LIBS="$pspio_libs $acx_pspio_save_LIBS $GSL_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ use pspio_f90_types_m
+ use pspio_f90_lib_m
+
+ type(pspio_f90_pointer_t) :: pspdata
+ integer :: i
+ i = pspio_f90_pspdata_free(pspdata)
+
+ end
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_pspio_ok=yes; FCFLAGS_PSPIO="$pspio_fcflags"; LIBS_PSPIO="$pspio_libs"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ else
+ pspio_libs="-lpspio"
+ FCFLAGS="$pspio_fcflags $acx_pspio_save_FCFLAGS $GSL_CFLAGS"
+ LIBS=" $acx_pspio_save_LIBS $pspio_libs $GSL_LIBS"
+ cat > conftest.$ac_ext <<_ACEOF
+ program main
+
+ use pspio_f90_types_m
+ use pspio_f90_lib_m
+
+ type(pspio_f90_pointer_t) :: pspdata
+ integer :: i
+ i = pspio_f90_pspdata_free(pspdata)
+
+ end
+_ACEOF
+if ac_fn_fc_try_link "$LINENO"; then :
+ acx_pspio_ok=yes; FCFLAGS_PSPIO="$pspio_fcflags"; LIBS_PSPIO="$pspio_libs"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pspio_ok ($LIBS_PSPIO)" >&5
+$as_echo "$acx_pspio_ok ($LIBS_PSPIO)" >&6; }
+fi
+
+
+
+FCFLAGS="$acx_pspio_save_FCFLAGS"
+LIBS="$acx_pspio_save_LIBS"
+
+if test x"$acx_pspio_ok" = xyes; then
+
+$as_echo "#define HAVE_PSPIO 1" >>confdefs.h
+
+
+else
+
+$as_echo "#define HAVE_PSPIO 0" >>confdefs.h
+
+ LIBS_PSPIO=""
+ FCFLAGS_PSPIO=""
+
+fi
+
+
+# now run configure for the internal libraries
+
+
+subdirs="$subdirs libstring_f"
+
+
+# This is not very nice, but it does not work otherwise...
+LINK="$FC $FCFLAGS $LDFLAGS -o \$@"
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: collecting compilation info..." >&5
+$as_echo "$as_me: collecting compilation info..." >&6;}
+
+rev=$(sh ./build/svn_release_number.sh 2> /dev/null)
+date=`date`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: collecting compilation info... \"$rev\"" >&5
+$as_echo "$as_me: collecting compilation info... \"$rev\"" >&6;}
+
+
+cat >>confdefs.h <<_ACEOF
+#define LATEST_SVN "$rev"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_TIME "$date"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define CC "$CC"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FC "$FC"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define CFLAGS "$CFLAGS"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FCFLAGS "$FCFLAGS $FCFLAGS_f90"
+_ACEOF
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile liboct_parser/Makefile src/Makefile build/Makefile build/ape.spec testsuite/Makefile testsuite/basic/Makefile testsuite/all_electron/Makefile testsuite/pseudopotentials/Makefile testsuite/libxc/Makefile doc/Makefile"
+
+ac_config_files="$ac_config_files testsuite/ape-run_testsuite"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by APE $as_me 2.2.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <ape-users at tddft.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+APE config.status 2.2.0
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "liboct_parser/Makefile") CONFIG_FILES="$CONFIG_FILES liboct_parser/Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "build/Makefile") CONFIG_FILES="$CONFIG_FILES build/Makefile" ;;
+ "build/ape.spec") CONFIG_FILES="$CONFIG_FILES build/ape.spec" ;;
+ "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+ "testsuite/basic/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/basic/Makefile" ;;
+ "testsuite/all_electron/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/all_electron/Makefile" ;;
+ "testsuite/pseudopotentials/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/pseudopotentials/Makefile" ;;
+ "testsuite/libxc/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/libxc/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "testsuite/ape-run_testsuite") CONFIG_FILES="$CONFIG_FILES testsuite/ape-run_testsuite" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "testsuite/ape-run_testsuite":F) chmod +x testsuite/ape-run_testsuite ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+
+#
+# CONFIG_SUBDIRS section.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ --disable-option-checking)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+ # Pass --silent
+ if test "$silent" = yes; then
+ ac_sub_configure_args="--silent $ac_sub_configure_args"
+ fi
+
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d "$srcdir/$ac_dir" || continue
+
+ ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
+$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative name.
+ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+ fi
+
+ cd "$ac_popdir"
+ done
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..46c2e5e
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,107 @@
+# Process this file with autoconf to produce a configure script.
+
+## Copyright (C) 2004-2013 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: configure.ac 789 2013-08-05 16:24:40Z micael $
+
+AC_PREREQ(2.59)
+AC_INIT([APE],[2.2.0],[ape-users at tddft.org],[ape])
+AC_CONFIG_SRCDIR([src/global.F90])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+
+AC_CONFIG_HEADERS([config.h])
+
+# Installation prefix by default
+AC_PREFIX_DEFAULT($HOME)
+
+# who am i
+AC_CANONICAL_HOST
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+AC_CHECK_PROGS([PKGCONFIG],[pkg-config])
+
+# Checks for header files.
+AC_CHECK_HEADERS([assert.h ctype.h math.h stdio.h stdlib.h string.h strings.h sys/stat.h sys/time.h sys/types.h unistd.h])
+
+# Checks for library functions.
+AC_CHECK_FUNCS([getcwd gettimeofday mkdir])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for size of pointer
+ACX_POINTER_SIZE
+AC_DEFINE_UNQUOTED(C_POINTER, [integer(${ac_pointersize})], [The type of a C pointer])
+
+# try to find out what is the default Fortran 95 compiler
+AC_PROG_FC([], Fortran 90)
+AC_LANG_PUSH(Fortran)
+AC_FC_SRCEXT(f90)
+
+# APE needs the preprocessor. The result goes to FCCPP
+# this is a hack, and should be changed in the future
+AC_LANG_PREPROC
+
+# how Fortran mangles function names
+AC_FC_WRAPPERS
+
+# check flag to include module path
+AX_F90_MODULE_FLAG
+F90_MODULE_FLAG=$ax_cv_f90_modflag
+AC_SUBST([F90_MODULE_FLAG])
+
+# check for GSL
+AC_LANG_PUSH(C)
+AX_PATH_GSL([1.0], [CFLAGS="$CFLAGS $GSL_CFLAGS"], AC_MSG_ERROR([could not find required gsl library]))
+AC_LANG_POP(C)
+
+#Check for libxc
+ACX_LIBXC
+
+#Check for pspio
+ACX_PSPIO
+
+# now run configure for the internal libraries
+AC_CONFIG_SUBDIRS([libstring_f])
+
+# This is not very nice, but it does not work otherwise...
+LINK="$FC $FCFLAGS $LDFLAGS -o \$@"
+AC_SUBST(LINK)
+
+
+ACX_COMPILATION_INFO
+
+AC_CONFIG_FILES([Makefile
+ liboct_parser/Makefile
+ src/Makefile
+ build/Makefile
+ build/ape.spec
+ testsuite/Makefile
+ testsuite/basic/Makefile
+ testsuite/all_electron/Makefile
+ testsuite/pseudopotentials/Makefile
+ testsuite/libxc/Makefile
+ doc/Makefile])
+AC_CONFIG_FILES([testsuite/ape-run_testsuite], [chmod +x testsuite/ape-run_testsuite])
+
+AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..c6c657d
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,24 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2004 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+info_TEXINFOS = ape.texi
+
+CLEANFILES = *~ *.bak
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..53bb399
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,664 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/build-aux/texinfo.tex
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+INFO_DEPS = $(srcdir)/ape.info
+TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
+DVIS = ape.dvi
+PDFS = ape.pdf
+PSS = ape.ps
+HTMLS = ape.html
+TEXINFOS = ape.texi
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__installdirs = "$(DESTDIR)$(infodir)"
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+info_TEXINFOS = ape.texi
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .dvi .html .info .pdf .ps .texi
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+.texi.info:
+ restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ am__cwd=`pwd` && $(am__cd) $(srcdir) && \
+ rm -rf $$backupdir && mkdir $$backupdir && \
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+ done; \
+ else :; fi && \
+ cd "$$am__cwd"; \
+ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $@ $<; \
+ then \
+ rc=0; \
+ $(am__cd) $(srcdir); \
+ else \
+ rc=$$?; \
+ $(am__cd) $(srcdir) && \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
+
+.texi.dvi:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) --clean $<
+
+.texi.pdf:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) --clean $<
+
+.texi.html:
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+ exit 1; \
+ fi
+$(srcdir)/ape.info: ape.texi
+ape.dvi: ape.texi
+ape.pdf: ape.texi
+ape.html: ape.texi
+.dvi.ps:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) -o $@ $<
+
+uninstall-dvi-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
+ rm -f "$(DESTDIR)$(dvidir)/$$f"; \
+ done
+
+uninstall-html-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
+ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
+ done
+
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
+ done; \
+ else :; fi
+ @$(NORMAL_UNINSTALL)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
+ done
+
+uninstall-pdf-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+
+uninstall-ps-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(psdir)/$$f"; \
+ done
+
+dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
+ case $$base in \
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+ if test -f $$file; then \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f "$(distdir)/$$relfile" || \
+ cp -p $$file "$(distdir)/$$relfile"; \
+ else :; fi; \
+ done; \
+ done
+
+mostlyclean-aminfo:
+ -rm -rf ape.aux ape.cp ape.cps ape.fn ape.fns ape.ky ape.kys ape.log ape.pg \
+ ape.pgs ape.tmp ape.toc ape.tp ape.tps ape.vr ape.vrs
+
+clean-aminfo:
+ -test -z "ape.dvi ape.pdf ape.ps ape.html" \
+ || rm -rf ape.dvi ape.pdf ape.ps ape.html
+
+maintainer-clean-aminfo:
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
+ done
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-info
+check-am: all-am
+check: check-am
+all-am: Makefile $(INFO_DEPS)
+installdirs:
+ for dir in "$(DESTDIR)$(infodir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-aminfo clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am: $(DVIS)
+
+html: html-am
+
+html-am: $(HTMLS)
+
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-info-am
+
+install-dvi: install-dvi-am
+
+install-dvi-am: $(DVIS)
+ @$(NORMAL_INSTALL)
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+ done
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ $(am__strip_dir) \
+ d2=$$d$$p; \
+ if test -d "$$d2"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+ else \
+ list2="$$list2 $$d2"; \
+ fi; \
+ done; \
+ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done; }
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+ fi; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ echo "$$ifile"; \
+ else : ; fi; \
+ done; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
+ @$(POST_INSTALL)
+ @if $(am__can_run_installinfo); then \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am: $(PDFS)
+ @$(NORMAL_INSTALL)
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
+install-ps: install-ps-am
+
+install-ps-am: $(PSS)
+ @$(NORMAL_INSTALL)
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am: $(PDFS)
+
+ps: ps-am
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
+ uninstall-pdf-am uninstall-ps-am
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
+ dist-info distclean distclean-generic distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
+ uninstall-info-am uninstall-pdf-am uninstall-ps-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/ape.info b/doc/ape.info
new file mode 100644
index 0000000..c1af8f0
--- /dev/null
+++ b/doc/ape.info
@@ -0,0 +1,1972 @@
+This is /home/cfc/micael/devel/ape/svn/tags/2.2.0/doc/ape.info,
+produced by makeinfo version 4.13 from
+/home/cfc/micael/devel/ape/svn/tags/2.2.0/doc/ape.texi.
+
+INFO-DIR-SECTION Individual utilities
+START-INFO-DIR-ENTRY
+* APE: (APE). The APE program.
+END-INFO-DIR-ENTRY
+
+ This manual is for APE (Atomic Pseudopotentials Engine) 2.2.0, a
+density functional theory atomic program and pseudopotentials generator.
+
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+2013 Micael Oliveira and Fernando Nogueira
+
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation.
+
+
+File: ape.info, Node: Top, Next: Copying, Prev: (dir), Up: (dir)
+
+ape
+***
+
+This manual is for APE (Atomic Pseudopotentials Engine) 2.2.0, a
+density functional theory atomic program and pseudopotentials generator.
+
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+2013 Micael Oliveira and Fernando Nogueira
+
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation.
+
+* Menu:
+
+* Copying::
+* Authors::
+* Introduction::
+* Installation::
+* The parser::
+* Input file options::
+* Examples::
+* Options Index::
+
+ --- The Detailed Node Listing ---
+
+Introduction
+
+
+Installation
+
+* Quick instructions::
+* Long instructions::
+* Troubleshooting::
+
+Input file options
+
+* Generalities::
+* Hamiltonian::
+* Specie::
+* Pseudopotentials generation::
+* Mesh::
+* SCF::
+* Wave-equations solver::
+
+Generalities
+
+* CalculationMode::
+* Units::
+* UnitsOutput::
+* UnitsInput::
+* Verbose::
+
+Hamiltonian
+
+* WaveEquation::
+* SpinMode::
+* XCFunctional::
+* XCCorrections::
+
+Specie
+
+* NuclearCharge::
+* Orbitals::
+
+Pseudopotentials generation
+
+* PPComponents::
+* PPCalculationTolerance::
+* PPOutputFileFormat::
+* CoreCorrection::
+* LLocal::
+
+Pseudopotentials tests
+
+* PPTests::
+* PPTestSCF::
+* PPTestOrbitals::
+* PPTestAEDir::
+* LogDerivativeRadius::
+* LogDerivativeEnergyMax::
+* LogDerivativeEnergyMin::
+* LogDerivativeEnergyStep::
+
+Mesh
+
+* MeshType::
+* MeshStartingPoint::
+* MeshOutmostPoint::
+* MeshNumberOfPoints::
+* MeshDerivMethod::
+* MeshFiniteDiffOrder::
+
+SCF
+
+* MaximumIter::
+* ConvAbsDens::
+* ConvRelDens::
+* ConvAbsEnergy::
+* ConvRelEnergy::
+* SmearingFunction::
+* MixingScheme::
+* Mixing::
+* MixNumberSteps::
+
+Wave-equations solver
+
+* EigenSolverTolerance::
+* ODEIntTolerance::
+* ODESteppingFunction::
+* ODEMaxSteps::
+
+Examples
+
+* Lithium::
+
+
+File: ape.info, Node: Copying, Next: Authors, Prev: Top, Up: Top
+
+1 Copying
+*********
+
+This program is "free"; this means that everyone is free to use it and
+free to redistribute it on a free basis. What is not allowed is to try
+to prevent others from further sharing any version of this program that
+they might get from you.
+
+ Specifically, we want to make sure that you have the right to give
+away copies of the program, that you receive source code or else can
+get it if you want it, that you can change this program or use pieces
+of them in new free programs, and that you know you can do these things.
+
+ To make sure that everyone has such rights, we have to forbid you to
+deprive anyone else of these rights. For example, if you distribute
+copies of the program, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must tell them their rights.
+
+ Also, for our own protection, we must make certain that everyone
+finds out that there is no warranty for this program. If these programs
+are modified by someone else and passed on, we want their recipients to
+know that what they have is not what we distributed, so that any
+problems introduced by others will not reflect on our reputation.
+
+ The precise conditions of the license are found in the General Public
+Licenses that accompany it.
+
+
+File: ape.info, Node: Authors, Next: Introduction, Prev: Copying, Up: Top
+
+2 Authors, Collaborators and Acknowledgments.
+*********************************************
+
+The main developing team of this program is composed of:
+
+ * Micael Oliveira (Universidade de Coimbra, Coimbra, Portugal),
+
+ * Fernando Nogueira (Universidade de Coimbra, Coimbra, Portugal)
+
+ Other people who made significant contributions to this program:
+
+ * Tiago Cerqueira (Universidade de Coimbra, Coimbra, Portugal),
+
+
+File: ape.info, Node: Introduction, Next: Installation, Prev: Authors, Up: Top
+
+3 Introduction
+**************
+
+`APE' is a computer package designed to generate and test
+norm-conserving pseudopotentials within Density Functional Theory. The
+generated pseudopotentials can be either non-relativistic, scalar
+relativistic or fully relativistic and can explicitly include semi-core
+states. A wide range of exchange-correlation functionals is included.
+
+ More information about `APE' can be found in its homepage
+(http://www.tddft.org/programs/APE/) and in the following article:
+
+ M. J. T. Oliveira and F. Nogueira, _Generating relativistic
+pseudo-potentials with explicit incorporation of semi-core states using
+APE, the Atomic Pseudo-potentials Engine_, Comp. Phys. Comm. _178_, 524
+(2008).
+
+
+File: ape.info, Node: Installation, Next: The parser, Prev: Introduction, Up: Top
+
+4 Installation
+**************
+
+* Menu:
+
+* Quick instructions::
+* Long instructions::
+* Troubleshooting::
+
+
+File: ape.info, Node: Quick instructions, Next: Long instructions, Prev: Installation, Up: Installation
+
+4.1 Quick instructions
+======================
+
+If you are feeling lucky:
+ prompt> tar xzf ape<-version>.tar.gz
+ prompt> cd ape-<version>
+ prompt> ./configure
+ prompt> make
+ prompt> make install
+
+ This may not work but, before giving up, just read the following
+paragraphs.
+
+
+File: ape.info, Node: Long instructions, Next: Troubleshooting, Prev: Quick instructions, Up: Installation
+
+4.2 Long instructions
+=====================
+
+The code is written in standard Fortran 95, with some routines written
+in C. To build it you will need both a C compiler (`gcc' works just
+fine), and a Fortran 95 compiler.
+
+ Besides the compiler, you will also need:
+ 1. `make': most computers have it installed, otherwise just grab and
+ install the GNU `make'.
+
+ 2. `cpp': GNU `cpp' is just fine, but any `cpp' that accepts the `-C'
+ flag (preserve comments) should work just as well.
+
+ 3. GSL: The GSL is heavily used in `APE'. If you don't have it
+ already installed in your system, you can obtain GSL from here
+ (http://sources.redhat.com/gsl/). You will need version 1.0 or
+ higher.
+
+ 4. `libxc': `libxc' is a library of exchange and correlation
+ functionals. If you don't have it already installed in your
+ system, you can obtain it here
+ (http://www.tddft.org/programs/octopus/wiki/index.php/Libxc).
+
+
+ First you should obtain the code file, `ape<-version>.tar.gz', (you
+probably have already done this). The code is freely available, and can
+be downloaded from `http://www.tddft.org/programs/APE'. There exists a
+`svn' server, which you can browse at
+`http://www.tddft.org/trac/APE/browser/'. The sources of the svn
+version (in general more unstable than the _official_ distribution) may
+be downloaded by anonymous svn access:
+
+ prompt> svn co http://www.tddft.org/svn/APE/trunk ape
+
+ Uncompress and untar it (`tar xzf ape<-version>.tar.gz'). In the
+following, `APE-HOME' denotes the home directory of APE, created by the
+`tar' command.
+
+ `APE-HOME' contains the following subdirectories:
+ * `autom4te.cache, build': contains files related to the building
+ system. May actually not be there. Not of real interest for the
+ plain user.
+
+ * `doc': The documentation of `APE' in _texinfo_ format.
+
+ * `liboct_parser': The parser used by `APE'. This is the parser from
+ `Octopus'.
+
+ * `sample': Sample input files for `APE'.
+
+ * `src': Fortran 90/95 source files. Note that these have to be
+ preprocessed before being fed to the Fortran compiler, so do not
+ be scared by the # directives.
+
+ * `testsuite': `APE' regression testsuite.
+
+ Before configuring you can (should) setup a couple of options.
+Although the configure script tries to guess your system settings for
+you, we recommend that you set explicitly the default Fortran 95
+compiler and the compiler options. For example, in `bash' you would
+typically do:
+ export FC=gfortran
+ export FCFLAGS="-O3 -Wall"
+ if you are using the GNU Fortran compiler on a Linux machine. Also,
+if you have some of the required libraries in some unusual directories,
+these directories may be placed in the variable `LDFLAGS' (e.g.,
+`export LDFLAGS="-L/opt/lib/"').
+
+ You can now run the configure script (`./configure').(1)
+
+ There are some options you can use with the configure script. To
+obtain a full list just type `./configure --help'. Some commonly used
+options include:
+ * `--prefix=PREFIX': Change the base installation dir of `APE' to
+ `PREFIX'. The executable will be installed in `PREFIX/bin', the
+ libraries in `PREFIX/lib' and the documentation in `PREFIX/info'.
+ `PREFIX' defaults to the home directory of the user who runs
+ `configure'.
+
+ * `--with-gsl-prefix=DIR': Installation directory of the GSL
+ library. The libraries are expected to be in `DIR/lib' and the
+ include files in `DIR/include'. The value of `DIR' is usually
+ found by issuing the command `gsl-config --prefix'. (If the GSL
+ library is installed, the program `gsl-config' should be
+ somewhere.)
+
+ * `--with-libxc-prefix=DIR': Installation directory of the `libxc'
+ library. The libraries are expected to be in `DIR/lib' and the
+ include files in `DIR/include'.
+
+ Run `make', and then `make check'. This last command will launch the
+`APE' testsuite. If all tests were passed, you can then install the
+code with `make install'. If everything went fine, you should now be
+able to run `APE'.
+
+ The program has been tested in the following platforms:
+ * `i686-linux-gnu': with the Intel and GNU Fortran compilers.
+
+ * `opteron': with the PathScale compiler.
+ If you manage to compile/run `APE' on a different platform or with a
+different compiler, please let us know so we can update the list.
+Patches to solve compiler issues are also welcome.
+
+ Build the documentation in the format you prefer. Since you are
+reading this, you already have it in some format. Due to the power of
+`texinfo', a series of formats are available, namely `dvi', `html',
+`pdf' and `info'. The `APE.texi' source code of this document is in the
+`APE-HOME/doc' directory.
+
+ ---------- Footnotes ----------
+
+ (1) If you downloaded the svn version, you will not find the
+`configure' script. In order to compile the development version you
+will first have to run the GNU autotools. This may be done by executing
+the command `autoreconf -i'. Note that you need to have working
+versions of the `automake' (1.11), `autoconf' (2.68) and `libtool'
+(2.4) programs (the versions we currently use are between parentheses).
+Note that `autoreconf' will likely not work if you have (much) older
+versions of the autotools.
+
+
+File: ape.info, Node: Troubleshooting, Prev: Long instructions, Up: Installation
+
+4.3 Troubleshooting
+===================
+
+So, something went wrong. Here is a list of things that might have gone
+wrong.
+
+ *Some tests of the testsuite fail*: When running the testsuite, one
+or more tests fail.
+
+ * Is the test failing because of a very small numerical difference?
+ While running a test, if a test case is failed, the code will print
+ some extra information about the failure, namely the calculated
+ value, the reference value, and the allowed tolerance. This should
+ look like this:
+
+ Match Failed
+ Calculated value : -24.344302
+ Reference value : -24.344198
+ Difference : 0.000104
+ Tolerance : 8e-5
+ If the difference is slightly larger than the tolerance, like in
+ the previous example, and if the same happens for all the failed
+ test cases, then it is likely that there is nothing wrong with your
+ compilation.
+
+
+ *Could not find GSL library*: We assume that you have already
+installed `GSL' but, for some reason, you were not able to compile the
+code.
+
+ * Did you pass the correct `--with-gsl-prefix' to the configure
+ script? If your library is installed in a non-standard directory
+ (like `/opt/gsl'), you will have to pass the script the location
+ of the library (in this example, you could try `./configure
+ --with-gsl-prefix=/opt/gsl'.
+
+
+ *Could not find `libxc' library*: We assume that you have already
+installed `libxc' but, for some reason, you were not able to compile
+the code.
+
+ * Did you pass the correct `--with-libxc-prefix' to the configure
+ script? If your library is installed in a non-standard directory
+ (like `/opt/libxc'), you will have to pass the script the location
+ of the library (in this example, you could try `./configure
+ --with-libxc-prefix=/opt/libxc'.
+
+ * Did you use the same Fortran compiler when compiling `libxc'?
+ Unfortunately the compilation of Fortran modules generates compiler
+ dependent files (usually with the .mod extension). Since APE uses
+ the Fortran interface of `libxc', it is required that you use the
+ same Fortran compiler for `APE' and `libxc'.
+
+
+ *Error while loading shared libraries*: You have already compiled
+the code, but it fails to run, giving an error message about a failure
+in locating some shared object file.
+
+ * Did you set the `LD_LIBRARY_PATH' environment variable? If some
+ of the libraries used to compile `APE' are installed in a
+ non-standard directory (like `/opt/libxc'), you will have to add
+ the path to the directory where the library objects are installed
+ to the `LD_LIBRARY_PATH' environment variable. If you are using
+ `bash', this is done with the following command:
+
+ export LD_LIBRARY_PATH=/path/to/libxc/lib:$LD_LIBRARY_PATH
+
+
+ *Fatal Error*: Sometimes the code stops after issuing a `Fatal
+Error' message. Here is a list of some of the most common errors and a
+brief explanation of their origin and some possible solutions.
+
+ * _Unable to bracket eigenvalue for state xxx._ This error occurs
+ when the eigensolver is unable to find the eigenvalue for a given
+ orbital. Most of the times this will happen when an occupied
+ orbital becomes unbound.
+
+ * _Generation of pseudopotentials from spin-polarized calculations
+ is not implemented!_ You are trying to generate a pseudopotential
+ from a spin-polarized calculation, but this is not possible in
+ `APE'. Although there are schemes to generate spin-dependent
+ pseudopotentials, for most applications, spin-polarized
+ calculations can be performed using pseudopotentials generated for
+ a spin-unpolarized atom. This is because spin-polarization should
+ come from the valence electrons. Furthermore, spin-dependent
+ pseudopotentials cannot be used in the same way as spin-independent
+ ones and most DFT codes don't know how to handle them.
+
+
+ *Whatever went wrong...*: If something else went wrong, please send
+an e-mail to the APE-users mailing list (ape-users at tddft.org). Note
+that you have to be subscribed to the mailing list in order to be able
+to post a message.
+
+
+File: ape.info, Node: The parser, Next: Input file options, Prev: Installation, Up: Top
+
+5 The parser
+************
+
+All input options should be in a file called "`inp.ape'", in the
+directory `APE' is run from. It is also possible to use a file with a
+different name. In that case the standard input should redirect to that
+file. For example, in `bash':
+ prompt> ape < filename
+ For fairly comprehensive examples, just look at the files in the
+`APE_HOME/samples' directory.
+
+ At the beginning of the program the `oct_parser' library reads the
+`inp.ape' file, parses it, and generates a list of variables that will
+be read by `APE' (note that the input is case independent). There are
+two kind of variables, scalar values (strings or numbers), and blocks
+(that you may view as matrices). A scalar variable `var' can be defined
+by:
+
+ var = exp
+ `var' can contain any alphanumeric character plus "_", and `exp' can
+be a quote delimited string, a number (integer, real, or complex), a
+variable name, or a mathematical expression. In the expressions all
+arithmetic operators are supported ("a+b", "a-b", "a*b", "a/b"; for
+exponentiation the C syntax "a^b" is used), and the following functions
+can be used:
+ * `sqrt(x)': The square root of `x'.
+
+ * `exp(x)': The exponential of `x'.
+
+ * `log(x)' or `ln(x)': The natural logarithm of `x'.
+
+ * `log10(x)': Base 10 logarithm of `x'.
+
+ * `sin(x)', `cos(x)', `tan(x)', `cot(x)', `sec(x)', `csc(x)': The
+ sinus, co-sinus, tangent, co-tangent, secant and co-secant of
+ `x'.
+
+ * `asin(x)', `acos(x)', `atan(x)', `acot(x)', `asec(x)',
+ `acsc(x)': The inverse (arc-) sinus, co-sinus, tangent, co-tangent,
+ secant and co-secant of `x'.
+
+ * `sinh(x)', `cosh(x)', `tanh(x)', `coth(x)', `sech(x)',
+ `csch(x)': The hyperbolic sinus, co-sinus, tangent, co-tangent,
+ secant and co-secant of `x'.
+
+ * `asinh(x)', `acosh(x)', `atanh(x)', `acoth(x)', `asech(x)',
+ `acsch(x)': The inverse hyperbolic sinus, co-sinus, tangent,
+ co-tangent, secant and co-secant of `x'.
+ You can also use any of the predefined variables:
+ * `pi': 3.141592653589793, what else is there to say?
+
+ * `e': The base of the natural logarithms.
+
+ * `false' or `f' or `no': False in all its flavors. For the
+ curious, `false' is defined as 0.
+
+ * `true' or `t' or `yes': The truthful companion of `false'. For the
+ curious, `true' is defined as 1.
+
+ Blocks are defined as a collection of values, organized in row and
+column format. The syntax is the following:
+ %var
+ exp | exp | exp | ...
+ exp | exp | exp | ...
+ ...
+ %
+ Rows in a block are separated by a newline, while columns are
+separated by the character "|" or by a tab. There may be any number of
+lines and any number of columns in a block. Note also that each line
+can have a different number of columns.
+
+ If `APE' tries to read a variable that is not defined in the
+`inp.ape' file, it automatically assigns to it a default value. All
+variables read are output to the file "`parser.log'". If you are not
+sure of what the program is reading, just take a look at it.
+Everything following the character "#" until the end of the line is
+considered a comment and is simply cast into oblivion.
+
+
+File: ape.info, Node: Input file options, Next: Examples, Prev: The parser, Up: Top
+
+6 Input file options
+********************
+
+`APE' has quite a few options, that we will subdivide in different
+groups. After the name of the option, its type and default value (when
+applicable) are given in parenthesis. Do not be scared by the amount of
+options! For many calculations you can safely rely on the default values
+of most of the options.
+
+* Menu:
+
+* Generalities::
+* Hamiltonian::
+* Specie::
+* Pseudopotentials generation::
+* Pseudopotentials tests::
+* SCF::
+* Wave-equations solver::
+* Mesh::
+
+
+File: ape.info, Node: Generalities, Next: Hamiltonian, Prev: Input file options, Up: Input file options
+
+6.1 Generalities
+================
+
+* Menu:
+
+* CalculationMode::
+* Units::
+* UnitsInput::
+* UnitsOutput::
+* Verbose::
+
+
+File: ape.info, Node: CalculationMode, Next: Units, Prev: Generalities, Up: Generalities
+
+6.1.1 `CalculationMode' (flag, ae + pp)
+---------------------------------------
+
+It defines the type of calculation to perform. Options are:
+ - `ae': Atomic calculation.
+
+ - `pp': Pseudopotential generation.
+
+ - `pp_test': Pseudopotential test.
+
+ - `xc': One-shot evaluation of exchange and correlation energies and
+ potentials and/or kinetic energy density functionals.
+
+ - `ip': Calculation of ionization energy.
+
+ - `nt': Numerical tests. Should only be useful to developers.
+
+
+File: ape.info, Node: Units, Next: UnitsOutput, Prev: CalculationMode, Up: Generalities
+
+6.1.2 `Units' (integer, 1)
+--------------------------
+
+Internally, the code works in atomic units. However, you can use this
+option to define the units used in the input and output files.
+
+ Valid options are:
+ - `1': atomic units.
+
+ - `2': atomic Rydberg units.
+
+ - `3': electron-volts/aangstro"m.
+
+
+File: ape.info, Node: UnitsOutput, Next: UnitsInput, Prev: Units, Up: Generalities
+
+6.1.3 `UnitsOutput' (integer, 1)
+--------------------------------
+
+Same as `Units', but only refers to the values in the output files.
+
+
+File: ape.info, Node: UnitsInput, Next: Verbose, Prev: UnitsOutput, Up: Generalities
+
+6.1.4 `UnitsInput' (integer, 1):
+--------------------------------
+
+Same as `Units', but only refers to the values in the input file.
+
+
+File: ape.info, Node: Verbose, Prev: UnitsInput, Up: Generalities
+
+6.1.5 `Verbose' (integer, 30)
+-----------------------------
+
+Verbosity level of the program. The higher, the more verbose `APE' is.
+Current levels are:
+ - `verbose <= 0': Silent mode. No output except fatal errors.
+
+ - `verbose > 0': Warnings only.
+
+ - `verbose > 10': Important program info only.
+
+ - `verbose > 20': Normal program info.
+
+ - `verbose > 30': Normal program info plus detailed info about the
+ SCF cycle.
+
+
+File: ape.info, Node: Hamiltonian, Next: Specie, Prev: Generalities, Up: Input file options
+
+6.2 Hamiltonian
+===============
+
+These parameters control what Hamiltonian to use when solving the
+Khon-Sham equations.
+
+* Menu:
+
+* WaveEquation::
+* SpinMode::
+* XCFunctional::
+* XCCorrections::
+* KEDFunctional::
+* TheoryLevel::
+
+
+File: ape.info, Node: WaveEquation, Next: SpinMode, Prev: Hamiltonian, Up: Hamiltonian
+
+6.2.1 `WaveEquation' (integer, schrodinger)
+-------------------------------------------
+
+When performing atomic calculations `APE' can solve either the
+Kohn-Sham equations, the Dirac-Kohn-Sham equations or the
+scalar-relativistic Khon-Sham equations. Valid options are:
+ - `schrodinger': Kohn-Sham equations.
+
+ - `dirac': Dirac-Kohn-Sham equations.
+
+ - `scalar_rel': scalar-relativistic Kohn-Sham equations.
+
+
+File: ape.info, Node: SpinMode, Next: XCFunctional, Prev: WaveEquation, Up: Hamiltonian
+
+6.2.2 `SpinMode' (integer, unpolarized)
+---------------------------------------
+
+Defines the spin mode `APE' will run in. Valid modes are:
+ - `unpolarized': Spin-unpolarized calculation.
+
+ - `polarized': Spin-polarized calculation.
+
+
+File: ape.info, Node: XCFunctional, Next: XCCorrections, Prev: SpinMode, Up: Hamiltonian
+
+6.2.3 `XCFunctional' (integer, lda_x+lda_c_pw)
+----------------------------------------------
+
+The possible values are (note that, depending on the version of `libxc'
+used, some of the following functionals might not be available):
+ * `none': No exchange-correlation.
+
+ * `lda_x': Slater exchange.
+
+ * `lda_c_wigner': Wigner parametrization.
+
+ * `lda_c_rpa': Random Phase Approximation.
+
+ * `lda_c_hl': Hedin & Lundqvist.
+
+ * `lda_c_gl': Gunnarson & Lundqvist.
+
+ * `lda_c_xalpha': Slater's Xalpha.
+
+ * `lda_c_vwn': Vosko, Wilk, & Nussair.
+
+ * `lda_c_vwn_rpa': Vosko, Wilk, & Nussair (fit to the RPA
+ correlation energy).
+
+ * `lda_c_pz': Perdew & Zunger.
+
+ * `lda_c_pz_mod': Perdew & Zunger (Modified to improve the matching
+ between the high and the low rs region).
+
+ * `lda_c_ob_pz': Ortiz & Ballone (PZ-type parametrization).
+
+ * `lda_c_pw': Perdew & Wang.
+
+ * `lda_c_pw_mod': Perdew & Wang (Modified to match the original PBE
+ routine).
+
+ * `lda_c_ob_pw': Ortiz & Ballone (PW-type parametrization).
+
+ * `lda_c_vbh': von Barth & Hedin.
+
+ * `lda_c_ml1': Modified LSD (version 1) of Proynov and Salahub.
+
+ * `lda_c_ml2': Modified LSD (version 2) of Proynov and Salahub.
+
+ * `lda_xc_teter93': Teter 93.
+
+ * `gga_x_pbe': Perdew, Burke & Ernzerhof.
+
+ * `gga_x_pbe_r': Perdew, Burke & Ernzerhof (revised).
+
+ * `gga_x_p86': Becke 86 Xalpha,beta,gamma.
+
+ * `gga_x_b86_r': Becke 86 Xalpha,beta,gamma reoptimized.
+
+ * `gga_x_b86_mgc': Becke 86 Xalpha,beta,gamma (with mod. grad.
+ correction).
+
+ * `gga_x_b88': Becke 88.
+
+ * `gga_x_g96': Gill 96.
+
+ * `gga_x_pw86': Perdew & Wang 86.
+
+ * `gga_x_pw91': Perdew & Wang 91.
+
+ * `gga_x_optx': Handy & Cohen OPTX 01.
+
+ * `gga_x_dk87_r1': dePristo & Kress 87 (version R1).
+
+ * `gga_x_dk87_r2': dePristo & Kress 87 (version R2).
+
+ * `gga_x_lg93': Lacks & Gordon 93.
+
+ * `gga_x_ft97_a': Filatov & Thiel 97 (version A).
+
+ * `gga_x_ft97_b': Filatov & Thiel 97 (version B).
+
+ * `gga_x_pbe_sol': Perdew, Burke & Ernzerhof exchange (solids).
+
+ * `gga_x_rpbe': Hammer, Hansen & Norskov (PBE-like).
+
+ * `gga_x_wc': Wu & Cohen
+
+ * `gga_x_mpw91': mPW91 of Adamo & Barone.
+
+ * `gga_x_am05': Armiento & Mattsson 05 exchange.
+
+ * `gga_x_pbea': Madsen 07.
+
+ * `gga_x_mpbe': Adamo & Barone modification to PBE.
+
+ * `gga_x_xpbe': Extended PBE by Xu & Goddard III.
+
+ * `gga_x_bayesian': Bayesian best fit for the enhancement factor.
+
+ * `gga_x_pbe_jsjr':
+
+ * `gga_x_optb88_vdw': opt-Becke 88 for vdW.
+
+ * `gga_x_pbek1_vdw': Reparametrized PBE for vdW.
+
+ * `gga_x_optpbe_vdw': Reparametrized PBE for vdW.
+
+ * `gga_x_rge2': Regularized PBE.
+
+ * `gga_c_pbe': Perdew, Burke & Ernzerhof correlation.
+
+ * `gga_c_lyp': Lee, Yang, & Parr LDA.
+
+ * `gga_c_pbe_sol': Perdew, Burke & Ernzerhof correlation SOL.
+
+ * `gga_c_p86': Perdew 86.
+
+ * `gga_c_pw91': Perdew & Wang 91.
+
+ * `gga_c_am05': Armiento & Mattsson 05 correlation.
+
+ * `gga_c_xpbe': Extended PBE by Xu & Goddard III.
+
+ * `gga_c_lm': Langreth & Mehl.
+
+ * `gga_c_pbe_jrgx': Reparametrized PBE by Pedroza, Silva & Capelle.
+
+ * `gga_c_rge2': Regularized PBE.
+
+ * `gga_xc_lb': van Leeuwen & Baerends.
+
+ * `gga_xc_hcth_93': HCTH functional fitted to 93 molecules.
+
+ * `gga_xc_hcth_120': HCTH functional fitted to 120 molecules.
+
+ * `gga_xc_hcth_147': HCTH functional fitted to 147 molecules.
+
+ * `gga_xc_hcth_407': HCTH functional fitted to 407 molecules.
+
+ * `gga_xc_edf1': Empirical functionals from Adamson, Gill, and Pople.
+
+ * `gga_xc_xlyp': XLYP functional.
+
+ * `gga_xc_b97': Becke 97.
+
+ * `gga_xc_b97_1': Becke 97-1.
+
+ * `gga_xc_b97_2': Becke 97-2.
+
+ * `gga_xc_b97_d': Becke 97-D (Grimme functional to be used with C6
+ vdW term).
+
+ * `gga_xc_b97_k': Becke 97-K (Boese-Martin for Kinetics).
+
+ * `gga_xc_b97_3': Becke 97-3.
+
+ * `gga_xc_pbe1w': PBE1W (functional fitted for water).
+
+ * `gga_xc_mpwlyp1w': mPWLYP1w (functional fitted for water).
+
+ * `gga_xc_pbelyp1w': PBELYP1W (functional fitted for water).
+
+ * `gga_xc_sb98_1a': SB98 (1a).
+
+ * `gga_xc_sb98_1b': SB98 (1b).
+
+ * `gga_xc_sb98_1c': SB98 (1c).
+
+ * `gga_xc_sb98_2a': SB98 (2a).
+
+ * `gga_xc_sb98_2b': SB98 (2b).
+
+ * `gga_xc_sb98_2c': SB98 (2c).
+
+ * `mgga_x_bj06': Becke & Johnson 06.
+
+ * `mgga_x_tb09': Tran & Blaha 09.
+
+ * `mgga_x_rpp09': Rasanen, Pittalis & Proetto 09.
+
+
+
+File: ape.info, Node: XCCorrections, Next: KEDFunctional, Prev: XCFunctional, Up: Hamiltonian
+
+6.2.4 `XCCorrections' (integer, none)
+-------------------------------------
+
+The possible values are:
+ * `rel_x': relativistic correction to the exchange functional
+ (implementd only for LDA exchange).
+
+ * `rel_c': relativistic correction to the correlation functional
+ (not yet implemented).
+
+ * `adsic': averaged density self-interaction correction.
+
+
+File: ape.info, Node: KEDFunctional, Next: TheoryLevel, Prev: XCCorrections, Up: Hamiltonian
+
+6.2.5 `KEDFunctional' (integer, none)
+-------------------------------------
+
+Kinetic energy density functional. This is only used when running the
+"xc" calculation mode. For a complete list of available functionals,
+check the `libxc' documentation.
+
+
+File: ape.info, Node: TheoryLevel, Prev: KEDFunctional, Up: Hamiltonian
+
+6.2.6 `TheoryLevel' (integer, dft)
+----------------------------------
+
+The possible values are:
+ * `independent_particles': particles are considered as independent,
+ i.e. as non-interacting.
+
+ * `dft': this is the default density-functional theory scheme.
+
+
+File: ape.info, Node: Specie, Next: Pseudopotentials generation, Prev: Hamiltonian, Up: Input file options
+
+6.3 Specie
+==========
+
+* Menu:
+
+* NuclearCharge::
+* Orbitals::
+
+
+File: ape.info, Node: NuclearCharge, Next: Orbitals, Prev: Specie, Up: Specie
+
+6.3.1 `NuclearCharge' (real)
+----------------------------
+
+Nuclear charge of the specie.
+
+
+File: ape.info, Node: Orbitals, Prev: NuclearCharge, Up: Specie
+
+6.3.2 `Orbitals' (block data)
+-----------------------------
+
+This options sets the electronic configuration of the specie. To each
+line corresponds an orbital, which is defined by some quantum numbers
+and its occupancy.
+
+ The first and second columns are the main quantum number _n_ and the
+angular momentum quantum number _l_. The meaning of the remaining
+columns depends if we are running a fully-relativistic spin-polarized
+calculation or not. In the later case, the remaining columns are used
+to specify the occupancies. One or two columns can be used to specify
+the occupancies and there are four possible cases:
+
+ * The calculation is spin-unpolarized and only the third column is
+ set: the occupancy of the orbital is simply set by the third
+ column.
+
+ * The calculation is spin-unpolarized and the third and fourth
+ columns are set: the occupancy of the orbital is equal to the sum
+ of both columns.
+
+ * The calculation is spin-polarized and only the third column is
+ set: the occupancies of the two spin channels are equal to half the
+ value of the third column.
+
+ * The calculation is spin-polarized and the third and fourth columns
+ are set: the occupancies of the two spin channels are set by the
+ two columns.
+
+
+ When running a fully-relativistic spin-polarized calculation
+(`WaveEquation = dirac' and `SpinMode = polarized'), besides the _n_
+and _l_ quantum numbers, it is also necessary to specify the _m_
+quantum number, which will always be the third column of the block.
+This quantum number runs from _-j_ to _j_, where _j_ can have two
+values: _j = l - 1/2_ and _j = l + 1/2_. This means that, when _|m| <
+l+1/2_ there will be two orbitals with the same _m_ quantum number. To
+differentiate these two orbitals, a fourth quantum number is
+introduced, which can have two values: _up_ or _down_ (these are
+represented in `APE' by _0.5_ and _-0.5_). The meaning of the columns
+beyond the third is thus the following:
+
+ * If _|m| = 2l+1_: the fourth column is just the occupancy.
+
+ * If _|m| < 2l+1_: the fourth column is the occupancy of the _up_
+ orbital and the fifth column is the occupancy of the _down_
+ orbital. If only the fourth column is set, both orbitals are
+ equally occupied with half the specified value.
+
+
+ Note that the occupancies can be set to zero.
+
+ Here is an example for the Lithium ground state electronic
+configuration:
+ %Orbitals
+ 1 | 0 | 1 | 1
+ 2 | 0 | 1 | 0
+ 2 | 1 | 0 | 0
+ %
+ The first column sets the quantum number _n_, the second the quantum
+number _l_ and the last two the occupancies for both spin channels. In
+case of a fully-relativistic spin-polarized calculation, the previous
+example would become:
+ %Orbitals
+ 1 | 0 | -1/2 | 1
+ 1 | 0 | 1/2 | 1
+ 1 | 1 | -1/2 | 1
+ 1 | 1 | 1/2 | 0
+ 2 | 1 | -3/2 | 0
+ 2 | 1 | -1/2 | 0 | 0
+ 2 | 1 | 1/2 | 0 | 0
+ 2 | 1 | 3/2 | 0
+ %
+
+ To make things easier, the core configuration can be replaced by a
+string with the chemical symbol of the rare gas that has the same
+configuration. For example, to run Sodium, it is possible to use the
+following input:
+ %Orbitals
+ "Ne"
+ 3 | 0 | 1
+ %
+
+
+File: ape.info, Node: Pseudopotentials generation, Next: Pseudopotentials tests, Prev: Specie, Up: Input file options
+
+6.4 Pseudopotentials generation
+===============================
+
+* Menu:
+
+* PPComponents::
+* PPCalculationTolerance::
+* PPOutputFileFormat::
+* CoreCorrection::
+* LLocal::
+
+
+File: ape.info, Node: PPComponents, Next: PPCalculationTolerance, Prev: Pseudopotentials generation, Up: Pseudopotentials generation
+
+6.4.1 `PPComponents' (block data)
+---------------------------------
+
+This block sets which pseudopotential components will be generated and
+the corresponding core radii. The first column is the main quantum
+number _n_, the second column is the angular momentum quantum number
+_l_, the one before the last is the core radius, and the last is the
+scheme to be used for constructing the pseudopotentials.
+
+ When generating relativistic pseudopotentials, the third column will
+be the total angular momentum quantum number _j_. Nevertheless, it is
+possible to omit _j_, in which case both _j=l-1/2_ and _j=l+1/2_
+components will use the same core radius.
+
+ Here is an example:
+ %PPComponents
+ 5 | 0 | 1.0 | tm
+ 5 | 1 | 0.5 | 1.4 | tm
+ 5 | 1 | 1.5 | 1.6 | tm
+ 4 | 2 | 2.0 | tm
+ %
+ In this case, the _j=l-1/2_ and _j=l+1/2_ components of _l=1_ will
+have different core radius, while for _l=2_ they will have the same
+core radius.
+
+ Note that it is possible to set the core-radii to zero. In that case,
+`APE' will use some default value that depends on which scheme is used
+for constructing the pseudopotentials. Right now, this feature only
+works with the Hamann scheme. In that case the default core-radius is
+determined using the value of the outermost maximum of the all-electron
+wavefunction. If there are core states present with the same angular
+momentum the default core-radius is equal to 0.6 times the outermost
+maximum. Otherwise, the core radius is 0.4 times the outermost maximum.
+
+ The possible values for the scheme used for constructing the
+pseudopotentials are:
+ - `ham': Hamann scheme.
+
+ - `tm': Troullier-Martins scheme.
+
+ - `rtm': Relativistic extension of the Troullier-Martins scheme.
+
+ - `mrpp': MRPP scheme.
+
+ Note that when using the MRPP scheme, the quantum numbers should
+correspond to a semi-core orbital, i.e., there should be at least
+another orbital with the same _l_ and _j_ quantum numbers, but higher
+in energy.
+
+
+File: ape.info, Node: PPCalculationTolerance, Next: PPOutputFileFormat, Prev: PPComponents, Up: Pseudopotentials generation
+
+6.4.2 `PPCalculationTolerance' (real, 1e-6)
+-------------------------------------------
+
+This tolerance is used during the pseudopotential generation. What it
+does exactly depends on the pseudopotential generation scheme used.
+
+
+File: ape.info, Node: PPOutputFileFormat, Next: CoreCorrection, Prev: PPCalculationTolerance, Up: Pseudopotentials generation
+
+6.4.3 `PPOutputFileFormat' (integer, upf)
+-----------------------------------------
+
+`APE' can write the pseudopotentials in different formats compatible
+with other programs. Programs currently supported are:
+ - `siesta': SIESTA
+ (http://www.uam.es/departamentos/ciencias/fismateriac/siesta/)
+ format.
+
+ - `fhi': fhi98PP (http://www.fhi-berlin.mpg.de/th/fhi98md/fhi98PP/)
+ pseudopotential generator format.
+
+ - `abinit5': ABINIT (http://www.abinit.org) format 5.
+
+ - `abinit6': ABINIT (http://www.abinit.org) format 6.
+
+ - `upf': PWscf (http://www.pwscf.org) unified pseudopotential format.
+
+ - `parsec': parsec (http://parsec.ices.utexas.edu) format. This is
+ basically the SIESTA format plus the pseudo-wavefunctions.
+
+ - `latepp_so' : LATEPP
+ (http://www.fkf.mpg.de/bester/methods/methods.html#LATEPP) format.
+ Spin-orbit difference potentials and respective wavefunctions for
+ the spin-orbit treatment in the LATEPP code.
+
+
+File: ape.info, Node: CoreCorrection, Next: LLocal, Prev: PPOutputFileFormat, Up: Pseudopotentials generation
+
+6.4.4 `CoreCorrection' (integer, 1)
+-----------------------------------
+
+Scheme for constructing the partial core density. Possible values are:
+ - `0': no non-linear core corrections.
+
+ - `1': scheme implemented in Jose' Luis Martins atom code.
+
+ - `2': scheme implemented in the fhi98PP code.
+
+
+File: ape.info, Node: LLocal, Prev: CoreCorrection, Up: Pseudopotentials generation
+
+6.4.5 `LLocal' (integer, -1)
+----------------------------
+
+Angular momentum component of the pseudo-potentential to take as local
+component when building the Kleinman-Bylander projectros. If set to -1
+a Vanderbilt function is used.
+
+
+File: ape.info, Node: Pseudopotentials tests, Next: Mesh, Prev: Pseudopotentials generation, Up: Input file options
+
+6.5 Pseudopotentials tests
+==========================
+
+* Menu:
+
+* PPTests::
+* PPTestSCF::
+* PPTestOrbitals::
+* PPTestAEDir::
+* LogDerivativeRadius::
+* LogDerivativeEnergyMax::
+* LogDerivativeEnergyMin::
+* LogDerivativeEnergyStep::
+
+
+File: ape.info, Node: PPTests, Next: PPTestSCF, Prev: Pseudopotentials tests, Up: Pseudopotentials tests
+
+6.5.1 `PPTests' (integer, ld+dm)
+--------------------------------
+
+What tests should be performed. Possible values are:
+ - `ld': logarithmic derivatives.
+
+ - `dm': transition dipole moments.
+
+ - `ip_test': ionization potentials.
+
+
+File: ape.info, Node: PPTestSCF, Next: PPTestOrbitals, Prev: PPTests, Up: Pseudopotentials tests
+
+6.5.2 `PPTestSCF' (logical, false)
+----------------------------------
+
+If set to "yes", run a SCF calculation for the pseudostates before
+performing the tests.
+
+
+File: ape.info, Node: PPTestOrbitals, Next: PPTestAEDir, Prev: PPTestSCF, Up: Pseudopotentials tests
+
+6.5.3 `PPTestOrbitals' (block date)
+-----------------------------------
+
+Orbitals configuration to be used for the SCF calculation performed when
+PPTestSCF is set ot "yes". This allows to change the occupancies of the
+valence states or to add other states to be tested.
+
+
+File: ape.info, Node: PPTestAEDir, Next: LogDerivativeRadius, Prev: PPTestOrbitals, Up: Pseudopotentials tests
+
+6.5.4 `PPTestAEDir' (string, "ae")
+----------------------------------
+
+Directory where to find the all-electron calculations that should be
+used during the tests. The default is the "ae" directory.
+
+
+File: ape.info, Node: LogDerivativeRadius, Next: LogDerivativeEnergyMax, Prev: PPTestAEDir, Up: Pseudopotentials tests
+
+6.5.5 `LogDerivativeRadius' (real, 0.0)
+---------------------------------------
+
+Diagnostic radius where the logarithmic derivatives are computed. If
+set to zero, `APE' will use the element covalent radius.
+
+
+File: ape.info, Node: LogDerivativeEnergyMax, Next: LogDerivativeEnergyMin, Prev: LogDerivativeRadius, Up: Pseudopotentials tests
+
+6.5.6 `LogDerivativeEnergyMax' (real)
+-------------------------------------
+
+Upper bound of the energy interval where the logarithmic derivatives
+are computed. If it is not set, then the value to be used will be equal
+to the largest eigenvalue plus 1 a.u.
+
+
+File: ape.info, Node: LogDerivativeEnergyMin, Next: LogDerivativeEnergyStep, Prev: LogDerivativeEnergyMax, Up: Pseudopotentials tests
+
+6.5.7 `LogDerivativeEnergyMin' (real)
+-------------------------------------
+
+Lower bound of the energy interval where the logarithmic derivatives
+are computed. If it is not set, then the value to be used will be equal
+to the smallest eigenvalue minus 1 a.u.
+
+
+File: ape.info, Node: LogDerivativeEnergyStep, Prev: LogDerivativeEnergyMin, Up: Pseudopotentials tests
+
+6.5.8 `LogDerivativeEnergyStep' (real, 0.0 a.u.)
+------------------------------------------------
+
+Step in energy interval. If set to zero, an adaptive step will be used.
+
+
+File: ape.info, Node: Mesh, Next: SCF, Prev: Pseudopotentials tests, Up: Input file options
+
+6.6 Mesh
+========
+
+`APE' uses a mesh to store functions. In order to change the mesh
+parameters you can use the following options:
+
+* Menu:
+
+* MeshType::
+* MeshStartingPoint::
+* MeshOutmostPoint::
+* MeshNumberOfPoints::
+* MeshDerivMethod::
+* MeshFiniteDiffOrder::
+
+
+File: ape.info, Node: MeshType, Next: MeshStartingPoint, Prev: Mesh, Up: Mesh
+
+6.6.1 `MeshType' (inteager, log1)
+---------------------------------
+
+Possible values are:
+ - `lin': Linear
+
+ - `log1': Logarithmic [ri = b*exp(a*i)]
+
+ - `log2': Logarithmic [ri = b*(exp(a*i) - 1)]
+
+
+File: ape.info, Node: MeshStartingPoint, Next: MeshOutmostPoint, Prev: MeshType, Up: Mesh
+
+6.6.2 `MeshStartingPoint' (real, sqrt(NuclearCharge)*1e-5 a.u.)
+---------------------------------------------------------------
+
+Sets the starting point of the mesh.
+
+
+File: ape.info, Node: MeshOutmostPoint, Next: MeshNumberOfPoints, Prev: MeshStartingPoint, Up: Mesh
+
+6.6.3 `MeshOutmostPoint' (real, sqrt(NuclearCharge)*30 a.u.)
+------------------------------------------------------------
+
+Sets the outmost point of the mesh.
+
+
+File: ape.info, Node: MeshNumberOfPoints, Next: MeshDerivMethod, Prev: MeshOutmostPoint, Up: Mesh
+
+6.6.4 `MeshNumberOfPoints' (integer, sqrt(NuclearCharge)*200)
+-------------------------------------------------------------
+
+Sets the mesh number of points.
+
+
+File: ape.info, Node: MeshDerivMethod, Next: MeshFiniteDiffOrder, Prev: MeshNumberOfPoints, Up: Mesh
+
+6.6.5 `MeshDerivMethod' (int, cubic_spline)
+-------------------------------------------
+
+Numerical method used to compute derivatives. Possible choices are:
+ - `cubic_spline': Use cubic splines to interpolate the function and
+ then uses this interpolation to compute the derivatives.
+
+ - `finite_diff': Finite differences. The number of points used is
+ controled by the `MeshFiniteDiffOrder' variable.
+
+
+File: ape.info, Node: MeshFiniteDiffOrder, Prev: MeshDerivMethod, Up: Mesh
+
+6.6.6 `MeshFiniteDiffOrder' (int, 4)
+------------------------------------
+
+This variable controls the numbers of points used for the finite
+differences discretization. To compute the derivative at a given point,
+the finite difference formula will use `MeshFiniteDiffOrder' points to
+the left and `MeshFiniteDiffOrder' points to the right. This means that
+in total `MeshFiniteDiffOrder'*2 + 1 points will be used.
+
+
+File: ape.info, Node: SCF, Next: Wave-equations solver, Prev: Mesh, Up: Input file options
+
+6.7 SCF
+=======
+
+The self consistent field procedure will stop when one of the
+convergence criteria is fulfilled. At each iteration the new guess
+potential is built mixing the input and output potentials.
+
+* Menu:
+
+* MaximumIter::
+* ConvAbsDens::
+* ConvRelDens::
+* ConvAbsEnergy::
+* ConvRelEnergy::
+* SmearingFunction::
+* MixingScheme::
+* Mixing::
+* MixNumberSteps::
+
+
+File: ape.info, Node: MaximumIter, Next: ConvAbsDens, Prev: SCF, Up: SCF
+
+6.7.1 `MaximumIter' (integer, 300)
+----------------------------------
+
+Maximum number of SCF iterations. When that number is reached the SCF
+procedure will stop, even if none of the criteria are fulfilled, and
+the calculation will continue as normal. `0' means unlimited.
+
+
+File: ape.info, Node: ConvAbsDens, Next: ConvRelDens, Prev: MaximumIter, Up: SCF
+
+6.7.2 `ConvAbsDens' (real, 0.0)
+-------------------------------
+
+Absolute convergence of the density. `0' means do not use this
+criterion.
+
+
+File: ape.info, Node: ConvRelDens, Next: ConvAbsEnergy, Prev: ConvAbsDens, Up: SCF
+
+6.7.3 `ConvRelDens' (real, 1e-8)
+--------------------------------
+
+Relative convergence of the density. `0' means do not use this
+criterion.
+
+
+File: ape.info, Node: ConvAbsEnergy, Next: ConvRelEnergy, Prev: ConvRelDens, Up: SCF
+
+6.7.4 `ConvAbsEnergy' (real, 0.0)
+---------------------------------
+
+Absolute convergence of the total energy. `0' means do not use this
+criterion.
+
+
+File: ape.info, Node: ConvRelEnergy, Next: SmearingFunction, Prev: ConvAbsEnergy, Up: SCF
+
+6.7.5 `ConvRelEnergy' (real, 0.0)
+---------------------------------
+
+Relative convergence of the total energy. `0' means do not use this
+criterion.
+
+
+File: ape.info, Node: SmearingFunction, Next: MixingScheme, Prev: ConvRelEnergy, Up: SCF
+
+6.7.6 `SmearingFunction' (integer, fixed_occ)
+---------------------------------------------
+
+Select how the states should be occupied. The option are:
+ - `fixed_occ': the occupancies of the states are fixed.
+
+ - `semiconducting': semiconducting occupancies, i.e., the lowest
+ lying states are occupied until no more electrons are left
+
+ - `averill_painter': F.W. Averill and G.S. Painter, Phys. Rev. B 46,
+ 2498 (1992)
+
+
+File: ape.info, Node: MixingScheme, Next: Mixing, Prev: SmearingFunction, Up: SCF
+
+6.7.7 `MixingScheme' (integer, broyden)
+---------------------------------------
+
+Selects the mixing procedure to be used during the SCF cycle. Possible
+values are:
+
+ - `linear': Linear mixing.
+
+ - `broyden': Broyden mixing.
+
+
+File: ape.info, Node: Mixing, Next: MixNumberSteps, Prev: MixingScheme, Up: SCF
+
+6.7.8 `Mixing' (real, 0.3)
+--------------------------
+
+Determines the amount of the new potential which is to be mixed with the
+old one.
+
+
+File: ape.info, Node: MixNumberSteps, Prev: Mixing, Up: SCF
+
+6.7.9 `MixNumberSteps' (integer, 3)
+-----------------------------------
+
+Number of steps used by Broyden mixing to extrapolate the new potential.
+
+
+File: ape.info, Node: Wave-equations solver, Prev: SCF, Up: Input file options
+
+6.8 Wave-equations solver
+=========================
+
+`APE' solves the Schrodinger and Dirac equations using the ODE solver
+from GSL.
+
+* Menu:
+
+* EigenSolverTolerance::
+* ODEIntTolerance::
+* ODESteppingFunction::
+* ODEMaxSteps::
+
+
+File: ape.info, Node: EigenSolverTolerance, Next: ODEIntTolerance, Prev: Wave-equations solver, Up: Wave-equations solver
+
+6.8.1 `EigenSolverTolerance' (real, 1.0e-8 a.u.)
+------------------------------------------------
+
+The eigensolver will improve the eigenvalues untill the error estimate
+of each eigenvalue is smaller than this tolerance.
+
+
+File: ape.info, Node: ODEIntTolerance, Next: ODESteppingFunction, Prev: EigenSolverTolerance, Up: Wave-equations solver
+
+6.8.2 `ODEIntTolerance' (real, 1.0e-12)
+---------------------------------------
+
+
+File: ape.info, Node: ODESteppingFunction, Next: ODEMaxSteps, Prev: ODEIntTolerance, Up: Wave-equations solver
+
+6.8.3 `ODESteppingFunction' (integer, rkpd8)
+--------------------------------------------
+
+Possible values are:
+ - `rk2': Embedded 2nd order Runge-Kutta method
+
+ - `rk4': 4th order (classical) Runge-Kutta method
+
+ - `rkf4': Embedded 4th order Runge-Kutta-Fehlberg method
+
+ - `rkck4': Embedded 4th order Runge-Kutta Cash-Karp method
+
+ - `rkpd8': Embedded 8th order Runge-Kutta Prince-Dormand method
+ For more information about the stepping functions please refer to
+the GSL documentation.
+
+
+File: ape.info, Node: ODEMaxSteps, Prev: ODESteppingFunction, Up: Wave-equations solver
+
+6.8.4 `ODEMaxSteps' (integer, 500000)
+-------------------------------------
+
+Sometimes it may happen that the ODE solver takes too many steps,
+because of some problem. To avoid that, `APE' will issue a fatal error
+if the number of steps is greater than `ODEMaxSteps'.
+
+
+File: ape.info, Node: Examples, Next: Options Index, Prev: Input file options, Up: Top
+
+7 Examples
+**********
+
+* Menu:
+
+* Lithium::
+
+
+File: ape.info, Node: Lithium, Prev: Examples, Up: Examples
+
+7.1 Lithium
+===========
+
+As a first example, we will take a Lithium atom. Using a text editor,
+create the following input "inp.ape":
+
+ Title = "Lithium"
+ CalculationMode = ae
+ Verbose = 30
+
+ NuclearCharge = 3
+
+ %Orbitals
+ "He"
+ 2 | 0 | 1
+ 2 | 1 | 0
+ %
+
+ Then run `APE'. The output should look like this:
+
+ APE - Atomic Pseudopotentials Engine
+
+ Program started on 2012/06/20 at 12:01:41
+
+ Compilation Info
+ Version: 2.x
+ Revision:
+ Build time: Wed Jun 20 12:00:49 WEST 2012
+ C compiler: gcc
+ C compiler flags: -g -O2 -I/usr/include
+ Fortran compiler: gfortran
+ Fortran compiler flags: -Wall -fbounds-check
+
+ Calculation Type:
+ Atomic Calculation
+
+ Setting units
+ Input units system: Atomic Units
+ Output units system: Atomic Units
+
+ Eigensolver Info
+ Method: Brent's method
+ Tolerance: 1.000E-08
+
+
+ -- All Electron Calculation --
+
+ Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+ General Information about the atom:
+ Symbol: Li
+ Theory Level: DFT
+ Wave-equation: Schrodinger
+ Spin mode: unpolarized
+ Nuclear charge: 3.00
+ Total charge: 0.00
+ Configuration : State Occupation
+ 1s 2.00
+ 2s 1.00
+ 2p 0.00
+
+ Exchange-Correlation model:
+ Correlation: Perdew & Wang (LDA)
+ Exchange: Slater exchange (LDA)
+
+ Mesh information:
+ Type: logarithmic [ri = b*exp(a*i)]
+ Mesh starting point: 1.73E-05 b
+ Mesh outmost point: 51.962 b
+ Mesh parameters (a, b): 7.49453E-02, 1.60699E-05
+ Mesh number of points: 200
+ Derivatives Method: Cubic slines
+
+ Starting SCF process
+ Convergence tolerance: ConvAbsDens ConvRelDens
+ 0.000E+00 1.000E-08
+ ConvAbsEnergy ConvRelEnergy
+ 0.000E+00 0.000E+00
+ Smearing: fixed occupancies
+ Maximum number of iterations: 300
+ Mixing scheme: Modified Broyden's Method
+ Mixing: 0.300
+
+ Performing SCF Cycle
+
+ Final results for SCF procedure:
+
+ Program finished on 2012/06/20 at 12:01:42
+
+ Now take a look at the working directory. It should include the
+following files and directories:
+
+ drwxrwxr-x 2 user group 4096 2012-06-20 12:01 ae
+ -rw-rw-r-- 1 user group 198 2012-06-20 12:01 inp.ape
+ -rw-rw-r-- 1 user group 1022 2012-06-20 12:01 parser.log
+
+ Besides the inp.ape and parser.log files there is now a new
+directory named `ae'. In that directory you will find the following
+files:
+
+ -rw-r--r-- 1 user group 24885 2012-06-20 12:01 data
+ -rw-r--r-- 1 user group 14665 2012-06-20 12:01 density
+ -rw-r--r-- 1 user group 1549 2012-06-20 12:01 info
+ -rw-r--r-- 1 user group 7396 2012-06-20 12:01 tau
+ -rw-r--r-- 1 user group 7567 2012-06-20 12:01 v_c
+ -rw-r--r-- 1 user group 7361 2012-06-20 12:01 v_ext
+ -rw-r--r-- 1 user group 7361 2012-06-20 12:01 v_hxc
+ -rw-r--r-- 1 user group 7567 2012-06-20 12:01 v_x
+ -rw-r--r-- 1 user group 10938 2012-06-20 12:01 wf-1s
+ -rw-r--r-- 1 user group 10938 2012-06-20 12:01 wf-2p
+ -rw-r--r-- 1 user group 10966 2012-06-20 12:01 wf-2s
+
+ The file `data' is a binary file containing the all-electron
+calculation data. This file is necessary if you want to generate
+pseudopotentials without having to solve again the all-electron
+equations. The file `info' contains some information about the
+all-electron calculation and it should be self-explanatory. The files
+`density' and `tau' contain the eletronic density and the kinetic
+energy density in a format suitable for plotting. The files whose name
+start with `v_' contain the different components of the Kohn-Sham
+potential. Finally, the `wf' files contain the radial wavefuntions.
+
+ Next we will generate some pseudopotentials using the Hamann scheme.
+Create the following "inp.ape" file:
+
+ Title = "Lithium"
+ CalculationMode = pp
+ Verbose = 30
+
+ %PPComponents
+ 2 | 0 | 0.00 | ham
+ 2 | 1 | 0.00 | ham
+ %
+
+ This time the output should look like this:
+
+
+ APE - Atomic Pseudopotentials Engine
+
+ Program started on 2012/06/20 at 12:06:13
+
+ Compilation Info
+ Version: 2.x
+ Revision:
+ Build time: Wed Jun 20 12:00:49 WEST 2012
+ C compiler: gcc
+ C compiler flags: -g -O2 -I/usr/include
+ Fortran compiler: gfortran
+ Fortran compiler flags: -Wall -fbounds-check
+
+ Calculation Type:
+ PseudoPotential Generation
+
+ Setting units
+ Input units system: Atomic Units
+ Output units system: Atomic Units
+
+ Eigensolver Info
+ Method: Brent's method
+ Tolerance: 1.000E-08
+
+ Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+
+ -- Pseudopotential Generation --
+
+ Pseudo atom information:
+ Wavefunction info:
+ State Occupation Node radius Peak radius Default core radius
+ 2s 1.00 0.842 3.012 1.807
+ 2p 0.00 0.000 3.771 1.509
+
+ Pseudopotential Generation:
+ State: 2s
+ Scheme: Hamann
+ Core radius: 1.807 Matching Radius: 5.486
+ cl = 0.1270413205
+ State: 2p
+ Scheme: Hamann
+ Core radius: 1.509 Matching Radius: 4.381
+ cl = -0.9176124519
+
+ Pseudopotentials Self-Consistency:
+ State Eigenvalue [H ] Norm Test Slope Test
+ 2s -0.10560 1.0000049 0.9999925
+ 2p -0.04140 0.9998835 0.9998173
+
+ Kleinman & Bylander Atom
+ Local potential is a Vanderbilt function
+ z rcmax v0 v1 v2 v3
+ 1.00 5.09 -0.491383 -0.057906 0.001118 -0.000010
+ Non-local components:
+ State KB Energy [H ] KB Cosine
+ 2s 1.0840 0.0761
+ 2p -0.4609 -0.2732
+
+ Ghost state analysis:
+ State: 2s
+ KB energy > 0; E0 < Eref < E1 => No ghost states
+ Local potential eigenvalues: -0.1215 (E0) -0.0050 (E1)
+ Reference energy: -0.1056 (Eref)
+ State: 2p
+ KB energy < 0; Eref < E0 => No ghost states
+ Local potential eigenvalues: -0.0248 (E0) 0.0000 (E1)
+ Reference energy: -0.0414 (Eref)
+
+ Localization radii [b]:
+ Local: 3.77
+ l = 0: 4.06
+ l = 1: 3.77
+
+ Program finished on 2012/06/20 at 12:06:14
+
+ At the end of the run there should be a new file named `Li.UPF' and
+two new directories named `pp' and `kb' in the working directory. The
+file `Li.UPF' contains the pseudopotential information in the `PWscf'
+unified pseudopotential format. The `pp' directory should include the
+following files:
+
+ -rw-r--r-- 1 user group 26463 2012-06-20 12:06 data
+ -rw-r--r-- 1 user group 14665 2012-06-20 12:06 density
+ -rw-r--r-- 1 user group 696 2012-06-20 12:06 info
+ -rw-r--r-- 1 user group 7361 2012-06-20 12:06 pp-p
+ -rw-r--r-- 1 user group 7361 2012-06-20 12:06 pp-s
+ -rw-r--r-- 1 user group 7396 2012-06-20 12:06 tau
+ -rw-r--r-- 1 user group 7567 2012-06-20 12:06 v_c
+ -rw-r--r-- 1 user group 7361 2012-06-20 12:06 v_hxc
+ -rw-r--r-- 1 user group 7567 2012-06-20 12:06 v_x
+ -rw-r--r-- 1 user group 10938 2012-06-20 12:06 wf-2p
+ -rw-r--r-- 1 user group 10938 2012-06-20 12:06 wf-2s
+
+ The file `data' is a binary file containing the pseudopotential
+calculation data. This file is necessary if you want to perform further
+tests on the pseudopotential transferability. The file `info' contains
+some information about the pseudopotential generation and it should be
+self-explanatory. The files `density' and `tau' contain the valence
+eletronic density and kinetic energy density in a format suitable for
+plotting. The `wf' files contain the radial pseudo-wavefuntions and the
+`pp' files contain the ionic pseudopotentials. Finally, the files whose
+name start with `v_' contain the different components of the Kohn-Sham
+potential evaluated for the pseudo valence states.
+
+ As for the `kb' directory should include the following files:
+
+ -rw-r--r-- 1 user group 819 2012-06-20 12:06 info
+ -rw-r--r-- 1 user group 7361 2012-06-20 12:06 kb-local
+ -rw-r--r-- 1 user group 7364 2012-06-20 12:06 kb-p
+ -rw-r--r-- 1 user group 7364 2012-06-20 12:06 kb-s
+
+ The `info' contains some information about the Kleinman-Bylander
+projectors and it should be self-explanatory. The file `kb-local'
+contains the local component used to generated the Kleinman-Bylander
+projectors, while the other `kb' files contain the projectors.
+
+ After generating the pseudopotentials, one should test them. One
+simple test is to compare the logarithmic derivative of the
+wavefunctions as a function of the orbital energy at a given diagnostic
+radius. The following input file will to precisely that:
+
+ Title = "Lithium"
+ CalculationMode = pp_test
+ Verbose = 30
+
+ PPTests = ld
+
+ In this case the output should look like this:
+
+ APE - Atomic Pseudopotentials Engine
+
+ Program started on 2012/06/20 at 13:55:25
+
+ Compilation Info
+ Version: 2.x
+ Revision:
+ Build time: Wed Jun 20 12:00:49 WEST 2012
+ C compiler: gcc
+ C compiler flags: -g -O2 -I/usr/include
+ Fortran compiler: gfortran
+ Fortran compiler flags: -Wall -fbounds-check
+
+ Calculation Type:
+ PseudoPotential Test
+
+ Setting units
+ Input units system: Atomic Units
+ Output units system: Atomic Units
+
+ Eigensolver Info
+ Method: Brent's method
+ Tolerance: 1.000E-08
+
+ Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+
+ -- Pseudopotential Testing --
+
+ Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+ Logarithmic Derivatives:
+ Diagnostic radius: 2.320 b
+ Energy step: Adaptive
+ Computing logarithmic derivative for states: s
+ Minimum energy: -1.106 H
+ Maximum energy: 0.894 H
+ Computing logarithmic derivative for states: p
+ Minimum energy: -1.041 H
+ Maximum energy: 0.959 H
+
+ Program finished on 2012/06/20 at 13:55:25
+
+ Notice that the choice of energy range and diagnostic radius was done
+automatically (check the description of the corresponding variable for
+more information about how this is done). At the end of the run there
+should be a new directory named `tests'. This directory should contain
+the following files:
+
+ -rw-r--r-- 1 user group 297 2012-06-20 13:55 info
+ -rw-r--r-- 1 user group 3916 2012-06-20 13:55 ld-p
+ -rw-r--r-- 1 user group 3700 2012-06-20 13:55 ld-s
+
+ The file `info' contains some information about the tests and it
+should be self-explanatory. The files `ld-' contain the all-electron
+and pseudo wavefunction logarithmic derivatives as a function of the
+orbital energy.
+
+
+File: ape.info, Node: Options Index, Prev: Examples, Up: Top
+
+Options Index
+*************
+
+ [index ]
+* Menu:
+
+* CalculationMode: CalculationMode. (line 6)
+* ConvAbsDens: ConvAbsDens. (line 6)
+* ConvAbsEnergy: ConvAbsEnergy. (line 6)
+* ConvRelDens: ConvRelDens. (line 6)
+* ConvRelEnergy: ConvRelEnergy. (line 6)
+* CoreCorrection: CoreCorrection. (line 6)
+* EigenSolverTolerance: EigenSolverTolerance. (line 6)
+* KEDFunctional: KEDFunctional. (line 6)
+* LLocal: LLocal. (line 6)
+* LogDerivativeEnergyMax: LogDerivativeEnergyMax.
+ (line 6)
+* LogDerivativeEnergyMin: LogDerivativeEnergyMin.
+ (line 6)
+* LogDerivativeEnergyStep: LogDerivativeEnergyStep.
+ (line 6)
+* LogDerivativeRadius: LogDerivativeRadius. (line 6)
+* MaximunIter: MaximumIter. (line 6)
+* MaxSteps: ODEMaxSteps. (line 6)
+* MeshDerivMethod: MeshDerivMethod. (line 6)
+* MeshFiniteDiffOrder: MeshFiniteDiffOrder. (line 6)
+* MeshNumberOfPoints: MeshNumberOfPoints. (line 6)
+* MeshOutmostPoint: MeshOutmostPoint. (line 6)
+* MeshStartingPoint: MeshStartingPoint. (line 6)
+* MeshType: MeshType. (line 6)
+* Mixing: Mixing. (line 6)
+* MixingScheme: MixingScheme. (line 6)
+* MixNumberSteps: MixNumberSteps. (line 6)
+* NuclearCharge: NuclearCharge. (line 6)
+* ODEIntTolerance: ODEIntTolerance. (line 6)
+* ODESteppingFunction: ODESteppingFunction. (line 6)
+* Orbitals: Orbitals. (line 6)
+* PPCalculationTolerance: PPCalculationTolerance.
+ (line 6)
+* PPComponents: PPComponents. (line 6)
+* PPOutputFileFormat: PPOutputFileFormat. (line 6)
+* PPTestAEDir: PPTestAEDir. (line 6)
+* PPTestOrbitals: PPTestOrbitals. (line 6)
+* PPTests: PPTests. (line 6)
+* PPTestSCF: PPTestSCF. (line 6)
+* SmearingFunction: SmearingFunction. (line 6)
+* SpinMode: SpinMode. (line 6)
+* TheoryLevel: TheoryLevel. (line 6)
+* Units: Units. (line 6)
+* UnitsInput: UnitsInput. (line 6)
+* UnitsOutput: UnitsOutput. (line 6)
+* Verbose: Verbose. (line 6)
+* WaveEquation: WaveEquation. (line 6)
+* XCCorrections: XCCorrections. (line 6)
+* XCFunctional: XCFunctional. (line 6)
+
+
+
+Tag Table:
+Node: Top759
+Node: Copying2670
+Node: Authors4063
+Node: Introduction4569
+Node: Installation5369
+Node: Quick instructions5564
+Node: Long instructions5971
+Ref: Long instructions-Footnote-110848
+Node: Troubleshooting11352
+Node: The parser15630
+Node: Input file options18910
+Node: Generalities19508
+Node: CalculationMode19737
+Node: Units20329
+Node: UnitsOutput20731
+Node: UnitsInput20957
+Node: Verbose21183
+Node: Hamiltonian21696
+Node: WaveEquation22025
+Node: SpinMode22534
+Node: XCFunctional22866
+Node: XCCorrections27349
+Node: KEDFunctional27817
+Node: TheoryLevel28168
+Node: Specie28511
+Node: NuclearCharge28689
+Node: Orbitals28864
+Node: Pseudopotentials generation32212
+Node: PPComponents32509
+Node: PPCalculationTolerance34652
+Node: PPOutputFileFormat35011
+Node: CoreCorrection36113
+Node: LLocal36531
+Node: Pseudopotentials tests36854
+Node: PPTests37209
+Node: PPTestSCF37557
+Node: PPTestOrbitals37822
+Node: PPTestAEDir38201
+Node: LogDerivativeRadius38518
+Node: LogDerivativeEnergyMax38853
+Node: LogDerivativeEnergyMin39247
+Node: LogDerivativeEnergyStep39647
+Node: Mesh39929
+Node: MeshType40293
+Node: MeshStartingPoint40583
+Node: MeshOutmostPoint40847
+Node: MeshNumberOfPoints41114
+Node: MeshDerivMethod41377
+Node: MeshFiniteDiffOrder41900
+Node: SCF42395
+Node: MaximumIter42861
+Node: ConvAbsDens43214
+Node: ConvRelDens43442
+Node: ConvAbsEnergy43674
+Node: ConvRelEnergy43915
+Node: SmearingFunction44161
+Node: MixingScheme44691
+Node: Mixing45009
+Node: MixNumberSteps45234
+Node: Wave-equations solver45447
+Node: EigenSolverTolerance45761
+Node: ODEIntTolerance46112
+Node: ODESteppingFunction46320
+Node: ODEMaxSteps46939
+Node: Examples47302
+Node: Lithium47441
+Node: Options Index59810
+
+End Tag Table
diff --git a/doc/ape.texi b/doc/ape.texi
new file mode 100644
index 0000000..fe09416
--- /dev/null
+++ b/doc/ape.texi
@@ -0,0 +1,1813 @@
+\input texinfo @c -*-texinfo-*-
+ at c %**start of header
+ at setfilename ape.info
+ at settitle the @code{APE} manual
+ at c %**end of header
+
+ at c This is to install APE into the info main tree.
+ at dircategory Individual utilities
+ at direntry
+* APE: (APE). The APE program.
+ at end direntry
+
+
+ at copying
+This manual is for APE (Atomic Pseudopotentials Engine) 2.2.0, a
+density functional theory atomic program and pseudopotentials
+generator.
+
+Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
+Micael Oliveira and Fernando Nogueira
+
+
+
+
+ at quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation.
+ at end quotation
+ at end copying
+
+
+
+
+ at titlepage
+
+ at title the @code{APE} manual
+ at subtitle Atomic calculations
+ at subtitle Pseudopotentials generation
+ at subtitle August 2013
+ at sp 4
+
+ at sp 2
+ at author By Micael Oliveira and Fernando Nogueira.
+
+Coimbra (Portugal)
+
+ at page
+ at vskip 0pt plus 1filll
+ at insertcopying
+ at end titlepage
+
+
+
+
+
+ at iftex
+ at headings off
+ at evenheading @thispage{} @| @thistitle @|
+ at oddheading @| @thischapter @| @thispage{}
+ at end iftex
+
+
+
+ at ifnottex
+ at node Top, Copying, (dir), (dir)
+ at top ape
+ at insertcopying
+ at end ifnottex
+
+
+ at menu
+* Copying::
+* Authors::
+* Introduction::
+* Installation::
+* The parser::
+* Input file options::
+* Examples::
+* Options Index::
+
+ at detailmenu
+ --- The Detailed Node Listing ---
+
+Introduction
+
+
+Installation
+
+* Quick instructions::
+* Long instructions::
+* Troubleshooting::
+
+Input file options
+
+* Generalities::
+* Hamiltonian::
+* Specie::
+* Pseudopotentials generation::
+* Mesh::
+* SCF::
+* Wave-equations solver::
+
+Generalities
+
+* CalculationMode::
+* Units::
+* UnitsOutput::
+* UnitsInput::
+* Verbose::
+
+Hamiltonian
+
+* WaveEquation::
+* SpinMode::
+* XCFunctional::
+* XCCorrections::
+
+Specie
+
+* NuclearCharge::
+* Orbitals::
+
+Pseudopotentials generation
+
+* PPComponents::
+* PPCalculationTolerance::
+* PPOutputFileFormat::
+* CoreCorrection::
+* LLocal::
+
+Pseudopotentials tests
+
+* PPTests::
+* PPTestSCF::
+* PPTestOrbitals::
+* PPTestAEDir::
+* LogDerivativeRadius::
+* LogDerivativeEnergyMax::
+* LogDerivativeEnergyMin::
+* LogDerivativeEnergyStep::
+
+Mesh
+
+* MeshType::
+* MeshStartingPoint::
+* MeshOutmostPoint::
+* MeshNumberOfPoints::
+* MeshDerivMethod::
+* MeshFiniteDiffOrder::
+
+SCF
+
+* MaximumIter::
+* ConvAbsDens::
+* ConvRelDens::
+* ConvAbsEnergy::
+* ConvRelEnergy::
+* SmearingFunction::
+* MixingScheme::
+* Mixing::
+* MixNumberSteps::
+
+Wave-equations solver
+
+* EigenSolverTolerance::
+* ODEIntTolerance::
+* ODESteppingFunction::
+* ODEMaxSteps::
+
+Examples
+
+* Lithium::
+
+
+ at end detailmenu
+ at end menu
+
+ at c ***************THE BODY OF THE DOCUMENT*******************************
+
+ at c ***************COPYING************************************************
+ at node Copying, Authors, Top, Top
+ at chapter Copying
+
+This program is ``free''; this means that everyone is free to use it and
+free to redistribute it on a free basis. What is not allowed is to try
+to prevent others from further sharing any version of this program that
+they might get from you.
+
+Specifically, we want to make sure that you have the right to give away
+copies of the program, that you receive source code or else can get it
+if you want it, that you can change this program or use pieces of them
+in new free programs, and that you know you can do these things.
+
+To make sure that everyone has such rights, we have to forbid you to
+deprive anyone else of these rights. For example, if you distribute
+copies of the program, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must tell them their rights.
+
+Also, for our own protection, we must make certain that everyone finds
+out that there is no warranty for this program. If these programs are
+modified by someone else and passed on, we want their recipients to know
+that what they have is not what we distributed, so that any problems
+introduced by others will not reflect on our reputation.
+
+The precise conditions of the license are found in the General Public
+Licenses that accompany it.
+
+ at c ********************AUTHORS, COLLABORATORS AND ACKNOWLEDGMENTS*******
+ at node Authors, Introduction, Copying, Top
+ at chapter Authors, Collaborators and Acknowledgments.
+
+The main developing team of this program is composed of:
+
+ at itemize @bullet
+ at item Micael Oliveira
+(Universidade de Coimbra, Coimbra, Portugal),
+ at item Fernando Nogueira
+(Universidade de Coimbra, Coimbra, Portugal)
+ at end itemize
+
+
+Other people who made significant contributions to this program:
+
+ at itemize @bullet
+ at item Tiago Cerqueira
+(Universidade de Coimbra, Coimbra, Portugal),
+ at end itemize
+
+
+
+
+ at c ********************* INTRODUCTION ***********************************
+ at node Introduction, Installation, Authors, Top
+ at chapter Introduction
+
+ at code{APE} is a computer package designed to generate and test
+norm-conserving pseudopotentials within Density Functional Theory. The
+generated pseudopotentials can be either non-relativistic, scalar
+relativistic or fully relativistic and can explicitly include
+semi-core states. A wide range of exchange-correlation functionals is
+included.
+
+More information about @code{APE} can be found in its
+ at uref{http://www.tddft.org/programs/APE/, homepage} and in the
+following article:
+
+M. J. T. Oliveira and F. Nogueira, @emph{Generating relativistic
+pseudo-potentials with explicit incorporation of semi-core states
+using APE, the Atomic Pseudo-potentials Engine},
+Comp. Phys. Comm. @emph{178}, 524 (2008).
+
+
+
+
+
+
+
+ at c *************************INSTALLATION*********************************
+ at node Installation, The parser, Introduction, Top
+ at chapter Installation
+
+ at menu
+* Quick instructions::
+* Long instructions::
+* Troubleshooting::
+ at end menu
+
+ at node Quick instructions, Long instructions, Installation, Installation
+ at section Quick instructions
+
+If you are feeling lucky:
+ at example
+prompt> tar xzf ape<-version>.tar.gz
+prompt> cd ape-<version>
+prompt> ./configure
+prompt> make
+prompt> make install
+ at end example
+
+This may not work but, before giving up, just read the following
+paragraphs.
+
+ at node Long instructions, Troubleshooting, Quick instructions, Installation
+ at section Long instructions
+
+The code is written in standard Fortran 95, with some routines written
+in C. To build it you will need both a C compiler (@code{gcc} works just
+fine), and a Fortran 95 compiler.
+
+Besides the compiler, you will also need:
+ at enumerate
+ at item @code{make}: most computers have it installed, otherwise just
+grab and install the GNU @code{make}.
+
+ at item @code{cpp}: GNU @code{cpp} is just fine, but any @code{cpp} that
+accepts the @code{-C} flag (preserve comments) should work just as
+well.
+
+ at item @sc{gsl}: The @sc{gsl} is heavily used in @code{APE}.
+If you don't have it already installed in your system, you can obtain
+GSL from @uref{http://sources.redhat.com/gsl/, here}. You will need
+version 1.0 or higher.
+
+ at item @code{libxc}: @code{libxc} is a library of exchange and correlation
+functionals. If you don't have it already installed in your system, you
+can obtain it
+ at uref{http://www.tddft.org/programs/octopus/wiki/index.php/Libxc,
+here}.
+
+ at end enumerate
+
+First you should obtain the code file, @code{ape<-version>.tar.gz},
+(you probably have already done this). The code is freely available, and
+can be downloaded from @uref{http://www.tddft.org/programs/APE}. There
+exists a @code{svn} server, which you can browse at
+ at uref{http://www.tddft.org/trac/APE/browser/}. The sources of the svn
+version (in general more unstable than the @emph{official} distribution)
+may be downloaded by anonymous svn access:
+
+ at example
+prompt> svn co http://www.tddft.org/svn/APE/trunk ape
+ at end example
+
+
+Uncompress and untar it (@code{tar xzf ape<-version>.tar.gz}). In the
+following, @code{APE-HOME} denotes the home directory of APE, created by
+the @code{tar} command.
+
+ at code{APE-HOME} contains the following subdirectories:
+ at itemize @bullet
+ at item @code{autom4te.cache, build}: contains files related
+to the building system. May actually not be
+there. Not of real interest for the plain user.
+ at item @code{doc}: The documentation of @code{APE} in @emph{texinfo} format.
+ at item @code{liboct_parser}: The parser used by @code{APE}. This is the parser from @code{Octopus}.
+ at item @code{sample}: Sample input files for @code{APE}.
+ at item @code{src}: Fortran 90/95 source files. Note that these have to be preprocessed
+before being fed to the Fortran compiler, so do not be scared by the #
+directives.
+ at item @code{testsuite}: @code{APE} regression testsuite.
+ at end itemize
+
+Before configuring you can (should) setup a couple of options. Although
+the configure script tries to guess your system settings for you, we
+recommend that you set explicitly the default Fortran 95 compiler and
+the compiler options. For example, in @code{bash} you would typically
+do:
+ at example
+export FC=gfortran
+export FCFLAGS="-O3 -Wall"
+ at end example
+if you are using the GNU Fortran compiler on a Linux machine. Also, if
+you have some of the required libraries in some unusual directories,
+these directories may be placed in the variable @code{LDFLAGS} (e.g.,
+ at code{export LDFLAGS="-L/opt/lib/"}).
+
+
+You can now run the configure script (@code{./configure}). at footnote{If
+you downloaded the svn version, you will not find the @code{configure}
+script. In order to compile the development version you will first have
+to run the GNU autotools. This may be done by executing the command
+ at code{autoreconf -i}. Note that you need to have working versions of the
+ at code{automake} (1.11), @code{autoconf} (2.68) and @code{libtool}
+(2.4) programs (the versions we currently use are between
+parentheses). Note that @code{autoreconf} will likely not work if you
+have (much) older versions of the autotools.}
+
+There are some options you can use with the configure script. To obtain
+a full list just type @code{./configure --help}. Some commonly used
+options include:
+ at itemize @bullet
+ at item
+ at code{--prefix=PREFIX}: Change the base installation dir of @code{APE}
+to @code{PREFIX}. The executable will be installed in @code{PREFIX/bin},
+the libraries in @code{PREFIX/lib} and the documentation in
+ at code{PREFIX/info}. @code{PREFIX} defaults to the home directory of the
+user who runs @code{configure}.
+ at item
+ at code{--with-gsl-prefix=DIR}: Installation directory of the @sc{gsl}
+library. The libraries are expected to be in @code{DIR/lib} and the
+include files in @code{DIR/include}. The value of @code{DIR} is usually
+found by issuing the command @code{gsl-config --prefix}. (If the GSL
+library is installed, the program @code{gsl-config} should be
+somewhere.)
+ at item
+ at code{--with-libxc-prefix=DIR}: Installation directory of the @code{libxc}
+library. The libraries are expected to be in @code{DIR/lib} and the
+include files in @code{DIR/include}.
+ at end itemize
+
+Run @code{make}, and then @code{make check}. This last command will
+launch the @code{APE} testsuite. If all tests were passed, you can
+then install the code with @code{make install}. If everything went
+fine, you should now be able to run @code{APE}.
+
+The program has been tested in the following platforms:
+ at itemize @bullet
+ at item @code{i686-linux-gnu}: with the Intel and GNU Fortran compilers.
+ at item @code{opteron}: with the PathScale compiler.
+ at end itemize
+If you manage to compile/run @code{APE} on a different platform or with
+a different compiler, please let us know so we can update the
+list. Patches to solve compiler issues are also welcome.
+
+Build the documentation in the format you prefer. Since you are reading
+this, you already have it in some format. Due to the power of
+ at code{texinfo}, a series of formats are available, namely @code{dvi},
+ at code{html}, @code{pdf} and @code{info}. The @code{APE.texi} source code
+of this document is in the @code{APE-HOME/doc} directory.
+
+
+
+ at node Troubleshooting, , Long instructions, Installation
+ at section Troubleshooting
+
+ So, something went wrong. Here is a list of things that might have gone
+wrong.
+
+ at strong{Some tests of the testsuite fail}: When running the testsuite, one
+or more tests fail.
+
+ at itemize @bullet
+
+ at item Is the test failing because of a very small numerical difference?
+While running a test, if a test case is failed, the code will print
+some extra information about the failure, namely the calculated value,
+the reference value, and the allowed tolerance. This should look like
+this:
+ at example
+
+ Match Failed
+ Calculated value : -24.344302
+ Reference value : -24.344198
+ Difference : 0.000104
+ Tolerance : 8e-5
+
+ at end example
+If the difference is slightly larger than the tolerance, like in the
+previous example, and if the same happens for all the failed test
+cases, then it is likely that there is nothing wrong with your
+compilation.
+
+ at end itemize
+
+
+ at strong{Could not find GSL library}: We assume that you have already
+installed @code{GSL} but, for some reason, you were not able to
+compile the code.
+
+ at itemize @bullet
+
+ at item Did you pass the correct @code{--with-gsl-prefix} to the configure script?
+If your library is installed in a non-standard directory (like
+ at code{/opt/gsl}), you will have to pass the script the location of the
+library (in this example, you could try @code{./configure
+--with-gsl-prefix=/opt/gsl}.
+
+ at end itemize
+
+
+ at strong{Could not find @code{libxc} library}: We assume that you have already
+installed @code{libxc} but, for some reason, you were not able to compile
+the code.
+
+ at itemize @bullet
+
+ at item Did you pass the correct @code{--with-libxc-prefix} to the configure script?
+If your library is installed in a non-standard directory (like
+ at code{/opt/libxc}), you will have to pass the script the location of the
+library (in this example, you could try @code{./configure
+--with-libxc-prefix=/opt/libxc}.
+
+ at item Did you use the same Fortran compiler when compiling @code{libxc}?
+Unfortunately the compilation of Fortran modules generates compiler
+dependent files (usually with the .mod extension). Since APE uses the
+Fortran interface of @code{libxc}, it is required that you use the
+same Fortran compiler for @code{APE} and @code{libxc}.
+
+ at end itemize
+
+
+ at strong{Error while loading shared libraries}: You have already
+compiled the code, but it fails to run, giving an error message about
+a failure in locating some shared object file.
+
+ at itemize @bullet
+
+ at item Did you set the @code{LD_LIBRARY_PATH} environment variable?
+If some of the libraries used to compile @code{APE} are installed in a
+non-standard directory (like @code{/opt/libxc}), you will have to add
+the path to the directory where the library objects are installed to
+the @code{LD_LIBRARY_PATH} environment variable. If you are using
+ at code{bash}, this is done with the following command:
+
+ at example
+export LD_LIBRARY_PATH=/path/to/libxc/lib:$LD_LIBRARY_PATH
+ at end example
+
+ at end itemize
+
+
+ at strong{Fatal Error}: Sometimes the code stops after issuing a
+ at code{Fatal Error} message. Here is a list of some of the most common
+errors and a brief explanation of their origin and some possible
+solutions.
+
+ at itemize @bullet
+
+ at item @emph{Unable to bracket eigenvalue for state xxx.}
+This error occurs when the eigensolver is unable to find the
+eigenvalue for a given orbital. Most of the times this will happen
+when an occupied orbital becomes unbound.
+
+ at item @emph{Generation of pseudopotentials from spin-polarized calculations
+ is not implemented!} You are trying to generate a pseudopotential
+from a spin-polarized calculation, but this is not possible in
+ at code{APE}. Although there are schemes to generate spin-dependent
+pseudopotentials, for most applications, spin-polarized calculations
+can be performed using pseudopotentials generated for a
+spin-unpolarized atom. This is because spin-polarization should come
+from the valence electrons. Furthermore, spin-dependent
+pseudopotentials cannot be used in the same way as spin-independent
+ones and most DFT codes don't know how to handle them.
+
+ at end itemize
+
+
+ at strong{Whatever went wrong...}: If something else went wrong, please
+send an e-mail to the APE-users mailing list (ape-users at
+tddft.org). Note that you have to be subscribed to the mailing list in
+order to be able to post a message.
+
+
+
+ at c *******************DESCRIPTION OF INPUT OPTION************************
+ at node The parser, Input file options, Installation, Top
+ at chapter The parser
+
+
+All input options should be in a file called ``@code{inp.ape}'', in the
+directory @code{APE} is run from. It is also possible to use a file with
+a different name. In that case the standard input should redirect to
+that file. For example, in @code{bash}:
+ at example
+prompt> ape < filename
+ at end example
+For fairly comprehensive examples, just look at the files in the
+ at code{APE_HOME/samples} directory.
+
+
+At the beginning of the program the @code{oct_parser} library reads the
+ at code{inp.ape} file, parses it, and generates a list of variables that
+will be read by @code{APE} (note that the input is case independent).
+There are two kind of variables, scalar values (strings or numbers), and
+blocks (that you may view as matrices). A scalar variable @code{var} can
+be defined by:
+
+ at example
+var = exp
+ at end example
+ at code{var} can contain any alphanumeric character plus ``_'', and
+ at code{exp} can be a quote delimited string, a number (integer, real, or
+complex), a variable name, or a mathematical expression. In the
+expressions all arithmetic operators are supported (``a+b'', ``a-b'',
+``a*b'', ``a/b''; for exponentiation the C syntax ``a^b'' is used), and
+the following functions can be used:
+ at itemize @bullet
+ at item @code{sqrt(x)}: The square root of @code{x}.
+ at item @code{exp(x)}: The exponential of @code{x}.
+ at item @code{log(x)} or @code{ln(x)}: The natural logarithm of @code{x}.
+ at item @code{log10(x)}: Base 10 logarithm of @code{x}.
+ at item @code{sin(x)}, @code{cos(x)}, @code{tan(x)}, @code{cot(x)},
+ @code{sec(x)}, @code{csc(x)}: The sinus, co-sinus, tangent, co-tangent,
+ secant and co-secant of @code{x}.
+ at item @code{asin(x)}, @code{acos(x)}, @code{atan(x)}, @code{acot(x)},
+ @code{asec(x)}, @code{acsc(x)}: The inverse (arc-) sinus, co-sinus, tangent, co-tangent,
+ secant and co-secant of @code{x}.
+ at item @code{sinh(x)}, @code{cosh(x)}, @code{tanh(x)}, @code{coth(x)},
+ @code{sech(x)}, @code{csch(x)}: The hyperbolic sinus, co-sinus, tangent, co-tangent,
+ secant and co-secant of @code{x}.
+ at item @code{asinh(x)}, @code{acosh(x)}, @code{atanh(x)}, @code{acoth(x)},
+ @code{asech(x)}, @code{acsch(x)}: The inverse hyperbolic sinus, co-sinus, tangent, co-tangent,
+ secant and co-secant of @code{x}.
+ at end itemize
+You can also use any of the predefined variables:
+ at itemize @bullet
+ at item @code{pi}: 3.141592653589793, what else is there to say?
+ at item @code{e}: The base of the natural logarithms.
+ at item @code{false} or @code{f} or @code{no}: False in all its flavors. For the
+ curious, @code{false} is defined as 0.
+ at item @code{true} or @code{t} or @code{yes}: The truthful companion of @code{false}. For the
+ curious, @code{true} is defined as 1.
+ at end itemize
+
+Blocks are defined as a collection of values, organized in row and
+column format. The syntax is the following:
+ at example
+%var
+ exp | exp | exp | ...
+ exp | exp | exp | ...
+ ...
+%
+ at end example
+Rows in a block are separated by a newline, while columns are separated
+by the character ``|'' or by a tab. There may be any number of lines and
+any number of columns in a block. Note also that each line can have a
+different number of columns.
+
+If @code{APE} tries to read a variable that is not defined in the
+ at code{inp.ape} file, it automatically assigns to it a default
+value. All variables read are output to the file
+``@code{parser.log}''. If you are not sure of what the program is
+reading, just take a look at it. Everything following the character
+``#'' until the end of the line is considered a comment and is simply
+cast into oblivion.
+
+
+
+
+ at node Input file options, Examples, The parser, Top
+ at chapter Input file options
+
+ at code{APE} has quite a few options, that we will subdivide in different
+groups. After the name of the option, its type and default value (when
+applicable) are given in parenthesis. Do not be scared by the amount of
+options! For many calculations you can safely rely on the default values
+of most of the options.
+
+
+ at c **********************************************************************
+ at menu
+* Generalities::
+* Hamiltonian::
+* Specie::
+* Pseudopotentials generation::
+* Pseudopotentials tests::
+* SCF::
+* Wave-equations solver::
+* Mesh::
+ at end menu
+
+
+
+
+ at node Generalities, Hamiltonian , Input file options, Input file options
+ at section Generalities
+
+ at menu
+* CalculationMode::
+* Units::
+* UnitsInput::
+* UnitsOutput::
+* Verbose::
+ at end menu
+
+ at node CalculationMode, Units, Generalities, Generalities
+ at subsection @code{CalculationMode} (flag, ae + pp)
+ at vindex @code{CalculationMode}
+
+It defines the type of calculation to perform. Options are:
+ @itemize @minus
+ @item @code{ae}: Atomic calculation.
+ @item @code{pp}: Pseudopotential generation.
+ @item @code{pp_test}: Pseudopotential test.
+ @item @code{xc}: One-shot evaluation of exchange and correlation energies and potentials and/or kinetic energy density functionals.
+ @item @code{ip}: Calculation of ionization energy.
+ @item @code{nt}: Numerical tests. Should only be useful to developers.
+ @end itemize
+
+
+ at node Units, UnitsOutput, CalculationMode, Generalities
+ at subsection @code{Units} (integer, 1)
+ at vindex @code{Units}
+
+ Internally, the code works in atomic units. However, you can use this
+option to define the units used in the input and output files.
+
+Valid options are:
+ at itemize @minus
+ @item @code{1}: atomic units.
+ @item @code{2}: atomic Rydberg units.
+ @item @code{3}: electron-volts/@aa{}ngstr@"om.
+ at end itemize
+
+ at node UnitsOutput, UnitsInput, Units, Generalities
+ at subsection @code{UnitsOutput} (integer, 1)
+ at vindex @code{UnitsOutput}
+
+Same as @code{Units}, but only refers to the values in the output files.
+
+ at node UnitsInput, Verbose, UnitsOutput, Generalities
+ at subsection @code{UnitsInput} (integer, 1):
+ at vindex @code{UnitsInput}
+
+Same as @code{Units}, but only refers to the values in the input file.
+
+ at node Verbose, , UnitsInput, Generalities
+ at subsection @code{Verbose} (integer, 30)
+ at vindex @code{Verbose}
+
+Verbosity level of the program. The higher, the more verbose @code{APE}
+is. Current levels are:
+ at itemize @minus
+ at item @code{verbose <= 0}: Silent mode. No output except fatal errors.
+ at item @code{verbose > 0}: Warnings only.
+ at item @code{verbose > 10}: Important program info only.
+ at item @code{verbose > 20}: Normal program info.
+ at item @code{verbose > 30}: Normal program info plus detailed info about the SCF cycle.
+ at end itemize
+
+
+
+
+ at node Hamiltonian, Specie, Generalities, Input file options
+ at section Hamiltonian
+
+These parameters control what Hamiltonian to use when solving the
+Khon-Sham equations.
+
+
+ at menu
+* WaveEquation::
+* SpinMode::
+* XCFunctional::
+* XCCorrections::
+* KEDFunctional::
+* TheoryLevel::
+ at end menu
+
+ at node WaveEquation, SpinMode, Hamiltonian, Hamiltonian
+ at subsection @code{WaveEquation} (integer, schrodinger)
+ at vindex @code{WaveEquation}
+
+When performing atomic calculations @code{APE} can solve either the
+Kohn-Sham equations, the Dirac-Kohn-Sham equations or the
+scalar-relativistic Khon-Sham equations. Valid options are:
+ at itemize @minus
+ @item @code{schrodinger}: Kohn-Sham equations.
+ @item @code{dirac}: Dirac-Kohn-Sham equations.
+ @item @code{scalar_rel}: scalar-relativistic Kohn-Sham equations.
+ at end itemize
+
+ at node SpinMode, XCFunctional, WaveEquation, Hamiltonian
+ at subsection @code{SpinMode} (integer, unpolarized)
+ at vindex @code{SpinMode}
+
+Defines the spin mode @code{APE} will run in. Valid modes are:
+ @itemize @minus
+ @item @code{unpolarized}: Spin-unpolarized calculation.
+ @item @code{polarized}: Spin-polarized calculation.
+ @end itemize
+
+ at node XCFunctional, XCCorrections, SpinMode, Hamiltonian
+ at subsection @code{XCFunctional} (integer, lda_x+lda_c_pw)
+ at vindex @code{XCFunctional}
+
+The possible values are (note that, depending on the version of
+ at code{libxc} used, some of the following functionals might not be
+available):
+ at itemize @bullet
+ at item @code{none}: No exchange-correlation.
+ at c LDA
+ at item @code{lda_x}: Slater exchange.
+ at item @code{lda_c_wigner}: Wigner parametrization.
+ at item @code{lda_c_rpa}: Random Phase Approximation.
+ at item @code{lda_c_hl}: Hedin & Lundqvist.
+ at item @code{lda_c_gl}: Gunnarson & Lundqvist.
+ at item @code{lda_c_xalpha}: Slater's Xalpha.
+ at item @code{lda_c_vwn}: Vosko, Wilk, & Nussair.
+ at item @code{lda_c_vwn_rpa}: Vosko, Wilk, & Nussair (fit to the RPA correlation energy).
+ at item @code{lda_c_pz}: Perdew & Zunger.
+ at item @code{lda_c_pz_mod}: Perdew & Zunger (Modified to improve the matching between the high and the low rs region).
+ at item @code{lda_c_ob_pz}: Ortiz & Ballone (PZ-type parametrization).
+ at item @code{lda_c_pw}: Perdew & Wang.
+ at item @code{lda_c_pw_mod}: Perdew & Wang (Modified to match the original PBE routine).
+ at item @code{lda_c_ob_pw}: Ortiz & Ballone (PW-type parametrization).
+ at item @code{lda_c_vbh}: von Barth & Hedin.
+ at item @code{lda_c_ml1}: Modified LSD (version 1) of Proynov and Salahub.
+ at item @code{lda_c_ml2}: Modified LSD (version 2) of Proynov and Salahub.
+ at item @code{lda_xc_teter93}: Teter 93.
+
+ at c GGA
+ at item @code{gga_x_pbe}: Perdew, Burke & Ernzerhof.
+ at item @code{gga_x_pbe_r}: Perdew, Burke & Ernzerhof (revised).
+ at item @code{gga_x_p86}: Becke 86 Xalpha,beta,gamma.
+ at item @code{gga_x_b86_r}: Becke 86 Xalpha,beta,gamma reoptimized.
+ at item @code{gga_x_b86_mgc}: Becke 86 Xalpha,beta,gamma (with mod. grad. correction).
+ at item @code{gga_x_b88}: Becke 88.
+ at item @code{gga_x_g96}: Gill 96.
+ at item @code{gga_x_pw86}: Perdew & Wang 86.
+ at item @code{gga_x_pw91}: Perdew & Wang 91.
+ at item @code{gga_x_optx}: Handy & Cohen OPTX 01.
+ at item @code{gga_x_dk87_r1}: dePristo & Kress 87 (version R1).
+ at item @code{gga_x_dk87_r2}: dePristo & Kress 87 (version R2).
+ at item @code{gga_x_lg93}: Lacks & Gordon 93.
+ at item @code{gga_x_ft97_a}: Filatov & Thiel 97 (version A).
+ at item @code{gga_x_ft97_b}: Filatov & Thiel 97 (version B).
+ at item @code{gga_x_pbe_sol}: Perdew, Burke & Ernzerhof exchange (solids).
+ at item @code{gga_x_rpbe}: Hammer, Hansen & Norskov (PBE-like).
+ at item @code{gga_x_wc}: Wu & Cohen
+ at item @code{gga_x_mpw91}: mPW91 of Adamo & Barone.
+ at item @code{gga_x_am05}: Armiento & Mattsson 05 exchange.
+ at item @code{gga_x_pbea}: Madsen 07.
+ at item @code{gga_x_mpbe}: Adamo & Barone modification to PBE.
+ at item @code{gga_x_xpbe}: Extended PBE by Xu & Goddard III.
+ at item @code{gga_x_bayesian}: Bayesian best fit for the enhancement factor.
+ at item @code{gga_x_pbe_jsjr}:
+ at item @code{gga_x_optb88_vdw}: opt-Becke 88 for vdW.
+ at item @code{gga_x_pbek1_vdw}: Reparametrized PBE for vdW.
+ at item @code{gga_x_optpbe_vdw}: Reparametrized PBE for vdW.
+ at item @code{gga_x_rge2}: Regularized PBE.
+
+ at item @code{gga_c_pbe}: Perdew, Burke & Ernzerhof correlation.
+ at item @code{gga_c_lyp}: Lee, Yang, & Parr LDA.
+ at item @code{gga_c_pbe_sol}: Perdew, Burke & Ernzerhof correlation SOL.
+ at item @code{gga_c_p86}: Perdew 86.
+ at item @code{gga_c_pw91}: Perdew & Wang 91.
+ at item @code{gga_c_am05}: Armiento & Mattsson 05 correlation.
+ at item @code{gga_c_xpbe}: Extended PBE by Xu & Goddard III.
+ at item @code{gga_c_lm}: Langreth & Mehl.
+ at item @code{gga_c_pbe_jrgx}: Reparametrized PBE by Pedroza, Silva & Capelle.
+ at item @code{gga_c_rge2}: Regularized PBE.
+
+ at item @code{gga_xc_lb}: van Leeuwen & Baerends.
+ at item @code{gga_xc_hcth_93}: HCTH functional fitted to 93 molecules.
+ at item @code{gga_xc_hcth_120}: HCTH functional fitted to 120 molecules.
+ at item @code{gga_xc_hcth_147}: HCTH functional fitted to 147 molecules.
+ at item @code{gga_xc_hcth_407}: HCTH functional fitted to 407 molecules.
+ at item @code{gga_xc_edf1}: Empirical functionals from Adamson, Gill, and Pople.
+ at item @code{gga_xc_xlyp}: XLYP functional.
+ at item @code{gga_xc_b97}: Becke 97.
+ at item @code{gga_xc_b97_1}: Becke 97-1.
+ at item @code{gga_xc_b97_2}: Becke 97-2.
+ at item @code{gga_xc_b97_d}: Becke 97-D (Grimme functional to be used with C6 vdW term).
+ at item @code{gga_xc_b97_k}: Becke 97-K (Boese-Martin for Kinetics).
+ at item @code{gga_xc_b97_3}: Becke 97-3.
+ at item @code{gga_xc_pbe1w}: PBE1W (functional fitted for water).
+ at item @code{gga_xc_mpwlyp1w}: mPWLYP1w (functional fitted for water).
+ at item @code{gga_xc_pbelyp1w}: PBELYP1W (functional fitted for water).
+ at item @code{gga_xc_sb98_1a}: SB98 (1a).
+ at item @code{gga_xc_sb98_1b}: SB98 (1b).
+ at item @code{gga_xc_sb98_1c}: SB98 (1c).
+ at item @code{gga_xc_sb98_2a}: SB98 (2a).
+ at item @code{gga_xc_sb98_2b}: SB98 (2b).
+ at item @code{gga_xc_sb98_2c}: SB98 (2c).
+
+ at c MGGA
+ at item @code{mgga_x_bj06}: Becke & Johnson 06.
+ at item @code{mgga_x_tb09}: Tran & Blaha 09.
+ at item @code{mgga_x_rpp09}: Rasanen, Pittalis & Proetto 09.
+
+ at end itemize
+
+
+ at node XCCorrections, KEDFunctional, XCFunctional, Hamiltonian
+ at subsection @code{XCCorrections} (integer, none)
+ at vindex @code{XCCorrections}
+
+
+The possible values are:
+ at itemize @bullet
+ at item @code{rel_x}: relativistic correction to the exchange functional (implementd only for LDA exchange).
+ at item @code{rel_c}: relativistic correction to the correlation functional (not yet implemented).
+ at item @code{adsic}: averaged density self-interaction correction.
+ at end itemize
+
+
+ at node KEDFunctional, TheoryLevel, XCCorrections, Hamiltonian
+ at subsection @code{KEDFunctional} (integer, none)
+ at vindex @code{KEDFunctional}
+
+Kinetic energy density functional. This is only used when running the
+``xc'' calculation mode. For a complete list of available
+functionals, check the @code{libxc} documentation.
+
+
+ at node TheoryLevel, , KEDFunctional, Hamiltonian
+ at subsection @code{TheoryLevel} (integer, dft)
+ at vindex @code{TheoryLevel}
+
+The possible values are:
+ at itemize @bullet
+ at item @code{independent_particles}: particles are considered as independent, i.e. as non-interacting.
+ at item @code{dft}: this is the default density-functional theory scheme.
+ at end itemize
+
+
+ at node Specie, Pseudopotentials generation, Hamiltonian, Input file options
+ at section Specie
+
+ at menu
+* NuclearCharge::
+* Orbitals::
+ at end menu
+
+
+ at node NuclearCharge, Orbitals, Specie, Specie
+ at subsection @code{NuclearCharge} (real)
+ at vindex @code{NuclearCharge}
+
+Nuclear charge of the specie.
+
+ at node Orbitals, , NuclearCharge, Specie
+ at subsection @code{Orbitals} (block data)
+ at vindex @code{Orbitals}
+
+This options sets the electronic configuration of the specie. To each
+line corresponds an orbital, which is defined by some quantum numbers
+and its occupancy.
+
+The first and second columns are the main quantum number @emph{n} and
+the angular momentum quantum number @emph{l}. The meaning of the
+remaining columns depends if we are running a fully-relativistic
+spin-polarized calculation or not. In the later case, the remaining
+columns are used to specify the occupancies. One or two columns can be
+used to specify the occupancies and there are four possible cases:
+
+ at itemize @bullet
+ at item The calculation is spin-unpolarized and only the third column is
+set: the occupancy of the orbital is simply set by the third column.
+
+ at item The calculation is spin-unpolarized and the third and fourth
+columns are set: the occupancy of the orbital is equal to the sum of
+both columns.
+
+ at item The calculation is spin-polarized and only the third column is
+set: the occupancies of the two spin channels are equal to half the
+value of the third column.
+
+ at item The calculation is spin-polarized and the third and fourth
+columns are set: the occupancies of the two spin channels are set by
+the two columns.
+
+ at end itemize
+
+When running a fully-relativistic spin-polarized calculation
+(@code{WaveEquation = dirac} and @code{SpinMode = polarized}), besides
+the @emph{n} and @emph{l} quantum numbers, it is also necessary to
+specify the @emph{m} quantum number, which will always be the third
+column of the block. This quantum number runs from @emph{-j} to
+ at emph{j}, where @emph{j} can have two values: @emph{j = l - 1/2} and
+ at emph{j = l + 1/2}. This means that, when @emph{|m| < l+1/2} there
+will be two orbitals with the same @emph{m} quantum number. To
+differentiate these two orbitals, a fourth quantum number is
+introduced, which can have two values: @emph{up} or @emph{down} (these
+are represented in @code{APE} by @emph{0.5} and @emph{-0.5}). The
+meaning of the columns beyond the third is thus the following:
+
+ at itemize @bullet
+ at item If @emph{|m| = 2l+1}: the fourth column is just the occupancy.
+
+ at item If @emph{|m| < 2l+1}: the fourth column is the occupancy of
+the @emph{up} orbital and the fifth column is the occupancy of the
+ at emph{down} orbital. If only the fourth column is set, both orbitals
+are equally occupied with half the specified value.
+
+ at end itemize
+
+
+
+Note that the occupancies can be set to zero.
+
+Here is an example for the Lithium ground state electronic
+configuration:
+ at example
+ %Orbitals
+ 1 | 0 | 1 | 1
+ 2 | 0 | 1 | 0
+ 2 | 1 | 0 | 0
+ %
+ at end example
+The first column sets the quantum number @emph{n}, the second the
+quantum number @emph{l} and the last two the occupancies for both spin
+channels. In case of a fully-relativistic spin-polarized calculation,
+the previous example would become:
+ at example
+ %Orbitals
+ 1 | 0 | -1/2 | 1
+ 1 | 0 | 1/2 | 1
+ 1 | 1 | -1/2 | 1
+ 1 | 1 | 1/2 | 0
+ 2 | 1 | -3/2 | 0
+ 2 | 1 | -1/2 | 0 | 0
+ 2 | 1 | 1/2 | 0 | 0
+ 2 | 1 | 3/2 | 0
+ %
+ at end example
+
+To make things easier, the core configuration can be replaced by a
+string with the chemical symbol of the rare gas that has the same
+configuration. For example, to run Sodium, it is possible to use the
+following input:
+ at example
+ %Orbitals
+ "Ne"
+ 3 | 0 | 1
+ %
+ at end example
+
+
+ at node Pseudopotentials generation, Pseudopotentials tests, Specie, Input file options
+ at section Pseudopotentials generation
+
+ at menu
+* PPComponents::
+* PPCalculationTolerance::
+* PPOutputFileFormat::
+* CoreCorrection::
+* LLocal::
+ at end menu
+
+
+ at node PPComponents, PPCalculationTolerance, Pseudopotentials generation, Pseudopotentials generation
+ at subsection @code{PPComponents} (block data)
+ at vindex @code{PPComponents}
+
+This block sets which pseudopotential components will be generated and
+the corresponding core radii. The first column is the main quantum
+number @emph{n}, the second column is the angular momentum quantum
+number @emph{l}, the one before the last is the core radius, and the
+last is the scheme to be used for constructing the pseudopotentials.
+
+When generating relativistic pseudopotentials, the third column will be
+the total angular momentum quantum number @emph{j}. Nevertheless, it is
+possible to omit @emph{j}, in which case both @emph{j=l-1/2} and
+ at emph{j=l+1/2} components will use the same core radius.
+
+Here is an example:
+ at example
+ %PPComponents
+ 5 | 0 | 1.0 | tm
+ 5 | 1 | 0.5 | 1.4 | tm
+ 5 | 1 | 1.5 | 1.6 | tm
+ 4 | 2 | 2.0 | tm
+ %
+ at end example
+In this case, the @emph{j=l-1/2} and @emph{j=l+1/2} components of
+ at emph{l=1} will have different core radius, while for @emph{l=2} they
+will have the same core radius.
+
+Note that it is possible to set the core-radii to zero. In that case,
+ at code{APE} will use some default value that depends on which scheme is
+used for constructing the pseudopotentials. Right now, this feature
+only works with the Hamann scheme. In that case the default core-radius
+is determined using the value of the outermost maximum of the
+all-electron wavefunction. If there are core states present with the
+same angular momentum the default core-radius is equal to 0.6 times the
+outermost maximum. Otherwise, the core radius is 0.4 times the outermost
+maximum.
+
+
+The possible values for the scheme used for constructing the
+pseudopotentials are:
+ @itemize @minus
+ @item @code{ham}: Hamann scheme.
+ @item @code{tm}: Troullier-Martins scheme.
+ @item @code{rtm}: Relativistic extension of the Troullier-Martins scheme.
+ @item @code{mrpp}: MRPP scheme.
+ at c @item @code{rmrpp}: Relativistic extension of the MRPP scheme (not implemented).
+ @end itemize
+
+Note that when using the MRPP scheme, the quantum numbers should
+correspond to a semi-core orbital, i.e., there should be at least
+another orbital with the same @emph{l} and @emph{j} quantum numbers,
+but higher in energy.
+
+
+ at node PPCalculationTolerance, PPOutputFileFormat, PPComponents, Pseudopotentials generation
+ at subsection @code{PPCalculationTolerance} (real, 1e-6)
+ at vindex @code{PPCalculationTolerance}
+
+This tolerance is used during the pseudopotential generation. What it
+does exactly depends on the pseudopotential generation scheme used.
+
+
+ at node PPOutputFileFormat, CoreCorrection, PPCalculationTolerance, Pseudopotentials generation
+ at subsection @code{PPOutputFileFormat} (integer, upf)
+ at vindex @code{PPOutputFileFormat}
+
+ @code{APE} can write the pseudopotentials in different formats
+compatible with other programs. Programs currently supported are:
+ @itemize @minus
+ @item @code{siesta}: @uref{http://www.uam.es/departamentos/ciencias/fismateriac/siesta/, SIESTA} format.
+ @item @code{fhi}: @uref{http://www.fhi-berlin.mpg.de/th/fhi98md/fhi98PP/, fhi98PP} pseudopotential generator format.
+ @item @code{abinit5}: @uref{http://www.abinit.org, ABINIT} format 5.
+ @item @code{abinit6}: @uref{http://www.abinit.org, ABINIT} format 6.
+ @item @code{upf}: @uref{http://www.pwscf.org, PWscf} unified pseudopotential format.
+ @item @code{parsec}: @uref{http://parsec.ices.utexas.edu, parsec} format. This is basically the SIESTA format plus the pseudo-wavefunctions.
+ @item @code{latepp_so} : @uref{http://www.fkf.mpg.de/bester/methods/methods.html#LATEPP, LATEPP} format. Spin-orbit difference potentials and respective wavefunctions for the spin-orbit treatment in the LATEPP code.
+ @end itemize
+
+
+ at node CoreCorrection, LLocal, PPOutputFileFormat, Pseudopotentials generation
+ at subsection @code{CoreCorrection} (integer, 1)
+ at vindex @code{CoreCorrection}
+
+Scheme for constructing the partial core density. Possible values are:
+ @itemize @minus
+ @item @code{0}: no non-linear core corrections.
+ @item @code{1}: scheme implemented in Jos@'e Luis Martins atom code.
+ @item @code{2}: scheme implemented in the fhi98PP code.
+ @end itemize
+
+
+ at node LLocal, , CoreCorrection, Pseudopotentials generation
+ at subsection @code{LLocal} (integer, -1)
+ at vindex @code{LLocal}
+
+Angular momentum component of the pseudo-potentential to take as local
+component when building the Kleinman-Bylander projectros. If set to -1
+a Vanderbilt function is used.
+
+
+
+ at node Pseudopotentials tests, Mesh, Pseudopotentials generation, Input file options
+ at section Pseudopotentials tests
+
+ at menu
+* PPTests::
+* PPTestSCF::
+* PPTestOrbitals::
+* PPTestAEDir::
+* LogDerivativeRadius::
+* LogDerivativeEnergyMax::
+* LogDerivativeEnergyMin::
+* LogDerivativeEnergyStep::
+ at end menu
+
+
+ at node PPTests, PPTestSCF, Pseudopotentials tests, Pseudopotentials tests
+ at subsection @code{PPTests} (integer, ld+dm)
+ at vindex @code{PPTests}
+
+What tests should be performed. Possible values are:
+ @itemize @minus
+ @item @code{ld}: logarithmic derivatives.
+ @item @code{dm}: transition dipole moments.
+ @item @code{ip_test}: ionization potentials.
+ @end itemize
+
+ at node PPTestSCF, PPTestOrbitals, PPTests, Pseudopotentials tests
+ at subsection @code{PPTestSCF} (logical, false)
+ at vindex @code{PPTestSCF}
+
+If set to ``yes'', run a SCF calculation for the pseudostates before
+performing the tests.
+
+ at node PPTestOrbitals, PPTestAEDir, PPTestSCF, Pseudopotentials tests
+ at subsection @code{PPTestOrbitals} (block date)
+ at vindex @code{PPTestOrbitals}
+
+Orbitals configuration to be used for the SCF calculation performed when
+PPTestSCF is set ot ``yes''. This allows to change the occupancies of
+the valence states or to add other states to be tested.
+
+
+ at node PPTestAEDir, LogDerivativeRadius, PPTestOrbitals, Pseudopotentials tests
+ at subsection @code{PPTestAEDir} (string, ``ae'')
+ at vindex @code{PPTestAEDir}
+
+Directory where to find the all-electron calculations that should be
+used during the tests. The default is the ``ae'' directory.
+
+
+ at node LogDerivativeRadius, LogDerivativeEnergyMax, PPTestAEDir, Pseudopotentials tests
+ at subsection @code{LogDerivativeRadius} (real, 0.0)
+ at vindex @code{LogDerivativeRadius}
+
+Diagnostic radius where the logarithmic derivatives are computed.
+If set to zero, @code{APE} will use the element covalent radius.
+
+
+ at node LogDerivativeEnergyMax, LogDerivativeEnergyMin, LogDerivativeRadius, Pseudopotentials tests
+ at subsection @code{LogDerivativeEnergyMax} (real)
+ at vindex @code{LogDerivativeEnergyMax}
+
+Upper bound of the energy interval where the logarithmic derivatives
+are computed. If it is not set, then the value to be used will be
+equal to the largest eigenvalue plus 1 a.u.
+
+
+ at node LogDerivativeEnergyMin, LogDerivativeEnergyStep, LogDerivativeEnergyMax, Pseudopotentials tests
+ at subsection @code{LogDerivativeEnergyMin} (real)
+ at vindex @code{LogDerivativeEnergyMin}
+
+Lower bound of the energy interval where the logarithmic derivatives
+are computed. If it is not set, then the value to be used will be
+equal to the smallest eigenvalue minus 1 a.u.
+
+
+ at node LogDerivativeEnergyStep, , LogDerivativeEnergyMin, Pseudopotentials tests
+ at subsection @code{LogDerivativeEnergyStep} (real, 0.0 a.u.)
+ at vindex @code{LogDerivativeEnergyStep}
+
+Step in energy interval. If set to zero, an adaptive step will be
+used.
+
+
+
+
+ at node Mesh, SCF, Pseudopotentials tests, Input file options
+ at section Mesh
+ at code{APE} uses a mesh to store functions. In order to change the mesh
+parameters you can use the following options:
+
+ at menu
+* MeshType::
+* MeshStartingPoint::
+* MeshOutmostPoint::
+* MeshNumberOfPoints::
+* MeshDerivMethod::
+* MeshFiniteDiffOrder::
+ at end menu
+
+ at node MeshType, MeshStartingPoint, Mesh, Mesh
+ at subsection @code{MeshType} (inteager, log1)
+ at vindex @code{MeshType}
+
+Possible values are:
+ @itemize @minus
+ @item @code{lin}: Linear
+ @item @code{log1}: Logarithmic [ri = b*exp(a*i)]
+ @item @code{log2}: Logarithmic [ri = b*(exp(a*i) - 1)]
+ @end itemize
+
+ at node MeshStartingPoint, MeshOutmostPoint, MeshType, Mesh
+ at subsection @code{MeshStartingPoint} (real, sqrt(NuclearCharge)*1e-5 a.u.)
+ at vindex @code{MeshStartingPoint}
+
+Sets the starting point of the mesh.
+
+ at node MeshOutmostPoint, MeshNumberOfPoints, MeshStartingPoint, Mesh
+ at subsection @code{MeshOutmostPoint} (real, sqrt(NuclearCharge)*30 a.u.)
+ at vindex @code{MeshOutmostPoint}
+
+Sets the outmost point of the mesh.
+
+ at node MeshNumberOfPoints, MeshDerivMethod, MeshOutmostPoint, Mesh
+ at subsection @code{MeshNumberOfPoints} (integer, sqrt(NuclearCharge)*200)
+ at vindex @code{MeshNumberOfPoints}
+
+Sets the mesh number of points.
+
+
+ at node MeshDerivMethod, MeshFiniteDiffOrder, MeshNumberOfPoints, Mesh
+ at subsection @code{MeshDerivMethod} (int, cubic_spline)
+ at vindex @code{MeshDerivMethod}
+
+Numerical method used to compute derivatives. Possible choices are:
+ at itemize @minus
+ @item @code{cubic_spline}: Use cubic splines to interpolate the function and then uses this interpolation to compute the derivatives.
+ @item @code{finite_diff}: Finite differences. The number of points used is controled by the @code{MeshFiniteDiffOrder} variable.
+ @end itemize
+
+
+ at node MeshFiniteDiffOrder, , MeshDerivMethod, Mesh
+ at subsection @code{MeshFiniteDiffOrder} (int, 4)
+ at vindex @code{MeshFiniteDiffOrder}
+
+This variable controls the numbers of points used for the finite
+differences discretization. To compute the derivative at a given
+point, the finite difference formula will use
+ at code{MeshFiniteDiffOrder} points to the left and
+ at code{MeshFiniteDiffOrder} points to the right. This means that in
+total @code{MeshFiniteDiffOrder}*2 + 1 points will be used.
+
+ at node SCF, Wave-equations solver, Mesh, Input file options
+ at section SCF
+
+The self consistent field procedure will stop when one of the
+convergence criteria is fulfilled. At each iteration the new guess
+potential is built mixing the input and output potentials.
+
+ at menu
+* MaximumIter::
+* ConvAbsDens::
+* ConvRelDens::
+* ConvAbsEnergy::
+* ConvRelEnergy::
+* SmearingFunction::
+* MixingScheme::
+* Mixing::
+* MixNumberSteps::
+ at end menu
+
+
+ at node MaximumIter, ConvAbsDens, SCF, SCF
+ at subsection @code{MaximumIter} (integer, 300)
+ at vindex @code{MaximunIter}
+
+Maximum number of SCF iterations. When that number is reached the SCF
+procedure will stop, even if none of the criteria are fulfilled, and
+the calculation will continue as normal. @code{0} means unlimited.
+
+ at node ConvAbsDens, ConvRelDens, MaximumIter, SCF
+ at subsection @code{ConvAbsDens} (real, 0.0)
+ at vindex @code{ConvAbsDens}
+
+Absolute convergence of the density. @code{0} means do not use this
+criterion.
+
+ at node ConvRelDens, ConvAbsEnergy, ConvAbsDens, SCF
+ at subsection @code{ConvRelDens} (real, 1e-8)
+ at vindex @code{ConvRelDens}
+
+Relative convergence of the density. @code{0} means do not use this
+criterion.
+
+ at node ConvAbsEnergy, ConvRelEnergy, ConvRelDens, SCF
+ at subsection @code{ConvAbsEnergy} (real, 0.0)
+ at vindex @code{ConvAbsEnergy}
+
+Absolute convergence of the total energy. @code{0} means do not use this
+criterion.
+
+ at node ConvRelEnergy, SmearingFunction, ConvAbsEnergy, SCF
+ at subsection @code{ConvRelEnergy} (real, 0.0)
+ at vindex @code{ConvRelEnergy}
+
+Relative convergence of the total energy. @code{0} means do not use this
+criterion.
+
+
+ at node SmearingFunction, MixingScheme, ConvRelEnergy, SCF
+ at subsection @code{SmearingFunction} (integer, fixed_occ)
+ at vindex @code{SmearingFunction}
+
+Select how the states should be occupied. The option are:
+ @itemize @minus
+ @item @code{fixed_occ}: the occupancies of the states are fixed.
+ @item @code{semiconducting}: semiconducting occupancies, i.e., the lowest lying states are occupied until no more electrons are left
+ @item @code{averill_painter}: F.W. Averill and G.S. Painter, Phys. Rev. B 46, 2498 (1992)
+ @end itemize
+
+
+ at node MixingScheme, Mixing, SmearingFunction, SCF
+ at subsection @code{MixingScheme} (integer, broyden)
+ at vindex @code{MixingScheme}
+
+Selects the mixing procedure to be used during the SCF cycle. Possible
+values are:
+
+ at itemize @minus
+ at item @code{linear}: Linear mixing.
+ at item @code{broyden}: Broyden mixing.
+ at end itemize
+
+ at node Mixing, MixNumberSteps, MixingScheme, SCF
+ at subsection @code{Mixing} (real, 0.3)
+ at vindex @code{Mixing}
+
+Determines the amount of the new potential which is to be mixed with the
+old one.
+
+ at node MixNumberSteps, , Mixing, SCF
+ at subsection @code{MixNumberSteps} (integer, 3)
+ at vindex @code{MixNumberSteps}
+
+Number of steps used by Broyden mixing to extrapolate the new potential.
+
+
+
+
+
+ at node Wave-equations solver, , SCF, Input file options
+ at section Wave-equations solver
+ at code{APE} solves the Schrodinger and Dirac equations using the ODE solver from
+ at sc{gsl}.
+
+ at menu
+* EigenSolverTolerance::
+* ODEIntTolerance::
+* ODESteppingFunction::
+* ODEMaxSteps::
+ at end menu
+
+ at node EigenSolverTolerance, ODEIntTolerance, Wave-equations solver, Wave-equations solver
+ at subsection @code{EigenSolverTolerance} (real, 1.0e-8 a.u.)
+ at vindex @code{EigenSolverTolerance}
+
+The eigensolver will improve the eigenvalues untill the error estimate
+of each eigenvalue is smaller than this tolerance.
+
+ at node ODEIntTolerance, ODESteppingFunction, EigenSolverTolerance, Wave-equations solver
+ at subsection @code{ODEIntTolerance} (real, 1.0e-12)
+ at vindex @code{ODEIntTolerance}
+
+
+
+ at node ODESteppingFunction, ODEMaxSteps, ODEIntTolerance, Wave-equations solver
+ at subsection @code{ODESteppingFunction} (integer, rkpd8)
+ at vindex @code{ODESteppingFunction}
+
+Possible values are:
+ @itemize @minus
+ @item @code{rk2}: Embedded 2nd order Runge-Kutta method
+ @item @code{rk4}: 4th order (classical) Runge-Kutta method
+ @item @code{rkf4}: Embedded 4th order Runge-Kutta-Fehlberg method
+ @item @code{rkck4}: Embedded 4th order Runge-Kutta Cash-Karp method
+ @item @code{rkpd8}: Embedded 8th order Runge-Kutta Prince-Dormand method
+ @end itemize
+For more information about the stepping functions please refer to the @sc{gsl}
+documentation.
+
+ at node ODEMaxSteps, , ODESteppingFunction, Wave-equations solver
+ at subsection @code{ODEMaxSteps} (integer, 500000)
+ at vindex @code{MaxSteps}
+
+Sometimes it may happen that the ODE solver takes too many steps,
+because of some problem. To avoid that, @code{APE} will issue a fatal
+error if the number of steps is greater than @code{ODEMaxSteps}.
+
+
+
+ at c **********************************************************************
+ at node Examples, Options Index, Input file options, Top
+ at chapter Examples
+
+ at menu
+* Lithium::
+ at end menu
+
+ at node Lithium, , Examples, Examples
+ at section Lithium
+
+As a first example, we will take a Lithium atom. Using a text editor,
+create the following input ``inp.ape'':
+ at example
+
+ Title = "Lithium"
+ CalculationMode = ae
+ Verbose = 30
+
+ NuclearCharge = 3
+
+ %Orbitals
+ "He"
+ 2 | 0 | 1
+ 2 | 1 | 0
+ %
+
+ at end example
+
+Then run @code{APE}. The output should look like this:
+ at example
+
+ APE - Atomic Pseudopotentials Engine
+
+ Program started on 2012/06/20 at 12:01:41
+
+Compilation Info
+ Version: 2.x
+ Revision:
+ Build time: Wed Jun 20 12:00:49 WEST 2012
+ C compiler: gcc
+ C compiler flags: -g -O2 -I/usr/include
+ Fortran compiler: gfortran
+ Fortran compiler flags: -Wall -fbounds-check
+
+Calculation Type:
+ Atomic Calculation
+
+Setting units
+ Input units system: Atomic Units
+ Output units system: Atomic Units
+
+Eigensolver Info
+ Method: Brent's method
+ Tolerance: 1.000E-08
+
+
+ -- All Electron Calculation --
+
+Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+General Information about the atom:
+ Symbol: Li
+ Theory Level: DFT
+ Wave-equation: Schrodinger
+ Spin mode: unpolarized
+ Nuclear charge: 3.00
+ Total charge: 0.00
+ Configuration : State Occupation
+ 1s 2.00
+ 2s 1.00
+ 2p 0.00
+
+Exchange-Correlation model:
+ Correlation: Perdew & Wang (LDA)
+ Exchange: Slater exchange (LDA)
+
+Mesh information:
+ Type: logarithmic [ri = b*exp(a*i)]
+ Mesh starting point: 1.73E-05 b
+ Mesh outmost point: 51.962 b
+ Mesh parameters (a, b): 7.49453E-02, 1.60699E-05
+ Mesh number of points: 200
+ Derivatives Method: Cubic slines
+
+Starting SCF process
+ Convergence tolerance: ConvAbsDens ConvRelDens
+ 0.000E+00 1.000E-08
+ ConvAbsEnergy ConvRelEnergy
+ 0.000E+00 0.000E+00
+ Smearing: fixed occupancies
+ Maximum number of iterations: 300
+ Mixing scheme: Modified Broyden's Method
+ Mixing: 0.300
+
+Performing SCF Cycle
+
+ Final results for SCF procedure:
+
+ Program finished on 2012/06/20 at 12:01:42
+
+ at end example
+
+
+Now take a look at the working directory. It should include the following
+files and directories:
+ at example
+
+drwxrwxr-x 2 user group 4096 2012-06-20 12:01 ae
+-rw-rw-r-- 1 user group 198 2012-06-20 12:01 inp.ape
+-rw-rw-r-- 1 user group 1022 2012-06-20 12:01 parser.log
+
+ at end example
+
+Besides the inp.ape and parser.log files there is now a new directory named
+ at code{ae}. In that directory you will find the following files:
+ at example
+
+-rw-r--r-- 1 user group 24885 2012-06-20 12:01 data
+-rw-r--r-- 1 user group 14665 2012-06-20 12:01 density
+-rw-r--r-- 1 user group 1549 2012-06-20 12:01 info
+-rw-r--r-- 1 user group 7396 2012-06-20 12:01 tau
+-rw-r--r-- 1 user group 7567 2012-06-20 12:01 v_c
+-rw-r--r-- 1 user group 7361 2012-06-20 12:01 v_ext
+-rw-r--r-- 1 user group 7361 2012-06-20 12:01 v_hxc
+-rw-r--r-- 1 user group 7567 2012-06-20 12:01 v_x
+-rw-r--r-- 1 user group 10938 2012-06-20 12:01 wf-1s
+-rw-r--r-- 1 user group 10938 2012-06-20 12:01 wf-2p
+-rw-r--r-- 1 user group 10966 2012-06-20 12:01 wf-2s
+
+ at end example
+
+The file @code{data} is a binary file containing the all-electron
+calculation data. This file is necessary if you want to generate
+pseudopotentials without having to solve again the all-electron
+equations. The file @code{info} contains some information about the
+all-electron calculation and it should be self-explanatory. The files
+ at code{density} and @code{tau} contain the eletronic density and the
+kinetic energy density in a format suitable for plotting. The files
+whose name start with @code{v_} contain the different components of the
+Kohn-Sham potential. Finally, the @code{wf} files contain the radial
+wavefuntions.
+
+Next we will generate some pseudopotentials using the Hamann
+scheme. Create the following ``inp.ape'' file:
+ at example
+
+ Title = "Lithium"
+ CalculationMode = pp
+ Verbose = 30
+
+ %PPComponents
+ 2 | 0 | 0.00 | ham
+ 2 | 1 | 0.00 | ham
+ %
+
+ at end example
+
+This time the output should look like this:
+
+ at example
+
+ APE - Atomic Pseudopotentials Engine
+
+ Program started on 2012/06/20 at 12:06:13
+
+Compilation Info
+ Version: 2.x
+ Revision:
+ Build time: Wed Jun 20 12:00:49 WEST 2012
+ C compiler: gcc
+ C compiler flags: -g -O2 -I/usr/include
+ Fortran compiler: gfortran
+ Fortran compiler flags: -Wall -fbounds-check
+
+Calculation Type:
+ PseudoPotential Generation
+
+Setting units
+ Input units system: Atomic Units
+ Output units system: Atomic Units
+
+Eigensolver Info
+ Method: Brent's method
+ Tolerance: 1.000E-08
+
+Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+
+ -- Pseudopotential Generation --
+
+Pseudo atom information:
+ Wavefunction info:
+ State Occupation Node radius Peak radius Default core radius
+ 2s 1.00 0.842 3.012 1.807
+ 2p 0.00 0.000 3.771 1.509
+
+Pseudopotential Generation:
+ State: 2s
+ Scheme: Hamann
+ Core radius: 1.807 Matching Radius: 5.486
+ cl = 0.1270413205
+ State: 2p
+ Scheme: Hamann
+ Core radius: 1.509 Matching Radius: 4.381
+ cl = -0.9176124519
+
+Pseudopotentials Self-Consistency:
+ State Eigenvalue [H ] Norm Test Slope Test
+ 2s -0.10560 1.0000049 0.9999925
+ 2p -0.04140 0.9998835 0.9998173
+
+Kleinman & Bylander Atom
+ Local potential is a Vanderbilt function
+ z rcmax v0 v1 v2 v3
+ 1.00 5.09 -0.491383 -0.057906 0.001118 -0.000010
+ Non-local components:
+ State KB Energy [H ] KB Cosine
+ 2s 1.0840 0.0761
+ 2p -0.4609 -0.2732
+
+ Ghost state analysis:
+ State: 2s
+ KB energy > 0; E0 < Eref < E1 => No ghost states
+ Local potential eigenvalues: -0.1215 (E0) -0.0050 (E1)
+ Reference energy: -0.1056 (Eref)
+ State: 2p
+ KB energy < 0; Eref < E0 => No ghost states
+ Local potential eigenvalues: -0.0248 (E0) 0.0000 (E1)
+ Reference energy: -0.0414 (Eref)
+
+ Localization radii [b]:
+ Local: 3.77
+ l = 0: 4.06
+ l = 1: 3.77
+
+ Program finished on 2012/06/20 at 12:06:14
+
+ at end example
+
+At the end of the run there should be a new file named @code{Li.UPF} and
+two new directories named @code{pp} and @code{kb} in the working
+directory. The file @code{Li.UPF} contains the pseudopotential
+information in the @code{PWscf} unified pseudopotential format. The
+ at code{pp} directory should include the following files:
+ at example
+
+-rw-r--r-- 1 user group 26463 2012-06-20 12:06 data
+-rw-r--r-- 1 user group 14665 2012-06-20 12:06 density
+-rw-r--r-- 1 user group 696 2012-06-20 12:06 info
+-rw-r--r-- 1 user group 7361 2012-06-20 12:06 pp-p
+-rw-r--r-- 1 user group 7361 2012-06-20 12:06 pp-s
+-rw-r--r-- 1 user group 7396 2012-06-20 12:06 tau
+-rw-r--r-- 1 user group 7567 2012-06-20 12:06 v_c
+-rw-r--r-- 1 user group 7361 2012-06-20 12:06 v_hxc
+-rw-r--r-- 1 user group 7567 2012-06-20 12:06 v_x
+-rw-r--r-- 1 user group 10938 2012-06-20 12:06 wf-2p
+-rw-r--r-- 1 user group 10938 2012-06-20 12:06 wf-2s
+
+ at end example
+
+The file @code{data} is a binary file containing the pseudopotential
+calculation data. This file is necessary if you want to perform further
+tests on the pseudopotential transferability. The file @code{info}
+contains some information about the pseudopotential generation and it
+should be self-explanatory. The files @code{density} and @code{tau}
+contain the valence eletronic density and kinetic energy density in a
+format suitable for plotting. The @code{wf} files contain the radial
+pseudo-wavefuntions and the @code{pp} files contain the ionic
+pseudopotentials. Finally, the files whose name start with @code{v_}
+contain the different components of the Kohn-Sham potential evaluated
+for the pseudo valence states.
+
+ As for the @code{kb} directory should include the following files:
+ at example
+
+-rw-r--r-- 1 user group 819 2012-06-20 12:06 info
+-rw-r--r-- 1 user group 7361 2012-06-20 12:06 kb-local
+-rw-r--r-- 1 user group 7364 2012-06-20 12:06 kb-p
+-rw-r--r-- 1 user group 7364 2012-06-20 12:06 kb-s
+
+ at end example
+
+The @code{info} contains some information about the Kleinman-Bylander
+projectors and it should be self-explanatory. The file @code{kb-local}
+contains the local component used to generated the Kleinman-Bylander
+projectors, while the other @code{kb} files contain the projectors.
+
+
+After generating the pseudopotentials, one should test them. One
+simple test is to compare the logarithmic derivative of the
+wavefunctions as a function of the orbital energy at a given
+diagnostic radius. The following input file will to precisely that:
+ at example
+
+ Title = "Lithium"
+ CalculationMode = pp_test
+ Verbose = 30
+
+ PPTests = ld
+
+ at end example
+
+In this case the output should look like this:
+ at example
+
+ APE - Atomic Pseudopotentials Engine
+
+ Program started on 2012/06/20 at 13:55:25
+
+Compilation Info
+ Version: 2.x
+ Revision:
+ Build time: Wed Jun 20 12:00:49 WEST 2012
+ C compiler: gcc
+ C compiler flags: -g -O2 -I/usr/include
+ Fortran compiler: gfortran
+ Fortran compiler flags: -Wall -fbounds-check
+
+Calculation Type:
+ PseudoPotential Test
+
+Setting units
+ Input units system: Atomic Units
+ Output units system: Atomic Units
+
+Eigensolver Info
+ Method: Brent's method
+ Tolerance: 1.000E-08
+
+Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+
+ -- Pseudopotential Testing --
+
+Initializing ODE Integrator
+ ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand
+ method with 9th order error estimate
+ ODE Integrator tolerance: 1.000E-12
+ ODE Integrator maximum number of steps: 500000
+
+Logarithmic Derivatives:
+ Diagnostic radius: 2.320 b
+ Energy step: Adaptive
+ Computing logarithmic derivative for states: s
+ Minimum energy: -1.106 H
+ Maximum energy: 0.894 H
+ Computing logarithmic derivative for states: p
+ Minimum energy: -1.041 H
+ Maximum energy: 0.959 H
+
+ Program finished on 2012/06/20 at 13:55:25
+
+ at end example
+
+Notice that the choice of energy range and diagnostic radius was done
+automatically (check the description of the corresponding variable for
+more information about how this is done). At the end of the run there
+should be a new directory named @code{tests}. This directory should
+contain the following files:
+ at example
+
+-rw-r--r-- 1 user group 297 2012-06-20 13:55 info
+-rw-r--r-- 1 user group 3916 2012-06-20 13:55 ld-p
+-rw-r--r-- 1 user group 3700 2012-06-20 13:55 ld-s
+
+ at end example
+
+The file @code{info} contains some information about the tests and it
+should be self-explanatory. The files @code{ld-} contain the
+all-electron and pseudo wavefunction logarithmic derivatives
+as a function of the orbital energy.
+
+
+
+ at c ***************THE END OF THE DOCUMENT********************************
+ at node Options Index, , Examples, Top
+ at unnumbered Options Index
+
+ at printindex vr
+
+ at contents
+
+ at bye
+ at c **********************************************************************
diff --git a/liboct_parser/Makefile.am b/liboct_parser/Makefile.am
new file mode 100644
index 0000000..6e7bf80
--- /dev/null
+++ b/liboct_parser/Makefile.am
@@ -0,0 +1,12 @@
+# $Id: Makefile.am 540 2010-11-09 17:53:26Z micael $
+
+noinst_LIBRARIES = liboct_parser.a
+
+liboct_parser_a_SOURCES = symbols.c parse.c parse_exp.c string_f.c parser_f.c gsl_userdef.c
+
+noinst_HEADERS = grammar.c symbols.h string_f.h gsl_userdef.h liboct_parser.h
+
+AM_CPPFLAGS = -I$(top_srcdir)/libstring_f
+
+CLEANFILES = *~ *.bak
+
diff --git a/liboct_parser/Makefile.in b/liboct_parser/Makefile.in
new file mode 100644
index 0000000..4ccaf64
--- /dev/null
+++ b/liboct_parser/Makefile.in
@@ -0,0 +1,501 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# $Id: Makefile.am 540 2010-11-09 17:53:26Z micael $
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = liboct_parser
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(top_srcdir)/build-aux/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+liboct_parser_a_AR = $(AR) $(ARFLAGS)
+liboct_parser_a_LIBADD =
+am_liboct_parser_a_OBJECTS = symbols.$(OBJEXT) parse.$(OBJEXT) \
+ parse_exp.$(OBJEXT) string_f.$(OBJEXT) parser_f.$(OBJEXT) \
+ gsl_userdef.$(OBJEXT)
+liboct_parser_a_OBJECTS = $(am_liboct_parser_a_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+SOURCES = $(liboct_parser_a_SOURCES)
+DIST_SOURCES = $(liboct_parser_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = liboct_parser.a
+liboct_parser_a_SOURCES = symbols.c parse.c parse_exp.c string_f.c parser_f.c gsl_userdef.c
+noinst_HEADERS = grammar.c symbols.h string_f.h gsl_userdef.h liboct_parser.h
+AM_CPPFLAGS = -I$(top_srcdir)/libstring_f
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu liboct_parser/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu liboct_parser/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+liboct_parser.a: $(liboct_parser_a_OBJECTS) $(liboct_parser_a_DEPENDENCIES) $(EXTRA_liboct_parser_a_DEPENDENCIES)
+ -rm -f liboct_parser.a
+ $(liboct_parser_a_AR) liboct_parser.a $(liboct_parser_a_OBJECTS) $(liboct_parser_a_LIBADD)
+ $(RANLIB) liboct_parser.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gsl_userdef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/parse.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/parse_exp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/parser_f.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/string_f.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/symbols.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES cscopelist ctags distclean \
+ distclean-compile distclean-generic distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/liboct_parser/grammar.c b/liboct_parser/grammar.c
new file mode 100644
index 0000000..ef314b4
--- /dev/null
+++ b/liboct_parser/grammar.c
@@ -0,0 +1,1020 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: grammar.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+
+/* A Bison parser, made from grammar.y
+ by GNU Bison version 1.28 */
+
+#define YYBISON 1 /* Identify Bison output. */
+
+#define NUM 257
+#define STR 258
+#define VAR 259
+#define FNCT 260
+#define NEG 261
+
+#line 2 "grammar.y"
+
+
+#line 5 "grammar.y"
+typedef union {
+ gsl_complex val; /* For returning numbers. */
+ char *str; /* For strings */
+ symrec *tptr; /* For returning symbol-table pointers */
+} YYSTYPE;
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define YYFINAL 41
+#define YYFLAG -32768
+#define YYNTBASE 18
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 22)
+
+static const char yytranslate[] = { 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 14,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 15,
+ 16, 10, 9, 17, 8, 2, 11, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 7, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 13, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6,
+ 12
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = { 0,
+ 0, 1, 4, 6, 9, 12, 15, 17, 19, 23,
+ 28, 32, 36, 40, 44, 47, 51, 57, 61, 63
+};
+
+static const short yyrhs[] = { -1,
+ 18, 19, 0, 14, 0, 20, 14, 0, 21, 14,
+ 0, 1, 14, 0, 3, 0, 5, 0, 5, 7,
+ 20, 0, 6, 15, 20, 16, 0, 20, 9, 20,
+ 0, 20, 8, 20, 0, 20, 10, 20, 0, 20,
+ 11, 20, 0, 8, 20, 0, 20, 13, 20, 0,
+ 15, 20, 17, 20, 16, 0, 15, 20, 16, 0,
+ 4, 0, 5, 7, 4, 0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+ 27, 28, 31, 33, 34, 35, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 51, 52
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = { "$","error","$undefined.","NUM","STR",
+"VAR","FNCT","'='","'-'","'+'","'*'","'/'","NEG","'^'","'\\n'","'('","')'","','",
+"input","line","exp","string", NULL
+};
+#endif
+
+static const short yyr1[] = { 0,
+ 18, 18, 19, 19, 19, 19, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 21, 21
+};
+
+static const short yyr2[] = { 0,
+ 0, 2, 1, 2, 2, 2, 1, 1, 3, 4,
+ 3, 3, 3, 3, 2, 3, 5, 3, 1, 3
+};
+
+static const short yydefact[] = { 1,
+ 0, 0, 7, 19, 8, 0, 0, 3, 0, 2,
+ 0, 0, 6, 0, 0, 8, 15, 0, 0, 0,
+ 0, 0, 0, 4, 5, 20, 9, 0, 0, 18,
+ 0, 12, 11, 13, 14, 16, 10, 0, 17, 0,
+ 0
+};
+
+static const short yydefgoto[] = { 1,
+ 10, 27, 12
+};
+
+static const short yypact[] = {-32768,
+ 23, -13,-32768,-32768, 9, 10, 40,-32768, 40,-32768,
+ 66, -5,-32768, 36, 40, 25, 4, -6, 40, 40,
+ 40, 40, 40,-32768,-32768,-32768, 73, 48, 40,-32768,
+ 40, 2, 2, 4, 4, 4,-32768, 57,-32768, 33,
+-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768, -1,-32768
+};
+
+
+#define YYLAST 86
+
+
+static const short yytable[] = { 11,
+ 13, 19, 20, 21, 22, 17, 23, 18, 25, 30,
+ 31, 21, 22, 28, 23, 14, 23, 32, 33, 34,
+ 35, 36, 40, 2, 15, 3, 4, 5, 6, 38,
+ 7, 29, 41, 0, 0, 0, 8, 9, 3, 26,
+ 16, 6, 3, 7, 16, 6, 0, 7, 0, 0,
+ 9, 0, 0, 0, 9, 19, 20, 21, 22, 0,
+ 23, 0, 0, 37, 19, 20, 21, 22, 0, 23,
+ 0, 0, 39, 19, 20, 21, 22, 0, 23, 24,
+ 19, 20, 21, 22, 0, 23
+};
+
+static const short yycheck[] = { 1,
+ 14, 8, 9, 10, 11, 7, 13, 9, 14, 16,
+ 17, 10, 11, 15, 13, 7, 13, 19, 20, 21,
+ 22, 23, 0, 1, 15, 3, 4, 5, 6, 31,
+ 8, 7, 0, -1, -1, -1, 14, 15, 3, 4,
+ 5, 6, 3, 8, 5, 6, -1, 8, -1, -1,
+ 15, -1, -1, -1, 15, 8, 9, 10, 11, -1,
+ 13, -1, -1, 16, 8, 9, 10, 11, -1, 13,
+ -1, -1, 16, 8, 9, 10, 11, -1, 13, 14,
+ 8, 9, 10, 11, -1, 13
+};
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+#line 3 "/usr/lib/bison.simple"
+/* This file comes from bison-1.28. */
+
+/* Skeleton output parser for bison,
+ Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+
+ $Id: grammar.c 778 2013-07-11 15:49:39Z micael $ */
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* This is the parser code that is written into each bison parser
+ when the %semantic_parser declaration is not specified in the grammar.
+ It was written by Richard Stallman by simplifying the hairy parser
+ used when %semantic_parser is specified. */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C. */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C. */
+/* This used to test MSDOS, but that is a bad idea
+ since that symbol is in the user namespace. */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+ instead, just don't use alloca. */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+ So I turned it off. rms, 2 May 1997. */
+/* #include <malloc.h> */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* haible at ilog.fr says this works for HPUX 9.05 and up,
+ and on HPUX 10. Eventually we can turn this on. */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+ It is replaced by the list of actions, each action
+ as one case of the switch. */
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY -2
+#define YYEOF 0
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+ This remains here temporarily to ease the
+ transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+#define YYFAIL goto yyerrlab
+#define YYRECOVERING() (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
+while (0)
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+#ifndef YYPURE
+#define YYLEX yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+ /* lookahead symbol */
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc; /* location data for the lookahead */
+ /* symbol */
+#endif
+
+int yynerrs; /* number of parse errors so far */
+#endif /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug; /* nonzero means print parse trace */
+/* Since this is uninitialized, it does not stop multiple parsers
+ from coexisting. */
+#endif
+
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
+
+#ifndef YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy. Note that the size argument
+ should be passed with type unsigned int, because that is what the non-GCC
+ definitions require. With GCC, __builtin_memcpy takes an arg
+ of type size_t, but it can handle unsigned int. */
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
+#else /* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (to, from, count)
+ char *to;
+ char *from;
+ unsigned int count;
+{
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+ in available built-in functions on various systems. */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+ register char *t = to;
+ register char *f = from;
+ register int i = count;
+
+ while (i-- > 0)
+ *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/lib/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+ into yyparse. The argument should have type void *.
+ It should actually point to an object.
+ Grammar actions can access the variable by casting it
+ to the proper pointer type. */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes. */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+ YYPARSE_PARAM_DECL
+{
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+
+ short *yyss = yyssa; /* refer to the stacks thru separate pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
+
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK (yyvsp--, yyssp--)
+#endif
+
+ int yystacksize = YYINITDEPTH;
+ int yyfree_stacks = 0;
+
+#ifdef YYPURE
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+#ifdef YYLSP_NEEDED
+ YYLTYPE yylloc;
+#endif
+#endif
+
+ YYSTYPE yyval; /* the variable used to return */
+ /* semantic values from the action */
+ /* routines */
+
+ int yylen;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
+#endif
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in yystate . */
+/* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks. */
+yynewstate:
+
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* Give user a chance to reallocate the stack */
+ /* Use copies of these so that the &'s don't force the real ones into memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+ YYLTYPE *yyls1 = yyls;
+#endif
+
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ /* Each stack pointer address is followed by the size of
+ the data in use in that stack, in bytes. */
+#ifdef YYLSP_NEEDED
+ /* This used to be a conditional around just the two extra args,
+ but that might be undefined if yyoverflow is a macro. */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yyls1, size * sizeof (*yylsp),
+ &yystacksize);
+#else
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof (*yyssp),
+ &yyvs1, size * sizeof (*yyvsp),
+ &yystacksize);
+#endif
+
+ yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+ yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+ yyfree_stacks = 1;
+#endif
+ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+ __yy_memcpy ((char *)yyss, (char *)yyss1,
+ size * (unsigned int) sizeof (*yyssp));
+ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+ __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+ size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+ __yy_memcpy ((char *)yyls, (char *)yyls1,
+ size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+ yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+ goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a lookahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to lookahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* yychar is either YYEMPTY or YYEOF
+ or a valid token in external form. */
+
+ if (yychar == YYEMPTY)
+ {
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
+#endif
+ yychar = YYLEX;
+ }
+
+ /* Convert token to internal form (in yychar1) for indexing tables with */
+
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
+#endif
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+ /* Give the individual parser a way to print the precise meaning
+ of a token, for further debugging info. */
+#ifdef YYPRINT
+ YYPRINT (stderr, yychar, yylval);
+#endif
+ fprintf (stderr, ")\n");
+ }
+#endif
+ }
+
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
+
+ yyn = yytable[yyn];
+
+ /* yyn is what to do for this token type in this state.
+ Negative => reduce, -yyn is rule number.
+ Positive => shift, yyn is new state.
+ New state is final state => don't bother to shift,
+ just return success.
+ 0, or most negative number => error. */
+
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the lookahead token. */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ /* count tokens shifted since error; after three, turn off error status. */
+ if (yyerrstatus) yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+/* Do the default action for the current state. */
+yydefault:
+
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+
+/* Do a reduction. yyn is the number of a rule to reduce with. */
+yyreduce:
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ int i;
+
+ fprintf (stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
+#endif
+
+
+ switch (yyn) {
+
+case 4:
+#line 33 "grammar.y"
+{ par_res.value.c = yyvsp[-1].val; par_res.type = PR_CMPLX; YYACCEPT;;
+ break;}
+case 5:
+#line 34 "grammar.y"
+{ par_res.value.s = yyvsp[-1].str; par_res.type = PR_STR; YYACCEPT;;
+ break;}
+case 6:
+#line 35 "grammar.y"
+{ yyerrok; YYABORT;;
+ break;}
+case 7:
+#line 38 "grammar.y"
+{ yyval.val = yyvsp[0].val; ;
+ break;}
+case 8:
+#line 39 "grammar.y"
+{ yyval.val = yyvsp[0].tptr->value.c; ;
+ break;}
+case 9:
+#line 40 "grammar.y"
+{ yyval.val = yyvsp[0].val; yyvsp[-2].tptr->value.c = yyvsp[0].val; yyvsp[-2].tptr->type = S_CMPLX;;
+ break;}
+case 10:
+#line 41 "grammar.y"
+{ yyval.val = (*(yyvsp[-3].tptr->value.fnctptr))(yyvsp[-1].val); ;
+ break;}
+case 11:
+#line 42 "grammar.y"
+{ yyval.val = gsl_complex_add(yyvsp[-2].val, yyvsp[0].val); ;
+ break;}
+case 12:
+#line 43 "grammar.y"
+{ yyval.val = gsl_complex_sub(yyvsp[-2].val, yyvsp[0].val); ;
+ break;}
+case 13:
+#line 44 "grammar.y"
+{ yyval.val = gsl_complex_mul(yyvsp[-2].val, yyvsp[0].val); ;
+ break;}
+case 14:
+#line 45 "grammar.y"
+{ yyval.val = gsl_complex_div(yyvsp[-2].val, yyvsp[0].val); ;
+ break;}
+case 15:
+#line 46 "grammar.y"
+{ yyval.val = gsl_complex_negative(yyvsp[0].val); ;
+ break;}
+case 16:
+#line 47 "grammar.y"
+{ yyval.val = gsl_complex_pow(yyvsp[-2].val, yyvsp[0].val); ;
+ break;}
+case 17:
+#line 48 "grammar.y"
+{ GSL_SET_COMPLEX (&yyval.val, GSL_REAL(yyvsp[-3].val), GSL_REAL(yyvsp[-1].val)); ;
+ break;}
+case 18:
+#line 49 "grammar.y"
+{ yyval.val = yyvsp[-1].val; ;
+ break;}
+case 19:
+#line 51 "grammar.y"
+{ yyval.str = yyvsp[0].str; ;
+ break;}
+case 20:
+#line 52 "grammar.y"
+{ yyval.str = yyvsp[0].str; yyvsp[-2].tptr->value.str = yyvsp[0].str; yyvsp[-2].tptr->type = S_STR; ;
+ break;}
+}
+ /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/lib/bison.simple"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+ yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+ *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp-1)->last_line;
+ yylsp->last_column = (yylsp-1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp+yylen-1)->last_line;
+ yylsp->last_column = (yylsp+yylen-1)->last_column;
+ }
+#endif
+
+ /* Now "shift" the result of the reduction.
+ Determine what state that goes to,
+ based on the state we popped back to
+ and the rule number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
+
+ goto yynewstate;
+
+yyerrlab: /* here on detecting error */
+
+ if (! yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (yyn > YYFLAG && yyn < YYLAST)
+ {
+ int size = 0;
+ char *msg;
+ int x, count;
+
+ count = 0;
+ /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror ("parse error; also virtual memory exceeded");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
+ }
+
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an action */
+
+ if (yyerrstatus == 3)
+ {
+ /* if just tried and failed to reuse lookahead token after an error, discard it. */
+
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+ yychar = YYEMPTY;
+ }
+
+ /* Else will try to reuse lookahead token
+ after shifting the error token. */
+
+ yyerrstatus = 3; /* Each real token shifted decrements this */
+
+ goto yyerrhandle;
+
+yyerrdefault: /* current state does not do anything special for the error token. */
+
+#if 0
+ /* This is wrong; only states that explicitly want error tokens
+ should shift them. */
+ yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
+ if (yyn) goto yydefault;
+#endif
+
+yyerrpop: /* pop the current state because it cannot handle the error token */
+
+ if (yyssp == yyss) YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+ yylsp--;
+#endif
+
+#if YYDEBUG != 0
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+ fprintf (stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf (stderr, " %d", *++ssp1);
+ fprintf (stderr, "\n");
+ }
+#endif
+
+yyerrhandle:
+
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
+
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
+
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+#if YYDEBUG != 0
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
+#endif
+
+ *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+ *++yylsp = yylloc;
+#endif
+
+ yystate = yyn;
+ goto yynewstate;
+
+ yyacceptlab:
+ /* YYACCEPT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 0;
+
+ yyabortlab:
+ /* YYABORT comes here. */
+ if (yyfree_stacks)
+ {
+ free (yyss);
+ free (yyvs);
+#ifdef YYLSP_NEEDED
+ free (yyls);
+#endif
+ }
+ return 1;
+}
+#line 54 "grammar.y"
+
diff --git a/liboct_parser/gsl_userdef.c b/liboct_parser/gsl_userdef.c
new file mode 100644
index 0000000..72756c8
--- /dev/null
+++ b/liboct_parser/gsl_userdef.c
@@ -0,0 +1,41 @@
+
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: gsl_userdef.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <gsl/gsl_complex_math.h>
+
+gsl_complex
+gsl_complex_step_real (double a)
+{
+ gsl_complex z;
+
+ if (a < 0)
+ {
+ GSL_SET_COMPLEX (&z, 0, 0);
+ }
+ else
+ {
+ GSL_SET_COMPLEX (&z, 1, 0);
+ }
+
+ return z;
+}
+
diff --git a/liboct_parser/gsl_userdef.h b/liboct_parser/gsl_userdef.h
new file mode 100644
index 0000000..f74aba4
--- /dev/null
+++ b/liboct_parser/gsl_userdef.h
@@ -0,0 +1,28 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: gsl_userdef.h 778 2013-07-11 15:49:39Z micael $
+*/
+
+#ifndef __GSL_USERDEF_H__
+#define __GSL_USERDEF_H__
+
+gsl_complex gsl_complex_step_real (double a); /* Heaviside step function */
+
+
+#endif /* __GSL_USERDEF_H__ */
diff --git a/liboct_parser/liboct_parser.h b/liboct_parser/liboct_parser.h
new file mode 100644
index 0000000..40d9a45
--- /dev/null
+++ b/liboct_parser/liboct_parser.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: liboct_parser.h 778 2013-07-11 15:49:39Z micael $
+*/
+
+#ifndef _LIB_OCT_H
+#define _LIB_OCT_H
+
+#include <gsl/gsl_complex.h>
+#include "symbols.h"
+
+int parse_init(char *file_out, int *mpiv_node);
+int parse_input(char *file_in);
+void parse_end();
+
+int parse_isdef(char *name);
+
+int parse_int(char *name, int def);
+double parse_double(char *name, double def);
+gsl_complex parse_complex(char *name, gsl_complex def);
+char *parse_string(char *name, char *def);
+
+int parse_block (char *name, sym_block **blk);
+int parse_block_end (sym_block **blk);
+int parse_block_n (sym_block *blk);
+int parse_block_cols (sym_block *blk, int l);
+int parse_block_int (sym_block *blk, int l, int col, int *r);
+int parse_block_double (sym_block *blk, int l, int col, double *r);
+int parse_block_complex(sym_block *blk, int l, int col, gsl_complex *r);
+int parse_block_string (sym_block *blk, int l, int col, char **r);
+
+/* from parse_exp.c */
+typedef struct parse_result{
+ union {
+ gsl_complex c;
+ char *s;
+ } value;
+ enum {PR_CMPLX, PR_STR} type;
+} parse_result;
+
+int parse_exp(char *exp, parse_result *t);
+
+void parse_putsym_int(char *s, int i);
+void parse_putsym_double(char *s, double d);
+void parse_putsym_complex(char *s, gsl_complex c);
+
+#endif
diff --git a/liboct_parser/parse.c b/liboct_parser/parse.c
new file mode 100644
index 0000000..0cb2863
--- /dev/null
+++ b/liboct_parser/parse.c
@@ -0,0 +1,403 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: parse.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <math.h>
+#include <assert.h>
+
+#include "liboct_parser.h"
+
+static FILE *fout;
+static int disable_write;
+
+#define ROUND(x) ((x)<0 ? (int)(x-0.5) : (int)(x+0.5))
+
+static char *str_trim(char *in)
+{
+ char *c, *s = in;
+
+ for(c=s; isspace(*c); c++);
+ for(; *c != '\0'; *s++=*c++);
+ for(s--; isspace(*s); s--);
+ *(s+1) = '\0';
+
+ return in;
+}
+
+static int parse_get_line(FILE *f, char **s, int *length)
+{
+ int i, c;
+
+ i = 0;
+ do{
+ c = getc(f);
+ if(c == '#') /* skip comments */
+ while(c!=EOF && c!='\n') c = getc(f);
+ else if(c != EOF){
+ if (i == *length - 1){
+ *length *= 2;
+ *s = (char *)realloc(*s, *length + 1);
+ }
+ (*s)[i++] = c;
+ }
+ }while(c != EOF && c != '\n');
+ (*s)[i] = '\0';
+
+ str_trim(*s);
+ return c;
+}
+
+int parse_init(char *file_out, int *mpiv_node)
+{
+ sym_init_table();
+
+ /* only enable writes for node 0 */
+ disable_write = *mpiv_node;
+
+ if(!disable_write) {
+ if(strcmp(file_out, "-") == 0)
+ fout = stdout;
+ else {
+ fout = fopen(file_out, "w");
+ if(!fout)
+ return -1; /* error opening file */
+ setvbuf(fout, NULL, _IONBF, 0);
+ }
+ fprintf(fout, "# Octopus parser started\n");
+ }
+
+
+ return 0;
+}
+
+int parse_input(char *file_in)
+{
+ FILE *f;
+ char *s;
+ int c, length = 0;
+
+ if(strcmp(file_in, "-") == 0)
+ f = stdin;
+ else
+ f = fopen(file_in, "r");
+
+ if(!f)
+ return -1; /* error opening file */
+
+ /* we now read in the file and parse */
+ length = 40;
+ s = (char *)malloc(length + 1);
+ do{
+ c = parse_get_line(f, &s, &length);
+ if(*s){
+ if(*s == '%'){ /* we have a block */
+ *s = ' ';
+ str_trim(s);
+ if(getsym(s) != NULL){ /* error */
+ fprintf(stderr, "%s \"%s\" %s", "Block", s, "already defined");
+ do{ /* skip block */
+ c = parse_get_line(f, &s, &length);
+ }while(c != EOF && *s != '%');
+ }else{ /* parse block */
+ symrec *rec;
+ rec = putsym(s, S_BLOCK);
+ rec->value.block = (sym_block *)malloc(sizeof(sym_block));
+ rec->value.block->n = 0;
+ rec->value.block->lines = NULL;
+ do{
+ c = parse_get_line(f, &s, &length);
+ if(*s && *s != '%'){
+ char *s1, *tok;
+ int l, col;
+
+ l = rec->value.block->n;
+ rec->value.block->n++;
+ rec->value.block->lines = (sym_block_line *)
+ realloc((void *)rec->value.block->lines, sizeof(sym_block_line)*(l+1));
+ rec->value.block->lines[l].n = 0;
+ rec->value.block->lines[l].fields = NULL;
+
+ /* parse columns */
+ for(s1 = s; (tok = strtok(s1, "|\t")) != NULL; s1 = NULL){
+ char *tok2 = strdup(tok);
+ str_trim(tok2);
+
+ col = rec->value.block->lines[l].n;
+ rec->value.block->lines[l].n++;
+ rec->value.block->lines[l].fields = (char **)
+ realloc((void *)rec->value.block->lines[l].fields, sizeof(char *)*(col+1));
+ rec->value.block->lines[l].fields[col] = tok2;
+ }
+ }
+ }while(c != EOF && *s != '%');
+ }
+ }else{ /* we can parse it np */
+ parse_result c;
+ parse_exp(s, &c);
+ }
+ }
+ }while(c != EOF);
+
+ free(s);
+ if(f != stdin)
+ fclose(f);
+
+ sym_clear_reserved();
+
+ return 0;
+}
+
+void parse_end()
+{
+ sym_end_table();
+ if(!disable_write) {
+ fprintf(fout, "# Octopus parser ended\n");
+ if(fout != stdout)
+ fclose(fout);
+ }
+}
+
+int parse_isdef(char *name)
+{
+ if(getsym(name) == NULL)
+ return 0;
+ return 1;
+}
+
+int parse_int(char *name, int def)
+{
+ symrec *ptr;
+ int ret;
+
+ ptr = getsym(name);
+ if(ptr && ptr->type == S_CMPLX){
+ ret = ROUND(GSL_REAL(ptr->value.c));
+ if(!disable_write) {
+ fprintf(fout, "%s = %d\n", name, ret);
+ }
+ }else{
+ ret = def;
+ if(!disable_write) {
+ fprintf(fout, "%s = %d\t\t# default\n", name, ret);
+ }
+ }
+ return ret;
+}
+
+double parse_double(char *name, double def)
+{
+ symrec *ptr;
+ double ret;
+
+ ptr = getsym(name);
+ if(ptr && ptr->type == S_CMPLX){
+ ret = GSL_REAL(ptr->value.c);
+ if(!disable_write) {
+ fprintf(fout, "%s = %g\n", name, ret);
+ }
+ }else{
+ ret = def;
+ if(!disable_write) {
+ fprintf(fout, "%s = %g\t\t# default\n", name, ret);
+ }
+ }
+ return ret;
+}
+
+gsl_complex parse_complex(char *name, gsl_complex def)
+{
+ symrec *ptr;
+ gsl_complex ret;
+
+ ptr = getsym(name);
+ if(ptr && ptr->type == S_CMPLX){
+ ret = ptr->value.c;
+ if(!disable_write) {
+ fprintf(fout, "%s = (%g, %g)\n", name, GSL_REAL(ret), GSL_IMAG(ret));
+ }
+ }else{
+ ret = def;
+ if(!disable_write) {
+ fprintf(fout, "%s = (%g, %g)\t\t# default\n", name, GSL_REAL(ret), GSL_IMAG(ret));
+ }
+ }
+ return ret;
+}
+
+char *parse_string(char *name, char *def)
+{
+ symrec *ptr;
+ char *ret;
+
+ ptr = getsym(name);
+ if(ptr && ptr->type == S_STR){
+ ret = ptr->value.str;
+ if(!disable_write) {
+ fprintf(fout, "%s = \"%s\"\n", name, ret);
+ }
+ }else{
+ ret = def;
+ if(!disable_write) {
+ fprintf(fout, "%s = \"%s\"\t\t# default\n", name, ret);
+ }
+ }
+ return ret;
+}
+
+int parse_block (char *name, sym_block **blk)
+{
+ symrec *ptr;
+
+ ptr = getsym(name);
+ if(ptr && ptr->type == S_BLOCK){
+ *blk = ptr->value.block;
+ if(!disable_write) {
+ fprintf(fout, "Opened block '%s'\n", name);
+ }
+ return 0;
+ }else{
+ *blk = NULL;
+ return -1;
+ }
+}
+
+int parse_block_end (sym_block **blk)
+{
+ *blk = NULL;
+ if(!disable_write) {
+ fprintf(fout, "Closed block\n");
+ }
+ return 0;
+}
+
+int parse_block_n(sym_block *blk)
+{
+ assert(blk != NULL);
+
+ return blk->n;
+}
+
+int parse_block_cols(sym_block *blk, int l)
+{
+ assert(blk!=NULL);
+ assert(l>=0 && l<blk->n);
+
+ return blk->lines[l].n;
+}
+
+static int parse_block_work(sym_block *blk, int l, int col, parse_result *r)
+{
+ assert(blk!=NULL);
+ assert(l>=0 && l<blk->n);
+ assert(col>=0 && col<blk->lines[l].n);
+
+ return parse_exp(blk->lines[l].fields[col], r);
+}
+
+int parse_block_int(sym_block *blk, int l, int col, int *r)
+{
+ int o;
+ parse_result pr;
+
+ o = parse_block_work(blk, l, col, &pr);
+
+ if(o == 0 && pr.type == PR_CMPLX){
+ *r = ROUND(GSL_REAL(pr.value.c));
+ if(!disable_write) {
+ fprintf(fout, " (%d, %d) = %d\n", l, col, *r);
+ }
+ return 0;
+ }else
+ return o;
+}
+
+int parse_block_double(sym_block *blk, int l, int col, double *r)
+{
+ int o;
+ parse_result pr;
+
+ o = parse_block_work(blk, l, col, &pr);
+
+ if(o == 0 && pr.type == PR_CMPLX){
+ *r = GSL_REAL(pr.value.c);
+ if(!disable_write) {
+ fprintf(fout, " (%d, %d) = %g\n", l, col, *r);
+ }
+ return 0;
+ }else
+ return o;
+}
+
+int parse_block_complex(sym_block *blk, int l, int col, gsl_complex *r)
+{
+ int o;
+ parse_result pr;
+
+ o = parse_block_work(blk, l, col, &pr);
+
+ if(o == 0 && pr.type == PR_CMPLX){
+ *r = pr.value.c;
+ if(!disable_write) {
+ fprintf(fout, " (%d, %d) = (%g,%g)\n", l, col, GSL_REAL(*r), GSL_IMAG(*r));
+ }
+ return 0;
+ }else
+ return o;
+}
+
+int parse_block_string(sym_block *blk, int l, int col, char **r)
+{
+ int o;
+ parse_result pr;
+
+ o = parse_block_work(blk, l, col, &pr);
+
+ if(o == 0 && pr.type == PR_STR){
+ *r = pr.value.s;
+ if(!disable_write) {
+ fprintf(fout, " (%d, %d) = \"%s\"\n", l, col, *r);
+ }
+ return 0;
+ }else
+ return o;
+}
+
+
+void parse_putsym_int(char *s, int i)
+{
+ symrec *rec = putsym(s, S_CMPLX);
+ GSL_SET_COMPLEX(&rec->value.c, (double)i, 0);
+}
+
+void parse_putsym_double(char *s, double d)
+{
+ symrec *rec = putsym(s, S_CMPLX);
+ GSL_SET_COMPLEX(&rec->value.c, d, 0);
+}
+
+void parse_putsym_complex(char *s, gsl_complex c)
+{
+ symrec *rec = putsym(s, S_CMPLX);
+ rec->value.c = c;
+}
diff --git a/liboct_parser/parse_exp.c b/liboct_parser/parse_exp.c
new file mode 100644
index 0000000..710300a
--- /dev/null
+++ b/liboct_parser/parse_exp.c
@@ -0,0 +1,144 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: parse_exp.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <gsl/gsl_complex.h>
+#include <gsl/gsl_complex_math.h>
+
+#include "liboct_parser.h"
+#include "symbols.h"
+
+static char *par_string;
+static int par_pos;
+parse_result par_res;
+
+int yylex();
+int yyerror (char *s) /* Called by yyparse on error */
+{
+ /* Do nothing */
+ /* printf("%s\n", s); */
+ return 0;
+}
+
+/* include the parser */
+#include "grammar.c"
+
+int parse_exp(char *exp, parse_result *r)
+{
+ int o;
+
+ par_string = exp;
+ par_pos = 0;
+
+ o = yyparse();
+ if(o == 0){
+ r->type = par_res.type;
+ if(r->type == PR_CMPLX)
+ r->value.c = par_res.value.c;
+ else
+ r->value.s = par_res.value.s;
+ }
+ return o;
+}
+
+int get_real(char *s, double *d)
+{
+ int n=0;
+ sscanf(s, "%lg", d);
+ while(*s && (isdigit(*s) || *s=='.' || *s=='e' || *s=='E')){
+ if((*s=='e' || *s=='E') && (*(s+1)=='+' || *(s+1)=='-')) {s++; n++;}
+ s++; n++;
+ }
+ return n;
+}
+
+int yylex (){
+ int c;
+ static char *symbuf = 0;
+ static int length = 0;
+
+ /* Ignore whitespace, get first nonwhite character. */
+ while ((c = par_string[par_pos++]) == ' ' || c == '\t');
+
+ if (c == '\0')
+ return '\n';
+
+ /* Char starts a number => parse the number. */
+ if (c == '.' || isdigit (c)){
+ par_pos--;
+ par_pos += get_real(&par_string[par_pos], &GSL_REAL(yylval.val));
+ return NUM;
+ }
+
+ /* Char starts an identifier => read the name. */
+ if (isalpha (c) || c == '\'' || c == '\"'){
+ symrec *s;
+ char startc = c;
+ int i;
+
+ /* Initially make the buffer long enough
+ for a 40-character symbol name. */
+ if (length == 0)
+ length = 40, symbuf = (char *)malloc (length + 1);
+
+ if(startc == '\'' || startc == '\"')
+ c = par_string[par_pos++];
+ else
+ startc = 0; /* false */
+
+ i = 0;
+ do{
+ /* If buffer is full, make it bigger. */
+ if (i == length){
+ length *= 2;
+ symbuf = (char *)realloc (symbuf, length + 1);
+ }
+ /* Add this character to the buffer. */
+ symbuf[i++] = c;
+ /* Get another character. */
+ c = par_string[par_pos++];
+ }while (c != '\0' && ((startc && c!=startc) ||
+ (!startc && (isalnum(c) || c == '_' ))));
+
+ if(!startc) par_pos--;
+ symbuf[i] = '\0';
+
+ if(!startc){
+ s = getsym (symbuf);
+ if (s == 0)
+ s = putsym (symbuf, S_CMPLX);
+ yylval.tptr = s;
+ if(s->type == S_CMPLX)
+ return VAR;
+ else
+ return FNCT;
+ }else{
+ yylval.str = strdup(symbuf);
+ return STR;
+ }
+ }
+
+ /* Any other character is a token by itself. */
+ return c;
+}
diff --git a/liboct_parser/parser_f.c b/liboct_parser/parser_f.c
new file mode 100644
index 0000000..a108439
--- /dev/null
+++ b/liboct_parser/parser_f.c
@@ -0,0 +1,296 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: parser_f.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+
+#include "liboct_parser.h"
+#include "string_f.h"
+
+/* --------------------- Interface to the parsing routines ---------------------- */
+
+/* --------------------------------------------------------- */
+/* Initialization of the library */
+/* --------------------------------------------------------- */
+int FC_FUNC_(oct_parse_init, OCT_PARSE_INIT)
+ (STR_F_TYPE s, int *dont_write STR_ARG1)
+{
+ int r;
+ char *s_c;
+
+ s_c = TO_C_STR1(s);
+ r = parse_init(s_c, dont_write);
+ free(s_c);
+
+ return r;
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_putsym_int, OCT_PARSE_PUTSYM_INT)
+ (STR_F_TYPE s, int *i STR_ARG1)
+{
+ char *s_c = TO_C_STR1(s);
+ parse_putsym_int(s_c, *i);
+ free(s_c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_putsym_double, OCT_PARSE_PUTSYM_DOUBLE)
+ (STR_F_TYPE s, double *d STR_ARG1)
+{
+ char *s_c = TO_C_STR1(s);
+ parse_putsym_double(s_c, *d);
+ free(s_c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_putsym_complex, OCT_PARSE_PUTSYM_COMPLEX)
+ (STR_F_TYPE s, gsl_complex *c STR_ARG1)
+{
+ char *s_c = TO_C_STR1(s);
+ parse_putsym_complex(s_c, *c);
+ free(s_c);
+}
+
+
+/* --------------------------------------------------------- */
+int FC_FUNC_(oct_parse_input, OCT_PARSE_INIT)
+ (STR_F_TYPE s STR_ARG1)
+{
+ int r;
+ char *s_c;
+
+ s_c = TO_C_STR1(s);
+ r = parse_input(s_c);
+ free(s_c);
+
+ return r;
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_end, OCT_PARSE_END)
+ ()
+{
+ parse_end();
+}
+
+
+/* --------------------------------------------------------- */
+/* Parser functions */
+/* --------------------------------------------------------- */
+int FC_FUNC_(oct_parse_isdef, OCT_PARSE_ISDEF)
+ (STR_F_TYPE name STR_ARG1)
+{
+ int r;
+ char *name_c;
+
+ name_c = TO_C_STR1(name);
+ r = parse_isdef(name_c);
+ free(name_c);
+
+ return r;
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_int, OCT_PARSE_INT)
+ (STR_F_TYPE name, int *def, int *res STR_ARG1)
+{
+ char *name_c;
+ name_c = TO_C_STR1(name);
+ *res = parse_int(name_c, *def);
+ free(name_c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_double, OCT_PARSE_DOUBLE)
+ (STR_F_TYPE name, double *def, double *res STR_ARG1)
+{
+ char *name_c;
+ name_c = TO_C_STR1(name);
+ *res = parse_double(name_c, *def);
+ free(name_c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_complex, OCT_PARSE_COMPLEX)
+ (STR_F_TYPE name, gsl_complex *def, gsl_complex *res STR_ARG1)
+{
+ char *name_c;
+ name_c = TO_C_STR1(name);
+ *res = parse_complex(name_c, *def);
+ free(name_c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_string, OCT_PARSE_STRING)
+ (STR_F_TYPE name, STR_F_TYPE def, STR_F_TYPE res STR_ARG3)
+{
+ char *c, *name_c, *def_c;
+
+ name_c = TO_C_STR1(name); /* convert string to c strings */
+ def_c = TO_C_STR2(def);
+ c = parse_string(name_c, def_c);
+ TO_F_STR3(c, res); /* convert string to fortran */
+ free(name_c); free(def_c); /* this has to be *after* the to_f_str
+ or we will have memory problems */
+}
+
+
+/* --------------------------------------------------------- */
+static void parse_block_error(char *type, char *name, int l, int c){
+ fprintf(stderr, "Error: block \"%s\" does not contain a %s in line %d and col %d\n",
+ name, type, l, c);
+ /* exit(1); */
+}
+static char *block_name = NULL;
+
+
+/* --------------------------------------------------------- */
+int FC_FUNC_(oct_parse_block, OCT_PARSE_BLOCK)
+ (STR_F_TYPE name, sym_block **blk STR_ARG1)
+{
+ int r;
+
+ assert(block_name == NULL);
+
+ block_name = TO_C_STR1(name);
+ r = parse_block(block_name, blk);
+
+ if(r != 0){
+ free(block_name);
+ block_name = NULL;
+ }
+ return r;
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_block_end, OCT_PARSE_BLOCK_END)
+ (sym_block **blk)
+{
+ assert(block_name!=NULL);
+
+ parse_block_end(blk);
+ free(block_name);
+ block_name = NULL;
+}
+
+
+/* --------------------------------------------------------- */
+int FC_FUNC_(oct_parse_block_n, OCT_PARSE_BLOCK_N)
+ (sym_block **blk)
+{
+ return parse_block_n(*blk);
+}
+
+
+/* --------------------------------------------------------- */
+int FC_FUNC_(oct_parse_block_cols, OCT_PARSE_BLOCK_COLS)
+ (sym_block **blk, int *l)
+{
+ return parse_block_cols(*blk, *l);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_block_int, OCT_PARSE_BLOCK_INT)
+ (sym_block **blk, int *l, int *c, int *res)
+{
+ if(parse_block_int(*blk, *l, *c, res) != 0)
+ parse_block_error("int", block_name, *l, *c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_block_double, OCT_PARSE_BLOCK_DOUBLE)
+ (sym_block **blk, int *l, int *c, double *res)
+{
+ if(parse_block_double(*blk, *l, *c, res) != 0)
+ parse_block_error("double", block_name, *l, *c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_block_complex, OCT_PARSE_BLOCK_COMPLEX)
+ (sym_block **blk, int *l, int *c, gsl_complex *res)
+{
+ if(parse_block_complex(*blk, *l, *c, res) != 0)
+ parse_block_error("complex", block_name, *l, *c);
+}
+
+
+/* --------------------------------------------------------- */
+void FC_FUNC_(oct_parse_block_string, OCT_PARSE_BLOCK_STRING)
+ (sym_block **blk, int *l, int *c, STR_F_TYPE res STR_ARG1)
+{
+ char *s;
+
+ if(parse_block_string(*blk, *l, *c, &s) != 0)
+ parse_block_error("string", block_name, *l, *c);
+ else{
+ TO_F_STR1(s, res);
+ }
+}
+
+
+/* --------------------------------------------------------- */
+double FC_FUNC_(oct_parse_potential, OCT_PARSE_POTENTIAL)
+ (double *x, double *y, double *z, double *r, STR_F_TYPE pot STR_ARG1)
+{
+ symrec *rec;
+ parse_result c;
+ char *pot_c;
+
+ pot_c = TO_C_STR1(pot);
+
+ rec = putsym("x", S_CMPLX);
+ GSL_SET_COMPLEX(&rec->value.c, *x, 0);
+ rec = putsym("y", S_CMPLX);
+ GSL_SET_COMPLEX(&rec->value.c, *y, 0);
+ rec = putsym("z", S_CMPLX);
+ GSL_SET_COMPLEX(&rec->value.c, *z, 0);
+ rec = putsym("r", S_CMPLX);
+ GSL_SET_COMPLEX(&rec->value.c, *r, 0);
+
+ parse_exp(pot_c, &c);
+
+ free(pot_c); /* clean up */
+ rmsym("x"); rmsym("y"); rmsym("z"); rmsym("r");
+
+ return GSL_REAL(c.value.c);
+}
diff --git a/liboct_parser/string_f.c b/liboct_parser/string_f.c
new file mode 100644
index 0000000..52ad04b
--- /dev/null
+++ b/liboct_parser/string_f.c
@@ -0,0 +1,82 @@
+/*
+ Copyright (C) 2003 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: string_f.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+/* --------------------- Fortran to C string compatibility ---------------------- */
+
+#include "string_f.h"
+#include <stdlib.h>
+
+#if defined(_CRAY)
+
+char *to_c_str(_fcd f)
+{
+ char *c, *fc;
+ int slen;
+
+ fc = _fcdtocp(f);
+ for(slen=_fcdlen(f)-1; slen>=0 && fc[slen]==' '; slen--);
+ slen++;
+ c = (char *)malloc(slen+1);
+ strncpy(c, _fcdtocp(f), slen);
+ c[slen] = '\0';
+ return c;
+}
+
+void to_f_str(char *c, _fcd f)
+{
+ char *fc;
+ int flen, clen, i;
+
+ flen = _fcdlen(f);
+ fc = _fcdtocp(f);
+ clen = strlen(c);
+ for(i=0; i<clen && i<flen; i++)
+ fc[i] = c[i];
+ for(; i<flen; i++)
+ fc[i] = ' ';
+}
+
+#else
+
+char *to_c_str(STR_F_TYPE f, unsigned long l)
+{
+ char *c;
+ int i;
+
+ for(l--; l>=0; l--) /* find length of fortran string */
+ if(f[l] != ' ') break;
+ l++; /* need space for th '\0' */
+ c = (char *)malloc((l+1)*sizeof(char)); /* alloc c string */
+ for(i=0; i<l; i++) c[i] = f[i]; /* copy fortran string onto c string */
+ c[i] = '\0'; /* add '\0' to the end of the c string */
+ return c;
+}
+
+void to_f_str(char *c, STR_F_TYPE f, unsigned long l)
+{
+ int i;
+ for(i=0; i<l && c[i]!='\0'; i++) /* copy string */
+ f[i] = c[i];
+ for(; i<l; i++) /* fill the rest with whitespace */
+ f[i] = ' ';
+}
+
+#endif
diff --git a/liboct_parser/string_f.h b/liboct_parser/string_f.h
new file mode 100644
index 0000000..b00f4e5
--- /dev/null
+++ b/liboct_parser/string_f.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2003 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: string_f.h 778 2013-07-11 15:49:39Z micael $
+*/
+
+/* --------------------- Fortran to C string compatibility ---------------------- */
+#if defined(_CRAY)
+#include <fortran.h>
+
+#define STR_F_TYPE _fcd
+#define TO_C_STR1(s) to_c_str(s)
+#define TO_C_STR2(s) to_c_str(s)
+#define TO_C_STR3(s) to_c_str(s)
+#define TO_F_STR1(c, f) to_f_str(c, f)
+#define TO_F_STR2(c, f) to_f_str(c, f)
+#define TO_F_STR3(c, f) to_f_str(c, f)
+#define STR_ARG1
+#define STR_ARG2
+#define STR_ARG3
+
+char *to_c_str(STR_F_TYPE f);
+void to_f_str(char *c, STR_F_TYPE f);
+
+#else
+
+#define STR_F_TYPE char *
+#define TO_C_STR1(s) to_c_str(s, l1)
+#define TO_C_STR2(s) to_c_str(s, l2)
+#define TO_C_STR3(s) to_c_str(s, l3)
+#define TO_F_STR1(c, f) to_f_str(c, f, l1)
+#define TO_F_STR2(c, f) to_f_str(c, f, l2)
+#define TO_F_STR3(c, f) to_f_str(c, f, l3)
+#define STR_ARG1 , unsigned long l1
+#define STR_ARG2 , unsigned long l1, unsigned long l2
+#define STR_ARG3 , unsigned long l1, unsigned long l2, unsigned long l3
+
+char *to_c_str(STR_F_TYPE f, unsigned long l);
+void to_f_str(char *c, STR_F_TYPE f, unsigned long l);
+
+#endif
diff --git a/liboct_parser/symbols.c b/liboct_parser/symbols.c
new file mode 100644
index 0000000..795d775
--- /dev/null
+++ b/liboct_parser/symbols.c
@@ -0,0 +1,234 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: symbols.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <ctype.h>
+#include <math.h>
+#include <gsl/gsl_complex_math.h>
+
+#include "symbols.h"
+#include "gsl_userdef.h"
+
+
+
+/* The symbol table: a chain of `struct symrec'. */
+symrec *sym_table = (symrec *)0;
+
+char *str_tolower(char *in)
+{
+ char *s;
+ for(s=in; *s; s++)
+ *s = tolower(*s);
+ return in;
+}
+
+symrec *putsym (char *sym_name, symrec_type sym_type)
+{
+ symrec *ptr;
+ ptr = (symrec *)malloc(sizeof(symrec));
+
+ /* names are always lowercase */
+ ptr->name = strdup(sym_name);
+ str_tolower(ptr->name);
+
+ ptr->type = sym_type;
+ GSL_SET_COMPLEX(&ptr->value.c, 0, 0); /* set value to 0 even if fctn. */
+ ptr->next = (struct symrec *)sym_table;
+ sym_table = ptr;
+ return ptr;
+}
+
+symrec *getsym (char *sym_name)
+{
+ symrec *ptr;
+ for (ptr = sym_table; ptr != (symrec *) 0;
+ ptr = (symrec *)ptr->next)
+ if (strcasecmp(ptr->name,sym_name) == 0)
+ return ptr;
+ return (symrec *) 0;
+}
+
+int rmsym (char *sym_name)
+{
+ symrec *ptr, *prev;
+ for (prev = (symrec *) 0, ptr = sym_table; ptr != (symrec *) 0;
+ prev = ptr, ptr = ptr->next)
+ if (strcasecmp(ptr->name,sym_name) == 0){
+ if(prev == (symrec *) 0)
+ sym_table = ptr->next;
+ else
+ prev->next = ptr->next;
+ free(ptr->name);
+ free(ptr);
+
+ return 1;
+ }
+
+ return 0;
+}
+
+struct init_fntc{
+ char *fname;
+ gsl_complex (*fnct)();
+};
+
+static struct init_fntc arith_fncts[] = {
+ {"sqrt", gsl_complex_sqrt},
+ {"exp", gsl_complex_exp},
+ {"ln", gsl_complex_log},
+ {"log", gsl_complex_log},
+ {"log10", gsl_complex_log10},
+
+ {"sin", gsl_complex_sin},
+ {"cos", gsl_complex_cos},
+ {"tan", gsl_complex_tan},
+ {"sec", gsl_complex_sec},
+ {"csc", gsl_complex_csc},
+ {"cot", gsl_complex_cot},
+
+ {"asin", gsl_complex_arcsin},
+ {"acos", gsl_complex_arccos},
+ {"atan", gsl_complex_arctan},
+ {"asec", gsl_complex_arcsec},
+ {"acsc", gsl_complex_arccsc},
+ {"acot", gsl_complex_arccot},
+
+ {"sinh", gsl_complex_sinh},
+ {"cosh", gsl_complex_cosh},
+ {"tanh", gsl_complex_tanh},
+ {"sech", gsl_complex_sech},
+ {"csch", gsl_complex_csch},
+ {"coth", gsl_complex_coth},
+
+ {"asinh", gsl_complex_arcsinh},
+ {"acosh", gsl_complex_arccosh},
+ {"atanh", gsl_complex_arctanh},
+ {"asech", gsl_complex_arcsech},
+ {"acsch", gsl_complex_arccsch},
+ {"acoth", gsl_complex_arccoth},
+
+/* user defined step function. this is not available in GSL,
+ but use GSL namespacing and macros. */
+ {"step", gsl_complex_step_real},
+
+ {0, 0}
+};
+
+struct init_cnst{
+ char *fname;
+ double c;
+};
+
+static struct init_cnst arith_cnts[] = {
+ {"pi", M_PI}, {"e", M_E},
+ {"true", 1}, {"t", 1}, {"yes", 1},
+ {"false", 0}, {"f", 0}, {"no", 0},
+ {0, 0}
+};
+
+static char *reserved_symbols[] = {
+ "x", "y", "z", "r", 0
+};
+
+void sym_init_table () /* puts arithmetic functions in table. */
+{
+ int i;
+ symrec *ptr;
+ for (i = 0; arith_fncts[i].fname != 0; i++){
+ ptr = putsym (arith_fncts[i].fname, S_FNCT);
+ ptr->value.fnctptr = arith_fncts[i].fnct;
+ }
+
+ /* now the constants */
+ for (i = 0; arith_cnts[i].fname != 0; i++){
+ ptr = putsym(arith_cnts[i].fname, S_CMPLX);
+ GSL_SET_COMPLEX(&ptr->value.c, arith_cnts[i].c, 0);
+ }
+}
+
+void sym_clear_reserved()
+{
+ int i;
+ for (i = 0; reserved_symbols[i] != 0; i++){
+ rmsym(reserved_symbols[i]);
+ }
+}
+
+void sym_end_table()
+{
+ symrec *ptr, *ptr2;
+ int l, col;
+
+ for (ptr = sym_table; ptr != NULL;){
+ free(ptr->name);
+ switch(ptr->type){
+ case S_STR:
+ free(ptr->value.str);
+ break;
+ case S_BLOCK:
+ if(ptr->value.block->n > 0){
+ for(l = 0; l < ptr->value.block->n; l++){
+ if(ptr->value.block->lines[l].n > 0){
+ for(col = 0; col < ptr->value.block->lines[l].n; col++)
+ free(ptr->value.block->lines[l].fields[col]);
+ free(ptr->value.block->lines[l].fields);
+ }
+ }
+ free(ptr->value.block->lines);
+ }
+ free(ptr->value.block);
+ break;
+ case S_CMPLX:
+ case S_FNCT:
+ break;
+ }
+ ptr2 = ptr->next;
+ free(ptr);
+ ptr = ptr2;
+ }
+
+ sym_table = NULL;
+}
+
+void sym_output_table()
+{
+ symrec *ptr;
+ for(ptr = sym_table; ptr != NULL; ptr = ptr->next){
+ printf("%s", ptr->name);
+ switch(ptr->type){
+ case S_CMPLX:
+ printf(" = (%lf,%lf)\n", GSL_REAL(ptr->value.c), GSL_IMAG(ptr->value.c));
+ break;
+ case S_STR:
+ printf(" = \"%s\"\n", ptr->value.str);
+ break;
+ case S_BLOCK:
+ printf("%s\n", " <= BLOCK");
+ break;
+ case S_FNCT:
+ printf("%s\n", " <= FUNCTION");
+ break;
+ }
+ }
+}
diff --git a/liboct_parser/symbols.h b/liboct_parser/symbols.h
new file mode 100644
index 0000000..24051db
--- /dev/null
+++ b/liboct_parser/symbols.h
@@ -0,0 +1,68 @@
+/*
+ Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: symbols.h 778 2013-07-11 15:49:39Z micael $
+*/
+
+#ifndef _SYMBOLS_H
+#define _SYMBOLS_H
+
+#include <gsl/gsl_complex.h>
+
+typedef struct sym_block_line{
+ int n;
+ char **fields;
+}sym_block_line;
+
+typedef struct sym_block{
+ int n;
+ sym_block_line *lines;
+}sym_block;
+
+typedef enum{
+ S_CMPLX, S_STR, S_BLOCK, S_FNCT
+}symrec_type;
+
+/* Data type for links in the chain of symbols. */
+typedef struct symrec{
+ char *name; /* name of symbol */
+ symrec_type type; /* type of symbol: either VAR or FNCT */
+
+ union {
+ gsl_complex c; /* value of a VAR */
+ char *str; /* value of a STRING */
+ sym_block *block; /* to store blocks */
+ gsl_complex (*fnctptr)(); /* value of a FNCT */
+ } value;
+
+ struct symrec *next; /* link field */
+} symrec;
+
+/* The symbol table: a chain of struct symrec. */
+extern symrec *sym_table;
+
+symrec *putsym (char *sym_name, symrec_type sym_type);
+symrec *getsym (char *sym_name);
+int rmsym (char *sym_name);
+void sym_init_table();
+void sym_clear_reserved();
+void sym_end_table();
+void sym_output_table();
+char *str_tolower(char *in);
+
+#endif
diff --git a/libstring_f/AUTHORS b/libstring_f/AUTHORS
new file mode 100644
index 0000000..1b88f07
--- /dev/null
+++ b/libstring_f/AUTHORS
@@ -0,0 +1,9 @@
+The main developing team of this program consists of:
+
+ * Micael Oliveira (micael at teor.fis.uc.pt)
+ * Fernando Nogueira (fnog at uc.pt)
+
+Other contributors are:
+
+ * José Rui Faustino (jrfsousa at teor.fis.uc.pt)
+ * Tiago Cerqueira (tiagoftcerqueira at gmail.com)
diff --git a/libstring_f/COPYING b/libstring_f/COPYING
new file mode 100644
index 0000000..623b625
--- /dev/null
+++ b/libstring_f/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/libstring_f/ChangeLog b/libstring_f/ChangeLog
new file mode 100644
index 0000000..d78f4f7
--- /dev/null
+++ b/libstring_f/ChangeLog
@@ -0,0 +1 @@
+2006/09/23 - Initial version of the library
diff --git a/libstring_f/INSTALL b/libstring_f/INSTALL
new file mode 100644
index 0000000..a1e89e1
--- /dev/null
+++ b/libstring_f/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
+
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put `/usr/ucb' early in your `PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+ On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/libstring_f/Makefile.am b/libstring_f/Makefile.am
new file mode 100644
index 0000000..a745dc1
--- /dev/null
+++ b/libstring_f/Makefile.am
@@ -0,0 +1,9 @@
+# $Id: Makefile.am 1198 2005-06-05 15:41:38Z acastro $
+
+noinst_LIBRARIES = libstring_f.a
+
+libstring_f_a_SOURCES = string_f.c
+
+noinst_HEADERS = string_f.h
+
+CLEANFILES = *~ *.bak
diff --git a/libstring_f/Makefile.in b/libstring_f/Makefile.in
new file mode 100644
index 0000000..e2621e1
--- /dev/null
+++ b/libstring_f/Makefile.in
@@ -0,0 +1,642 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# $Id: Makefile.am 1198 2005-06-05 15:41:38Z acastro $
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
+ config.guess config.sub depcomp install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+AR = ar
+ARFLAGS = cru
+libstring_f_a_AR = $(AR) $(ARFLAGS)
+libstring_f_a_LIBADD =
+am_libstring_f_a_OBJECTS = string_f.$(OBJEXT)
+libstring_f_a_OBJECTS = $(am_libstring_f_a_OBJECTS)
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(libstring_f_a_SOURCES)
+DIST_SOURCES = $(libstring_f_a_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+AM_RECURSIVE_TARGETS = cscope
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = libstring_f.a
+libstring_f_a_SOURCES = string_f.c
+noinst_HEADERS = string_f.h
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libstring_f.a: $(libstring_f_a_OBJECTS) $(libstring_f_a_DEPENDENCIES) $(EXTRA_libstring_f_a_DEPENDENCIES)
+ -rm -f libstring_f.a
+ $(libstring_f_a_AR) libstring_f.a $(libstring_f_a_OBJECTS) $(libstring_f_a_LIBADD)
+ $(RANLIB) libstring_f.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/string_f.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+ -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod u+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
+ clean-cscope clean-generic clean-noinstLIBRARIES cscope \
+ cscopelist ctags dist dist-all dist-bzip2 dist-gzip dist-lzip \
+ dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+ distclean-compile distclean-generic distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libstring_f/NEWS b/libstring_f/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/libstring_f/README b/libstring_f/README
new file mode 100644
index 0000000..b34f932
--- /dev/null
+++ b/libstring_f/README
@@ -0,0 +1,24 @@
+This very simple library tries to do what many think impossible: to
+allow the passage of strings between Fortran and C and viceversa. Almost
+all Fortran compilers pass strings by including hidden parameters that
+contain the length of the string. The exception is the CRAY compiler,
+where a string is a structure, and there is a series of functions that
+allow to handle it.
+
+An example of the use is
+
+>>>>>>>>>>>>>>>>>>
+void FC_FUNC_(xc_info_family, XC_INFO_FAMILY)
+ (void **info, STR_F_TYPE s STR_ARG1)
+{
+ TO_F_STR1(((func_type *)(*info))->family, s);
+}
+<<<<<<<<<<<<<<<<<<
+
+STR_F_TYPE: defines the (compiler dependent) type of the string
+STR_ARG1 : used to add the hidden arguments that some compilers use
+TO_F_STR1 : converts a C string to a Fortran string
+TO_C_STR1 : converts a Fortran string in a Fortran string
+
+The number (in this case 1) refers to the number of strings present in
+the argument list.
diff --git a/libstring_f/aclocal.m4 b/libstring_f/aclocal.m4
new file mode 100644
index 0000000..4cefd89
--- /dev/null
+++ b/libstring_f/aclocal.m4
@@ -0,0 +1,973 @@
+# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.12'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.12.2], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.12.2])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 17
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 19
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+[$0: two- and three-arguments forms are deprecated. For more info, see:
+http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+dnl Support for Objective C++ was only introduced in Autoconf 2.65,
+dnl but we still cater to Autoconf 2.62.
+m4_ifdef([AC_PROG_OBJCXX],
+[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of '-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/libstring_f/config.guess b/libstring_f/config.guess
new file mode 100755
index 0000000..49ba16f
--- /dev/null
+++ b/libstring_f/config.guess
@@ -0,0 +1,1522 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-01-01'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel at ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes at openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf at swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green at stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/libstring_f/config.sub b/libstring_f/config.sub
new file mode 100755
index 0000000..d6b6b3c
--- /dev/null
+++ b/libstring_f/config.sub
@@ -0,0 +1,1766 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-01-01'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>. Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | be32 | be64 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | epiphany \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | open8 \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/libstring_f/configure b/libstring_f/configure
new file mode 100755
index 0000000..302172c
--- /dev/null
+++ b/libstring_f/configure
@@ -0,0 +1,5702 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for string_f 1.0.
+#
+# Report bugs to <ape-devel at tddft.org>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf at gnu.org and
+$0: ape-devel at tddft.org about your system, including any
+$0: error possibly output before this message. Then install
+$0: a modern shell, or manually run the script under such a
+$0: shell if you do have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='string_f'
+PACKAGE_TARNAME='string_f'
+PACKAGE_VERSION='1.0'
+PACKAGE_STRING='string_f 1.0'
+PACKAGE_BUGREPORT='ape-devel at tddft.org'
+PACKAGE_URL=''
+
+ac_unique_file="string_f.h"
+ac_default_prefix=/opt/etfs
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+ALLOCA
+EGREP
+GREP
+CPP
+RANLIB
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures string_f 1.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/string_f]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of string_f 1.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <ape-devel at tddft.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+string_f configure 1.0
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by string_f $as_me 1.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+am__api_version='1.12'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if ${ac_cv_path_mkdir+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='string_f'
+ VERSION='1.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# Installation prefix by default
+
+
+# who am i
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+# Checks for header files.
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction (int *addr, int depth)
+{
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+ return find_stack_direction (0, argc + !argv + 20) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+# Checks for functions
+for ac_func in malloc
+do :
+ ac_fn_c_check_func "$LINENO" "malloc" "ac_cv_func_malloc"
+if test "x$ac_cv_func_malloc" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MALLOC 1
+_ACEOF
+
+fi
+done
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+:mline
+/\\$/{
+ N
+ s,\\\n,,
+ b mline
+}
+t clear
+:clear
+s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+ g
+ s/^\n//
+ s/\n/ /g
+ p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by string_f $as_me 1.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <ape-devel at tddft.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+string_f config.status 1.0
+configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h | --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+
+eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+
+
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/libstring_f/configure.ac b/libstring_f/configure.ac
new file mode 100644
index 0000000..4e76756
--- /dev/null
+++ b/libstring_f/configure.ac
@@ -0,0 +1,42 @@
+## Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: configure.ac 2402 2006-09-14 16:59:22Z acastro $
+
+AC_INIT([string_f],[1.0],[ape-devel at tddft.org],[string_f])
+AC_CONFIG_SRCDIR([string_f.h])
+AM_INIT_AUTOMAKE
+
+# Installation prefix by default
+AC_PREFIX_DEFAULT([/opt/etfs])
+
+# who am i
+AC_CANONICAL_HOST
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_FUNC_ALLOCA
+
+# Checks for functions
+AC_CHECK_FUNCS([malloc])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/libstring_f/depcomp b/libstring_f/depcomp
new file mode 100755
index 0000000..bd0ac08
--- /dev/null
+++ b/libstring_f/depcomp
@@ -0,0 +1,688 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2011-12-04.11; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> "$depfile"
+ echo >> "$depfile"
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/libstring_f/install-sh b/libstring_f/install-sh
new file mode 100755
index 0000000..a9244eb
--- /dev/null
+++ b/libstring_f/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for `test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/libstring_f/missing b/libstring_f/missing
new file mode 100755
index 0000000..86a8fc3
--- /dev/null
+++ b/libstring_f/missing
@@ -0,0 +1,331 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2012-01-06.13; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te*)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison*|yacc*)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex*|flex*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG=\${$#}
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit $?
+ fi
+ ;;
+
+ makeinfo*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/libstring_f/string_f.c b/libstring_f/string_f.c
new file mode 100644
index 0000000..71ceae9
--- /dev/null
+++ b/libstring_f/string_f.c
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2003 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: string_f.c 2422 2006-09-23 20:43:15Z marques $
+*/
+
+/* --------------------- Fortran to C string compatibility ---------------------- */
+
+#include "string_f.h"
+#include <stdlib.h>
+
+#if defined(_CRAY)
+
+char *to_c_str(_fcd f)
+{
+ char *c, *fc;
+ int slen;
+
+ fc = _fcdtocp(f);
+ for(slen=_fcdlen(f)-1; slen>=0 && fc[slen]==' '; slen--);
+ slen++;
+ c = (char *)malloc(slen+1);
+ strncpy(c, _fcdtocp(f), slen);
+ c[slen] = '\0';
+ return c;
+}
+
+void to_f_str(char *c, _fcd f)
+{
+ char *fc;
+ int flen, clen, i;
+
+ flen = _fcdlen(f);
+ fc = _fcdtocp(f);
+ clen = strlen(c);
+ for(i=0; i<clen && i<flen; i++)
+ fc[i] = c[i];
+ for(; i<flen; i++)
+ fc[i] = ' ';
+}
+
+#else
+
+char *to_c_str(STR_F_TYPE f, unsigned long l)
+{
+ char *c;
+ int i, ll;
+
+ ll = (int)l; /* I do this because otherwise there are troubles with the NAG 64 bits compiler on the Opteron */
+
+ for(ll--; ll>=0; ll--) /* find length of fortran string */
+ if(f[ll] != ' ') break;
+ ll++; /* need space for th '\0' */
+ c = (char *)malloc((ll+1)*sizeof(char)); /* alloc c string */
+ for(i=0; i<ll; i++) c[i] = f[i]; /* copy fortran string onto c string */
+ c[i] = '\0'; /* add '\0' to the end of the c string */
+ return c;
+}
+
+void to_f_str(char *c, STR_F_TYPE f, unsigned long l)
+{
+ int i,ll;
+ ll = (int)l;
+ for(i=0; i<ll && c[i]!='\0'; i++) /* copy string */
+ f[i] = c[i];
+ for(; i<ll; i++) /* fill the rest with whitespace */
+ f[i] = ' ';
+}
+
+#endif
diff --git a/libstring_f/string_f.h b/libstring_f/string_f.h
new file mode 100644
index 0000000..bee4e83
--- /dev/null
+++ b/libstring_f/string_f.h
@@ -0,0 +1,56 @@
+/*
+ Copyright (C) 2003 M. Marques, A. Castro, A. Rubio, G. Bertsch
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: string_f.h 2422 2006-09-23 20:43:15Z marques $
+*/
+
+/* --------------------- Fortran to C string compatibility ---------------------- */
+#if defined(_CRAY)
+#include <fortran.h>
+
+#define STR_F_TYPE _fcd
+#define TO_C_STR1(s) to_c_str(s)
+#define TO_C_STR2(s) to_c_str(s)
+#define TO_C_STR3(s) to_c_str(s)
+#define TO_F_STR1(c, f) to_f_str(c, f)
+#define TO_F_STR2(c, f) to_f_str(c, f)
+#define TO_F_STR3(c, f) to_f_str(c, f)
+#define STR_ARG1
+#define STR_ARG2
+#define STR_ARG3
+
+char *to_c_str(STR_F_TYPE f);
+void to_f_str(char *c, STR_F_TYPE f);
+
+#else
+
+#define STR_F_TYPE char *
+#define TO_C_STR1(s) to_c_str(s, l1)
+#define TO_C_STR2(s) to_c_str(s, l2)
+#define TO_C_STR3(s) to_c_str(s, l3)
+#define TO_F_STR1(c, f) to_f_str(c, f, l1)
+#define TO_F_STR2(c, f) to_f_str(c, f, l2)
+#define TO_F_STR3(c, f) to_f_str(c, f, l3)
+#define STR_ARG1 , unsigned long l1
+#define STR_ARG2 , unsigned long l1, unsigned long l2
+#define STR_ARG3 , unsigned long l1, unsigned long l2, unsigned long l3
+
+char *to_c_str(STR_F_TYPE f, unsigned long l);
+void to_f_str(char *c, STR_F_TYPE f, unsigned long l);
+
+#endif
diff --git a/m4/acx.m4 b/m4/acx.m4
new file mode 100644
index 0000000..a96d2b5
--- /dev/null
+++ b/m4/acx.m4
@@ -0,0 +1,245 @@
+## Copyright (C) 2002 M. Marques, A. Castro, A. Rubio, G. Bertsch
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: acx.m4 778 2013-07-11 15:49:39Z micael $
+##
+
+################################################
+# Check size of a pointer
+# ----------------------------------
+AC_DEFUN([ACX_POINTER_SIZE],
+[AC_MSG_CHECKING([for the size of a pointer])
+ AC_REQUIRE([AC_PROG_CC])
+ if test -z "$POINTER_SIZE"; then
+ cat >pointertest.c <<EOF
+#include <stdio.h>
+void main()
+{
+ printf("%ld", sizeof(void *));
+}
+EOF
+ ac_try='$CC $CFLAGS -o pointertest.x pointertest.c 1>&AC_FD_CC'
+ if AC_TRY_EVAL(ac_try); then
+ ac_try=""
+ else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat pointertest.c >&AC_FD_CC
+ rm -f pointertest*
+ AC_MSG_ERROR(failed to compile c program to find the size of a pointer)
+ fi
+ ac_pointersize=`./pointertest.x`;
+ rm -f pointertest*
+ AC_DEFINE_UNQUOTED(POINTER_SIZE, ${ac_pointersize}, [The size of a C pointer])
+ AC_MSG_RESULT([${ac_pointersize} bytes])
+fi
+])
+
+################################################
+# Check size of a fortran integer
+# ----------------------------------
+AC_DEFUN([ACX_FC_INTEGER_SIZE],
+[AC_MSG_CHECKING([for the size of a Fortran integer])
+ AC_REQUIRE([AC_PROG_FC])
+ if test -z "$FC_INTEGER_SIZE"; then
+ cat >intsizetest.f90 <<EOF
+program integer_size
+ integer :: i
+ integer(8) :: i8
+
+ i8 = huge(i)
+ select case(i8)
+ case(127_8); i = 1
+ case(32767_8); i = 2
+ case(2147483647_8); i = 4
+ case(9223372036854775807_8); i = 8
+ end select
+
+ write(*,'(i1)') i
+
+end program integer_size
+EOF
+ ac_try='$FC $FCFLAGS -o intsizetest.x intsizetest.f90 1>&AC_FD_CC'
+ if AC_TRY_EVAL(ac_try); then
+ ac_try=""
+ ac_fcintegersize=`./intsizetest.x`;
+ else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat intsizetest.f90 >&AC_FD_CC
+ AC_MSG_WARN(failed to compile f90 program to find the size of a Fortran integer)
+ ac_fcintegersize=4
+ fi
+ rm -f intsizetest*
+ AC_DEFINE_UNQUOTED(FC_INTEGER_SIZE, ${ac_fcintegersize}, [The size of a Fortran integer])
+ AC_MSG_RESULT([${ac_fcintegersize} bytes])
+fi
+])
+
+################################################
+# Check which C type corresponds to Fortran int
+# ----------------------------------
+AC_DEFUN([ACX_CC_FORTRAN_INT],
+[AC_MSG_CHECKING([for which C type corresponds to Fortran integer])
+ AC_REQUIRE([ACX_FC_INTEGER_SIZE])
+ AC_REQUIRE([AC_PROG_CC])
+ if test -z "$CC_FORTRAN_INT"; then
+ cat >ccfortranint.c <<EOF
+#include <stdio.h>
+
+int main(void)
+{
+ if(${ac_fcintegersize} == sizeof(char))
+ printf("char");
+ else if(${ac_fcintegersize} == sizeof(short))
+ printf("short");
+ else if(${ac_fcintegersize} == sizeof(int))
+ printf("int");
+ else if(${ac_fcintegersize} == sizeof(long))
+ printf("long");
+ else if(${ac_fcintegersize} == sizeof(long long))
+ printf("long long");
+ return 1;
+}
+EOF
+ ac_try='$CC $CCFLAGS -o ccfortranint.x ccfortranint.c 1>&AC_FD_CC'
+ if AC_TRY_EVAL(ac_try); then
+ ac_try=""
+ else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat ccfortranint.c >&AC_FD_CC
+ rm -f ccfortranint*
+ AC_MSG_ERROR(failed to compile C program to find the C type of a Fortran integer)
+ fi
+ ac_ccfortranint=`./ccfortranint.x`;
+ rm -f ccfortranint*
+ AC_DEFINE_UNQUOTED(CC_FORTRAN_INT, ${ac_ccfortranint}, [The C type of a Fortran integer])
+ AC_MSG_RESULT([${ac_ccfortranint}])
+fi
+])
+
+
+################################################
+# Check whether the compiler accepts very long lines.
+# ----------------------------------
+AC_DEFUN([ACX_LONG_FORTRAN_LINES],
+[AC_MSG_CHECKING([whether the compiler accepts very long lines])
+AC_COMPILE_IFELSE( AC_LANG_PROGRAM( [], [
+write(*, *) '45678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'
+ ]),
+ [acx_long_lines_ok=yes; AC_DEFINE(LONG_LINES, 1, [compiler supports long lines])], [acx_long_lines_ok=no] )
+AC_MSG_RESULT($acx_long_lines_ok)
+])
+
+
+################################################
+# Check whether the compiler accepts preprocessor "# line-number" lines.
+# ----------------------------------
+AC_DEFUN([ACX_F90_ACCEPTS_LINE_NUMBERS],
+[
+AC_MSG_CHECKING([whether the compiler accepts "line-number" lines cast by the preprocessor])
+AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM( [], [# 1]),
+ [acx_f90_accepts_line_numbers_ok=yes; AC_DEFINE(F90_ACCEPTS_LINE_NUMBERS, 1, [compiler supports line-number lines])],
+ [acx_f90_accepts_line_numbers_ok=no])
+AC_MSG_RESULT($acx_f90_accepts_line_numbers_ok)
+]
+)
+
+################################################
+# Check for the presence of a given function in Fortran.
+# It substitutes AC_CHECK_FUNC, since the latter
+# seems to fail with some autotools versions, due to a call to some broken
+# version of AC_LANG_FUNC_LINK_TRY.
+AC_DEFUN([ACX_FORTRAN_CHECK_FUNC],
+[
+AC_MSG_CHECKING([for $1])
+AC_LANG_PUSH(Fortran)dnl
+AC_TRY_LINK_FUNC($1,
+[
+acx_fortran_check_func=yes
+AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]),1, [Define if the $1 function can be called from Fortran])],
+[
+acx_fortran_check_func=no
+])dnl
+AC_LANG_POP(Fortran)dnl
+AC_MSG_RESULT($acx_fortran_check_func)
+])
+
+
+################################################
+# AC_LANG_FUNC_LINK_TRY(Fortran)(FUNCTION)
+# ----------------------------------
+m4_define([AC_LANG_FUNC_LINK_TRY(Fortran)],
+[AC_LANG_PROGRAM([], [call [$1]])])
+
+################################################
+# AC_LANG_PREPROC(Fortran)
+# ---------------------------
+m4_define([AC_LANG_PREPROC(Fortran)],[
+ # this should not be hardwired
+ if test -z "$FCCPP"; then FCCPP="/lib/cpp -C -ansi"; fi
+ AC_SUBST(FCCPP)
+])
+
+################################################
+# Get default FFLAGS
+# ----------------------------------
+# this function can certainly be improved on
+AC_DEFUN([ACX_FCFLAGS],
+[
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+if test -z "${FCFLAGS}"; then
+ case "${host}" in
+ i?86*linux*)
+ case "${FC}" in
+ pgf90*)
+ FCFLAGS="-O2 -fast -Munroll -Mnoframe -Mdalign"
+ ;;
+ abf90*)
+ FCFLAGS="-O -YEXT_NAMES=LCS -YEXT_SFX=_"
+ ;;
+ ifc|ifort*)
+ FCFLAGS="-u -zero -fpp1 -nbs -pc80 -pad -align -unroll -O3 -ip"
+ a=`echo $host | sed "s/^i//" | sed "s/86.*//"`
+ if test "$a" -gt 5 ; then
+ FCFLAGS="$FCFLAGS -tpp7 -xW"
+ fi
+ ;;
+ *)
+ FCFLAGS="-O"
+ esac
+ ;;
+ x86_64*)
+ dnl NAG => FCFLAGS="-colour -kind=byte -mismatch_all -abi=64 -ieee=full -O4 -Ounroll=4"
+ dnl ABSOFT => FCFLAGS="-O3 -mcmodel=medium -m64 -cpu:host -YEXT_NAMES=LCS -YEXT_SFX=_ -YDEALLOC=MINE"
+ dnl PGI => FCFLAGS="-fastsse -mcmodel=medium -O4 -Mdalign -Mlarge_arrays -Mscalarsse -Munroll=c:4,n:4 -Mvect=assoc,sse,cachesize:262144 -Minfo"
+ ;;
+ alphaev*)
+ FCFLAGS="-align dcommons -fast -tune host -arch host -noautomatic"
+ ;;
+ powerpc-ibm*)
+ FCFLAGS="-bmaxdata:0x80000000 -qmaxmem=-1 -qsuffix=f=f90 -Q -O5 -qstrict -qtune=auto -qarch=auto -qhot -qipa"
+ ;;
+ mips-sgi-irix*)
+ FCFLAGS="-O3 -INLINE -n32 -LANG:recursive=on"
+ ;;
+ *)
+ FCFLAGS="-O"
+ esac
+fi
+AC_MSG_NOTICE([Using FCFLAGS="$FCFLAGS"])
+])
diff --git a/m4/compilation_info.m4 b/m4/compilation_info.m4
new file mode 100644
index 0000000..75535ba
--- /dev/null
+++ b/m4/compilation_info.m4
@@ -0,0 +1,46 @@
+## Copyright (C) 2010 The octopus team
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: compilation_info.m4 778 2013-07-11 15:49:39Z micael $
+##
+
+################################################
+# Generates macro definitions for:
+# LATEST_SVN : the svn revision number.
+# BUILD_TIME : when the configure script is launched.
+# FC : The Fortran compiler
+# CC : The C compiler
+# CFLAGS : The flags passed to the C compiler.
+# FCFLAGS : The flags passed to the Fortran compiler.
+# ----------------------------------
+AC_DEFUN([ACX_COMPILATION_INFO],
+[
+AC_MSG_NOTICE([collecting compilation info...])
+
+rev=$(sh ./build/svn_release_number.sh 2> /dev/null)
+date=`date`
+AC_MSG_NOTICE([collecting compilation info... "$rev"])
+
+AC_DEFINE_UNQUOTED([LATEST_SVN], ["$rev"], [subversion revision number])
+AC_DEFINE_UNQUOTED([BUILD_TIME], ["$date"], [date when configure was launched])
+AC_DEFINE_UNQUOTED([CC], ["$CC"], [C compiler])
+AC_DEFINE_UNQUOTED([FC], ["$FC"], [Fortran compiler])
+AC_DEFINE_UNQUOTED([CFLAGS], ["$CFLAGS"], [C compiler])
+AC_DEFINE_UNQUOTED([FCFLAGS], ["$FCFLAGS $FCFLAGS_f90"], [Fortran compiler])
+
+]
+)
diff --git a/m4/f90_module_flag.m4 b/m4/f90_module_flag.m4
new file mode 100644
index 0000000..7767938
--- /dev/null
+++ b/m4/f90_module_flag.m4
@@ -0,0 +1,55 @@
+dnl @synopsis AX_F90_MODULE_FLAG
+dnl
+dnl @summary Find Fortran 90 modules inclusion flag.
+dnl
+dnl Find Fortran 90 modules inclusion flag. The module inclusion flag
+dnl is stored in the cached variable ax_f90_modflag. An error is
+dnl triggered if the flag cannot be found. Supported are the -I GNU
+dnl compilers flag, the -M SUN compilers flag, and the -p Absoft Pro
+dnl Fortran compiler flag.
+dnl
+dnl @category Fortran
+dnl @author Luc Maisonobe <luc at spaceroots.org>
+dnl @author Julian C. Cummings <cummings at cacr.caltech.edu>
+dnl @version 2006-01-28
+dnl @license AllPermissive
+dnl
+dnl $Id: f90_module_flag.m4 540 2010-11-09 17:53:26Z micael $
+
+AC_DEFUN([AX_F90_MODULE_FLAG],[
+AC_CACHE_CHECK([fortran 90 modules inclusion flag],
+ax_cv_f90_modflag,
+[AC_LANG_PUSH(Fortran)
+i=0
+while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
+ i=`expr $i + 1`
+done
+mkdir tmpdir_$i
+cd tmpdir_$i
+AC_COMPILE_IFELSE([module conftest_module
+ contains
+ subroutine conftest_routine
+ write(*,'(a)') 'gotcha!'
+ end subroutine conftest_routine
+ end module conftest_module
+ ],[],[])
+cd ..
+ax_cv_f90_modflag="not found"
+for ax_flag in "-I " "-I" "-M" "-p"; do
+ if test "$ax_cv_f90_modflag" = "not found" ; then
+ ax_save_FCFLAGS="$FCFLAGS"
+ FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i"
+ AC_COMPILE_IFELSE([program conftest_program
+ use conftest_module
+ call conftest_routine
+ end program conftest_program
+ ],[ax_cv_f90_modflag="$ax_flag"],[])
+ FCFLAGS="$ax_save_FCFLAGS"
+ fi
+done
+rm -fr tmpdir_$i
+if test "$ax_flag" = "not found" ; then
+ AC_MSG_ERROR([unable to find compiler flag for modules inclusion])
+fi
+AC_LANG_POP(Fortran)
+])])
diff --git a/m4/libxc.m4 b/m4/libxc.m4
new file mode 100644
index 0000000..df19cac
--- /dev/null
+++ b/m4/libxc.m4
@@ -0,0 +1,138 @@
+## Copyright (C) 2009-2013 M. Oliveira and F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: libxc.m4 785 2013-08-05 11:08:59Z micael $
+
+AC_DEFUN([ACX_LIBXC], [
+acx_libxc_ok=no
+
+dnl Check if the library was given in the command line
+dnl if not, use environment variables or defaults
+AC_ARG_WITH(libxc-prefix, [AS_HELP_STRING([--with-libxc-prefix=DIR], [Directory where libxc was installed.])])
+
+# Set FCFLAGS_LIBXC only if not set from environment
+if test x"$FCFLAGS_LIBXC" = x; then
+ case $with_libxc_prefix in
+ "") FCFLAGS_LIBXC="-I/usr/include" ;;
+ *) FCFLAGS_LIBXC="$ax_cv_f90_modflag$with_libxc_prefix/include" ;;
+ esac
+fi
+
+AC_ARG_WITH(libxc-include, [AS_HELP_STRING([--with-libxc-include=DIR], [Directory where libxc Fortran headers were installed.])])
+case $with_libxc_include in
+ "") ;;
+ *) FCFLAGS_LIBXC="$ax_cv_f90_modflag$with_libxc_include" ;;
+esac
+
+dnl Backup LIBS and FCFLAGS
+acx_libxc_save_LIBS="$LIBS"
+acx_libxc_save_FCFLAGS="$FCFLAGS"
+
+dnl The tests
+AC_MSG_CHECKING([for libxc])
+
+dnl The following program should work with all version of libxc
+testprog="AC_LANG_PROGRAM([],[
+ use xc_f90_lib_m
+ implicit none
+
+ integer :: i
+ i = XC_EXCHANGE
+])"
+
+
+FCFLAGS="$FCFLAGS_LIBXC $acx_libxc_save_FCFLAGS"
+
+# set from environment variable, if not blank
+if test ! -z "$LIBS_LIBXC"; then
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], [])
+fi
+
+# static linkage, separate Fortran interface
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="$with_libxc_prefix/lib/libxcf90.a $with_libxc_prefix/lib/libxc.a"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], [])
+fi
+
+# dynamic linkage, separate Fortran interface
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="-L$with_libxc_prefix/lib -lxcf90 -lxc"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], [])
+fi
+
+# static linkage, combined Fortran interface (libxc pre-r10730)
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="$with_libxc_prefix/lib/libxc.a"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], [])
+fi
+
+# dynamic linkage, combined Fortran interface (libxc pre-r10730)
+if test x"$acx_libxc_ok" = xno; then
+ LIBS_LIBXC="-L$with_libxc_prefix/lib -lxc"
+ LIBS="$LIBS_LIBXC $acx_libxc_save_LIBS"
+ AC_LINK_IFELSE($testprog, [acx_libxc_ok=yes], [])
+fi
+
+
+dnl The following programs will only work with specific version of libxc
+testprog_20="AC_LANG_PROGRAM([],[
+ use xc_f90_lib_m
+ implicit none
+ integer :: major
+ integer :: minor
+ call xc_f90_version(major, minor)])"
+
+testprog_12="AC_LANG_PROGRAM([],[
+ use xc_f90_lib_m
+ implicit none
+
+ integer :: i
+ i = XC_GGA_X_AIRY])"
+
+testprog_11="AC_LANG_PROGRAM([],[
+ use xc_f90_lib_m
+ implicit none
+
+ integer :: i
+ i = XC_KINETIC])"
+
+dnl Get libxc version
+if test x"$acx_libxc_ok" = xyes; then
+AC_LINK_IFELSE($testprog_11, [acx_libxc_version=110], [acx_libxc_version=100])
+AC_LINK_IFELSE($testprog_12, [acx_libxc_version=120], [])
+AC_LINK_IFELSE($testprog_20, [acx_libxc_version=200], [])
+AC_DEFINE_UNQUOTED([LIBXC_VERSION],[$acx_libxc_version],[Defined the LIBXC version.])
+fi
+
+AC_MSG_RESULT([$acx_libxc_ok ($FCFLAGS_LIBXC $LIBS_LIBXC)])
+
+dnl Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_libxc_ok" = xyes; then
+ AC_DEFINE(HAVE_LIBXC, 1, [Defined if you have the LIBXC library.])
+else
+ AC_MSG_ERROR([Could not find required libxc library ( >= v 1.0.0).])
+fi
+
+AC_SUBST(FCFLAGS_LIBXC)
+AC_SUBST(LIBS_LIBXC)
+FCFLAGS="$acx_libxc_save_FCFLAGS"
+LIBS="$acx_libxc_save_LIBS"
+])dnl ACX_LIBXC
diff --git a/m4/pspio.m4 b/m4/pspio.m4
new file mode 100644
index 0000000..40ee3ed
--- /dev/null
+++ b/m4/pspio.m4
@@ -0,0 +1,88 @@
+## Copyright (C) 2012 M. Oliveira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: pspio.m4 778 2013-07-11 15:49:39Z micael $
+
+AC_DEFUN([ACX_PSPIO], [
+acx_pspio_ok=no
+FCFLAGS_PSPIO=""
+LIBS_PSPIO=""
+
+dnl Backup LIBS and FCFLAGS
+acx_pspio_save_LIBS="$LIBS"
+acx_pspio_save_FCFLAGS="$FCFLAGS"
+
+if test "$PKGCONFIG" != ""; then
+ PSPIO_PREFIX=`$PKGCONFIG --variable=prefix pspio`
+else
+ PSPIO_PREFIX=/usr
+fi
+dnl Check if the library was given in the command line
+AC_ARG_WITH(pspio-prefix, [AS_HELP_STRING([--with-pspio-prefix=DIR], [Directory where pspio was installed.])],[],[with_pspio_prefix=$PSPIO_PREFIX])
+case $with_pspio_prefix in
+ no ) acx_pspio_ok=disable ;;
+ *) LIBS_PSPIO="-L$with_pspio_prefix/lib -lpspio"; FCFLAGS_PSPIO="$ax_cv_f90_modflag$with_pspio_prefix/include" ;;
+esac
+
+dnl The tests
+if test "$acx_pspio_ok" = no; then
+ AC_MSG_CHECKING([for pspio])
+ # If the location has been passed with --with-pspio-prefix just test this
+ if test "$LIBS_PSPIO"; then
+ pspio_fcflags="$FCFLAGS_PSPIO"; pspio_libs="$LIBS_PSPIO"
+ FCFLAGS="$pspio_fcflags $acx_pspio_save_FCFLAGS $GSL_CFLAGS"
+ LIBS="$pspio_libs $acx_pspio_save_LIBS $GSL_LIBS"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([],[
+ use pspio_f90_types_m
+ use pspio_f90_lib_m
+
+ type(pspio_f90_pointer_t) :: pspdata
+ integer :: i
+ i = pspio_f90_pspdata_free(pspdata)
+]), [acx_pspio_ok=yes; FCFLAGS_PSPIO="$pspio_fcflags"; LIBS_PSPIO="$pspio_libs"], [])
+ else
+ pspio_libs="-lpspio"
+ FCFLAGS="$pspio_fcflags $acx_pspio_save_FCFLAGS $GSL_CFLAGS"
+ LIBS=" $acx_pspio_save_LIBS $pspio_libs $GSL_LIBS"
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([],[
+ use pspio_f90_types_m
+ use pspio_f90_lib_m
+
+ type(pspio_f90_pointer_t) :: pspdata
+ integer :: i
+ i = pspio_f90_pspdata_free(pspdata)
+]), [acx_pspio_ok=yes; FCFLAGS_PSPIO="$pspio_fcflags"; LIBS_PSPIO="$pspio_libs"], [])
+ fi
+ AC_MSG_RESULT([$acx_pspio_ok ($LIBS_PSPIO)])
+fi
+
+AC_SUBST(FCFLAGS_PSPIO)
+AC_SUBST(LIBS_PSPIO)
+FCFLAGS="$acx_pspio_save_FCFLAGS"
+LIBS="$acx_pspio_save_LIBS"
+
+dnl Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pspio_ok" = xyes; then
+ AC_DEFINE(HAVE_PSPIO,1,[Defined if you have the PSPIO library.])
+ $1
+else
+ AC_DEFINE(HAVE_PSPIO,0,[Defined if you have the PSPIO library.])
+ LIBS_PSPIO=""
+ FCFLAGS_PSPIO=""
+ $2
+fi
+])dnl ACX_PSPIO
diff --git a/sample/Cd/Cd b/sample/Cd/Cd
new file mode 100644
index 0000000..332e3c4
--- /dev/null
+++ b/sample/Cd/Cd
@@ -0,0 +1,40 @@
+# Generalities
+Title = "Cadmium"
+CalculationMode = ae + pp
+Verbose = 40
+UnitsOutput = 2
+
+# Hamiltonian
+WaveEquation = dirac
+
+XCFunctional = lda_x + lda_c_pw
+
+# Specie
+NuclearCharge = 48
+
+%Orbitals
+"Kr"
+ 4 | 2 | 10.0
+ 4 | 3 | 0.0
+ 5 | 0 | 2.0
+ 5 | 1 | 0.0
+ 5 | 2 | 0.0
+%
+
+# PseudoPotentials
+%PPComponents
+ 5 | 0 | 1.4 | ham
+ 5 | 1 | 1.6 | ham
+ 5 | 2 | 2.4 | ham
+ 4 | 3 | 2.4 | ham
+%
+
+PPCalculationTolerance = 1e-6
+
+# SCF
+ConvAbsDens = 1.0e-5
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-12
+ODEMaxSteps = 2000000
diff --git a/sample/Cu/Cu.ae b/sample/Cu/Cu.ae
new file mode 100644
index 0000000..0d31205
--- /dev/null
+++ b/sample/Cu/Cu.ae
@@ -0,0 +1,28 @@
+# Generalities
+Title = "Copper"
+CalculationMode = ae
+Verbose = 40
+
+# Specie
+NuclearCharge = 29
+
+%Orbitals
+"Ar"
+ 4 | 0 | 1 | 0
+ 4 | 1 | 0 | 0
+ 3 | 2 | 5 | 5
+ 4 | 3 | 0 | 0
+%
+
+# Mesh
+MeshType = log2
+MeshStartingPoint = 1.e-06
+MeshOutmostPoint = 120.0
+MeshNumberOfPoints = 1100
+
+# SCF
+ConvAbsDens = 1.0e-6
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-9
+ODEIntTolerance = 1e-14
diff --git a/sample/Cu/Cu.mrpp b/sample/Cu/Cu.mrpp
new file mode 100644
index 0000000..1ab68fb
--- /dev/null
+++ b/sample/Cu/Cu.mrpp
@@ -0,0 +1,20 @@
+# Generalities
+Title = "Copper"
+CalculationMode = pp
+Verbose = 40
+
+# PseudoPotentials
+%PPComponents
+ 3 | 0 | 1.5 | mrpp
+ 3 | 1 | 1.5 | mrpp
+ 3 | 2 | 1.8 | tm
+%
+
+PPCalculationTolerance = 1e-6
+LLocal = 0
+
+PPOutputFileFormat = abinit6 + fhi
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-9
+ODEIntTolerance = 1e-14
diff --git a/sample/Cu/Cu.tm b/sample/Cu/Cu.tm
new file mode 100644
index 0000000..85dfebc
--- /dev/null
+++ b/sample/Cu/Cu.tm
@@ -0,0 +1,20 @@
+# Generalities
+Title = "Copper"
+CalculationMode = pp
+Verbose = 40
+
+# PseudoPotentials
+%PPComponents
+ 4 | 0 | 2.08 | tm
+ 4 | 1 | 2.30 | tm
+ 3 | 2 | 2.08 | tm
+%
+
+PPCalculationTolerance = 1e-6
+LLocal = 0
+
+PPOutputFileFormat = abinit6 + fhi
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-9
+ODEIntTolerance = 1e-14
diff --git a/sample/Na/Na b/sample/Na/Na
new file mode 100644
index 0000000..922f587
--- /dev/null
+++ b/sample/Na/Na
@@ -0,0 +1,41 @@
+# Generalities
+Title = "Sodium"
+CalculationMode = ae + pp + pp_test
+Verbose = 40
+
+# Hamiltonian
+WaveEquation = schrodinger
+SpinMode = unpolarized
+
+XCFunctional = lda_x + lda_c_pw
+
+NuclearCharge = 11
+
+%Orbitals
+"Ne"
+ 3 | 0 | 1 | 0
+ 3 | 1 | 0 | 0
+ 3 | 2 | 0 | 0
+ 4 | 3 | 0 | 0
+%
+
+# PseudoPotentials
+%PPComponents
+ 3 | 0 | 2.95 | tm
+ 3 | 1 | 2.95 | tm
+ 3 | 2 | 2.95 | tm
+ 4 | 3 | 2.95 | tm
+%
+
+PPCalculationTolerance = 1e-6
+CoreCorrection = 1
+
+
+PPTests = ld
+LogDerivativeRadius = 3.0
+LogDerivativeEnergyMax = 1.5
+LogDerivativeEnergyMin = -1.5
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-12
diff --git a/sample/Si/Si b/sample/Si/Si
new file mode 100644
index 0000000..29745e2
--- /dev/null
+++ b/sample/Si/Si
@@ -0,0 +1,35 @@
+# Generalities
+Title = "Silicum"
+CalculationMode = ae + pp
+Verbose = 40
+
+# Hamiltonian
+WaveEquation = schrodinger
+SpinMode = unpolarized
+
+XCFunctional = lda_x + lda_c_pw
+
+# Specie
+NuclearCharge = 14
+
+%Orbitals
+"Ne"
+ 3 | 0 | 2
+ 3 | 1 | 2
+ 3 | 2 | 0
+ 4 | 3 | 0
+%
+
+# PseudoPotentials
+%PPComponents
+ 3 | 0 | 1.2 | ham
+ 3 | 1 | 1.27 | ham
+ 3 | 2 | 1.5 | ham
+ 4 | 3 | 1.9 | ham
+%
+
+PPCalculationTolerance = 1e-6
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-12
diff --git a/sample/Ti/Ti.ae b/sample/Ti/Ti.ae
new file mode 100644
index 0000000..483a0ab
--- /dev/null
+++ b/sample/Ti/Ti.ae
@@ -0,0 +1,31 @@
+# Generalities
+Title = "Titanium"
+CalculationMode = ae
+Verbose = 40
+
+# Hamiltonian
+WaveEquation = schrodinger
+SpinMode = unpolarized
+
+XCFunctional = lda_x + lda_c_pw
+
+# Specie
+NuclearCharge = 22
+
+%Orbitals
+"Ar"
+ 4 | 0 | 2
+ 4 | 1 | 0
+ 3 | 2 | 2
+ 4 | 3 | 0
+%
+
+# Mesh
+MeshType = log2
+MeshStartingPoint = 1.15e-06
+MeshOutmostPoint = 120.0
+MeshNumberOfPoints = 1110
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-14
diff --git a/sample/Ti/Ti.mrpp b/sample/Ti/Ti.mrpp
new file mode 100644
index 0000000..9699d7e
--- /dev/null
+++ b/sample/Ti/Ti.mrpp
@@ -0,0 +1,21 @@
+# Generalities
+Title = "Titanium"
+CalculationMode = pp
+Verbose = 40
+
+# PseudoPotentials
+%PPComponents
+ 3 | 0 | 1.75 | mrpp
+ 3 | 1 | 1.75 | mrpp
+ 3 | 2 | 1.65 | tm
+%
+
+LLocal = 0
+
+PPCalculationTolerance = 1e-7
+
+PPOutputFileFormat = upf
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-14
diff --git a/sample/Ti/Ti.tm b/sample/Ti/Ti.tm
new file mode 100644
index 0000000..a58bc34
--- /dev/null
+++ b/sample/Ti/Ti.tm
@@ -0,0 +1,21 @@
+# Generalities
+Title = "Titanium"
+CalculationMode = pp
+Verbose = 40
+
+# PseudoPotentials
+%PPComponents
+ 4 | 0 | 2.54 | tm
+ 4 | 1 | 2.96 | tm
+ 3 | 2 | 2.25 | tm
+%
+
+PPCalculationTolerance = 1e-6
+
+LLocal = 0
+
+PPOutputFileFormat = upf
+
+# Wave-equations solver
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-14
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..68b7309
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,151 @@
+## Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+bin_PROGRAMS = ape
+
+AM_FCFLAGS = \
+ @F90_MODULE_FLAG@$(top_builddir)/src
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/liboct_parser \
+ -I$(top_srcdir)/libstring_f \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src
+
+
+ape_SOURCES = \
+ global.F90 \
+ liboct_parser.F90 \
+ gsl_interface_f.F90 \
+ gsl_interface_c.c \
+ utilities_c.c \
+ utilities_f.F90 \
+ messages.F90 \
+ io.F90 \
+ linalg.F90 \
+ multiroot_c.c \
+ multiroot_f.F90 \
+ splines.F90 \
+ finite_diff.F90 \
+ units.F90 \
+ output.F90 \
+ mesh.F90 \
+ ps_io.F90 \
+ mixing.F90 \
+ quantum_numbers.F90 \
+ loc_potentials.F90 \
+ sl_potentials.F90 \
+ kb_projectors.F90 \
+ potentials.F90 \
+ odeint.c \
+ ode_integrator.F90 \
+ wave_equations.F90 \
+ eigensolver.F90 \
+ hamann.F90 \
+ tm_equations.F90 \
+ tm.F90 \
+ math.F90 \
+ mrpp_equations.F90 \
+ mrpp.F90 \
+ states.F90 \
+ hartree.F90 \
+ functionals.F90 \
+ xc.F90 \
+ states_batch.F90 \
+ atom.F90 \
+ numerical_tests.F90 \
+ run_ape.F90 \
+ parser_symbols.F90 \
+ ape.F90
+
+noinst_HEADERS = \
+ global.h \
+ atom_ae_inc.F90 \
+ atom_ps_inc.F90
+
+ape_LDADD = \
+ $(top_builddir)/liboct_parser/liboct_parser.a \
+ -L$(top_builddir)/libstring_f -lstring_f \
+ @GSL_LIBS@ @LIBS_LIBXC@ @LIBS_PSPIO@
+
+CLEANFILES = *~ *.bak *.mod *.il *.d *.pc* ifc* *_ape.f90 config_F90.h
+DISTCLEANFILES = dirs.h
+
+SUFFIXES = .F90 .o
+
+# How to compile a .F90 file
+.F90.o:
+ @FCCPP@ @CPPFLAGS@ $(AM_CPPFLAGS) -I. $< > $*_ape.f90
+ @perl -pi -e 's/\\newline/\n/g' $*_ape.f90
+ @FC@ @FCFLAGS@ @FCFLAGS_LIBXC@ @FCFLAGS_PSPIO@ $(AM_FCFLAGS) -c @FCFLAGS_f90@ -o $@ $*_ape.f90
+ @rm -f $*_ape.f90
+
+# How to generate config_F90.h
+global.h: config_F90.h
+global.o: config_F90.h
+config_F90.h: $(top_builddir)/config.h
+ grep "#define " $^ >config_F90.h
+
+depend:
+ @makedepf90 $(ape_SOURCES)
+
+# Dependencies
+global.o : global.F90 config_F90.h global.h
+liboct_parser.o : liboct_parser.F90 config_F90.h global.h
+gsl_interface_f.o : gsl_interface_f.F90 config_F90.h global.h global.o
+gsl_interface_c.o : gsl_interface_c.c
+utilities_c.o : utilities_c.c
+utilities_f.o : utilities_f.F90 global.o
+messages.o : messages.F90 config_F90.h global.h utilities_f.o liboct_parser.o global.o
+io.o : io.F90 messages.o global.o
+linalg.o : linalg.F90 config_F90.h global.h messages.o gsl_interface_f.o global.o
+multiroot_c.o : multiroot_c.c
+multiroot_f.o : multiroot_f.F90 config_F90.h global.h linalg.o gsl_interface_f.o messages.o global.o
+splines.o : splines.F90 config_F90.h global.h gsl_interface_f.o messages.o global.o
+finite_diff.o : finite_diff.F90 config_F90.h global.h linalg.o messages.o liboct_parser.o global.o
+units.o : units.F90 messages.o liboct_parser.o global.o
+output.o : output.F90 config_F90.h global.h messages.o io.o global.o
+mesh.o : mesh.F90 config_F90.h global.h units.o finite_diff.o splines.o math.o utilities_f.o messages.o liboct_parser.o global.o
+ps_io.o : ps_io.F90 config_F90.h global.h mesh.o messages.o io.o global.o
+mixing.o : mixing.F90 linalg.o messages.o liboct_parser.o global.o
+quantum_numbers.o : quantum_numbers.F90 config_F90.h global.h messages.o global.o
+loc_potentials.o : loc_potentials.F90 config_F90.h global.h mesh.o splines.o units.o io.o messages.o global.o
+sl_potentials.o : sl_potentials.F90 config_F90.h global.h ps_io.o quantum_numbers.o mesh.o splines.o units.o io.o messages.o global.o
+kb_projectors.o : kb_projectors.F90 config_F90.h global.h loc_potentials.o quantum_numbers.o ps_io.o mesh.o splines.o units.o io.o messages.o global.o
+potentials.o : potentials.F90 config_F90.h global.h kb_projectors.o sl_potentials.o loc_potentials.o quantum_numbers.o mixing.o mesh.o messages.o global.o
+odeint.o : odeint.c
+ode_integrator.o : ode_integrator.F90 config_F90.h global.h potentials.o quantum_numbers.o gsl_interface_f.o io.o messages.o global.o
+wave_equations.o : wave_equations.F90 ode_integrator.o potentials.o quantum_numbers.o utilities_f.o mesh.o splines.o messages.o liboct_parser.o global.o
+eigensolver.o : eigensolver.F90 config_F90.h global.h wave_equations.o potentials.o quantum_numbers.o mesh.o units.o io.o messages.o liboct_parser.o global.o
+hamann.o : hamann.F90 config_F90.h global.h wave_equations.o potentials.o quantum_numbers.o mesh.o output.o io.o messages.o global.o
+tm_equations.o : tm_equations.F90 config_F90.h global.h potentials.o quantum_numbers.o linalg.o mesh.o messages.o global.o
+tm.o : tm.F90 config_F90.h global.h tm_equations.o wave_equations.o potentials.o quantum_numbers.o multiroot_f.o mesh.o output.o utilities_f.o messages.o global.o
+math.o : math.F90 linalg.o global.o
+mrpp_equations.o : mrpp_equations.F90 config_F90.h global.h wave_equations.o linalg.o potentials.o quantum_numbers.o mesh.o messages.o global.o
+mrpp.o : mrpp.F90 config_F90.h global.h mrpp_equations.o tm.o wave_equations.o potentials.o quantum_numbers.o mesh.o multiroot_f.o output.o utilities_f.o messages.o global.o
+states.o : states.F90 config_F90.h global.h mrpp.o tm.o hamann.o eigensolver.o wave_equations.o potentials.o quantum_numbers.o mesh.o output.o units.o utilities_f.o messages.o io.o liboct_parser.o global.o
+hartree.o : hartree.F90 mesh.o units.o io.o global.o
+functionals.o : functionals.F90 config_F90.h global.h hartree.o states.o mesh.o messages.o liboct_parser.o global.o
+xc.o : xc.F90 config_F90.h global.h states_batch.o ps_io.o functionals.o mesh.o output.o io.o units.o messages.o liboct_parser.o global.o
+states_batch.o : states_batch.F90 config_F90.h global.h states.o eigensolver.o wave_equations.o potentials.o ps_io.o mesh.o quantum_numbers.o output.o io.o units.o messages.o liboct_parser.o global.o
+atom.o : atom.F90 atom_ps_inc.F90 atom_ae_inc.F90 config_F90.h global.h hamann.o xc.o hartree.o states_batch.o states.o eigensolver.o wave_equations.o potentials.o quantum_numbers.o ps_io.o mixing.o mesh.o output.o units.o messages.o io.o liboct_parser.o global.o
+numerical_tests.o : numerical_tests.F90 config_F90.h global.h hartree.o mesh.o utilities_f.o output.o io.o messages.o liboct_parser.o global.o
+run_ape.o : run_ape.F90 config_F90.h global.h numerical_tests.o atom.o eigensolver.o output.o units.o messages.o utilities_f.o liboct_parser.o global.o
+parser_symbols.o : parser_symbols.F90 config_F90.h global.h run_ape.o numerical_tests.o atom.o ps_io.o states_batch.o states.o wave_equations.o ode_integrator.o xc.o functionals.o mixing.o mesh.o liboct_parser.o global.o
+ape.o : ape.F90 config_F90.h global.h run_ape.o messages.o utilities_f.o parser_symbols.o liboct_parser.o global.o
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..728e778
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,680 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+bin_PROGRAMS = ape$(EXEEXT)
+subdir = src
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(top_srcdir)/build-aux/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_ape_OBJECTS = global.$(OBJEXT) liboct_parser.$(OBJEXT) \
+ gsl_interface_f.$(OBJEXT) gsl_interface_c.$(OBJEXT) \
+ utilities_c.$(OBJEXT) utilities_f.$(OBJEXT) messages.$(OBJEXT) \
+ io.$(OBJEXT) linalg.$(OBJEXT) multiroot_c.$(OBJEXT) \
+ multiroot_f.$(OBJEXT) splines.$(OBJEXT) finite_diff.$(OBJEXT) \
+ units.$(OBJEXT) output.$(OBJEXT) mesh.$(OBJEXT) \
+ ps_io.$(OBJEXT) mixing.$(OBJEXT) quantum_numbers.$(OBJEXT) \
+ loc_potentials.$(OBJEXT) sl_potentials.$(OBJEXT) \
+ kb_projectors.$(OBJEXT) potentials.$(OBJEXT) odeint.$(OBJEXT) \
+ ode_integrator.$(OBJEXT) wave_equations.$(OBJEXT) \
+ eigensolver.$(OBJEXT) hamann.$(OBJEXT) tm_equations.$(OBJEXT) \
+ tm.$(OBJEXT) math.$(OBJEXT) mrpp_equations.$(OBJEXT) \
+ mrpp.$(OBJEXT) states.$(OBJEXT) hartree.$(OBJEXT) \
+ functionals.$(OBJEXT) xc.$(OBJEXT) states_batch.$(OBJEXT) \
+ atom.$(OBJEXT) numerical_tests.$(OBJEXT) run_ape.$(OBJEXT) \
+ parser_symbols.$(OBJEXT) ape.$(OBJEXT)
+ape_OBJECTS = $(am_ape_OBJECTS)
+ape_DEPENDENCIES = $(top_builddir)/liboct_parser/liboct_parser.a
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
+FCLD = $(FC)
+FCLINK = $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+ $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+SOURCES = $(ape_SOURCES)
+DIST_SOURCES = $(ape_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_FCFLAGS = \
+ @F90_MODULE_FLAG@$(top_builddir)/src
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/liboct_parser \
+ -I$(top_srcdir)/libstring_f \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src
+
+ape_SOURCES = \
+ global.F90 \
+ liboct_parser.F90 \
+ gsl_interface_f.F90 \
+ gsl_interface_c.c \
+ utilities_c.c \
+ utilities_f.F90 \
+ messages.F90 \
+ io.F90 \
+ linalg.F90 \
+ multiroot_c.c \
+ multiroot_f.F90 \
+ splines.F90 \
+ finite_diff.F90 \
+ units.F90 \
+ output.F90 \
+ mesh.F90 \
+ ps_io.F90 \
+ mixing.F90 \
+ quantum_numbers.F90 \
+ loc_potentials.F90 \
+ sl_potentials.F90 \
+ kb_projectors.F90 \
+ potentials.F90 \
+ odeint.c \
+ ode_integrator.F90 \
+ wave_equations.F90 \
+ eigensolver.F90 \
+ hamann.F90 \
+ tm_equations.F90 \
+ tm.F90 \
+ math.F90 \
+ mrpp_equations.F90 \
+ mrpp.F90 \
+ states.F90 \
+ hartree.F90 \
+ functionals.F90 \
+ xc.F90 \
+ states_batch.F90 \
+ atom.F90 \
+ numerical_tests.F90 \
+ run_ape.F90 \
+ parser_symbols.F90 \
+ ape.F90
+
+noinst_HEADERS = \
+ global.h \
+ atom_ae_inc.F90 \
+ atom_ps_inc.F90
+
+ape_LDADD = \
+ $(top_builddir)/liboct_parser/liboct_parser.a \
+ -L$(top_builddir)/libstring_f -lstring_f \
+ @GSL_LIBS@ @LIBS_LIBXC@ @LIBS_PSPIO@
+
+CLEANFILES = *~ *.bak *.mod *.il *.d *.pc* ifc* *_ape.f90 config_F90.h
+DISTCLEANFILES = dirs.h
+SUFFIXES = .F90 .o
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .F90 .o .c .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+ape$(EXEEXT): $(ape_OBJECTS) $(ape_DEPENDENCIES) $(EXTRA_ape_DEPENDENCIES)
+ @rm -f ape$(EXEEXT)
+ $(FCLINK) $(ape_OBJECTS) $(ape_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gsl_interface_c.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/multiroot_c.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/odeint.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utilities_c.Po at am__quote@
+
+.F90.obj:
+ $(PPFCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.o:
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic cscopelist ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-binPROGRAMS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-binPROGRAMS
+
+
+# How to compile a .F90 file
+.F90.o:
+ @FCCPP@ @CPPFLAGS@ $(AM_CPPFLAGS) -I. $< > $*_ape.f90
+ @perl -pi -e 's/\\newline/\n/g' $*_ape.f90
+ @FC@ @FCFLAGS@ @FCFLAGS_LIBXC@ @FCFLAGS_PSPIO@ $(AM_FCFLAGS) -c @FCFLAGS_f90@ -o $@ $*_ape.f90
+ @rm -f $*_ape.f90
+
+# How to generate config_F90.h
+global.h: config_F90.h
+global.o: config_F90.h
+config_F90.h: $(top_builddir)/config.h
+ grep "#define " $^ >config_F90.h
+
+depend:
+ @makedepf90 $(ape_SOURCES)
+
+# Dependencies
+global.o : global.F90 config_F90.h global.h
+liboct_parser.o : liboct_parser.F90 config_F90.h global.h
+gsl_interface_f.o : gsl_interface_f.F90 config_F90.h global.h global.o
+gsl_interface_c.o : gsl_interface_c.c
+utilities_c.o : utilities_c.c
+utilities_f.o : utilities_f.F90 global.o
+messages.o : messages.F90 config_F90.h global.h utilities_f.o liboct_parser.o global.o
+io.o : io.F90 messages.o global.o
+linalg.o : linalg.F90 config_F90.h global.h messages.o gsl_interface_f.o global.o
+multiroot_c.o : multiroot_c.c
+multiroot_f.o : multiroot_f.F90 config_F90.h global.h linalg.o gsl_interface_f.o messages.o global.o
+splines.o : splines.F90 config_F90.h global.h gsl_interface_f.o messages.o global.o
+finite_diff.o : finite_diff.F90 config_F90.h global.h linalg.o messages.o liboct_parser.o global.o
+units.o : units.F90 messages.o liboct_parser.o global.o
+output.o : output.F90 config_F90.h global.h messages.o io.o global.o
+mesh.o : mesh.F90 config_F90.h global.h units.o finite_diff.o splines.o math.o utilities_f.o messages.o liboct_parser.o global.o
+ps_io.o : ps_io.F90 config_F90.h global.h mesh.o messages.o io.o global.o
+mixing.o : mixing.F90 linalg.o messages.o liboct_parser.o global.o
+quantum_numbers.o : quantum_numbers.F90 config_F90.h global.h messages.o global.o
+loc_potentials.o : loc_potentials.F90 config_F90.h global.h mesh.o splines.o units.o io.o messages.o global.o
+sl_potentials.o : sl_potentials.F90 config_F90.h global.h ps_io.o quantum_numbers.o mesh.o splines.o units.o io.o messages.o global.o
+kb_projectors.o : kb_projectors.F90 config_F90.h global.h loc_potentials.o quantum_numbers.o ps_io.o mesh.o splines.o units.o io.o messages.o global.o
+potentials.o : potentials.F90 config_F90.h global.h kb_projectors.o sl_potentials.o loc_potentials.o quantum_numbers.o mixing.o mesh.o messages.o global.o
+odeint.o : odeint.c
+ode_integrator.o : ode_integrator.F90 config_F90.h global.h potentials.o quantum_numbers.o gsl_interface_f.o io.o messages.o global.o
+wave_equations.o : wave_equations.F90 ode_integrator.o potentials.o quantum_numbers.o utilities_f.o mesh.o splines.o messages.o liboct_parser.o global.o
+eigensolver.o : eigensolver.F90 config_F90.h global.h wave_equations.o potentials.o quantum_numbers.o mesh.o units.o io.o messages.o liboct_parser.o global.o
+hamann.o : hamann.F90 config_F90.h global.h wave_equations.o potentials.o quantum_numbers.o mesh.o output.o io.o messages.o global.o
+tm_equations.o : tm_equations.F90 config_F90.h global.h potentials.o quantum_numbers.o linalg.o mesh.o messages.o global.o
+tm.o : tm.F90 config_F90.h global.h tm_equations.o wave_equations.o potentials.o quantum_numbers.o multiroot_f.o mesh.o output.o utilities_f.o messages.o global.o
+math.o : math.F90 linalg.o global.o
+mrpp_equations.o : mrpp_equations.F90 config_F90.h global.h wave_equations.o linalg.o potentials.o quantum_numbers.o mesh.o messages.o global.o
+mrpp.o : mrpp.F90 config_F90.h global.h mrpp_equations.o tm.o wave_equations.o potentials.o quantum_numbers.o mesh.o multiroot_f.o output.o utilities_f.o messages.o global.o
+states.o : states.F90 config_F90.h global.h mrpp.o tm.o hamann.o eigensolver.o wave_equations.o potentials.o quantum_numbers.o mesh.o output.o units.o utilities_f.o messages.o io.o liboct_parser.o global.o
+hartree.o : hartree.F90 mesh.o units.o io.o global.o
+functionals.o : functionals.F90 config_F90.h global.h hartree.o states.o mesh.o messages.o liboct_parser.o global.o
+xc.o : xc.F90 config_F90.h global.h states_batch.o ps_io.o functionals.o mesh.o output.o io.o units.o messages.o liboct_parser.o global.o
+states_batch.o : states_batch.F90 config_F90.h global.h states.o eigensolver.o wave_equations.o potentials.o ps_io.o mesh.o quantum_numbers.o output.o io.o units.o messages.o liboct_parser.o global.o
+atom.o : atom.F90 atom_ps_inc.F90 atom_ae_inc.F90 config_F90.h global.h hamann.o xc.o hartree.o states_batch.o states.o eigensolver.o wave_equations.o potentials.o quantum_numbers.o ps_io.o mixing.o mesh.o output.o units.o messages.o io.o liboct_parser.o global.o
+numerical_tests.o : numerical_tests.F90 config_F90.h global.h hartree.o mesh.o utilities_f.o output.o io.o messages.o liboct_parser.o global.o
+run_ape.o : run_ape.F90 config_F90.h global.h numerical_tests.o atom.o eigensolver.o output.o units.o messages.o utilities_f.o liboct_parser.o global.o
+parser_symbols.o : parser_symbols.F90 config_F90.h global.h run_ape.o numerical_tests.o atom.o ps_io.o states_batch.o states.o wave_equations.o ode_integrator.o xc.o functionals.o mixing.o mesh.o liboct_parser.o global.o
+ape.o : ape.F90 config_F90.h global.h run_ape.o messages.o utilities_f.o parser_symbols.o liboct_parser.o global.o
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/ape.F90 b/src/ape.F90
new file mode 100644
index 0000000..27673e9
--- /dev/null
+++ b/src/ape.F90
@@ -0,0 +1,94 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: ape.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+program ape
+ use global_m
+ use oct_parser_m
+ use parser_symbols_m
+ use utilities_m
+ use messages_m
+ use run_ape_m
+ implicit none
+
+ integer :: ierr
+#if LIBXC_VERSION >= 200
+ integer :: major, minor
+#endif
+
+ !Initialize parser
+ ierr = oct_parse_init('parser.log', 0)
+ if(ierr .ne. 0) then
+ message(1) = "Unable to initialize parser."
+ call write_fatal(1)
+ end if
+ call set_parser_symbols()
+ ierr = oct_parse_input('inp.ape')
+ if(ierr .ne. 0) then
+ ierr = oct_parse_input("-")
+ if(ierr .ne. 0) then
+ message(1) = "Error initializing the parser."
+ message(2) = "Can not open input file or standard input!"
+ call write_fatal(2)
+ end if
+ end if
+
+ !Start messages
+ call messages_init()
+
+ !If in debug mode, create the debug directory
+ if (in_debug_mode) call sys_mkdir("debug_info")
+
+ !Print some stuff and tell the world when the program started
+ message(1) = str_center("APE - Atomic Pseudopotentials Engine", 70)
+ call write_info(1)
+ call print_date("Program started on ")
+ message(1) = "Compilation Info"
+ message(2) = " Version: "// PACKAGE_VERSION
+ message(3) = " Revision: "// LATEST_SVN
+ message(4) = " Build time: "// BUILD_TIME
+ message(5) = " C compiler: "// CC
+ message(6) = " C compiler flags: "// CFLAGS
+ message(7) = " Fortran compiler: "// FC
+ message(8) = " Fortran compiler flags: "// FCFLAGS
+#if LIBXC_VERSION >= 200
+ call xc_f90_version(major, minor)
+ write(message(9),'(A,I1,A,I1)') " Libxc version: ", major, ".", minor
+ message(10) = ""
+ call write_info(10)
+#else
+ message(9) = ""
+ call write_info(9)
+#endif
+
+
+
+ !Now we really run the program
+ call run()
+
+ !End parser
+ call oct_parse_end()
+
+ !Tell the world when the program finished
+ call print_date("Program finished on ")
+
+end program ape
+
+
diff --git a/src/atom.F90 b/src/atom.F90
new file mode 100644
index 0000000..9c7e6ab
--- /dev/null
+++ b/src/atom.F90
@@ -0,0 +1,996 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira, T. Cerqueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: atom.F90 781 2013-08-02 14:39:53Z micael $
+
+#include "global.h"
+
+module atom_m
+ use global_m
+ use oct_parser_m
+ use io_m
+ use messages_m
+ use units_m
+ use output_m
+ use mesh_m
+ use mixing_m
+ use ps_io_m
+ use quantum_numbers_m
+ use potentials_m
+ use wave_equations_m
+ use eigensolver_m
+ use states_m
+ use states_batch_m
+ use hartree_m
+ use xc_m
+ use hamann_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure atom_copy
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type atom_t
+ private
+ integer :: type
+ real(R8) :: z
+ character(3) :: symbol
+ integer :: wave_eq
+ integer :: theory_level
+ type(xc_t):: xc_model
+ type(potential_t) :: potential
+ type(mesh_t) :: m
+ integer :: nspin
+ type(states_batch_t) :: states
+ type(integrator_t) :: integrator_sp
+ type(integrator_t) :: integrator_dp
+ end type atom_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: TEST_LD = 1, &
+ TEST_DM = 2, &
+ TEST_IP = 4
+
+ integer, parameter :: ATOM_AE = 1, &
+ ATOM_PS = 2, &
+ ATOM_KB = 3
+
+ integer, parameter :: INDEPENDENT_PARTICLES = 1, &
+ DFT = 2
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: atom_t, &
+ atom_null, &
+ atom_create_ae, &
+ atom_create_ps, &
+ atom_create_kb, &
+ atom_save, &
+ atom_load, &
+ atom_end, &
+ atom_xc_eval, &
+ atom_solve, &
+ atom_test, &
+ atom_ip, &
+ atom_output, &
+ TEST_LD, TEST_DM, TEST_IP, &
+ INDEPENDENT_PARTICLES, DFT
+
+contains
+
+ subroutine atom_null(atm)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the atom atm. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(out) :: atm
+
+ atm%type = 0
+ atm%z = M_ZERO
+ atm%symbol = ""
+ atm%wave_eq = 0
+ atm%theory_level = 0
+ atm%nspin = 0
+ call xc_null(atm%xc_model)
+ call potential_null(atm%potential)
+ call mesh_null(atm%m)
+ call integrator_null(atm%integrator_sp)
+ call integrator_null(atm%integrator_dp)
+ call states_batch_null(atm%states)
+
+ end subroutine atom_null
+
+ subroutine atom_init_states_from_block(atm, block_name)
+ !-----------------------------------------------------------------------!
+ ! Initializes the atom by reading the relevant input options and prints !
+ ! some relevant informantion. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ character(len=*), intent(in) :: block_name
+
+ type input_data
+ integer :: n
+ integer :: l
+ real(R8) :: occ(2)
+ real(R8) :: m
+ end type input_data
+
+ integer :: n_lines, n_id, n_rare, l1, i, k, n_cols, ierr, ij, is, im
+ integer(POINTER_SIZE) :: blk
+ real(R8) :: occ
+ character(2) :: rare
+ type(qn_t) :: qn
+ type(input_data), allocatable :: id(:)
+ type(input_data), parameter :: ID_RARE(15) = &
+ (/ input_data(1, 0, (/M_ONE, M_ONE/), M_ZERO), &
+ input_data(2, 0, (/M_ONE, M_ONE/), M_ZERO), &
+ input_data(2, 1, (/M_THREE,M_THREE/), M_ZERO), &
+ input_data(3, 0, (/M_ONE, M_ONE/), M_ZERO), &
+ input_data(3, 1, (/M_THREE,M_THREE/), M_ZERO), &
+ input_data(3, 2, (/M_FIVE, M_FIVE/), M_ZERO), &
+ input_data(4, 0, (/M_ONE, M_ONE/), M_ZERO), &
+ input_data(4, 1, (/M_THREE,M_THREE/), M_ZERO), &
+ input_data(4, 2, (/M_FIVE, M_FIVE/), M_ZERO), &
+ input_data(5, 0, (/M_ONE, M_ONE/), M_ZERO), &
+ input_data(5, 1, (/M_THREE,M_THREE/), M_ZERO), &
+ input_data(4, 3, (/M_SEVEN,M_SEVEN/), M_ZERO), &
+ input_data(5, 2, (/M_FIVE, M_FIVE/), M_ZERO), &
+ input_data(6, 0, (/M_ONE, M_ONE/), M_ZERO), &
+ input_data(6, 1, (/M_THREE,M_THREE/), M_ZERO) /)
+
+ call push_sub("atom_init_states_from_block")
+
+ !Open the orbitals block and get the number of lines
+ ierr = oct_parse_block(trim(block_name), blk)
+ n_lines = oct_parse_block_n(blk)
+ if (n_lines < 1) then
+ write(message(1),'("No ",A," block specified on input.")') trim(block_name)
+ call write_fatal(1)
+ end if
+
+ !Do we have a rare gas in the orbitals block?
+ if (oct_parse_block_cols(blk, 0) == 1) then
+ call oct_parse_block_string(blk, 0, 0, rare)
+ select case (rare)
+ case ("He")
+ n_rare = 1
+ case ("Ne")
+ n_rare = 3
+ case ("Ar")
+ n_rare = 5
+ case ("Kr")
+ n_rare = 8
+ case ("Xe")
+ n_rare = 11
+ case ("Rn")
+ n_rare = 15
+ case default
+ message(1) = "Wrong input for orbitals block: unknown rare gas."
+ call write_fatal(1)
+ end select
+ l1 = 1
+ n_id = n_rare + n_lines - 1
+ else
+ n_rare = 0
+ l1 = 0
+ n_id = n_lines
+ end if
+
+ allocate(id(n_id))
+ id = input_data(0, 0, (/M_ZERO,M_ZERO/), M_ZERO)
+ id(1:n_rare) = ID_RARE(1:n_rare)
+
+ k = n_rare
+ do i = l1, n_lines - 1
+ k = k + 1
+
+ !Read input
+ n_cols = oct_parse_block_cols(blk, i)
+ call oct_parse_block_int(blk, i, 0, id(k)%n)
+ call oct_parse_block_int(blk, i, 1, id(k)%l)
+ id(k)%m = M_ZERO
+ select case (n_cols)
+ case (3)
+ call oct_parse_block_double(blk, i, 2, id(k)%occ(1))
+ if (atm%nspin == 2) id(k)%occ = id(k)%occ(1)/M_TWO
+ case (4)
+ if (atm%nspin == 2 .and. atm%wave_eq == DIRAC) then
+ call oct_parse_block_double(blk, i, 2, id(k)%m)
+ call oct_parse_block_double(blk, i, 3, id(k)%occ(1))
+ if (abs(id(k)%m) == id(k)%l + M_HALF) then
+ id(k)%occ(2) = M_ZERO
+ else
+ id(k)%occ = id(k)%occ(1)/M_TWO
+ end if
+ else
+ call oct_parse_block_double(blk, i, 2, id(k)%occ(1))
+ call oct_parse_block_double(blk, i, 3, id(k)%occ(2))
+ end if
+ case (5)
+ if (atm%wave_eq /= DIRAC .or. atm%nspin /= 2) then
+ write(message(1),'("There is something wrong at line ",I2," of Orbitals block.")') i+1
+ message(2) = "Illegal number of columns for an unRel unPol calc."
+ call write_fatal(2)
+ end if
+ call oct_parse_block_double(blk, i, 2, id(k)%m)
+ if (abs(id(k)%m) == id(k)%l + M_HALF) then
+ write(message(1),'("There is something wrong at line ",I2," of Orbitals block.")') i+1
+ message(2) = "Orbitals with 2|m| = 2l + 1 cannot have two occupancies specified."
+ call write_fatal(2)
+ end if
+ call oct_parse_block_double(blk, i, 3, id(k)%occ(1))
+ call oct_parse_block_double(blk, i, 4, id(k)%occ(2))
+ case default
+ write(message(1),'("There is something wrong at line ",I2," of Orbitals block.")') i+1
+ message(2) = "Illegal number of columns."
+ call write_fatal(2)
+ end select
+
+ !Check input
+ if (id(k)%n < 1) then
+ write(message(1),'("There is something wrong at line ",I2," of Orbitals block.")') i+1
+ message(2) = "Illegal main quantum number."
+ call write_fatal(2)
+ else if (id(k)%l < 0 .or. id(k)%l > id(k)%n - 1) then
+ write(message(1),'("There is something wrong at line ",I2," of Orbitals block.")') i+1
+ message(2) = "Illegal angular momentum quantum number."
+ call write_fatal(2)
+ else if ( ((sum(id(k)%occ)) > (id(k)%l*M_FOUR + M_TWO) ) .or. &
+ (any(id(k)%occ > (id(k)%l*M_FOUR + M_TWO)/atm%nspin)) .or. &
+ (id(k)%m /= M_ZERO .and. any(id(k)%occ > M_ONE))) then
+ write(message(1),'("There is something wrong at line ",I2," of Orbitals block")') i+1
+ message(2) = "Illegal occupancies."
+ call write_fatal(2)
+ end if
+
+ end do
+
+ !Close the Orbitals block
+ call oct_parse_block_end(blk)
+
+ !Check that there are no duplicated lines
+ do i = 1, n_id - 1
+ do k = i + 1, n_id
+ if (id(i)%n == id(k)%n .and. id(i)%l == id(k)%l .and. id(i)%m == id(k)%m ) then
+ message(1) = "There are at least two lines with the same set of quantum numbers."
+ message(2) = "in the Orbitals block."
+ call write_fatal(2)
+ end if
+ end do
+ end do
+
+ !Initialize states
+ call states_batch_null(atm%states)
+ do i = 1, n_id
+ select case (atm%wave_eq)
+ case (SCHRODINGER, SCALAR_REL)
+ if (atm%nspin == 1) then
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO)
+ call create_state(atm%states, qn, sum(id(i)%occ))
+ else
+ do is = 1, 2
+ qn = qn_init(id(i)%n, id(i)%l, is - M_THREE/M_TWO)
+ call create_state(atm%states, qn, id(i)%occ(is))
+ end do
+ end if
+
+ case (DIRAC)
+ if (atm%nspin == 1) then
+ if (id(i)%l == 0) then
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, j=M_HALF)
+ call create_state(atm%states, qn, sum(id(i)%occ))
+ else
+ do ij = 1, 2
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, j=id(i)%l+ij-M_THREE/M_TWO)
+ occ = sum(id(i)%occ)*(M_TWO*qn%j + M_ONE)/(M_FOUR*qn%l + M_TWO)
+ call create_state(atm%states, qn, occ)
+ end do
+ end if
+
+ else
+ if (id(i)%m == M_ZERO) then
+ occ = sum(id(i)%occ)/(M_FOUR*id(i)%l + M_TWO)
+
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, m= (id(i)%l+M_HALF), sg=M_ZERO)
+ call create_state(atm%states, qn, occ)
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, m=-(id(i)%l+M_HALF), sg=M_ZERO)
+ call create_state(atm%states, qn, occ)
+
+ do im = 1, 2*id(i)%l
+ do is = 1, 2
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, m=im-id(i)%l-M_HALF, sg=M_THREE/M_TWO-is)
+ call create_state(atm%states, qn, occ)
+ end do
+ end do
+ else
+ if (abs(id(i)%m) == id(i)%l + M_HALF) then
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, m=id(i)%m, sg=M_ZERO)
+ call create_state(atm%states, qn, sum(id(i)%occ))
+ else
+ do is = 1, 2
+ qn = qn_init(id(i)%n, id(i)%l, M_ZERO, m=id(i)%m, sg=M_THREE/M_TWO-is)
+ call create_state(atm%states, qn, id(i)%occ(is))
+ end do
+ end if
+ end if
+ end if
+
+ end select
+ end do
+ deallocate(id)
+
+ call pop_sub()
+ contains
+
+ subroutine create_state(batch, qn, occ)
+ type(states_batch_t), intent(inout) :: batch
+ type(qn_t), intent(inout) :: qn
+ real(R8), intent(in) :: occ
+
+ character(10) :: label
+ type(state_t), pointer :: state
+
+ !Get label and correct quantum numbers
+ label = qn_label(qn, full=.false.)
+ if (atm%type == ATOM_PS) then
+ qn%n = qn%n - &
+ minval(id(:)%n, mask=id(:)%l == qn%l) + qn%l + 1
+ end if
+
+ !Allocate memory, init state, and add it to the batch
+ allocate(state)
+ call state_init(state, atm%m, qn, occ, label)
+ call states_batch_add(batch, state)
+
+ !We do not deallocate the state, because the batch has a pointer to that chunk of memory
+ nullify(state)
+
+ end subroutine create_state
+
+ end subroutine atom_init_states_from_block
+
+ subroutine atom_save(atm, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the atom information to the "dir/data" file. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(in) :: atm
+ character(len=*), intent(in) :: dir
+
+ integer :: unit, i
+
+ call push_sub("atom_save")
+
+ call io_open(unit, trim(dir)//"/data", form='unformatted')
+
+ write(unit) atm%type, atm%z, atm%symbol, atm%theory_level, atm%wave_eq, atm%nspin
+
+ !Write exchange-correlation model
+ call xc_model_save(unit, atm%xc_model)
+
+ !Write mesh
+ call mesh_save(unit, atm%m)
+
+ !Write states info
+ write(unit) states_batch_size(atm%states)
+ do i = 1, states_batch_size(atm%states)
+ call state_save(unit, states_batch_get(atm%states,i))
+ end do
+
+ !Write potential
+ call potential_save(unit, atm%potential)
+
+ close(unit)
+
+ call pop_sub()
+ end subroutine atom_save
+
+ subroutine atom_load(atm, dir)
+ !-----------------------------------------------------------------------!
+ ! Reads the atom information from the "dir/data" file. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ character(len=*), intent(in) :: dir
+
+ integer :: unit, i, n_states
+ type(state_t), pointer :: state
+
+ call push_sub("atom_load")
+
+ !Open file
+ call io_open(unit, trim(dir)//"/data", form='unformatted', status='old')
+
+ !
+ read(unit) atm%type, atm%z, atm%symbol, atm%theory_level, atm%wave_eq, atm%nspin
+
+ !Read exchange-correlation model
+ call xc_model_load(unit, atm%xc_model)
+
+ !Read mesh
+ call mesh_load(unit, atm%m)
+
+ !Read states data
+ read(unit) n_states
+ do i = 1, n_states
+ allocate(state)
+ call state_null(state)
+ call state_load(unit, state)
+ call states_batch_add(atm%states, state)
+ nullify(state)
+ end do
+
+ !Read potential
+ call potential_load(unit, atm%potential)
+
+ !Initialize integrator
+ call integrator_init(atm%integrator_sp, atm%integrator_dp)
+
+ close(unit)
+
+ call pop_sub()
+ end subroutine atom_load
+
+ subroutine atom_end(atm)
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to atm. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+
+ integer :: i
+ type(state_t), pointer :: state
+
+ call push_sub("atom_end")
+
+ !End states
+ do i = 1, states_batch_size(atm%states)
+ state => states_batch_get(atm%states, i)
+ call state_end(state)
+ end do
+ call states_batch_end(atm%states)
+
+ !End potential
+ call potential_end(atm%potential)
+
+ !End xc
+ call xc_end(atm%xc_model)
+
+ !End mesh
+ call mesh_end(atm%m)
+
+ !End integrators
+ call integrator_end(atm%integrator_sp)
+ call integrator_end(atm%integrator_dp)
+
+ !Set everything to zero
+ atm%type = 0
+ atm%z = M_ZERO
+ atm%symbol = ""
+ atm%theory_level = 0
+ atm%wave_eq = 0
+ atm%nspin = 0
+
+ call pop_sub()
+ end subroutine atom_end
+
+ subroutine atom_copy(atm_a, atm_b)
+ !-----------------------------------------------------------------------!
+ ! Copies atom_b to atom_a. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm_a
+ type(atom_t), intent(in) :: atm_b
+
+ call push_sub("atom_copy")
+
+ call atom_end(atm_a)
+
+ atm_a%type = atm_b%type
+ atm_a%z = atm_b%z
+ atm_a%symbol = atm_b%symbol
+ atm_a%wave_eq = atm_b%wave_eq
+ atm_a%theory_level = atm_b%theory_level
+ atm_a%xc_model = atm_b%xc_model
+ atm_a%potential = atm_b%potential
+ atm_a%m = atm_b%m
+ atm_a%nspin = atm_b%nspin
+ atm_a%states = atm_b%states
+ atm_a%integrator_sp = atm_b%integrator_sp
+ atm_a%integrator_dp = atm_b%integrator_dp
+
+ call pop_sub()
+ end subroutine atom_copy
+
+
+ subroutine atom_eigensolve(atm, eigensolver)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ logical :: polarized
+ integer :: i, n_folds
+ type(states_batch_t), allocatable :: folds(:)
+
+ call push_sub("atom_eigensolve")
+
+ !Split states into batches
+ polarized = potential_is_polarized(atm%potential)
+ n_folds = states_batch_number_of_folds(atm%states, polarized)
+ allocate(folds(n_folds))
+ do i = 1, n_folds
+ call states_batch_null(folds(i))
+ end do
+ call states_batch_split_folds(atm%states, folds, polarized)
+
+ !Solve the one-electron equations
+ do i = 1, n_folds
+ call states_batch_eigensolve(folds(i), atm%m, atm%wave_eq, atm%potential, &
+ atm%integrator_dp, atm%integrator_sp, eigensolver)
+ end do
+
+ !End batches
+ do i = 1, n_folds
+ call states_batch_end(folds(i))
+ end do
+
+ call pop_sub()
+ end subroutine atom_eigensolve
+
+ subroutine atom_solve(atm, eigensolver, unit)
+ !-----------------------------------------------------------------------!
+ ! Solve the Kohn-Sham equations for the atom in a self-consitent way an !
+ ! outputs the relevant results. !
+ ! !
+ ! atm - atom object !
+ ! eigensolver - information about the eigensolver !
+ ! unit - output file !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ type(eigensolver_t), intent(in) :: eigensolver
+ integer, intent(in) :: unit
+
+ logical :: fixed_occ
+ integer :: smearing_function, nitmax, nit, p, order
+ real(R8) :: rel_etot, abs_etot, rel_dens, abs_dens
+ real(R8) :: conv_rel_etot, conv_abs_etot, conv_rel_dens, conv_abs_dens
+ real(R8) :: etot_in, etot_out
+ real(R8), allocatable :: density_out(:,:), density_in(:,:)
+ type(mixing_t) :: mix
+ type(potential_t) :: potential_out
+
+ call push_sub("atom_solve")
+
+ message(1) = ""
+ message(2) = "Starting SCF process"
+ call write_info(2)
+
+ !Read convergence parameters
+ call oct_parse_float('ConvRelEnergy', M_ZERO, conv_rel_etot)
+ call oct_parse_float('ConvAbsEnergy', M_ZERO, conv_abs_etot)
+ call oct_parse_float('ConvRelDens', 1e-8_R8, conv_rel_dens)
+ call oct_parse_float('ConvAbsDens', M_ZERO, conv_abs_dens)
+ if (conv_rel_etot < M_ZERO .and. conv_abs_etot < M_ZERO .and. &
+ conv_rel_dens < M_ZERO .and. conv_abs_dens < M_ZERO) then
+ message(1) = "Not all the convergence criteria can be zero."
+ call write_fatal(1)
+ end if
+ message(1) = " Convergence tolerance: ConvAbsDens ConvRelDens"
+ write(message(2),'(25X,ES10.3E2,2X,ES10.3E2)') conv_abs_dens, conv_rel_dens
+ message(3) = " ConvAbsEnergy ConvRelEnergy"
+ write(message(4),'(25X,ES10.3E2,2X,ES10.3E2)') conv_abs_etot, conv_rel_etot
+ call write_info(4,20)
+
+ !Are we fixing the occupancies?
+ call oct_parse_int('SmearingFunction', OCC_FIXED, smearing_function)
+ select case (smearing_function)
+ case (OCC_FIXED)
+ fixed_occ = .true.
+ write(message(1),'(2X,"Smearing: fixed occupancies")')
+ case (OCC_SEMICONDUCTING)
+ fixed_occ = .false.
+ write(message(1),'(2X,"Smearing: semiconducting")')
+ case (OCC_AVERILL_PAINTER)
+ fixed_occ = .false.
+ if (states_batch_charge(atm%states) == states_batch_max_charge(atm%states)) then
+ message(1) = "States that are not fully occupied are required in order"
+ message(2) = "to use the Averill-Painter smearing."
+ call write_fatal(2)
+ end if
+ write(message(1),'(2X,"Smearing: Averill-Painter")')
+ end select
+ call write_info(1,20)
+
+ !Read maximum number of iterations during the SCF procedure
+ call oct_parse_int('MaximumIter', 300, nitmax)
+ if (nitmax < 0) then
+ message(1) = "MaximumIter can''t take negative values."
+ call write_fatal(1)
+ end if
+ write(message(1),'(2X,"Maximum number of iterations: ",I6)') nitmax
+ call write_info(1,20)
+
+ !Initialize mixing
+ call mixing_null(mix)
+ call mixing_init(mix, atm%m%np*atm%nspin*2)
+
+ !Nullify potentials
+ call potential_null(potential_out)
+
+ !Initialize some stuff
+ allocate(density_out(atm%m%np, atm%nspin), density_in(atm%m%np, atm%nspin))
+ call atom_energies(atm, etot_in)
+ potential_out = atm%potential
+ density_in = states_batch_density(atm%states, atm%nspin, atm%m)
+
+
+ !---Self Consistent Field cycle---!
+
+
+ message(1) = ""
+ message(2) = "Performing SCF Cycle"
+ call write_info(2)
+
+ !Main loop
+ do nit = 1, nitmax
+ if (in_debug_mode) then
+ call atom_output(atm, "debug_info")
+ end if
+
+ !Get states eigenvalues and wavefunctions
+ call atom_eigensolve(atm, eigensolver)
+
+ !Get new occupancies
+ call states_batch_smearing(atm%states, smearing_function, eigensolver%tol)
+
+ !Get the output density, the output potential and the output energy
+ density_out = states_batch_density(atm%states, atm%nspin, atm%m)
+ call atom_update_potential(atm, potential_out)
+ call atom_energies(atm, etot=etot_out,potential=potential_out)
+
+ !Calculate the convergence for the density and for the total energy
+ abs_dens = M_ZERO
+ do p = 1, atm%nspin
+ abs_dens = abs_dens + mesh_integrate(atm%m, abs(density_in(:,p) &
+ - density_out(:,p)))
+ end do
+ abs_dens = abs_dens
+ rel_dens = abs_dens/states_batch_charge(atm%states)
+ abs_etot = abs(etot_out - etot_in)
+ rel_etot = abs((etot_out - etot_in)/etot_out)
+
+ !Print intermediate results
+ message(1) = ""
+ write(message(2),'(2X,"Iteration number: ",I6)') nit
+ write(message(3),'(4X,"Total energy: ",F14.6," ",A)') &
+ etot_out/units_out%energy%factor, trim(units_out%energy%abbrev)
+ write(message(4),'(4X,"ConvAbsDens =",ES9.2E2,1X,"ConvAbsEnergy =",ES9.2E2)') &
+ abs_dens, abs_etot/units_out%energy%factor
+ write(message(5),'(4X,"ConvRelDens =",ES9.2E2,1X,"ConvRelEnergy =",ES9.2E2)') &
+ rel_dens, rel_etot
+ call write_info(5,30)
+ call states_batch_sort(atm%states, SORT_EV)
+ call states_batch_output_eigenvalues(atm%states, atm%nspin, verbose_limit=30)
+
+ !Check for convergence
+ if ( (abs_etot <= conv_abs_etot .or. conv_abs_etot == M_ZERO) .and. &
+ (rel_etot <= conv_rel_etot .or. conv_rel_etot == M_ZERO) .and. &
+ (abs_dens <= conv_abs_dens .or. conv_abs_dens == M_ZERO) .and. &
+ (rel_dens <= conv_rel_dens .or. conv_rel_dens == M_ZERO) ) exit
+
+ !See if the maximum number of iterations as been reached
+ if (nit == nitmax) then
+ message(1) = "The SCF procedure did not converge"
+ call write_warning(1)
+ end if
+
+ !Mix input and output potentials
+ call potential_mix(atm%potential, potential_out, nit, mix)
+
+ !Save values for next iterations
+ etot_in = etot_out
+ density_in = density_out
+ end do
+
+
+ !---Final steps---!
+
+ !Get the eigenvalues and wavefunctions of all the states
+ call atom_eigensolve(atm, eigensolver)
+ call states_batch_smearing(atm%states, smearing_function, eigensolver%tol)
+
+ !Get the potential
+ call atom_update_potential(atm)
+
+ !Deallocate memory
+ deallocate(density_out, density_in)
+ call potential_end(potential_out)
+ call mixing_end(mix)
+
+ !Output results and information about the SCF cycle to the output
+ message(1) = ""
+ message(2) = " Final results for SCF procedure:"
+ call write_info(2,20)
+ call states_batch_sort(atm%states, SORT_EV)
+ call states_batch_output_eigenvalues(atm%states, atm%nspin, verbose_limit=30)
+
+ write(unit,*)
+ write(unit,'("SCF cycle information:")')
+ write(unit,'(2X,"Number of iterations: ",I6)') nit
+ write(unit,'(2X,"Convergence: ")')
+ write(unit,'(4X,"ConvAbsDens =",ES9.2E2," (",ES9.2E2,")")') abs_dens, conv_abs_dens
+ write(unit,'(4X,"ConvRelDens =",ES9.2E2," (",ES9.2E2,")")') rel_dens, conv_rel_dens
+ write(unit,'(4X,"ConvAbsEnergy =",ES9.2E2," (",ES9.2E2,")")') &
+ abs_etot/units_out%energy%factor, conv_abs_etot/units_out%energy%factor
+ write(unit,'(4X,"ConvRelEnergy =",ES9.2E2," (",ES9.2E2,")")') rel_etot, conv_rel_etot
+ if (nit > nitmax) then
+ write(unit,'(4X,"The SCF procedure did not converge")')
+ end if
+ if (atm%nspin == 2) then
+ write(unit,*)
+ write(unit,'("Total Magnetic Moment: ",F12.4)') mesh_integrate(atm%m, &
+ states_batch_magnetization_density(atm%states, atm%m))*M_FOUR*M_PI
+ end if
+
+ !Output energies and density moments to file
+ write(unit,*)
+ write(unit,'("Density Moments")')
+ do order = -2, 5
+ if (order == 0) cycle
+ write(unit,'(" <r^",I2,"> = ",F12.3)') order, &
+ states_batch_density_moment(atm%states, atm%m, order)/&
+ units_out%length%factor**order
+ end do
+ write(unit,*)
+ call atom_output_energies(atm, unit)
+ write(unit,*)
+ call states_batch_output_eigenvalues(atm%states, atm%nspin, unit)
+
+ call pop_sub()
+ end subroutine atom_solve
+
+ subroutine atom_ip(atm, eigensolver)
+ !-------------------------------------------------------------------------!
+ ! Determines the ionization potential for a given atom. !
+ !-------------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ real(R8) :: ip_homo, ip_ediff, e1, e2, ip(atm%nspin)
+
+ call push_sub("atom_ip")
+
+ !First we get the ionization potential from the HOMO eigenvalue
+ ip = states_batch_ip(atm%states, atm%nspin)
+ ip_homo = minval(ip, ip /= M_ZERO)
+
+ !Next we get the ionization potential from the total energy difference
+ call atom_energies(atm, e1)
+ call states_batch_smearing(atm%states, OCC_SEMICONDUCTING, M_ZERO, new_charge=states_batch_charge(atm%states) - M_ONE)
+ call atom_update_potential(atm)
+ call atom_solve(atm, eigensolver, info_unit("ip"))
+ call atom_energies(atm, e2)
+ ip_ediff = e2 - e1
+
+ !Write results
+ message(1) = ""
+ message(2) = ""
+ write(message(3),'("Ionization potential [",A,"]")') trim(units_out%energy%abbrev)
+ write(message(4),'(" From HOMO Eigenvalue: ",F14.6)') ip_homo/units_out%energy%factor
+ write(message(5),'(" From Total Energy Difference: ",F14.6)') ip_ediff/units_out%energy%factor
+ call write_info(5)
+ call write_info(5, unit = info_unit("ip"))
+
+ call pop_sub()
+ end subroutine atom_ip
+
+ subroutine atom_energies(atm, etot, ekin, eh, enuc, exc, potential)
+ !-----------------------------------------------------------------------!
+ ! Computes the various terms of the energy. !
+ ! !
+ ! atm - atom information !
+ ! etot - total enegy !
+ ! ekin - kinetic energy !
+ ! eh - electron-electron interaction energy !
+ ! enuc - electron-nucleus interaction energy !
+ ! exc - exchange-correlation energy !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ real(R8), optional, intent(out) :: etot, ekin, eh, enuc, exc
+ type(potential_t), optional, intent(in) :: potential
+
+ integer :: i
+ real(R8) :: ekin_, eh_, enuc_, exc_
+ real(R8), allocatable :: density(:)
+
+ call push_sub("atom_energies")
+
+ allocate(density(atm%m%np))
+
+ !Compute density
+ density = states_batch_charge_density(atm%states, atm%m)
+
+ !Now, the various energies
+ ekin_ = M_ZERO
+ do i = 1, states_batch_size(atm%states)
+ if (present(potential)) then
+ ekin_ = ekin_ + state_kinetic_energy(atm%m, states_batch_get(atm%states, i), potential)
+ else
+ ekin_ = ekin_ + state_kinetic_energy(atm%m, states_batch_get(atm%states, i), atm%potential)
+ end if
+ end do
+ enuc_ = M_FOUR*M_PI*mesh_integrate(atm%m, -density*atm%z, dv=atm%m%r)
+ select case (atm%theory_level)
+ case (INDEPENDENT_PARTICLES)
+ eh_ = M_ZERO; exc_ = M_ZERO
+ case (DFT)
+ call hartree_potential(atm%m, density, states_batch_charge(atm%states), eh = eh_)
+ call xc_potential(atm%xc_model, atm%m, atm%states, atm%nspin, exc = exc_)
+ end select
+ etot = ekin_ + enuc_ + eh_ + exc_
+
+ if (present(ekin)) ekin = ekin_
+ if (present(enuc)) enuc = enuc_
+ if (present(eh)) eh = eh_
+ if (present(exc)) exc = exc_
+
+ deallocate(density)
+
+ call pop_sub()
+ end subroutine atom_energies
+
+ subroutine atom_output_energies(atm, unit, verbose_limit)
+ !-----------------------------------------------------------------------!
+ ! Writes the atomic energies either to a file or to the screen in a !
+ ! nice readable format. !
+ ! !
+ ! atm - atom information !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ integer, intent(in), optional :: unit, verbose_limit
+
+ real(R8) :: etot, ekin, eh, enuc, exc
+
+ call push_sub("atom_output_energies")
+
+ call atom_energies(atm, etot, ekin, eh, enuc, exc)
+
+ write(message(1),'("Energies [",A,"]")') trim(units_out%energy%abbrev)
+ write(message(2),'(" Total energy: ",F14.6)') etot/units_out%energy%factor
+ write(message(3),'(" Kinetic energy: ",F14.6)') ekin/units_out%energy%factor
+ write(message(4),'(" Electron-electron interaction energy: ",F14.6)') eh/units_out%energy%factor
+ write(message(5),'(" Electron-nucleus interaction energy: ",F14.6)') enuc/units_out%energy%factor
+ write(message(6),'(" Exchange-correlation energy: ",F14.6)') exc/units_out%energy%factor
+
+ if (present(unit)) then
+ call write_info(6, unit=unit)
+ else
+ if (present(verbose_limit)) then
+ call write_info(6, verbose_limit)
+ else
+ call write_info(6)
+ end if
+ end if
+
+ call pop_sub()
+ end subroutine atom_output_energies
+
+ subroutine atom_update_potential(atm, potential)
+ !-----------------------------------------------------------------------!
+ ! Updates the potential. !
+ ! atom - atom information !
+ ! potential - potential to update !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ type(potential_t), optional, intent(out) :: potential
+
+ real(R8), allocatable :: vh(:,:), vxc(:,:), vxctau(:,:)
+
+ call push_sub("atom_update_potential")
+
+ !Compute new potential
+ allocate(vh(atm%m%np, atm%nspin), vxc(atm%m%np, atm%nspin), vxctau(atm%m%np, atm%nspin))
+ select case (atm%theory_level)
+ case (INDEPENDENT_PARTICLES)
+ vh = M_ZERO; vxc = M_ZERO; vxctau = M_ZERO
+ case (DFT)
+ call hartree_potential(atm%m, states_batch_charge_density(atm%states, atm%m), &
+ states_batch_charge(atm%states), vh)
+ call xc_potential(atm%xc_model, atm%m, atm%states, atm%nspin, vxc=vxc, vxctau=vxctau)
+ end select
+
+ !Update potential
+ if (present(potential)) then
+ call potential_update_vhxc(potential, vh + vxc, vxctau)
+ else
+ call potential_update_vhxc(atm%potential, vh + vxc, vxctau)
+ end if
+
+ !Free memory
+ deallocate(vh, vxc, vxctau)
+
+ call pop_sub()
+ end subroutine atom_update_potential
+
+ function label(z)
+ !-----------------------------------------------------------------------!
+ ! Given an atomic number it returns the corresponding chemical symbol. !
+ ! !
+ ! z - atomic number !
+ ! label - chemical symbol !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(in) :: z
+ character(3) :: label
+
+ character(3), dimension(112), parameter :: table= &
+ (/'H ','He ','Li ','Be ','B ','C ','N ','O ','F ','Ne ','Na ', &
+ 'Mg ','Al ','Si ','P ','S ','Cl ','Ar ','K ','Ca ','Sc ','Ti ', &
+ 'V ','Cr ','Mn ','Fe ','Co ','Ni ','Cu ','Zn ','Ga ','Ge ','As ', &
+ 'Se ','Br ','Kr ','Rb ','Sr ','Y ','Zr ','Nb ','Mo ','Tc ','Ru ', &
+ 'Rh ','Pd ','Ag ','Cd ','In ','Sn ','Sb ','Te ','I ','Xe ','Cs ', &
+ 'Ba ','La ','Ce ','Pr ','Nd ','Pm ','Sm ','Eu ','Gd ','Tb ','Dy ', &
+ 'Ho ','Er ','Tm ','Yb ','Lu ','Hf ','Ta ','W ','Re ','Os ','Ir ', &
+ 'Pt ','Au ','Hg ','Tl ','Pb ','Bi ','Po ','At ','Rn ','Fr ','Ra ', &
+ 'Ac ','Th ','Pa ','U ','Np ','Pu ','Am ','Cm ','Bk ','Cf ','Es ', &
+ 'Fm ','Md ','No ','Lr ','Rf ','Db ','Sg ','Bh ','Hs ','Mt ','Uun', &
+ 'Uuu','Uub'/)
+
+ if (int(z) > 112) then
+ label='unk'
+ else
+ label=table(int(z))
+ end if
+
+ end function label
+
+ subroutine atom_output(atm, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the density, the wavefunctions and the potential to the dir !
+ ! directory. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(in) :: atm
+ character(len=*), intent(in) :: dir
+
+ integer :: i
+
+ call push_sub("atom_output")
+
+ if (atm%type == ATOM_AE .or. atm%type == ATOM_PS) then
+ call states_batch_output_density(atm%states, atm%nspin, atm%m, dir)
+ do i = 1, states_batch_size(atm%states)
+ call state_output_wf(states_batch_get(atm%states, i), atm%m, dir)
+ end do
+ call xc_output(atm%xc_model, atm%m, atm%states, atm%nspin, dir)
+ call hartree_output(atm%m, states_batch_charge_density(atm%states, atm%m), &
+ states_batch_charge(atm%states), dir)
+ end if
+
+ call potential_output(atm%potential, dir)
+
+ call pop_sub()
+ end subroutine atom_output
+
+#include "atom_ae_inc.F90"
+#include "atom_ps_inc.F90"
+
+end module atom_m
diff --git a/src/atom_ae_inc.F90 b/src/atom_ae_inc.F90
new file mode 100644
index 0000000..22aaa8f
--- /dev/null
+++ b/src/atom_ae_inc.F90
@@ -0,0 +1,185 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira, T. Cerqueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: atom_ae_inc.F90 778 2013-07-11 15:49:39Z micael $
+
+ subroutine atom_create_ae(atm, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Initializes the atom by reading the relevant input options and prints !
+ ! some relevant informantion. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ real(R8), allocatable :: vh(:,:), vxc(:,:), vxctau(:,:)
+
+ call push_sub("atom_create_ae")
+
+ !---Read information about the atom---!
+
+ !Read theory level
+ call oct_parse_int('TheoryLevel', DFT, atm%theory_level)
+ select case (atm%theory_level)
+ case (INDEPENDENT_PARTICLES, DFT)
+ case default
+ message(1) = "Illegal TheoryLevel."
+ call write_fatal(1)
+ end select
+
+ !Read nuclear charge
+ call oct_parse_float('NuclearCharge', M_ZERO, atm%z)
+ if (atm%z <= M_ZERO) then
+ message(1) = "Wrong or absent value for the nuclear charge."
+ call write_fatal(1)
+ end if
+ atm%symbol = label(atm%z)
+
+ !Read rel
+ call oct_parse_int('WaveEquation', SCHRODINGER, atm%wave_eq)
+ select case (atm%wave_eq)
+ case (SCHRODINGER, DIRAC, SCALAR_REL)
+ case default
+ message(1) = "Illegal WaveEquation."
+ call write_fatal(1)
+ end select
+
+ !Read polarization
+ call oct_parse_int('SpinMode', 1, atm%nspin)
+ select case (atm%nspin)
+ case (1,2)
+ case default
+ message(1) = "Illegal SpinMode."
+ call write_fatal(1)
+ end select
+
+
+ !---Initialize the data structures---!
+
+ atm%type = ATOM_AE
+
+ !Initialize xc
+ call xc_null(atm%xc_model)
+ if (atm%theory_level == DFT) call xc_init(atm%nspin, atm%xc_model)
+
+ !Initialize mesh
+ call mesh_null(atm%m)
+ call mesh_init_from_input(atm%z, atm%m)
+
+ !Initialize orbitals from file
+ call atom_init_states_from_block(atm, "Orbitals")
+
+ !Initialize potential
+ allocate(vh(atm%m%np, atm%nspin), vxc(atm%m%np, atm%nspin), vxctau(atm%m%np, atm%nspin))
+ select case (atm%theory_level)
+ case (INDEPENDENT_PARTICLES)
+ vh = M_ZERO; vxc = M_ZERO; vxctau = M_ZERO
+ case (DFT)
+ call hartree_potential(atm%m, states_batch_charge_density(atm%states, atm%m), &
+ states_batch_charge(atm%states), vh = vh)
+ call xc_potential(atm%xc_model, atm%m, atm%states, atm%nspin, vxc = vxc, vxctau=vxctau)
+ end select
+ call potential_init(atm%potential, atm%m, atm%nspin, vh + vxc, vxctau, atm%z)
+ deallocate(vh, vxc, vxctau)
+
+ !Initialize integrator
+ call integrator_init(atm%integrator_sp, atm%integrator_dp)
+
+
+ !---Print information about the atom---!
+
+ message(1) = ""
+ message(2) = "General Information about the atom:"
+ call write_info(2)
+ call write_info(2,unit=info_unit("ae"))
+
+ !Print info to screen and to the ae/info file
+ write(message(1),'(2X,"Symbol: ",A)') trim(atm%symbol)
+ select case (atm%theory_level)
+ case (INDEPENDENT_PARTICLES)
+ message(2) = " Theory Level: independent particles"
+ case (DFT)
+ message(2) = " Theory Level: DFT"
+ end select
+ select case (atm%wave_eq)
+ case (SCHRODINGER)
+ message(3) = " Wave-equation: Schrodinger"
+ case (SCALAR_REL)
+ message(3) = " Wave-equation: scalar-relativistic"
+ case (DIRAC)
+ message(3) = " Wave-equation: Dirac"
+ end select
+ if (atm%nspin == 1) then
+ message(4) = " Spin mode: unpolarized"
+ else
+ message(4) = " Spin mode: polarized"
+ end if
+ write(message(5),'(2X,"Nuclear charge: ",F6.2)') atm%z
+ write(message(6),'(2X,"Total charge: ",F6.2)') atm%z - states_batch_charge(atm%states)
+ call write_info(6, verbose_limit=20)
+ call write_info(6, unit=info_unit("ae"))
+
+ call states_batch_sort(atm%states, SORT_QN)
+ call states_batch_output_configuration(atm%states, atm%nspin, verbose_limit=20)
+ call states_batch_output_configuration(atm%states, atm%nspin, unit=info_unit("ae"))
+
+ if (atm%theory_level == DFT) then
+ call xc_model_output_info(atm%xc_model, verbose_limit=20)
+ call xc_model_output_info(atm%xc_model, unit=info_unit("ae"))
+ end if
+
+ call mesh_output_params(atm%m, verbose_limit=20)
+ call mesh_output_params(atm%m, unit=info_unit("ae"))
+
+
+ !---Solve Khon-Sham equation---!
+
+ call atom_solve(atm, eigensolver, info_unit("ae"))
+
+ call pop_sub()
+ end subroutine atom_create_ae
+
+ subroutine atom_xc_eval(atm)
+ !-----------------------------------------------------------------------!
+ ! Evaluates the exchange and correlation potential and energy using !
+ ! the wavefunctions of a previous run. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: atm
+
+ real(R8) :: exc
+
+ call push_sub("atom_xc_eval")
+
+ ASSERT(atm%type == ATOM_AE)
+
+ !Initialialize xc_model from input file
+ call xc_end(atm%xc_model)
+ call xc_init(atm%nspin, atm%xc_model)
+ call xc_model_output_info(atm%xc_model, verbose_limit=20)
+ call xc_model_output_info(atm%xc_model, unit=info_unit("xc"))
+
+ !Output energies and xc potential
+ call xc_potential(atm%xc_model, atm%m, atm%states, atm%nspin, exc = exc)
+ call xc_evaluate_ked_approximation(atm%xc_model, atm%m, atm%states, atm%nspin, info_unit("xc"))
+ write(message(1),'(" Exchange-correlation energy [",A,"]: ",F14.6)') &
+ trim(units_out%energy%abbrev), exc/units_out%energy%factor
+
+ call write_info(1,20)
+ call write_info(1,unit=info_unit("xc"))
+ call xc_output(atm%xc_model, atm%m, atm%states, atm%nspin, "xc")
+
+ call pop_sub()
+ end subroutine atom_xc_eval
diff --git a/src/atom_ps_inc.F90 b/src/atom_ps_inc.F90
new file mode 100644
index 0000000..820a478
--- /dev/null
+++ b/src/atom_ps_inc.F90
@@ -0,0 +1,1002 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira, T. Cerqueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: atom_ps_inc.F90 778 2013-07-11 15:49:39Z micael $
+
+ subroutine atom_create_ps(ps_atm, ae_atm, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Creates a pseudo-atom and the corresponding KB atom. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: ps_atm
+ type(atom_t), intent(in) :: ae_atm
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ type input_data
+ integer :: n
+ integer :: l
+ real(R8) :: j
+ real(R8) :: rc
+ integer :: scheme
+ end type input_data
+
+ type channel
+ type(states_batch_t) :: fold
+ integer :: scheme
+ real(R8) :: rc
+ type(qn_t) :: qn
+ end type channel
+
+ integer :: i, j, k, n, ierr, n_cols, n_lines, n_channels, nlcc, file_format
+ integer(POINTER_SIZE) :: blk
+ real(R8) :: z_val, tol, min_ev, max_ev, ev, norm, slope, rmatch, nlcc_rc
+ character(3) :: unbound_trick
+ character(10) :: label
+ real(R8), allocatable :: rc(:), core_density(:,:), ps_density(:,:), ps_v(:,:), vh(:,:), vxc(:,:), vxctau(:,:)
+ type(input_data), allocatable :: id(:)
+ type(qn_t), allocatable :: qn(:)
+ type(state_t), pointer :: ae_state, state
+ type(channel), allocatable :: channels(:)
+
+ call push_sub("atom_create_ps")
+
+ ASSERT(ae_atm%type == ATOM_AE)
+
+ if (ae_atm%nspin == 2) then
+ message(1) = "Generation of pseudopotentials from spin-polarized calculations"
+ message(2) = "is not implemented!"
+ message(3) = ""
+ message(4) = "For most applications, spin-polarized calculations can be"
+ message(5) = "performed using pseudopotentials generated for a spin-unpolarized"
+ message(6) = "atom, as spin-polarization should come from the valence electrons."
+ call write_fatal(6)
+ end if
+
+ ps_atm%type = ATOM_PS
+
+ !Get information from all-electron atom
+ !(except the atomic number, which will be obtained later)
+ ps_atm%symbol = ae_atm%symbol
+ ps_atm%theory_level = ae_atm%theory_level
+ ps_atm%wave_eq = ae_atm%wave_eq
+ ps_atm%nspin = ae_atm%nspin
+ ps_atm%xc_model = ae_atm%xc_model
+ ps_atm%m = ae_atm%m
+ ps_atm%integrator_sp = ae_atm%integrator_sp
+ ps_atm%integrator_dp = ae_atm%integrator_dp
+
+
+ !---Read input options---!
+
+ !Print some information
+ message(1) = ""
+ message(2) = "Pseudo atom information:"
+ call write_info(2)
+ call write_info(2,unit=info_unit("pp"))
+
+ !Get PP generation tolerance
+ call oct_parse_float('PPCalculationTolerance', 1e-6_r8, tol)
+ if (tol <= M_ZERO) then
+ message(1) = "PPCalculationTolerance must be positive."
+ call write_fatal(1)
+ end if
+
+ !Check how to deal with the unbound states
+ call oct_parse_string('PPTrick', 'non', unbound_trick)
+
+ !Open the orbitals block and check how many lines the it has
+ ierr = oct_parse_block("PPComponents", blk)
+ n_lines = oct_parse_block_n(blk)
+ allocate(id(n_lines))
+
+ !Read the input data
+ do i = 1, n_lines
+ n_cols = oct_parse_block_cols(blk, i-1)
+
+ !Check for errors in the format
+ if (n_cols < 4 .or. n_cols > 5 .or. &
+ (ps_atm%wave_eq /= DIRAC .and. n_cols == 5)) then
+ write(message(1),'("There is something wrong at line ",I2," of the PPComponents block.")') i
+ call write_fatal(1)
+ end if
+
+ !Get main quantum number
+ call oct_parse_block_int(blk, i-1, 0, id(i)%n)
+
+ !Get angular momentum quantum number
+ call oct_parse_block_int(blk, i-1, 1, id(i)%l)
+
+ if (ps_atm%wave_eq == DIRAC .and. n_cols == 5) then
+ !The third column is the total angular momentum quantum number
+ call oct_parse_block_double(blk, i-1, 2, id(i)%j)
+ else
+ id(i)%j = M_ZERO
+ end if
+
+ !Get cutoff radius (it is always the column before the last)
+ call oct_parse_block_double(blk, i-1, n_cols-2, id(i)%rc)
+ id(i)%rc = id(i)%rc*units_in%length%factor
+
+ !Get scheme (it is always the last column)
+ call oct_parse_block_int(blk, i-1, n_cols-1, id(i)%scheme)
+
+ end do
+ call oct_parse_block_end(blk)
+
+ !Check for errors in the input data
+ do i = 1, n_lines
+ if (id(i)%rc < M_ZERO) then
+ write(message(1),'("There is something wrong at line ",I2," of the PPComponents block.")') i
+ message(2) = "The cutoff radius can not take negative values."
+ call write_fatal(2)
+ end if
+ do j = i+1, n_lines
+ if (id(i)%n == id(j)%n .and. id(i)%l == id(j)%l .and. id(i)%j == id(j)%j) then
+ write(message(1),'("There is something wrong at line ",I2," of the PPComponents block.")') i
+ message(2) = "There is at least another line with the same set of quantum numbers."
+ call write_fatal(2)
+ end if
+ end do
+ select case (id(i)%scheme)
+ case (HAM,TM,MRPP,MTM)
+ case (RTM,RMRPP)
+ if (ps_atm%wave_eq /= DIRAC) then
+ write(message(1),'("There is something wrong at line ",I2," of the PPComponents block.")') i
+ message(2) = "All electron relativistic calculation is needed in order to use"
+ message(3) = "the relativistic extensions to the TM or MRPP schemes."
+ call write_fatal(2)
+ end if
+ case default
+ write(message(1),'("There is something wrong at line ",I2," of the PPComponents block.")') i
+ message(2) = "Illegal pseusopotential generation scheme."
+ call write_fatal(2)
+ end select
+
+ end do
+
+
+ !---Initialize data structures---!
+
+ !Allocate memory and copy some information
+ n_channels = n_lines
+ if (ps_atm%wave_eq == DIRAC) n_channels = n_channels + count(id%l /= 0 .and. id%j == M_ZERO)
+ allocate(channels(n_channels))
+ do i = 1, n_channels
+ call states_batch_null(channels(i)%fold)
+ end do
+ k = 0
+ do i = 1, n_lines
+ k = k + 1
+ if (ps_atm%wave_eq == DIRAC .and. id(i)%j == M_ZERO) then
+ !Split "j=l +/- 1/2" states that were implicit in the input file
+ channels(k)%qn = qn_init(id(i)%n, id(i)%l, M_ZERO, j=id(i)%l+M_HALF)
+ channels(k)%rc = id(i)%rc
+ channels(k)%scheme = id(i)%scheme
+ if (id(i)%l /= M_ZERO) then
+ k = k + 1
+ channels(k)%qn = qn_init(id(i)%n, id(i)%l, M_ZERO, j=id(i)%l-M_HALF)
+ channels(k)%rc = id(i)%rc
+ channels(k)%scheme = id(i)%scheme
+ end if
+ else
+ channels(k)%qn = qn_init(id(i)%n, id(i)%l, M_ZERO, j=id(i)%j)
+ channels(k)%rc = id(i)%rc
+ channels(k)%scheme = id(i)%scheme
+ end if
+ end do
+ deallocate(id)
+
+ !Create states batch and add states to the channels folds
+ call states_batch_null(ps_atm%states)
+ do i = 1, n_channels
+ do n = 1, states_batch_size(ae_atm%states)
+ ae_state => states_batch_get(ae_atm%states, n)
+ if (state_qn(ae_state) == channels(i)%qn) then
+ allocate(state)
+ call state_null(state)
+ state = ae_state
+ call states_batch_add(ps_atm%states, state)
+ call states_batch_add(channels(i)%fold, state)
+ nullify(state)
+ exit
+ end if
+ if (n == states_batch_size(ae_atm%states)) then
+ write(message(1),'("Orbital ",A," not found in all-electron calculation.")') &
+ trim(qn_label(channels(i)%qn))
+ call write_fatal(1)
+ end if
+ end do
+ end do
+
+ !Sanity check
+ if (n_channels /= states_batch_number_of_folds(ps_atm%states, .false.)) then
+ write(message(1),'("There is something wrong at the PPComponents block.")')
+ message(2) = "Only one orbital per angular momentum channel should be specified."
+ end if
+
+ !Check core radius
+ do i = 1, n_channels
+ if (channels(i)%rc == M_ZERO) then
+ channels(i)%rc = state_default_rc(states_batch_get(channels(i)%fold, 1), channels(i)%scheme)
+ end if
+ if (channels(i)%rc == M_ZERO) then
+ do j = 1, states_batch_size(ps_atm%states)
+ channels(i)%rc = max(channels(i)%rc, state_default_rc(states_batch_get(ps_atm%states, j), channels(i)%scheme))
+ end do
+ end if
+ end do
+
+ !Do something about the unbound states
+ if (unbound_trick == "fhi") then
+ max_ev = maxval(states_batch_eigenvalues(ae_atm%states), &
+ states_batch_eigenvalues(ae_atm%states) /= M_ZERO)
+ do i = 1, states_batch_size(ps_atm%states)
+ state => states_batch_get(ps_atm%states, i)
+ if (state_eigenvalue(state) == M_ZERO) then
+ call state_update(state, ps_atm%m, ps_atm%wave_eq, ae_atm%potential, ps_atm%integrator_dp, max_ev)
+ end if
+ end do
+ end if
+
+ !We will include in the valence space all the states that are higher in
+ !energy than the states used to generate the pseudopotentials
+ do i = 1, n_channels
+ min_ev = maxval(states_batch_eigenvalues(channels(i)%fold))
+ do j = 1, states_batch_size(ae_atm%states)
+ ae_state => states_batch_get(ae_atm%states, j)
+ if (channels(i)%qn == state_qn(ae_state)) cycle
+ if (state_eigenvalue(ae_state) > min_ev .and. qn_equal_fold(state_qn(ae_state), channels(i)%qn, .false.)) then
+ allocate(state)
+ call state_null(state)
+ state = ae_state
+ call states_batch_add(ps_atm%states, state)
+ call states_batch_add(channels(i)%fold, state)
+ nullify(state)
+ exit
+ end if
+ end do
+
+ !Sanity check
+ if ( (channels(i)%scheme == MRPP .or. channels(i)%scheme == RMRPP) .and. &
+ states_batch_size(channels(i)%fold) == 1) then
+ write(message(1),'("There is something wrong at the PPComponents block.")')
+ message(2) = "When using the MRPP scheme, at least two orbitals from the"
+ message(3) = "same angular momentum channel are needed in the valence space,"
+ message(4) = "but only one was found."
+ call write_fatal(4)
+ end if
+
+ end do
+
+ !Write information
+ write(message(1),'(2X,"Wavefunction info:")')
+ write(message(2),'(4X,"State Occupation Node radius Peak radius Default core radius")')
+ n = 2
+ do j = 1, n_channels
+ call states_batch_sort(channels(j)%fold, SORT_EV)
+ do i = 1, states_batch_size(channels(j)%fold)
+ state => states_batch_get(channels(j)%fold, i)
+ n = n + 1
+ label = state_label(state)
+ select case (len_trim(label))
+ case (2)
+ write(message(n),'(5X,A,5X,F7.2,7X,F8.3,6X,F8.3,10X,F8.3)') &
+ trim(label), state_charge(state), &
+ state_outermost_node(state), &
+ state_outermost_peak(state), &
+ state_default_rc(state, channels(j)%scheme)
+ case (5)
+ write(message(n),'(4X,A,3X,F7.2,7XF8.3,6X,F8.3,10X,F8.3)') &
+ trim(label), state_charge(state), &
+ state_outermost_node(state), &
+ state_outermost_peak(state), &
+ state_default_rc(state, channels(j)%scheme)
+ end select
+ end do
+ end do
+ message(n+1) = ""
+ message(n+2) = "Pseudopotential Generation:"
+ call write_info(n+2)
+ call write_info(n+2,unit=info_unit("pp"))
+
+ !Get core density
+ allocate(core_density(ps_atm%m%np, 1))
+ core_density = states_batch_density(ae_atm%states, 1, ps_atm%m) - &
+ states_batch_density(ps_atm%states, 1, ps_atm%m)
+
+
+ !---Generate pseudopotentials---!
+
+ allocate(ps_v(ps_atm%m%np, n_channels))
+ ps_v = M_ZERO
+ do i = 1, n_channels
+ call states_batch_psp_generation(channels(i)%fold, ps_atm%m, channels(i)%scheme, &
+ ps_atm%wave_eq, tol, ae_atm%potential, ps_atm%integrator_sp, &
+ ps_atm%integrator_dp, eigensolver, channels(i)%rc, ps_v(:,i))
+ end do
+
+
+ !---Unscreening and spin-average of the pseudopotentials---!
+
+
+ !Non-linear core corrections
+ call oct_parse_int('CoreCorrection', CC_NONE, nlcc)
+ if (nlcc /= CC_NONE) then
+ !Get rc
+ allocate(ps_density(ps_atm%m%np, 1))
+ ps_density = states_batch_density(ps_atm%states, 1, ps_atm%m)
+ do i = ps_atm%m%np, 2, -1
+ if (ps_atm%m%r(i)**2*core_density(i, 1) > ps_atm%m%r(i)**2*ps_density(i, 1)) then
+ nlcc_rc = ps_atm%m%r(i)
+ exit
+ end if
+ end do
+ deallocate(ps_density)
+
+ if (nlcc == CC_FHI) then
+ call oct_parse_float('CoreCorrectionCutoff', ps_atm%m%r(i), nlcc_rc)
+ end if
+
+ !Initialize the nlcc part of xc_model
+ call xc_nlcc_init(ps_atm%xc_model, ps_atm%m, nlcc_rc, nlcc, core_density)
+ end if
+ deallocate(core_density)
+
+ !Get screening
+ allocate(vh(ps_atm%m%np, 1), vxc(ps_atm%m%np, 1), vxctau(ps_atm%m%np, 1))
+ call hartree_potential(ps_atm%m, states_batch_charge_density(ps_atm%states, ps_atm%m), &
+ states_batch_charge(ps_atm%states), vh=vh)
+ call xc_potential(ps_atm%xc_model, ps_atm%m, ps_atm%states, 1, vxc=vxc, vxctau=vxctau)
+
+ !Unscreen
+ do i = 1, n_channels
+ ps_v(:, i) = ps_v(:, i) - vh(:, 1) - vxc(:, 1)
+ end do
+
+ !Initialize ps_potential structure
+ allocate(qn(n_channels))
+ do i = 1, n_channels
+ qn(i) = state_qn(states_batch_get(channels(i)%fold, 1))
+ end do
+ call potential_init(ps_atm%potential, ps_atm%m, 1, vh + vxc, vxctau, n_channels, qn, ps_v)
+ deallocate(ps_v, qn, vh, vxc, vxctau)
+
+
+ !---Self-consistency test---!
+
+ message(1) = ""
+ message(2) = "Pseudopotentials Self-Consistency:"
+ write(message(3),'(2X,"State Eigenvalue [",A,"] Norm Test Slope Test")') units_out%energy%abbrev
+ call write_info(3)
+ write(info_unit("pp"),*)
+ call write_info(3,unit=info_unit("pp"))
+ do i = 1, n_channels
+ do j = 1, min(states_batch_size(channels(i)%fold), 2)
+ state => states_batch_get(channels(i)%fold, j)
+
+ if (channels(i)%scheme == HAM) then
+ rmatch = hamann_match_radius(ps_atm%m, channels(i)%rc)
+ else
+ rmatch = channels(i)%rc
+ end if
+
+ call state_test_consistency(ps_atm%m, ps_atm%wave_eq, eigensolver, ps_atm%integrator_sp, &
+ ps_atm%integrator_dp, ae_atm%potential, ps_atm%potential, state, &
+ rmatch, ev, norm, slope)
+
+ label = state_label(state, full=.true.)
+ select case (len_trim(label))
+ case (2)
+ write(message(1),'(4X,A,4X,F12.5,5X,F10.7,2X,F10.7)') trim(label), &
+ ev/units_out%energy%factor, norm, slope
+ case (5)
+ write(message(1),'(2X,A,3X,F12.5,5X,F10.7,2X,F10.7)') trim(label), &
+ ev/units_out%energy%factor, norm, slope
+ end select
+ call write_info(1)
+ call write_info(1,unit=info_unit("pp"))
+ end do
+ end do
+
+ !Get the correct atomic number
+ z_val = states_batch_charge(ps_atm%states)
+ ps_atm%z = ae_atm%z - states_batch_charge(ae_atm%states) + z_val
+
+ !Start writing things to the pseudopotential file
+ call oct_parse_int('PPOutputFileFormat', PSIO_UPF, file_format)
+ call ps_io_init(ps_atm%m, ps_atm%wave_eq, channels(1)%scheme, ae_atm%z, &
+ ps_atm%z, z_val, ps_atm%symbol, file_format)
+ call potential_ps_io_set(ps_atm%potential)
+ allocate(rc(states_batch_size(ps_atm%states)))
+ do i = 1, states_batch_size(ps_atm%states)
+ state => states_batch_get(ps_atm%states, i)
+ do j = 1, n_channels
+ if (qn_equal_fold(channels(j)%qn, state_qn(state), .false.)) then
+ rc(i) = channels(j)%rc
+ exit
+ end if
+ end do
+ end do
+ call states_batch_ps_io_set(ps_atm%states, ps_atm%m, rc)
+ deallocate(rc)
+ call xc_ps_io_set(ps_atm%xc_model)
+
+ !Free memory
+ do i = 1, n_channels
+ call states_batch_end(channels(i)%fold)
+ end do
+ deallocate(channels)
+
+ call pop_sub()
+ end subroutine atom_create_ps
+
+ subroutine atom_create_kb(kb_atm, ps_atm, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Generate the KB form of the pseudo-potentials. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: kb_atm
+ type(atom_t), intent(in) :: ps_atm
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ integer :: l_local, i, p, k, n_kb
+ real(R8) :: rcmax, v0, v1, v2, v3, r
+ real(R8), allocatable :: vh(:,:), vxc(:,:), vxctau(:,:), vv(:), e(:), proj_f(:,:)
+ type(qn_t) :: qn_loc
+ type(qn_t), allocatable :: qn(:)
+ type(potential_t) :: v_local
+ type(states_batch_t), allocatable :: folds(:)
+ type(mesh_t) :: m
+
+ call push_sub("atom_create_kb")
+
+ ASSERT(ps_atm%type == ATOM_PS)
+
+ call potential_null(v_local)
+ call mesh_null(m)
+
+ kb_atm%type = ATOM_KB
+
+ !Get information from pseudo-atom
+ kb_atm%symbol = ps_atm%symbol
+ kb_atm%theory_level = ps_atm%theory_level
+ kb_atm%wave_eq = ps_atm%wave_eq
+ kb_atm%nspin = ps_atm%nspin
+ kb_atm%xc_model = ps_atm%xc_model
+ kb_atm%m = ps_atm%m
+ kb_atm%integrator_sp = ps_atm%integrator_sp
+ kb_atm%integrator_dp = ps_atm%integrator_dp
+ kb_atm%z = ps_atm%z
+
+ !Shortcuts
+ m = kb_atm%m
+
+ !Write information
+ message(1) = ""
+ message(2) = "Kleinman & Bylander Atom"
+ call write_info(2)
+ call write_info(2, unit=info_unit("kb"))
+
+ !Read input
+ call oct_parse_int("Llocal", -1, l_local)
+ if (l_local < -1) then
+ message(1) = "Invalid value for Llocal."
+ call write_fatal(1)
+ end if
+ if (l_local == -1) then
+ write(message(1),'(2X,"Local potential is a Vanderbilt function")')
+ else
+ write(message(1),'(2X,"l-component used as local: l = ",I1)') l_local
+ end if
+ call write_info(1, 20)
+ call write_info(1, unit=info_unit("kb"))
+
+ !Divide states into folds. We need this, because there will be a KB projector per fold.
+ n_kb = states_batch_number_of_folds(ps_atm%states, .false.)
+ allocate(folds(n_kb))
+ do i = 1, n_kb
+ call states_batch_null(folds(i))
+ end do
+ call states_batch_split_folds(ps_atm%states, folds, .false.)
+
+ ! Get local potential
+ if (l_local == -1) then
+ ! If llocal=-1, use a Vanderbilt function for the local component
+
+ !Determine the radius at which all the pseudopotentials become equal
+ allocate(vv(n_kb))
+ do i = 1, m%np
+ do k = 1, n_kb
+ vv(k) = v(ps_atm%potential, m%r(i), state_qn(states_batch_get(folds(k), 1)), unscreened=.true.)
+ end do
+ if (all(vv == vv(1))) then
+ rcmax = m%r(i-1)
+ exit
+ end if
+ end do
+ deallocate(vv)
+
+ !Build Vanderbilt function
+ v0 = -kb_atm%z*exp(M_ELEVEN/M_TWELVE)/rcmax
+ v1 = -M_THREE/(M_TWO*rcmax**2)
+ v2 = M_THREE/(M_FOUR*rcmax**4)
+ v3 = -M_ONE/(M_SIX*rcmax**6)
+
+ allocate(vv(m%np))
+ do i = 1, m%np
+ if (m%r(i) < rcmax) then
+ vv(i) = v0*exp(v1*m%r(i)**2 + v2*m%r(i)**4 + v3*m%r(i)**6)
+ else
+ vv(i) = -kb_atm%z/m%r(i)
+ end if
+ end do
+
+ !Write some information to the screen
+ write(message(1),'(4X,3X,"z",5X,"rcmax",6X,"v0",10X,"v1",10X,"v2",10X,"v3")')
+ write(message(2),'(4X,F6.2,2X,F6.2,2X,4(F10.6,2X))') kb_atm%z, rcmax, v0, v1, v2, v3
+ call write_info(2)
+ call write_info(2, unit=info_unit("kb"))
+
+ else
+ allocate(vv(m%np))
+ qn_loc = QN_NULL
+ qn_loc%l = l_local
+ if (kb_atm%wave_eq == DIRAC .and. l_local /= 0) then
+ qn_loc%j = l_local - M_HALF
+ do k = 1, m%np
+ vv(k) = v(ps_atm%potential, m%r(k), qn_loc, unscreened=.true.)
+ end do
+ qn_loc%j = l_local + M_HALF
+ do k = 1, m%np
+ vv(k) = M_ONE/(M_TWO*l_local + M_ONE)*(l_local*vv(k) + &
+ (l_local + M_ONE)*v(ps_atm%potential, m%r(k), qn_loc, unscreened=.true.))
+ end do
+
+ else
+ do k = 1, m%np
+ vv(k) = v(ps_atm%potential, m%r(k), qn_loc, unscreened=.true.)
+ end do
+ end if
+ end if
+
+ !Get screening and initialize local potential
+ allocate(vh(m%np, 1), vxc(m%np, 1), vxctau(m%np, 1))
+ call hartree_potential(m, states_batch_charge_density(ps_atm%states, m), &
+ states_batch_charge(ps_atm%states), vh=vh)
+ call xc_potential(kb_atm%xc_model, m, ps_atm%states, 1, vxc=vxc, vxctau=vxctau)
+ call potential_init(v_local, m, 1, vh + vxc, vxctau, vv)
+ deallocate(vv, vh, vxc, vxctau)
+ write(message(1),'(2X,"Non-local components:")')
+ write(message(2),'(4X,"State KB Energy [",A,"] KB Cosine")') units_out%energy%abbrev
+ call write_info(2)
+ call write_info(2, unit=info_unit("kb"))
+
+ !Get the projectors and the KB energy
+ allocate(qn(n_kb), e(n_kb), proj_f(m%np, n_kb))
+ do i = 1, n_kb
+ call states_batch_sort(folds(i), SORT_EV)
+ qn(i) = state_qn(states_batch_get(folds(i), 1))
+ call state_kb_projector(m, v_local, ps_atm%potential, states_batch_get(folds(i), 1), &
+ e(i), proj_f(:,i))
+ call states_batch_end(folds(i))
+ end do
+ deallocate(folds)
+
+ !Initialize the KB potential
+ call potential_init(kb_atm%potential, m, l_local, v_local, n_kb, qn, e, proj_f)
+
+ !Test for ghost states
+ message(1) = ""
+ write(message(2),'(2X,"Ghost state analysis:")')
+ call write_info(2)
+ call write_info(2, unit=info_unit("kb"))
+ do i = 1, states_batch_size(ps_atm%states)
+ call state_test_ghost(m, kb_atm%wave_eq, kb_atm%integrator_sp, kb_atm%integrator_dp, &
+ eigensolver, kb_atm%potential, states_batch_get(ps_atm%states, i))
+ end do
+
+ !Print localization radii
+ message(1) = ""
+ write(message(2),'(2X,"Localization radii [",A,"]:")') trim(units_out%length%abbrev)
+
+ r = M_ZERO
+ do i = m%np, 1, -1
+ if (abs(v(v_local, m%r(i), QN_NULL, unscreened=.true.) &
+ + states_batch_charge(ps_atm%states)/m%r(i)) > 0.001) then
+ r = m%r(i)
+ exit
+ end if
+ end do
+ write(message(3),'(4X,"Local:",F6.2)') r/units_out%length%factor
+
+ k = 0
+ do p = 1, n_kb
+ if (qn(p)%l == l_local) cycle
+ k = k + 1
+ r = M_ZERO
+ do i = m%np, 1, -1
+ if (abs(proj_f(i, p)) > 0.001) then
+ r = m%r(i)
+ exit
+ end if
+ end do
+ write(message(3+k),'(4X,"l = ",I1,":",F6.2)') qn(p)%l, r/units_out%length%factor
+ end do
+ call write_info(3+k)
+ call write_info(3+k, unit=info_unit("kb"))
+
+ !Deallocate memory
+ deallocate(qn, e, proj_f)
+ call mesh_end(m)
+
+ !Finish writing things to the pseudopotential file
+ call potential_ps_io_set(kb_atm%potential)
+ call ps_io_save()
+
+ call pop_sub()
+ end subroutine atom_create_kb
+
+ subroutine atom_test(ps_atm, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Test the pseudo-potentials tranferability. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(inout) :: ps_atm
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ logical :: redo_scf
+ integer :: tests, i
+ integer :: wave_eq
+ character(len=20) :: dir
+ type(atom_t) :: ae_atm
+ type(state_t), pointer :: state
+
+ call push_sub("ps_atom_test")
+
+ ASSERT(ps_atm%type == ATOM_PS)
+
+ call oct_parse_logical('PPTestSCF', .false., redo_scf)
+ if (redo_scf) then
+ !Should we change the orbitals?
+ if (oct_parse_isdef("PPTestOrbitals") /= 0) then
+ do i = 1, states_batch_size(ps_atm%states)
+ state => states_batch_get(ps_atm%states,i)
+ call state_end(state)
+ end do
+ call states_batch_end(ps_atm%states)
+
+ call atom_init_states_from_block(ps_atm, "PPTestOrbitals")
+ end if
+
+ !Are we using the same wave-equation?
+ if (ps_atm%wave_eq /= SCHRODINGER) then
+ call oct_parse_int('WaveEquation', ps_atm%wave_eq, wave_eq)
+ if (ps_atm%wave_eq == SCALAR_REL .and. wave_eq == DIRAC) then
+ message(1) = "It is not possible to solve the Dirac equation for pseudopotentials"
+ message(2) = "generated from a scalar relativistic calculation."
+ call write_fatal(2)
+ end if
+ ps_atm%wave_eq = wave_eq
+ end if
+
+ !Initialize integrator
+ call integrator_init(ps_atm%integrator_sp, ps_atm%integrator_dp)
+
+ !SCF cycle
+ call atom_solve(ps_atm, eigensolver, info_unit("tests"))
+
+ !Output wave-functions
+ call atom_output(ps_atm, "tests")
+ end if
+
+ !Get the all electron atom
+ call oct_parse_string("PPTestAEDir", "ae", dir)
+ call atom_null(ae_atm)
+ call atom_load(ae_atm, dir)
+
+ !Now do the tests
+ call oct_parse_int('PPTests', TEST_LD + TEST_DM, tests)
+
+ if (iand(tests, TEST_LD).ne.0) then
+ call atom_ld_test(ae_atm, ps_atm)
+ end if
+
+ if (iand(tests, TEST_DM).ne.0) then
+ call atom_dm_test(ae_atm, ps_atm)
+ end if
+
+ if (iand(tests, TEST_IP).ne.0) then
+ call atom_ip_test(ae_atm, ps_atm, eigensolver)
+ end if
+
+ !Ends
+ call atom_end(ae_atm)
+
+ call pop_sub()
+ end subroutine atom_test
+
+ subroutine atom_ld_test(ae_atm, ps_atm)
+ !-----------------------------------------------------------------------!
+ ! Test the pseudo-potentials tranferability by computing the !
+ ! logarithmic derivatives. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(in) :: ae_atm
+ type(atom_t), intent(inout) :: ps_atm
+
+ logical :: emin_is_def, emax_is_def
+ integer :: i, n_folds
+ real(R8) :: rc, rld, emin, emax, de
+ real(R8), parameter :: covalent_radius(112) = &
+ ! H He Li Be B C N O F Ne Na
+ (/ 0.60, 1.76, 2.32, 1.70, 1.55, 1.46, 1.42, 1.38, 1.36, 1.34, 2.91, &
+ ! Mg Al Si P S Cl Ar K Ca Sc Ti
+ 2.57, 2.23, 2.10, 2.00, 1.93, 1.87, 1.85, 3.84, 3.29, 2.72, 2.49, &
+ ! V Cr Mn Fe Co Ni Cu Zn Ga Ge As
+ 2.31, 2.23, 2.21, 2.21, 2.19, 2.17, 2.21, 2.36, 2.38, 2.31, 2.27, &
+ ! Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru
+ 2.19, 2.15, 2.12, 4.08, 3.61, 3.06, 2.74, 2.53, 2.46, 2.40, 2.36, &
+ ! Rh Pd Ag Cd In Sn Sb Te I Xe Cs
+ 2.36, 2.42, 2.53, 2.80, 2.72, 2.66, 2.66, 2.57, 2.51, 2.48, 4.44, &
+ ! Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy
+ 3.74, 3.19, 3.12, 3.12, 3.10, 3.08, 3.06, 3.50, 3.04, 3.00, 3.00, &
+ ! Ho Er Tm Yb Lu Hf Ta W Re Os Ir
+ 2.99, 2.97, 2.95, 3.29, 2.95, 2.72, 2.53, 2.46, 2.42, 2.38, 2.40, &
+ ! Pt Au Hg Tl Pb Bi Po At Rn Fr Ra
+ 2.46, 2.53, 2.82, 2.80, 2.78, 2.76, 2.76, 2.74, 2.74, 0.00, 0.00, &
+ ! Ac Th Pa U Np Pu Am Cm Bk Cf Es
+ 0.00, 3.12, 0.00, 2.68, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, &
+ ! Fm Md No Lr Rf Db Sg Bh Hs Mt Uun
+ 0.00, 0.00, 0.00, 2.68, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, &
+ ! Uuu Uub
+ 0.00, 0.00 /)
+ type(states_batch_t), allocatable :: folds(:)
+
+ call push_sub("ps_atom_ld_test")
+
+ ASSERT(ae_atm%type == ATOM_AE .and. ps_atm%type == ATOM_PS)
+
+ message(1) = ""
+ message(2) = "Logarithmic Derivatives:"
+ call write_info(2)
+ call write_info(2,unit=info_unit("tests"))
+
+ !Read the input options
+ rc = covalent_radius(int(ae_atm%z))/units_in%length%factor
+ call oct_parse_float("LogDerivativeRadius", rc, rld)
+ if (rld <= M_ZERO) then
+ write(message(1), '(A,F14.6,A)') "Input: '",rld,"' is not a valid LogDerivativeRadius"
+ message(2) = '(LogDerivativeRadius > 0.0)'
+ call write_fatal(2)
+ end if
+ rld = rld*units_in%length%factor
+
+ emin_is_def = oct_parse_isdef("LogDerivativeEnergyMin") == 1
+ if (emin_is_def) then
+ call oct_parse_float("LogDerivativeEnergyMin", M_TWO, emin)
+ emin = emin*units_in%energy%factor
+ end if
+
+ emax_is_def = oct_parse_isdef("LogDerivativeEnergyMax") == 1
+ if (emax_is_def) then
+ call oct_parse_float("LogDerivativeEnergyMax", M_TWO, emax)
+ emax = emax*units_in%energy%factor
+ end if
+
+ call oct_parse_float("LogDerivativeEnergyStep", M_ZERO, de)
+ if (de < M_ZERO) then
+ message(1) = "LogDerivativeEnergyStep must be greater then zero"
+ end if
+ de = de*units_in%energy%factor
+
+ !Output input info to the screen and to file tests/info
+ write(message(1), '(2X,"Diagnostic radius: ",F6.3,1X,A)') &
+ rld/units_out%length%factor, trim(units_out%length%abbrev)
+ if (de == M_ZERO) then
+ write(message(2), '(2X,"Energy step: Adaptive")')
+ else
+ write(message(2), '(2X,"Energy step: ",F6.3,1X,A)') &
+ de/units_out%energy%factor, trim(units_out%energy%abbrev)
+ end if
+ call write_info(2)
+ call write_info(2,unit=info_unit("tests"))
+
+ !Split states into folds. The logarithmic derivatives will be computed for each fold
+ n_folds = states_batch_number_of_folds(ps_atm%states, .false.)
+ allocate(folds(n_folds))
+ do i = 1, n_folds
+ call states_batch_null(folds(i))
+ end do
+ call states_batch_split_folds(ps_atm%states, folds, .false.)
+
+ !Perform test for each fold
+ do i = 1, n_folds
+ if (emin_is_def .and. emax_is_def) then
+ call states_batch_ld_test(folds(i), ae_atm%m, ae_atm%potential, &
+ ps_atm%potential, ps_atm%integrator_dp, rld, de, emin, emax)
+ elseif (emin_is_def .and. .not.emax_is_def) then
+ call states_batch_ld_test(folds(i), ae_atm%m, ae_atm%potential, &
+ ps_atm%potential, ps_atm%integrator_dp, rld, de, emin=emin)
+ elseif (.not. emin_is_def .and. emax_is_def) then
+ call states_batch_ld_test(folds(i), ae_atm%m, ae_atm%potential, &
+ ps_atm%potential, ps_atm%integrator_dp, rld, de, emax=emax)
+ else
+ call states_batch_ld_test(folds(i), ae_atm%m, ae_atm%potential, &
+ ps_atm%potential, ps_atm%integrator_dp, rld, de)
+ end if
+ end do
+
+ !Free memory
+ do i = 1, n_folds
+ call states_batch_end(folds(i))
+ end do
+ deallocate(folds)
+
+ call pop_sub()
+ end subroutine atom_ld_test
+
+ subroutine atom_dm_test(ae_atm, ps_atm)
+ !-----------------------------------------------------------------------!
+ ! Test the pseudo-potentials tranferability by computing the !
+ ! dipole matrix elements. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(in) :: ae_atm, ps_atm
+
+ integer :: i, f, k
+ real(R8) :: ae_mif, ps_mif
+ character(len=10) :: label_i, label_f
+ type(state_t), pointer :: ae_state_i, ae_state_f, ps_state_i, ps_state_f
+
+ call push_sub("ps_atom_dm_test")
+
+ ASSERT(ae_atm%type == ATOM_AE .and. ps_atm%type == ATOM_PS)
+
+ message(1) = ""
+ message(2) = "Dipole Matrix Elements:"
+ write(message(3),'(6X,"States",11X,"AE",9X,"PS")')
+ call write_info(3)
+ call write_info(3,unit=info_unit("tests"))
+
+ !Loop over i and f states
+ i_loop: do i = 1, states_batch_size(ps_atm%states) - 1
+ ps_state_i => states_batch_get(ps_atm%states, i)
+
+ !Get ae state i
+ do k = 1, states_batch_size(ae_atm%states)
+ ae_state_i => states_batch_get(ae_atm%states, k)
+ if (ae_state_i == ps_state_i) exit
+ end do
+
+ f_loop: do f = i + 1, states_batch_size(ps_atm%states)
+ ps_state_f => states_batch_get(ps_atm%states, f)
+
+ !Get ae state f
+ do k = 1, states_batch_size(ae_atm%states)
+ ae_state_f => states_batch_get(ae_atm%states, k)
+ if (ae_state_f == ps_state_f) exit
+ end do
+
+ !Compute matrix elements
+ ae_mif = state_dipole_matrix_element(ps_atm%m, ae_state_i, ae_state_f)
+ ps_mif = state_dipole_matrix_element(ps_atm%m, ps_state_i, ps_state_f)
+
+ !Write results to screen
+ label_i = state_label(ae_state_i, full=.true.)
+ label_f = state_label(ae_state_f, full=.true.)
+ select case (len_trim(label_i))
+ case (2)
+ write(message(1),'(5X,A," -- ",A,7X,F7.4,4X,F7.4)') &
+ trim(label_i), trim(label_f), ae_mif, ps_mif
+ case (5)
+ write(message(1),'(2X,A," -- ",A,4X,F7.4,4X,F7.4)') &
+ trim(label_i), trim(label_f), ae_mif, ps_mif
+ end select
+ call write_info(1)
+ call write_info(1,unit=info_unit("tests"))
+
+ end do f_loop
+
+ end do i_loop
+
+ call pop_sub()
+ end subroutine atom_dm_test
+
+ subroutine atom_ip_test(ae_atm_in, ps_atm_in, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Test the pseudo-potentials tranferability by computing the !
+ ! ionization potentials. !
+ !-----------------------------------------------------------------------!
+ type(atom_t), intent(in) :: ae_atm_in, ps_atm_in
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ integer :: n_ip_homo, n_ip_ediff, i
+ real(R8) :: ae_e1, ae_e2, ps_e1, ps_e2, ip(ae_atm_in%nspin)
+ type(atom_t) :: ae_atm, ps_atm
+ real(R8), allocatable :: ae_ip_homo(:), ae_ip_ediff(:), ps_ip_homo(:), ps_ip_ediff(:)
+
+ call push_sub("ps_atom_ip_test")
+
+ ASSERT(ae_atm_in%type == ATOM_AE .and. ps_atm_in%type == ATOM_PS)
+
+ call atom_null(ae_atm)
+ call atom_null(ps_atm)
+
+ !Make a copy of the atoms, as we are going to change them
+ ae_atm = ae_atm_in
+ ps_atm = ps_atm_in
+
+ !How many ionization potentials are we going to calculate?
+ n_ip_homo = int(states_batch_charge(ps_atm%states))
+ n_ip_ediff = n_ip_homo - 1
+ allocate(ae_ip_homo(n_ip_homo), ae_ip_ediff(n_ip_homo))
+ allocate(ps_ip_homo(n_ip_homo), ps_ip_ediff(n_ip_homo))
+
+ !We already have some of the values we need
+ ip = states_batch_ip(ae_atm%states, ae_atm%nspin)
+ ae_ip_homo(1) = minval(ip, ip /= M_ZERO)
+ ip = states_batch_ip(ps_atm%states, ps_atm%nspin)
+ ps_ip_homo(1) = minval(ip, ip /= M_ZERO)
+ call atom_energies(ae_atm, ae_e1)
+ call atom_energies(ps_atm, ps_e1)
+
+ !Now we remove electrons from the atoms and recalculate total energy and eivenvalues
+ do i = 1, n_ip_ediff
+ !All-electron
+ call states_batch_smearing(ae_atm%states, OCC_SEMICONDUCTING, M_ZERO, &
+ new_charge=states_batch_charge(ae_atm%states) - M_ONE)
+ call atom_update_potential(ae_atm)
+ call atom_solve(ae_atm, eigensolver, info_unit("tests"))
+ call atom_energies(ae_atm, ae_e2)
+ ae_ip_ediff(i) = ae_e2 - ae_e1
+ ae_e1 = ae_e2
+ ip = states_batch_ip(ae_atm%states, ae_atm%nspin)
+ ae_ip_homo(i+1) = minval(ip, ip /= M_ZERO)
+
+ !Pseudopotential
+ call states_batch_smearing(ps_atm%states, OCC_SEMICONDUCTING, M_ZERO, &
+ new_charge=states_batch_charge(ps_atm%states) - M_ONE)
+ call atom_update_potential(ps_atm)
+ call atom_solve(ps_atm, eigensolver, info_unit("tests"))
+ call atom_energies(ps_atm, ps_e2)
+ ps_ip_ediff(i) = ps_e2 - ps_e1
+ ps_e1 = ps_e2
+ ip = states_batch_ip(ps_atm%states, ps_atm%nspin)
+ ps_ip_homo(i+1) = minval(ip, ip /= M_ZERO)
+ end do
+
+ !Output results
+ message(1) = ""
+ write(message(2),'("Ionization potentials [",A,"]:")') trim(units_out%energy%abbrev)
+ write(message(3),'(16X,"HOMO Eigenvalue",14X,"Energy Difference")')
+ write(message(4),'(15X,"AE",13X,"PS",13X,"AE",13X,"PS")')
+ call write_info(4)
+ call write_info(4,unit=info_unit("tests"))
+ do i = 1, n_ip_ediff
+ write(message(i),'(2X,I2,4(2X,F13.5))') i, ae_ip_homo(i)/units_out%energy%factor, &
+ ps_ip_homo(i)/units_out%energy%factor, &
+ ae_ip_ediff(i)/units_out%energy%factor, &
+ ps_ip_ediff(i)/units_out%energy%factor
+ end do
+ write(message(n_ip_homo),'(2X,I2,2(2X,F13.5))') n_ip_homo, &
+ ae_ip_homo(i)/units_out%energy%factor, &
+ ps_ip_homo(i)/units_out%energy%factor
+ call write_info(n_ip_homo)
+ call write_info(n_ip_homo,unit=info_unit("tests"))
+
+ !Deallocate memory
+ deallocate(ae_ip_homo, ps_ip_homo, ae_ip_ediff, ps_ip_ediff)
+ call atom_end(ae_atm)
+ call atom_end(ps_atm)
+
+ call pop_sub()
+ end subroutine atom_ip_test
diff --git a/src/eigensolver.F90 b/src/eigensolver.F90
new file mode 100644
index 0000000..1d6c6de
--- /dev/null
+++ b/src/eigensolver.F90
@@ -0,0 +1,406 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: eigensolver.F90 782 2013-08-02 14:41:58Z micael $
+
+#include "global.h"
+
+module eigensolver_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use io_m
+ use units_m
+ use mesh_m
+ use quantum_numbers_m
+ use potentials_m
+ use wave_equations_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type eigensolver_t
+ real(R8) :: tol
+ end type eigensolver_t
+
+ type ld_e
+ real(R8) :: e
+ real(R8) :: ldd
+ integer :: nnodes
+ logical :: refine
+ type(ld_e), pointer :: next
+ end type ld_e
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: eigensolver_t, &
+ eigensolver_init, &
+ eigensolver_bracket, &
+ eigensolver_find_ev, &
+ eigensolver_end
+
+contains
+
+ subroutine eigensolver_init(eigensolver)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ type(eigensolver_t), intent(out) :: eigensolver
+
+ call push_sub("eigensolver_init")
+
+ !Read Eingensolver tolerance
+ call oct_parse_float('EigenSolverTolerance', 1.0E-8_r8, eigensolver%tol)
+ eigensolver%tol = eigensolver%tol*units_in%energy%factor
+ if (eigensolver%tol <= M_ZERO) then
+ message(1) = "EigenSolverTolerance must be positive."
+ call write_fatal(1)
+ end if
+
+ message(1) = ""
+ message(2) = "Eigensolver Info"
+ call write_info(2)
+ write(message(1),'(2X,"Method: ",A)') "Brent's method"
+ write(message(2),'(2X,"Tolerance: ",ES10.3E2)') eigensolver%tol
+ call write_info(2,20)
+
+ call pop_sub()
+ end subroutine eigensolver_init
+
+ subroutine eigensolver_end(eigensolver)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ type(eigensolver_t), intent(inout) :: eigensolver
+
+ call push_sub("eigensolver_end")
+
+ !There is nothing to end yet
+
+ call pop_sub()
+ end subroutine eigensolver_end
+
+ subroutine eigensolver_bracket(n_ev, qns, wave_eq, eigensolver, potential, integrator, brackets, bracketed)
+ !-----------------------------------------------------------------------!
+ ! Bracket the eigenvalue. !
+ ! !
+ ! n_ev - number of eigenvalues to be bracketed !
+ ! qns - sets of quantum numbers !
+ ! wave_eq - wave-equation to use !
+ ! wf_dim - dimension of the wavefunction spinor !
+ ! eigensolver - eigensolver object !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! brackets - information about upper and lower bounds of the !
+ ! intervals containing the eigenvalues !
+ ! bracketed - did the eigensolver manage to bracket the eigenvalues? !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n_ev
+ type(qn_t), intent(in) :: qns(n_ev)
+ integer, intent(in) :: wave_eq
+ type(eigensolver_t), intent(in) :: eigensolver
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(out) :: brackets(2, n_ev)
+ logical, intent(out) :: bracketed(n_ev)
+
+ integer :: i, j, min_nnodes, max_nnodes
+ real(R8) :: h
+ type(ld_e), pointer :: first, ptr, next, new_ptr, p1, p2, p3, p4
+ type(qn_t) :: qn
+ integer, allocatable :: nnodes(:)
+
+ call push_sub("eigensolver_bracket")
+
+ if (n_ev == 0) then
+ !No eigenvalues to bracket
+ call pop_sub()
+ return
+ end if
+
+ nullify(first, next, ptr, new_ptr)
+ nullify(p1, p2, p3, p4)
+ brackets = M_ZERO
+
+ !Quantum numbers should belong to the same fold and should be ordered by
+ !increasing node number
+ do i = 2, n_ev
+ ASSERT(qn_equal_fold(qns(1), qns(i), potential_is_polarized(potential)))
+ ASSERT(qns(i)%n >= qns(i-1)%n)
+ end do
+
+ !We use qn for calling the wave equation integrator
+ qn = qns(1)
+ qn%n = 0
+
+ !Number of nodes of the eigenvalues
+ allocate(nnodes(n_ev))
+ nnodes = qn_number_of_nodes(qns)
+ min_nnodes = minval(nnodes)
+ max_nnodes = maxval(nnodes)
+
+ !Initial bracket
+ allocate(first); call ld_e_null(first)
+ allocate(next); call ld_e_null(next)
+ first%e = wave_equation_emin(qns(1), wave_eq, potential)
+ next%e = wave_equation_emax(qns(n_ev), potential)
+ first%ldd = wave_equation_ld_diff(qn, first%e, wave_eq, potential, integrator, first%nnodes)
+ next%ldd = wave_equation_ld_diff(qn, next%e, wave_eq, potential, integrator, next%nnodes)
+ first%refine = .true.
+ next%refine = .false.
+ h = abs(next%e - first%e)
+ first%next => next
+
+ !Bracketing
+ main: do
+ !Check which eigenvalues have been bracketed
+ p1 => first
+ bracketed = .false.
+ do
+ !We need four points, because we are going to check if we have a zero or a discontinuity
+ p2 => p1%next
+ if (.not. associated(p2%next)) exit
+ p3 => p2%next
+ if (.not. associated(p3%next)) exit
+ p4 => p3%next
+
+ !Now the actual check
+ do i = 1, n_ev
+ if (bracketed(i)) cycle
+ if (p2%ldd*p3%ldd < M_ZERO .and. &
+ p2%nnodes == nnodes(i) .and. p3%nnodes == nnodes(i) &
+ .and. abs(p1%ldd) > abs(p2%ldd) .and. &
+ abs(p3%ldd) < abs(p4%ldd) &
+ ) then
+ brackets(1,i) = p2%e
+ brackets(2,i) = p3%e
+ bracketed(i) = .true.
+ exit
+ end if
+ end do
+ p1 => p2
+ end do
+
+ !If we have bracketed all the eigenvalues then we are done!
+ if (all(bracketed)) exit
+
+ !Check if there is something wrong
+ if (h < sqrt(eigensolver%tol)) then
+ if (in_debug_mode) then
+ call bracket_eigenvalue_debug()
+ call potential_debug(potential)
+ end if
+ exit
+ end if
+
+ !Check which brackets should be further refined
+ ptr => first
+ do
+ next => ptr%next
+ !We should not refine this bracket if it:
+ if (ptr%refine .and. (&
+ ! already contains an eigenvalue and no missing eigenvalues have the same number of nodes
+ (any(brackets(1,:) == ptr%e) .and. .not. any(nnodes == ptr%nnodes .and. .not.bracketed)) .or. &
+ ! has less nodes than the minimum number of nodes we are looking for
+ (ptr%nnodes < min_nnodes .and. next%nnodes < min_nnodes) .or. &
+ ! has more nodes than the maximum number of nodes we are looking for
+ (ptr%nnodes > max_nnodes .and. next%nnodes > max_nnodes) .or. &
+ ! has a number of nodes we do not require
+ (ptr%nnodes == next%nnodes .and. .not. any(ptr%nnodes == nnodes)) .or. &
+ ! there cannot be an eigenvalue in this interval
+ ! (for the spin-polarized relativistic case we will not use this condition,
+ ! because the function can have discontinuities)
+ (ptr%nnodes == next%nnodes .and. ptr%ldd*next%ldd > M_ZERO .and. &
+ count(nnodes == ptr%nnodes) == 1) &
+ )) then
+ ptr%refine = .false.
+ end if
+ ptr => next
+ if (.not. associated(ptr%next)) exit
+ end do
+
+ !Refine brackets
+ ptr => first
+ h = h*M_HALF
+ do
+ next => ptr%next
+ if (ptr%refine) then
+ allocate(new_ptr)
+ new_ptr%e = ptr%e + (next%e - ptr%e)*M_HALF
+ new_ptr%ldd = wave_equation_ld_diff(qn, new_ptr%e, wave_eq, potential, integrator, new_ptr%nnodes)
+ new_ptr%refine = .true.
+ new_ptr%next => next
+ ptr%next => new_ptr
+ nullify(new_ptr)
+ end if
+ ptr => next
+ if (.not. associated(ptr%next)) exit
+ end do
+
+ end do main
+
+ !Deallocate everything
+ deallocate(nnodes)
+ call end_list(first)
+
+ call pop_sub()
+ contains
+ subroutine bracket_eigenvalue_debug()
+ integer :: unit, i
+
+ call io_open(unit, 'debug_info/bracket_eigenvalue')
+
+ ptr => first
+ do
+ write(unit,'(F12.5,1X,ES10.3E2,1X,I2,1X,L)') ptr%e, ptr%ldd, ptr%nnodes, ptr%refine
+ if (.not. associated(ptr%next)) exit
+ ptr => ptr%next
+ end do
+ close(unit)
+
+ call io_open(unit, 'debug_info/bracketed_eigenvalues')
+ do i = 1, n_ev
+ write(unit,'(F12.5,1X,F12.5,1X,I2,1X,F4.1)') brackets(1, i), brackets(2, i), nnodes(i)
+ end do
+
+ close(unit)
+
+ end subroutine bracket_eigenvalue_debug
+
+ end subroutine eigensolver_bracket
+
+ subroutine ld_e_null(ptr)
+ type(ld_e), pointer :: ptr
+
+ ptr%e = M_ZERO
+ ptr%ldd = M_ZERO
+ ptr%nnodes = 0
+ nullify(ptr%next)
+
+ end subroutine ld_e_null
+
+ subroutine end_list(ptr)
+ type(ld_e), pointer :: ptr
+
+ type(ld_e), pointer :: next
+
+ do
+ if (.not. associated(ptr%next)) exit
+ next => ptr%next
+ deallocate(ptr)
+ ptr => next
+ end do
+ deallocate(ptr)
+
+ end subroutine end_list
+
+ subroutine eigensolver_find_ev(qn, wave_eq, eigensolver, potential, integrator, bracket, ev)
+ !-----------------------------------------------------------------------!
+ ! Use Brents method to find the eigenvalue. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! wave_eq - wave-equation to use !
+ ! eigensolver - eigensolver object !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! bracket - information about upper and lower bounds of the !
+ ! interval containing the eigenvalue !
+ ! ev - eigenvalue !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ integer, intent(in) :: wave_eq
+ type(eigensolver_t), intent(in) :: eigensolver
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(in) :: bracket(2)
+ real(R8), intent(out) :: ev
+
+ integer :: nnodes_dum
+ real(R8) :: a, b, c, fa, fb, fc, tol1, n, d, e, r, s, q, p, eps = epsilon(M_ONE)
+
+ call push_sub("find_eigenvalue")
+
+ a = bracket(1)
+ b = bracket(2)
+ if (a == M_ZERO .and. b == M_ZERO) then !Unbound state
+ ev = M_ZERO
+ call pop_sub()
+ return
+ end if
+ fa = wave_equation_ld_diff(qn, a, wave_eq, potential, integrator, nnodes_dum)
+ fb = wave_equation_ld_diff(qn, b, wave_eq, potential, integrator, nnodes_dum)
+ c = b
+ fc = fb
+
+ do
+ if ((fb < M_ZERO .and. fc < M_ZERO) .or. (fb > M_ZERO .and. fc > M_ZERO)) then
+ c = a; fc = fa
+ d = b - a; e = d
+ end if
+
+ if (abs(fc) < abs(fb)) then
+ a = b; b = c; c = a
+ fa = fb; fb = fc; fc = fa
+ end if
+ tol1 = M_TWO*eps*abs(b) + M_HALF*eigensolver%tol
+ n = (c - b)*M_HALF
+
+ if (abs(n) <= eigensolver%tol .or. fb == M_HALF) exit
+
+ if (abs(e) > eigensolver%tol .and. abs(fa) > abs(fb)) then
+ s = fb/fa
+ if (a == c) then !Linear interpolation
+ p = M_TWO*n*s
+ q = M_ONE - s
+ else !Inverse quadratic interpolation
+ q = fa/fc
+ r = fb/fc
+ p = s*(M_TWO*n*q*(q - r) - (b - a)*(r - M_ONE))
+ q = (q - M_ONE)*(r - M_ONE)*(s - M_ONE)
+ end if
+ if (p > M_ZERO) then
+ q = -q
+ else
+ p = abs(p)
+ end if
+ s = e
+ e = d
+ if (M_TWO*p < min(M_THREE*n*q - abs(tol1*q), abs(M_HALF*s*q))) then
+ d = p/q
+ else
+ d = n
+ e = d
+ end if
+ end if
+
+ a = b
+ fa = fb
+ if (abs(d) > tol1) then
+ b = b + d
+ else
+ b = b + sign(tol1, n)
+ end if
+
+ fb = wave_equation_ld_diff(qn, b, wave_eq, potential, integrator, nnodes_dum)
+ end do
+
+ ev = b
+ call pop_sub()
+ end subroutine eigensolver_find_ev
+
+end module eigensolver_m
diff --git a/src/finite_diff.F90 b/src/finite_diff.F90
new file mode 100644
index 0000000..324d43e
--- /dev/null
+++ b/src/finite_diff.F90
@@ -0,0 +1,262 @@
+!! Copyright (C) 2011 M. Oliveira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: mesh.F90 569 2011-02-17 17:02:26Z micael $
+
+#include "global.h"
+
+module finite_diff_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use linalg_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure fd_operator_copy
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type fd_operator_t
+ private
+ integer :: order
+ integer :: np
+ integer :: size
+ integer, pointer :: f_index(:)
+ integer, pointer :: c_index(:)
+ real(R8), pointer :: c(:)
+ end type fd_operator_t
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: fd_operator_t, &
+ fd_operator_null, &
+ fd_operator_init, &
+ assignment(=), &
+ fd_operator_apply, &
+ fd_operator_end
+
+
+contains
+
+ subroutine fd_operator_null(op)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of operator op. !
+ !-----------------------------------------------------------------------!
+ type(fd_operator_t), intent(out) :: op
+
+ call push_sub("fd_operator_null")
+
+ op%np = 0
+ op%order = 0
+ op%size = 0
+ nullify(op%f_index)
+ nullify(op%c_index)
+ nullify(op%c)
+
+ call pop_sub()
+ end subroutine fd_operator_null
+
+ subroutine fd_operator_init(op, order, n, np, x)
+ !-----------------------------------------------------------------------!
+ ! Initializes operator op, by calculating the finite differences !
+ ! coefficients and the lookup tables to speed-up the application of the !
+ ! operator. !
+ ! !
+ ! op - operator !
+ ! order - derivative order !
+ ! n - number of points in each spatial direction to be used for !
+ ! the calculation of the derivative at a given point !
+ ! np - number of points in the mesh !
+ ! x - mesh !
+ !-----------------------------------------------------------------------!
+ type(fd_operator_t), intent(inout) :: op
+ integer, intent(in) :: order
+ integer, intent(in) :: n
+ integer, intent(in) :: np
+ real(R8), intent(in) :: x(np)
+
+ integer :: i, j, nl, nr, il, ir, n_stencil
+
+ call push_sub("fd_operator_init")
+
+ op%order = op%order
+ op%np = np
+ op%size = np*(n*2+1)
+ allocate(op%c(op%size))
+ allocate(op%c_index(op%size))
+ allocate(op%f_index(op%size))
+
+ do i = 1, np
+ !Number of points to the left and to the right
+ if (i > n .and. i < np-n) then
+ nl = n
+ nr = n
+ else if (i >= np-n) then
+ nr = np-i
+ nl = min(2*n-nr, i-1)
+ else if (i <= n) then
+ nl = i-1
+ nr = min(2*n-nl, np-i)
+ end if
+
+ !Size and boundaries of the stencil
+ n_stencil = nl + nr + 1
+ il = n_stencil*(i - 1) + 1
+ ir = il + n_stencil - 1
+
+ !Lookup tables
+ op%f_index(il:ir) = i
+ do j = 0, nl + nr
+ op%c_index(il + j) = i - nl + j
+ end do
+
+ !Coefficients
+ call fd_coeff(order, n_stencil, nl+1, x(i-nl:i+nr)-x(i), op%c(il:ir))
+ end do
+
+ call pop_sub()
+ end subroutine fd_operator_init
+
+ subroutine fd_coeff(order, n, i0, h, coeff)
+ !-----------------------------------------------------------------------!
+ ! Calculates the finite differences coefficients for a given set of !
+ ! points. !
+ ! !
+ ! order - derivative order !
+ ! n - number of points !
+ ! i0 - position of the point where the derivative is calculated !
+ ! h - distances of the points (note that should be h(i0) = 0) !
+ ! coeff - the coefficients !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: order
+ integer, intent(in) :: n, i0
+ real(R8), intent(in) :: h(n)
+ real(R8), intent(out) :: coeff(n)
+
+ integer :: i, j, fac
+ real(R8), allocatable :: e(:), c(:), hi(:), g(:,:)
+
+ call push_sub("fd_coeff")
+
+ allocate(e(n-1), g(n-1, n-1), c(n-1), hi(n-1))
+
+ fac = 1
+ e = M_ZERO
+ do i = 1, n-1
+ fac = fac*i
+ if (i == order) then
+ e(i) = fac
+ exit
+ end if
+ end do
+
+ hi(1:i0-1) = h(1:i0-1)
+ hi(i0:n-1) = h(i0+1:n)
+ g(1, 1:n-1) = hi(1:n-1)
+ do i = 2, n-1
+ do j = 1, n-1
+ g(i, j) = g(i-1, j)*hi(j)
+ end do
+ end do
+
+ call solve_linear_system(n-1, g, e, c)
+ coeff(1:i0-1) = c(1:i0-1)
+ coeff(i0) = -sum(c)
+ coeff(i0+1:n) = c(i0:n-1)
+
+ deallocate(e, g, c, hi)
+
+ call pop_sub()
+ end subroutine fd_coeff
+
+ subroutine fd_operator_copy(op_a, op_b)
+ !-----------------------------------------------------------------------!
+ ! Copies operator op_b to op_a. !
+ !-----------------------------------------------------------------------!
+ type(fd_operator_t), intent(inout) :: op_a
+ type(fd_operator_t), intent(in) :: op_b
+
+ call push_sub("fd_operator_copy")
+
+ call fd_operator_end(op_a)
+ op_a%order = op_b%order
+ op_a%np = op_b%np
+ op_a%size = op_b%size
+ if (op_a%size > 0) then
+ allocate(op_a%c(op_a%size))
+ allocate(op_a%c_index(op_a%size))
+ allocate(op_a%f_index(op_a%size))
+ op_a%c = op_b%c
+ op_a%c_index = op_b%c_index
+ op_a%f_index = op_b%f_index
+ end if
+
+ call pop_sub()
+ end subroutine fd_operator_copy
+
+ subroutine fd_operator_apply(op, f, opf)
+ !-----------------------------------------------------------------------!
+ ! Calculate the derivative of f by applying the operator op to function !
+ ! f. !
+ ! !
+ ! op - operator !
+ ! f - function !
+ ! opf - derivative of f !
+ !-----------------------------------------------------------------------!
+ type(fd_operator_t), intent(in) :: op
+ real(R8), intent(in) :: f(op%np)
+ real(R8), intent(out) :: opf(op%np)
+
+ integer :: i
+
+ call push_sub("fd_operator_apply")
+
+ opf = M_ZERO
+ do i = 1, op%size
+ opf(op%f_index(i)) = opf(op%f_index(i)) + f(op%c_index(i))*op%c(i)
+ end do
+
+ call pop_sub()
+ end subroutine fd_operator_apply
+
+ subroutine fd_operator_end(op)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to operator op. !
+ !-----------------------------------------------------------------------!
+ type(fd_operator_t), intent(inout) :: op
+
+ call push_sub("fd_operator_end")
+
+ if (associated(op%c)) deallocate(op%c)
+ if (associated(op%c_index)) deallocate(op%c_index)
+ if (associated(op%f_index)) deallocate(op%f_index)
+ op%np = 0
+ op%order = 0
+ op%size = 0
+
+ call pop_sub()
+ end subroutine fd_operator_end
+
+end module finite_diff_m
diff --git a/src/functionals.F90 b/src/functionals.F90
new file mode 100644
index 0000000..3f238ec
--- /dev/null
+++ b/src/functionals.F90
@@ -0,0 +1,774 @@
+!! Copyright (C) 2008-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: functionals.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module functionals_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use mesh_m
+ use states_m
+ use hartree_m
+ use xc_f90_types_m
+ use xc_f90_lib_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure functional_copy
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type functional_t
+ private
+ integer :: family ! LDA, GGA, etc.
+ integer :: id ! identifier
+ integer :: nspin ! XC_UNPOLARIZED | XC_POLARIZED
+
+ type(xc_f90_pointer_t) :: conf ! the pointer used to call the library
+ type(xc_f90_pointer_t) :: info ! information about the functional
+
+ integer :: irel
+ real(R8) :: xalpha
+ end type functional_t
+
+
+ !---Global Variables---!
+
+ !Some functionals not available in libxc
+ integer, parameter :: XC_OEP_X_EXX = 600, &
+ XC_OEP_XC_SIC = 601, &
+ XC_MGGA_K_GE2 = 599
+
+ !Some version of libxc break backward compatibility...
+#if LIBXC_VERSION == 100
+ integer, parameter :: XC_KINETIC = 3, &
+ XC_GGA_X_LB = XC_GGA_XC_LB
+#endif
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: functional_t, &
+ functional_null, &
+ functional_init, &
+ assignment(=), &
+ functional_get_vxc, &
+ functional_get_tau, &
+ functional_adsic, &
+ functional_rhoxc, &
+ functional_name, &
+ functional_kind, &
+ functional_family, &
+ functional_save, &
+ functional_load, &
+ functional_end, &
+ XC_OEP_X_EXX, &
+ XC_OEP_XC_SIC, &
+ XC_MGGA_K_GE2
+
+contains
+
+ subroutine functional_null(functl)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the functional. !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(out) :: functl
+
+ call push_sub("functional_null")
+
+ functl%family = 0
+ functl%id = 0
+ functl%nspin = 0
+ functl%irel = 0
+ functl%xalpha = M_ZERO
+
+ call pop_sub()
+ end subroutine functional_null
+
+ subroutine functional_init(nspin, id, irel, functl)
+ !-----------------------------------------------------------------------!
+ ! Initializes a functional. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: nspin
+ integer, intent(in) :: id, irel
+ type(functional_t), intent(inout) :: functl
+
+ call push_sub("functional_init")
+
+ functl%id = id
+ functl%nspin = nspin
+ functl%irel = irel
+
+ if(functl%id /= 0) then
+ ! get the family of the functional
+ if (id == XC_OEP_X_EXX) then
+ functl%family = XC_FAMILY_OEP
+ elseif (id == XC_MGGA_K_GE2) then
+ functl%family = XC_FAMILY_MGGA
+ else
+ functl%family = xc_f90_family_from_id(functl%id)
+ end if
+
+ if (functl%family == XC_FAMILY_UNKNOWN) then
+ write(message(1), '(a,i3,a)') "'", functl%id,"' is not a known functional!"
+ message(2) = "Please check the manual for a list of possible values."
+ call write_fatal(2)
+ end if
+
+ end if
+
+ !Extra variables
+ if (functl%family == XC_FAMILY_LDA .and. functl%id == XC_LDA_C_XALPHA) then
+ call oct_parse_float('Xalpha', M_ONE, functl%xalpha)
+ end if
+
+ !Initialize
+ if(functl%id /= 0 .and. functl%id /= XC_MGGA_K_GE2) then
+ call functional_libxc_init(functl)
+ end if
+
+ call pop_sub()
+ end subroutine functional_init
+
+ subroutine functional_libxc_init(functl)
+ !-----------------------------------------------------------------------!
+ ! Initialize the libxc objects of the functional. !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(inout) :: functl
+
+ if (functl%family /= XC_FAMILY_OEP) then
+ call xc_f90_func_init(functl%conf, functl%info, functl%id, functl%nspin)
+
+ if (functl%id == XC_LDA_C_XALPHA) then
+ call xc_f90_lda_c_xalpha_set_par(functl%conf, functl%xalpha)
+ end if
+
+ if (functl%id == XC_LDA_X) then
+#if LIBXC_VERSION == 200
+ call xc_f90_lda_x_set_par(functl%conf, M_FOUR/M_THREE, functl%irel, M_ZERO)
+#else
+ call xc_f90_lda_x_set_par(functl%conf, functl%irel)
+#endif
+ end if
+ end if
+
+ end subroutine functional_libxc_init
+
+ subroutine functional_copy(functl_out, functl_in)
+ !-----------------------------------------------------------------------!
+ ! Copies the functional functl_in to functl_out. !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(inout) :: functl_out
+ type(functional_t), intent(in) :: functl_in
+
+ call push_sub("functional_copy")
+
+ call functional_end(functl_out)
+
+ functl_out%family = functl_in%family
+ functl_out%id = functl_in%id
+ functl_out%nspin = functl_in%nspin
+
+ functl_out%irel = functl_in%irel
+ functl_out%xalpha = functl_in%xalpha
+
+ if(functl_out%id /= 0 .and. functl_out%id /= XC_MGGA_K_GE2) then
+ call functional_libxc_init(functl_out)
+ end if
+
+ call pop_sub()
+ end subroutine functional_copy
+
+ subroutine functional_end(functl)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to the functional. !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(inout) :: functl
+
+ call push_sub("functional_end")
+
+ select case (functl%family)
+ case (XC_FAMILY_LDA, XC_FAMILY_GGA, XC_FAMILY_MGGA)
+ if (functl%id /= XC_MGGA_K_GE2) then
+ call xc_f90_func_end(functl%conf)
+ end if
+ end select
+
+ functl%family = 0
+ functl%id = 0
+ functl%nspin = 0
+
+ functl%irel = 0
+ functl%xalpha = M_ZERO
+
+ call pop_sub()
+ end subroutine functional_end
+
+ function functional_name(functl)
+ !-----------------------------------------------------------------------!
+ ! Returns the name of the functional. !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(in) :: functl
+ character(120) :: functional_name
+
+ select case (functl%id)
+ case (0)
+ functional_name = "None"
+ case (XC_OEP_X_EXX)
+ functional_name = "Exact Exchange"
+ case (XC_MGGA_K_GE2)
+ functional_name = "Second-order gradient expansion of the kinetic energy density"
+ case default
+ call xc_f90_info_name(functl%info, functional_name)
+ end select
+
+ end function functional_name
+
+ function functional_kind(functl)
+ !-----------------------------------------------------------------------!
+ ! Returns the kind of functional we have !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(in) :: functl
+ integer :: functional_kind
+
+ select case (functl%id)
+ case (0)
+ functional_kind = -1
+ case (XC_OEP_X_EXX)
+ functional_kind = XC_EXCHANGE
+ case (XC_OEP_XC_SIC)
+ functional_kind = XC_EXCHANGE_CORRELATION
+ case (XC_MGGA_K_GE2)
+ functional_kind = XC_KINETIC
+ case default
+ functional_kind = xc_f90_info_kind(functl%info)
+ end select
+
+ end function functional_kind
+
+ elemental function functional_family(functl)
+ !-----------------------------------------------------------------------!
+ ! Returns the family of the functional !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(in) :: functl
+ integer :: functional_family
+
+ functional_family = functl%family
+
+ end function functional_family
+
+ subroutine functional_save(unit, functl)
+ !-----------------------------------------------------------------------!
+ ! Writes the functional data to a file. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(functional_t), intent(in) :: functl
+
+ call push_sub("functl_save")
+
+ write(unit) functl%family
+ write(unit) functl%id
+ write(unit) functl%nspin
+
+ write(unit) functl%irel
+ write(unit) functl%xalpha
+
+ call pop_sub()
+ end subroutine functional_save
+
+ subroutine functional_load(unit, functl)
+ !-----------------------------------------------------------------------!
+ ! Reads the exchange-correlation model data from a file. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(functional_t), intent(inout) :: functl
+
+ call push_sub("functl_load")
+
+ read(unit) functl%family
+ read(unit) functl%id
+ read(unit) functl%nspin
+
+ read(unit) functl%irel
+ read(unit) functl%xalpha
+
+ if(functl%id /= 0 .and. functl%id /= XC_MGGA_K_GE2) then
+ call functional_libxc_init(functl)
+ end if
+
+ call pop_sub()
+ end subroutine functional_load
+
+ subroutine functional_get_vxc(functl, m, rho, rho_grad, rho_lapl, tau, ip, v, e, vtau)
+ !-----------------------------------------------------------------------!
+ ! Given a density, computes the corresponding exchange/correlation !
+ ! potentials and energies. !
+ ! !
+ ! functl - functional !
+ ! m - mesh !
+ ! rho - electronic radial density !
+ ! rho_grad - gradient of the electronic radial density !
+ ! rho_lapl - laplacian of the electronic radial density !
+ ! tau - radial kinetic energy density !
+ ! ip - ionization potential !
+ ! v - potential !
+ ! e - energy per-volume !
+ ! vtau - extra term arising from MGGA potential !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(inout) :: functl
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: rho(m%np, functl%nspin)
+ real(R8), intent(in) :: rho_grad(m%np, functl%nspin)
+ real(R8), intent(in) :: rho_lapl(m%np, functl%nspin)
+ real(R8), intent(in) :: tau(m%np, functl%nspin)
+ real(R8), intent(in) :: ip(functl%nspin)
+ real(R8), intent(out) :: v(m%np, functl%nspin), e(m%np)
+ real(R8), intent(out) :: vtau(m%np, functl%nspin)
+
+ integer :: i, is, nspin
+ real(R8) :: sigma(3), vsigma(3), a, b, c
+ real(R8), parameter :: alpha = -0.012_r8, beta = 1.023_r8
+ real(R8), allocatable :: d(:), dedd(:,:), ldedd(:)
+ real(R8), allocatable :: lgd(:), dedgd(:,:)
+ real(R8), allocatable :: ltau(:), dedtau(:)
+ real(R8), allocatable :: lld(:), dedld(:,:), ldedld(:)
+
+ call push_sub("functional_get_vxc")
+
+ ASSERT(size(v, dim=2) == functl%nspin)
+ ASSERT(functional_kind(functl) /= XC_KINETIC)
+
+ if (functl%family == 0) then
+ v = M_ZERO ; e = M_ZERO ; vtau = M_ZERO
+ call pop_sub()
+ return
+ end if
+
+ nspin = functl%nspin
+
+ !Allocate work arrays
+ allocate(d(nspin), dedd(m%np, nspin), ldedd(nspin))
+ d = M_ZERO; dedd = M_ZERO; ldedd = M_ZERO
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ allocate(lgd(nspin), dedgd(m%np, nspin))
+ lgd = M_ZERO; dedgd = M_ZERO
+ end if
+ if (functl%family == XC_FAMILY_MGGA) then
+ allocate(lld(nspin), ldedld(nspin), dedld(m%np, nspin))
+ lld = M_ZERO; ldedld = M_ZERO; dedld = M_ZERO
+ allocate(ltau(nspin), dedtau(nspin))
+ ltau = M_ZERO; dedtau = M_ZERO
+ end if
+
+ if (functl%id == XC_MGGA_X_TB09) then
+ if (maxval(ip) == M_ZERO) then
+ c = M_ONE
+ else
+ a = M_ZERO
+ do
+ c = alpha + beta*sqrt(M_TWO*sqrt(M_TWO*(maxval(ip) + a)))
+ b = (M_THREE*c - M_TWO)/M_PI*sqrt(M_FIVE/M_SIX*(maxval(ip) + a))
+ if (abs(a - b) < 1.0e-8) exit
+ a = b
+ end do
+ end if
+ call xc_f90_mgga_x_tb09_set_par(functl%conf, c)
+ end if
+
+ !Space loop
+ do i = 1, m%np
+ ! make a local copy with the correct memory order
+ d(1:nspin) = rho(i, 1:nspin)
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ lgd(1:nspin) = rho_grad(i, 1:nspin)
+
+ sigma = M_ZERO
+ sigma(1) = lgd(1)**2
+ if(nspin == 2) then
+ sigma(2) = lgd(1)*lgd(2)
+ sigma(3) = lgd(2)**2
+ end if
+ end if
+ if (functl%family == XC_FAMILY_MGGA) then
+#if LIBXC_VERSION >= 200
+ ltau(1:nspin) = tau(i, 1:nspin)/M_TWO
+#else
+ ltau(1:nspin) = tau(i, 1:nspin)
+#endif
+ lld(1:nspin) = rho_lapl(i, 1:nspin)
+ end if
+
+ if (iand(xc_f90_info_flags(functl%info), XC_FLAGS_HAVE_EXC) .ne. 0) then
+
+ select case(functl%family)
+ case(XC_FAMILY_LDA)
+ call xc_f90_lda_exc_vxc(functl%conf, 1, d(1), e(i), ldedd(1))
+ case(XC_FAMILY_GGA)
+ call xc_f90_gga_exc_vxc(functl%conf, 1, d(1), sigma(1), e(i), ldedd(1), vsigma(1))
+ case(XC_FAMILY_MGGA)
+ call xc_f90_mgga_exc_vxc(functl%conf, 1, d(1), sigma(1), lld(1), ltau(1), &
+ e(i), ldedd(1), vsigma(1), ldedld(1), dedtau(1))
+ end select
+
+ else !Just get the potential
+
+ select case(functl%family)
+ case(XC_FAMILY_LDA)
+ call xc_f90_lda_vxc(functl%conf, 1, d(1), ldedd(1))
+ case(XC_FAMILY_GGA)
+ call xc_f90_gga_vxc(functl%conf, 1, d(1), sigma(1), ldedd(1), vsigma(1))
+ case(XC_FAMILY_MGGA)
+ call xc_f90_mgga_vxc(functl%conf, 1, d(1), sigma(1), lld(1), ltau(1), &
+ ldedd(1), vsigma(1), ldedld(1), dedtau(1))
+ end select
+ e(i) = M_ZERO
+
+ end if
+
+ e(i) = e(i)*sum(d)
+ dedd(i, :) = ldedd(:)
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ if (nspin == 1) then
+ dedgd(i, 1) = M_TWO*vsigma(1)*lgd(1)
+ else
+ dedgd(i, 1) = M_TWO*vsigma(1)*lgd(1) + vsigma(2)*lgd(2)
+ dedgd(i, 2) = M_TWO*vsigma(3)*lgd(2) + vsigma(2)*lgd(1)
+ end if
+ end if
+ if(functl%family == XC_FAMILY_MGGA) then
+ dedld(i, 1:nspin) = dedld(i, 1:nspin) + ldedld(1:nspin)
+#if LIBXC_VERSION >= 200
+ vtau(i, 1:nspin) = vtau(i, 1:nspin) + dedtau(1:nspin)/M_TWO
+#else
+ vtau(i, 1:nspin) = vtau(i, 1:nspin) + dedtau(1:nspin)
+#endif
+ else
+ vtau(i, 1:nspin) = M_ZERO
+ end if
+ end do
+
+ !Compute potentials
+ v = dedd
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ do is = 1, nspin
+ v(:, is) = v(:, is) - mesh_divergence(m, dedgd(:, is))
+ end do
+ end if
+ if (functl%family == XC_FAMILY_MGGA) then
+ do is = 1, nspin
+ v(:, is) = v(:, is) + mesh_laplacian(m, dedld(:, is))
+ end do
+ end if
+
+ ! If LB94, we can calculate an approximation to the energy from
+ ! Levy-Perdew relation PRA 32, 2010 (1985)
+ if (functl%id == XC_GGA_X_LB) then
+ do is = 1, nspin
+ e = e - rho(:, is)*m%r*mesh_gradient(m, v(:, is))
+ end do
+ end if
+
+ !Shift potentials that do not go to zero at infinity
+ do is = 1, nspin
+ select case (functl%id)
+ case (XC_MGGA_X_BJ06)
+ a = sqrt(M_FIVE/M_SIX*ip(is))/M_PI
+ case (XC_MGGA_X_TB09)
+ a = (M_THREE*c - M_TWO)*sqrt(M_FIVE/M_SIX*ip(is))/M_PI
+ case default
+ a = M_ZERO
+ end select
+ do i = m%np, 1, -1
+ if (v(i, is) /= M_ZERO) then
+ v(1:i, is) = v(1:i, is) - a
+ exit
+ end if
+ end do
+ end do
+
+ !Deallocate arrays
+ deallocate(d, dedd, ldedd)
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ deallocate(lgd, dedgd)
+ end if
+ if (functl%family == XC_FAMILY_MGGA) then
+ deallocate(lld, dedld, ldedld)
+ deallocate(ltau, dedtau)
+ end if
+
+ call pop_sub()
+ end subroutine functional_get_vxc
+
+ subroutine functional_get_tau(functl, m, rho, rho_grad, rho_lapl, tau)
+ !-----------------------------------------------------------------------!
+ ! Computes the approximated kinetic energy density. !
+ ! !
+ ! functl - functional !
+ ! m - mesh !
+ ! rho - electronic radial density !
+ ! rho_grad - gradient of the electronic radial density !
+ ! rho_lapl - laplacian of the electronic radial density !
+ ! tau - radial kinetic energy density !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(in) :: functl
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: rho(m%np, functl%nspin)
+ real(R8), intent(in) :: rho_grad(m%np, functl%nspin)
+ real(R8), intent(in) :: rho_lapl(m%np, functl%nspin)
+ real(R8), intent(out) :: tau(m%np, functl%nspin)
+
+ integer :: i, is, nspin
+ real(R8) :: sigma(3)
+ real(R8), allocatable :: d(:), lgd(:), ltau(:), lld(:)
+
+ call push_sub("functional_get_tau")
+
+ ASSERT(functional_kind(functl) == XC_KINETIC)
+
+ if (functl%id == XC_MGGA_K_GE2) then
+ where (rho <= 1e-30)
+ tau = M_ZERO
+ elsewhere
+ tau = M_THREE/M_FIVE*(M_THREE*M_PI**2)**(M_TWO/M_THREE)*rho**(M_FIVE/M_THREE) + &
+ rho_lapl/M_THREE + rho_grad**2/rho/36.0_r8
+ end where
+ call pop_sub()
+ return
+ end if
+
+ nspin = functl%nspin
+
+ !Allocate work arrays
+ allocate(d(nspin), ltau(nspin))
+ d = M_ZERO; ltau = M_ZERO
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ allocate(lgd(nspin))
+ lgd = M_ZERO
+ end if
+ if (functl%family == XC_FAMILY_MGGA) then
+ allocate(lld(nspin))
+ lld = M_ZERO
+ end if
+
+ !Spin loop
+ do is = 1, nspin
+ !Space loop
+ do i = 1, m%np
+ ! make a local copy with the correct memory order
+ d = M_ZERO
+ d(is) = rho(i, is)
+
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) then
+ lgd = M_ZERO
+ lgd(is) = rho_grad(i, is)
+
+ sigma = M_ZERO
+ sigma(1) = lgd(1)**2
+ if(nspin == 2) then
+ sigma(2) = lgd(1)*lgd(2)
+ sigma(3) = lgd(2)**2
+ end if
+ end if
+ if (functl%family == XC_FAMILY_MGGA) then
+ lld = M_ZERO
+ lld(is) = rho_lapl(i, is)
+ end if
+
+ select case(functl%family)
+ case(XC_FAMILY_LDA)
+ call xc_f90_lda_exc(functl%conf, 1, d(1), ltau(1))
+ case(XC_FAMILY_GGA)
+ call xc_f90_gga_exc(functl%conf, 1, d(1), sigma(1), ltau(1))
+ end select
+
+#if LIBXC_VERSION >= 200
+ tau(i, is) = M_TWO*ltau(1)*d(is)
+#else
+ tau(i, is) = ltau(1)*d(is)
+#endif
+ end do
+ end do
+
+ !Deallocate arrays
+ deallocate(d, ltau)
+ if (functl%family == XC_FAMILY_GGA .or. functl%family == XC_FAMILY_MGGA) deallocate(lgd)
+ if (functl%family == XC_FAMILY_MGGA) deallocate(lld)
+
+ call pop_sub()
+ end subroutine functional_get_tau
+
+ subroutine functional_adsic(functls, m, nspin, rho, rho_grad, rho_lapl, tau, ip, vxc, exc)
+ !-----------------------------------------------------------------------!
+ ! Computes the ADSIC corrections !
+ ! !
+ ! functls - the functionals that should be corrected !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! rho - electronic radial density !
+ ! rho_grad - gradient of the electronic radial density !
+ ! rho_lapl - laplacian of the electronic radial density !
+ ! tau - radial kinetic energy density !
+ ! charge - electronic charge !
+ ! ip - ionization potential !
+ ! vxc - ADSIC correction to the potential !
+ ! exc - ADSIC correction to the energy !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(inout) :: functls(2)
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nspin
+ real(R8), intent(in) :: rho(m%np, nspin)
+ real(R8), intent(in) :: rho_grad(m%np, nspin)
+ real(R8), intent(in) :: rho_lapl(m%np, nspin)
+ real(R8), intent(in) :: tau(m%np, nspin)
+ real(R8), intent(in) :: ip(nspin)
+ real(R8), intent(out) :: vxc(m%np, nspin)
+ real(R8), intent(out) :: exc
+
+ integer :: i, is
+ real(R8), allocatable :: e(:), v(:,:), vtau(:,:), charge(:)
+ real(R8), allocatable :: srho(:,:), sgrad(:,:), slapl(:,:), stau(:,:)
+
+ call push_sub("functional_adsic")
+
+ !Allocate potential and energy work arrays
+ allocate(v(m%np, nspin), e(m%np), vtau(m%np, nspin), charge(nspin))
+ e = M_ZERO; v = M_ZERO; vtau = M_ZERO
+ exc = M_ZERO; vxc = M_ZERO
+
+ !Get charge
+ do is = 1, nspin
+ charge(is) = mesh_integrate(m, rho(:,is))
+ end do
+
+ !Get correction for Hartree potential and energy
+ call hartree_potential(m, sum(rho,dim=2), sum(charge), vh = vxc, eh = exc)
+ vxc = vxc/sum(charge)
+ exc = exc/sum(charge)
+
+ allocate(srho(m%np, nspin), sgrad(m%np, nspin), slapl(m%np, nspin), stau(m%np, nspin))
+ do is = 1, nspin
+ srho(:, is) = rho(:, is)/charge(is)
+ sgrad(:, is) = rho_grad(:, is)/charge(is)
+ slapl(:, is) = rho_lapl(:, is)/charge(is)
+ stau (:, is) = tau(:, is)/charge(is)
+ if (nspin == 2) then
+ srho (:, nspin-is+1) = M_ZERO
+ sgrad(:, nspin-is+1) = M_ZERO
+ slapl(:, nspin-is+1) = M_ZERO
+ stau (:, nspin-is+1) = M_ZERO
+ end if
+ !Get xc energy and potential for the average density
+ do i = 1, 2
+ call functional_get_vxc(functls(i), m, srho, sgrad, slapl, stau, ip, v, e, vtau)
+ exc = exc + charge(is)*M_FOUR*M_PI*mesh_integrate(m, e)
+ vxc = vxc + v
+ end do
+ end do
+
+ !Deallocates arrays
+ deallocate(e, v, vtau, srho, sgrad, slapl, stau, charge)
+
+ call pop_sub()
+ end subroutine functional_adsic
+
+ subroutine functional_rhoxc(functl, m, nspin, rho, rho_grad, rho_lapl, tau, ip, dvxc)
+ !-----------------------------------------------------------------------!
+ ! Computes the rhoxc correction !
+ ! !
+ ! functl - the functional that should be corrected !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! rho - electronic radial density !
+ ! rho_grad - gradient of the electronic radial density !
+ ! rho_lapl - laplacian of the electronic radial density !
+ ! tau - radial kinetic energy density !
+ ! ip - ionization potential !
+ ! dvxc - correction to the potential !
+ !-----------------------------------------------------------------------!
+ type(functional_t), intent(inout) :: functl
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nspin
+ real(R8), intent(in) :: rho(m%np, nspin)
+ real(R8), intent(in) :: rho_grad(m%np, nspin)
+ real(R8), intent(in) :: rho_lapl(m%np, nspin)
+ real(R8), intent(in) :: tau(m%np, nspin)
+ real(R8), intent(in) :: ip(nspin)
+ real(R8), intent(out) :: dvxc(m%np, nspin)
+
+ integer :: i
+ real(R8) :: qxc
+ real(R8), allocatable :: nxcb(:), nxc(:), vxc(:,:)
+ real(R8), allocatable :: urho(:,:), ugrad(:,:), ulapl(:,:), utau(:,:)
+ real(R8), allocatable :: uvxc(:,:), uexc(:), uvxctau(:,:)
+
+ call push_sub("functional_rhoxc")
+
+ !Get spin-unpolarized potential
+ allocate(urho(m%np, nspin), ugrad(m%np, nspin), ulapl(m%np, nspin), utau(m%np, nspin))
+ allocate(uvxc(m%np, nspin), uexc(m%np), uvxctau(m%np, nspin))
+ do i = 1, m%np
+ urho(i, :) = sum(rho(i, 1:nspin))/nspin
+ ugrad(i, :) = sum(rho_grad(i, 1:nspin))/nspin
+ ulapl(i, :) = sum(rho_lapl(i, 1:nspin))/nspin
+ utau(i, :) = sum(tau(i, 1:nspin))/nspin
+ end do
+ call functional_get_vxc(functl, m, urho, ugrad, ulapl, utau, ip, uvxc, uexc, uvxctau)
+
+ !Allocate xc density and potential
+ allocate(nxcb(m%np), nxc(m%np), vxc(m%np, nspin))
+
+ !Get original xc density
+ nxc = -M_ONE/(M_FOUR*M_PI)*mesh_laplacian(m, uvxc)
+
+ !Remove density from the tail such that the charge is as close as possible to -1
+ nxcb = M_FOUR*M_PI*mesh_primitive(m, nxc)
+ do i = m%np, 2, -1
+ if ( (abs(nxcb(i-1)) > M_ONE .and. abs(nxcb(i)) <= M_ONE) .or. &
+ (nxcb(i-1) - nxcb(i) > 1e-4) ) then
+ nxc(i:m%np) = M_ZERO
+ exit
+ end if
+ end do
+
+ !Normalize xc density to -1
+ qxc = M_FOUR*M_PI*mesh_integrate(m, nxc)
+ if (qxc /= M_ZERO) then
+ nxc = -nxc/qxc
+ end if
+
+ !Solve the Poisson equation for the xc density to get the correction to the potential
+ call hartree_potential(m, nxc, -M_ONE, vh=vxc)
+ dvxc = vxc - uvxc
+
+ !Deallocates arrays
+ deallocate(nxcb, nxc, vxc)
+ deallocate(urho, ugrad, ulapl, utau)
+ deallocate(uvxc, uexc, uvxctau)
+
+ call pop_sub()
+ end subroutine functional_rhoxc
+
+end module functionals_m
diff --git a/src/global.F90 b/src/global.F90
new file mode 100644
index 0000000..631adac
--- /dev/null
+++ b/src/global.F90
@@ -0,0 +1,67 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: global.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module global_m
+ implicit none
+
+ !---Names of kind types parameters---!
+
+ !8 bytes real
+ integer, parameter :: R8 = 8
+
+ !---Parameters---!
+
+ real(R8), parameter :: M_ZERO = 0.0_r8
+ real(R8), parameter :: M_ONE = 1.0_r8
+ real(R8), parameter :: M_TWO = 2.0_r8
+ real(R8), parameter :: M_THREE = 3.0_r8
+ real(R8), parameter :: M_FOUR = 4.0_r8
+ real(R8), parameter :: M_FIVE = 5.0_r8
+ real(R8), parameter :: M_SIX = 6.0_r8
+ real(R8), parameter :: M_SEVEN = 7.0_r8
+ real(R8), parameter :: M_EIGHT = 8.0_r8
+ real(R8), parameter :: M_NINE = 9.0_r8
+ real(R8), parameter :: M_TEN = 10.0_r8
+ real(R8), parameter :: M_ELEVEN = 11.0_r8
+ real(R8), parameter :: M_TWELVE = 12.0_r8
+ real(R8), parameter :: M_FOURTEEN = 14.0_r8
+ real(R8), parameter :: M_SIXTEEN = 16.0_r8
+ real(R8), parameter :: M_EIGHTEEN = 18.0_r8
+ real(R8), parameter :: M_TWENTY = 20.0_r8
+ real(R8), parameter :: M_THIRTY = 30.0_r8
+ real(R8), parameter :: M_FIFTY = 50.0_r8
+ real(R8), parameter :: M_SIXTY = 60.0_r8
+ real(R8), parameter :: M_HUNDRED = 100.0_r8
+ real(R8), parameter :: M_HALF = 0.5_r8
+ real(R8), parameter :: M_THIRD = M_ONE/M_THREE
+ real(R8), parameter :: M_TWOTHIRD = M_TWO/M_THREE
+ real(R8), parameter :: M_DIME = 0.1_r8
+ real(R8), parameter :: M_CENT = 0.01_r8
+ real(R8), parameter :: M_PI = 3.141592653589793238462643383279502884197_r8
+ real(R8), parameter :: M_C = 137.03599976_r8
+ real(R8), parameter :: M_C2 = 18778.86524_r8
+ real(R8), parameter :: M_LOGC = 4.92024366328042038029011278105_r8
+ real(R8), parameter :: M_EPSILON = 1.0e-20_r8
+
+ !Other stuff
+ logical :: in_debug_mode = .false.
+
+end module global_m
diff --git a/src/global.h b/src/global.h
new file mode 100644
index 0000000..b59f00e
--- /dev/null
+++ b/src/global.h
@@ -0,0 +1,30 @@
+!! Copyright (C) 2004-2006 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: global.h 778 2013-07-11 15:49:39Z micael $
+
+#include "config_F90.h"
+
+#define __STRING(x) #x
+
+
+#define ASSERT(expr) \
+ if(.not.(expr)) then \newline \
+ call assert_die (__STRING(expr), & \newline \
+ __FILE__, __LINE__) \newline \
+ end if
+
diff --git a/src/gsl_interface_c.c b/src/gsl_interface_c.c
new file mode 100644
index 0000000..a20f134
--- /dev/null
+++ b/src/gsl_interface_c.c
@@ -0,0 +1,358 @@
+/*
+ Copyright (C) 2004-2007 M. Oliveira, F. Nogueira
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: gsl_interface_c.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <config.h>
+#include <string_f.h>
+
+#include <gsl/gsl_errno.h>
+#include <gsl/gsl_math.h>
+#include <gsl/gsl_sf.h>
+#include <gsl/gsl_vector.h>
+#include <gsl/gsl_matrix.h>
+#include <gsl/gsl_permutation.h>
+#include <gsl/gsl_linalg.h>
+#include <gsl/gsl_odeiv.h>
+#include <gsl/gsl_spline.h>
+#include <gsl/gsl_multiroots.h>
+
+
+/* This file contains interface routines that allow Fortran 90/95
+routines to call GSL routines. The names of these routines are
+compiler dependent: Fortran 90/95 compilers have different
+name-mangling schemes. For a description of the routines please refer
+to the GSL documentation. */
+
+
+ /* Error Handling */
+
+void FC_FUNC_(gsl_strerror, GSL_STRERROR)
+ (int *err, STR_F_TYPE res STR_ARG1)
+{
+ char *c;
+
+ c = gsl_strerror(*err);
+ TO_F_STR1(c, res);
+}
+
+
+ /* Mathematical Functions */
+
+double FC_FUNC_(gsl_asinh, GSL_ASINH)
+ (const double *x)
+{
+ return gsl_asinh(*x);
+}
+
+
+ /* Special Functions */
+
+double FC_FUNC_(gsl_sf_bessel_knu_scaled, GSL_SF_BESSEL_KNU_SCALED)
+ (double *nu, double *x)
+{
+ return gsl_sf_bessel_Knu_scaled(*nu,*x);
+}
+
+
+ /* Vectors and Matrices */
+
+void FC_FUNC_(gsl_vector_alloc, GSL_VECTOR_ALLOC)
+ (int *n, void **v)
+{
+ *v = (void*) gsl_vector_alloc (*n);
+}
+
+void FC_FUNC_(gsl_vector_free, GSL_VECTOR_FREE)
+ (void **v)
+{
+ gsl_vector_free ((gsl_vector *)(*v));
+}
+
+double FC_FUNC_(gsl_vector_get, GSL_VECTOR_GET) (void **v, int *i)
+{
+ return gsl_vector_get ((gsl_vector *)(*v), *i);
+}
+
+void FC_FUNC_(gsl_vector_set, GSL_VECTOR_SET)
+ (void **v, int *i, double *x)
+{
+ gsl_vector_set ((gsl_vector *)(*v), *i, *x);
+}
+
+void FC_FUNC_(gsl_matrix_alloc, GSL_MATRIX_ALLOC)
+ (int *n1, int *n2, void **m)
+{
+ *m = (void*) gsl_matrix_alloc (*n1, *n2);
+}
+
+void FC_FUNC_(gsl_matrix_calloc, GSL_MATRIX_CALLOC)
+ (int *n1, int *n2, void **m)
+{
+ *m = (void*) gsl_matrix_calloc (*n1, *n2);
+}
+
+void FC_FUNC_(gsl_matrix_free, GSL_MATRIX_FREE)
+ (void **m)
+{
+ gsl_matrix_free ((gsl_matrix *)(*m));
+}
+
+double FC_FUNC_(gsl_matrix_get, GSL_MATRIX_GET)
+ (void **m, int *i, int *j)
+{
+ return gsl_matrix_get ((gsl_matrix *)(*m), *i, *j);
+}
+
+void FC_FUNC_(gsl_matrix_set, GSL_MATRIX_SET)
+ (void **m, int *i, int *j, double *x)
+{
+ gsl_matrix_set ((gsl_matrix *)(*m), *i, *j, *x);
+}
+
+
+ /* Permutations */
+
+
+void FC_FUNC_(gsl_permutation_alloc, GSL_PERMUTATION_ALLOC)
+ (int *n, void **p)
+{
+ *p = (void*) gsl_permutation_alloc (*n);
+}
+
+void FC_FUNC_(gsl_permutation_free, GSL_PERMUTATION_FREE)
+ (void **p)
+{
+ gsl_permutation_free ((gsl_permutation *)(*p));
+}
+
+
+ /* Linear Algebra */
+
+
+int FC_FUNC_(gsl_linalg_lu_decomp, GSL_LINALG_LU_DECOMP)
+ (void **m, void **p, int *signum)
+{
+ int s,ierr;
+ ierr = gsl_linalg_LU_decomp ((gsl_matrix *)(*m) , (gsl_permutation *)(*p), &s);
+ *signum = s;
+ return (ierr);
+}
+
+int FC_FUNC_(gsl_linalg_lu_invert, GSL_LINALG_LU_INVERT)
+ (void **LU, void **p, void **inverse)
+{
+
+ return gsl_linalg_LU_invert ((gsl_matrix *)(*LU),(gsl_permutation *)(*p), (gsl_matrix *)(*inverse));
+}
+
+int FC_FUNC_(gsl_linalg_lu_solve, GSL_LINALG_LU_SOLVE)
+ (void **LU, void **p, void **b, void **x)
+{
+ return gsl_linalg_LU_solve ((gsl_matrix *)(*LU), (gsl_permutation *)(*p), (gsl_vector *)(*b), (gsl_vector *)(*x));
+}
+
+
+ /* Ordinary Differential Equations */
+
+void FC_FUNC_(gsl_odeiv_step_alloc, GSL_ODEIV_STEP_ALLOC)
+ (const int *stepping_func, const int *dim, void **stp)
+{
+ /* WARNING: This routine has a small modification: the user needs to
+ pass an integer in order to choose the stepping function instead of
+ a variable of type gsl_odeiv_step_type. */
+
+ switch(*stepping_func) {
+ case 1 : // Embedded 2nd order Runge-Kutta with 3rd order error estimate
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rk2, *dim);
+ break;
+ case 2 : // 4th order (classical) Runge-Kutta
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rk4, *dim);
+ break;
+ case 3 : // Embedded 4th order Runge-Kutta-Fehlberg method with 5th order error estimate. This method is a good general-purpose integrator
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rkf45, *dim);
+ break;
+ case 4 : // Embedded 4th order Runge-Kutta Cash-Karp method with 5th order error estimate
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rkck, *dim);
+ break;
+ case 5 : // Embedded 8th order Runge-Kutta Prince-Dormand method with 9th order error estimate
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rk8pd, *dim);
+ break;
+ case 6 : // Implicit 2nd order Runge-Kutta at Gaussian points
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rk2imp, *dim);
+ break;
+ case 7 : // Implicit 4th order Runge-Kutta at Gaussian points
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_rk4imp, *dim);
+ break;
+ case 8 : // Implicit Bulirsch-Stoer method of Bader and Deuflhard. This algorithm requires the Jacobian
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_bsimp, *dim);
+ break;
+ case 9 : // M=1 implicit Gear method
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_gear1, *dim);
+ break;
+ case 10 : // M=2 implicit Gear method
+ *stp = (void *)gsl_odeiv_step_alloc(gsl_odeiv_step_gear2, *dim);
+ break;
+ }
+}
+
+void FC_FUNC_(gsl_odeiv_step_free, GSL_ODEIV_STEP_FREE)
+ (void **stp)
+{
+ gsl_odeiv_step_free((gsl_odeiv_step *)(*stp));
+}
+
+void FC_FUNC_(gsl_odeiv_evolve_alloc, GSL_ODEIV_EVOLVE_ALLOC)
+ (const int *dim, void **evl)
+{
+ *evl = (void *)gsl_odeiv_evolve_alloc (*dim);
+}
+
+int FC_FUNC_(gsl_odeiv_evolve_reset, GSL_ODEIV_EVOLVE_RESET)
+ (void **evl)
+{
+ return gsl_odeiv_evolve_reset ((gsl_odeiv_evolve *)(*evl));
+}
+
+void FC_FUNC_(gsl_odeiv_evolve_free, GSL_ODEIV_EVOLVE_FREE)
+ (void **evl)
+{
+ gsl_odeiv_evolve_free((gsl_odeiv_evolve *)(*evl));
+}
+
+void FC_FUNC_(gsl_odeiv_control_standart_new, GSL_ODEIV_CONTROL_STANDART_NEW)
+ (void **ctrl, double *epsabs, double *epsrel, double *ay, double *adydt)
+{
+ *ctrl = (void*) gsl_odeiv_control_standard_new (*epsabs, *epsrel, *ay, *adydt);
+}
+
+void FC_FUNC_(gsl_odeiv_control_free, GSL_ODEIV_CONTROL_FREE)
+ (void **ctrl)
+{
+ gsl_odeiv_control_free((gsl_odeiv_control *)(*ctrl));
+}
+
+
+ /* Interpolation */
+
+void FC_FUNC_(gsl_interp_accel_alloc, GSL_INTERP_ACCEL_ALLOC)
+ (void **acc)
+{
+ *acc = (void *)gsl_interp_accel_alloc();
+}
+
+void FC_FUNC_(gsl_spline_alloc, GSL_SPLINE_ALLOC)
+ (void **spl, int *n, short int *opt)
+{
+ /* WARNING: This routine has a small modification: the user needs to
+ pass an integer in order to choose the interpolation type instead
+ of a variable of type gsl_interp_type. */
+
+ switch (*opt) {
+ case 1 : // linear interpolation
+ *spl = (void *)gsl_spline_alloc(gsl_interp_linear, *n);
+ break;
+ case 2 : // polynomial interpolation
+ *spl = (void *)gsl_spline_alloc(gsl_interp_polynomial, *n);
+ break;
+ case 3 : // cubic spline with natural boundary conditions
+ *spl = (void *)gsl_spline_alloc(gsl_interp_cspline, *n);
+ break;
+ case 4 : // cubic spline with periodic boundary conditions
+ *spl = (void *)gsl_spline_alloc(gsl_interp_cspline_periodic, *n);
+ break;
+ case 5 : // Akima spline with natural boundary conditions
+ *spl = (void *)gsl_spline_alloc(gsl_interp_akima, *n);
+ break;
+ case 6 : // Akima spline with periodic boundary conditions
+ *spl = (void *)gsl_spline_alloc(gsl_interp_akima_periodic, *n);
+ break;
+ }
+}
+
+void FC_FUNC_(gsl_spline_init, GSL_SPLINE_INIT)
+ (void **spl, int *n, double *x, double *f)
+{
+ gsl_spline_init((gsl_spline *)(*spl), x, f, *n);
+}
+
+double FC_FUNC_(gsl_spline_eval, GSL_SPLINE_EVAL)
+ (double *x, void **spl, void **acc)
+{
+ return gsl_spline_eval((gsl_spline *)(*spl), *x, (gsl_interp_accel *)(*acc));
+}
+
+double FC_FUNC_(gsl_spline_eval_deriv, GSL_SPLINE_EVAL_DERIV)
+ (double *x, void **spl, void **acc)
+{
+ return gsl_spline_eval_deriv((gsl_spline *)(*spl), *x, (gsl_interp_accel *)(*acc));
+}
+
+double FC_FUNC_(gsl_spline_eval_deriv2, GSL_SPLINE_EVAL_DERIV2)
+ (double *x, void **spl, void **acc)
+{
+ return gsl_spline_eval_deriv2((gsl_spline *)(*spl), *x, (gsl_interp_accel *)(*acc));
+}
+
+void FC_FUNC_(gsl_spline_free, GSL_SPLINE_FREE)
+ (void **spl)
+{
+ gsl_spline_free((gsl_spline *)(*spl));
+
+}
+
+void FC_FUNC_(gsl_interp_accel_free, GSL_INTERP_ACCEL_FREE)
+ (void **acc)
+{
+ gsl_interp_accel_free((gsl_interp_accel *)(*acc));
+}
+
+double FC_FUNC_(gsl_spline_eval_integ, GSL_SPLINE_EVAL_INTEG)
+ (double *a, double *b, void **spl, void **acc)
+{
+ return gsl_spline_eval_integ((gsl_spline *)(*spl), *a, *b, (gsl_interp_accel *)(*acc));
+}
+
+
+ /* Multidimensional Root-Finding */
+
+ void FC_FUNC_(gsl_multiroot_fsolver_alloc, GSL_MULTIROOT_FSOLVER_ALLOC)
+ (void **s, const int *solver_type, const int *n)
+{
+ switch(*solver_type) {
+ case 1 : // hybrid algorithm with internal scaling.
+ *s = (void *)gsl_multiroot_fsolver_alloc(gsl_multiroot_fsolver_hybrids, *n);
+ break;
+ case 2 : // hybrid algorithm without internal scaling.
+ *s = (void *)gsl_multiroot_fsolver_alloc(gsl_multiroot_fsolver_hybrid, *n);
+ break;
+ case 3 : // discrete Newton algorithm
+ *s = (void *)gsl_multiroot_fsolver_alloc(gsl_multiroot_fsolver_dnewton, *n);
+ break;
+ case 4 : // Broyden algorithm
+ *s = (void *)gsl_multiroot_fsolver_alloc(gsl_multiroot_fsolver_broyden, *n);
+ break;
+ }
+}
+
+void FC_FUNC_(gsl_multiroot_fsolver_free, GSL_MULTIROOT_FSOLVER_FREE)
+ (void **s)
+{
+ gsl_multiroot_fsolver_free((gsl_multiroot_fsolver *)(*s));
+}
diff --git a/src/gsl_interface_f.F90 b/src/gsl_interface_f.F90
new file mode 100644
index 0000000..778c5db
--- /dev/null
+++ b/src/gsl_interface_f.F90
@@ -0,0 +1,355 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: gsl_interface_f.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+! This module contains the explicit interfaces for the external GSL routines.
+! It also contains a very short description of the routines.
+! For more information please refer to the GSL documentation.
+
+module gsl_interface_m
+ implicit none
+
+ ! Error Handling
+ interface
+ subroutine gsl_strerror(err, res)
+ !Returns a string describing the error code
+ use global_m
+ implicit none
+ integer, intent(in) :: err
+ character(len=*), intent(out) :: res
+ end subroutine gsl_strerror
+ end interface
+
+ ! Mathematical Functions
+ interface
+ elemental function gsl_asinh(x)
+ !Computes the value of arcsinh(x)
+ use global_m
+ implicit none
+ real(R8), intent(in) :: x
+ real(R8) :: gsl_asinh
+ end function gsl_asinh
+ end interface
+
+
+ ! Special Functions
+ interface
+ function gsl_sf_bessel_knu_scaled(xnu, x)
+ !Computes the scaled irregular modified Bessel function of
+ !fractional order nu, \exp(+|x|) K_\nu(x) for x>0, \nu>0.
+ use global_m
+ implicit none
+ real(R8), intent(in) :: x, xnu
+ real(R8) :: gsl_sf_bessel_knu_scaled
+ end function gsl_sf_bessel_knu_scaled
+ end interface
+
+
+ ! Vectors and Matrices
+ interface
+ subroutine gsl_vector_alloc(n, v)
+ !Creates a vector of length n, returning a pointer
+ !to a newly initialized vector struct
+ use global_m
+ implicit none
+ integer, intent(in) :: n
+ integer(POINTER_SIZE), intent(inout) :: v
+ end subroutine gsl_vector_alloc
+
+ subroutine gsl_vector_free(v)
+ !Frees a previously allocated vector v
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: v
+ end subroutine gsl_vector_free
+
+ subroutine gsl_vector_set(v, i, x)
+ !Sets the value of the i-th element of a vector v to x
+ use global_m
+ implicit none
+ integer, intent(in) :: i
+ real(R8), intent(in) :: x
+ integer(POINTER_SIZE), intent(inout) :: v
+ end subroutine gsl_vector_set
+
+ pure function gsl_vector_get(v, i)
+ !Returns the i-th element of a vector v
+ use global_m
+ implicit none
+ integer, intent(in) :: i
+ integer(POINTER_SIZE), intent(in) :: v
+ real(R8) :: gsl_vector_get
+ end function gsl_vector_get
+
+ subroutine gsl_matrix_alloc(n1, n2, m)
+ !Creates a matrix of size n1 rows by n2 columns, returning
+ !a pointer to a newly initialized matrix struct
+ use global_m
+ implicit none
+ integer, intent(in) :: n1, n2
+ integer(POINTER_SIZE), intent(inout) :: m
+ end subroutine gsl_matrix_alloc
+
+ subroutine gsl_matrix_calloc(n1, n2, m)
+ !Allocates memory for a matrix of size n1 rows by n2 columns
+ !and initializes all the elements of the matrix to zero
+ use global_m
+ implicit none
+ integer, intent(in) :: n1, n2
+ integer(POINTER_SIZE), intent(inout) :: m
+ end subroutine gsl_matrix_calloc
+
+ subroutine gsl_matrix_free(m)
+ !Frees a previously allocated matrix m
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: m
+ end subroutine gsl_matrix_free
+
+ subroutine gsl_matrix_set(m, i, j, x)
+ !Sets the value of the (i,j)th element of a matrix m to x
+ use global_m
+ implicit none
+ integer, intent(in) :: i, j
+ real(R8), intent(in) :: x
+ integer(POINTER_SIZE), intent(inout) :: m
+ end subroutine gsl_matrix_set
+
+ pure function gsl_matrix_get(m, i, j)
+ !Returns the (i,j)th element of a matrix m
+ use global_m
+ implicit none
+ integer, intent(in) :: i, j
+ integer(POINTER_SIZE), intent(in) :: m
+ real(R8) :: gsl_matrix_get
+ end function gsl_matrix_get
+ end interface
+
+
+ ! Permutations
+ interface
+ subroutine gsl_permutation_alloc(n, p)
+ !Allocates memory for a new permutation of size n
+ use global_m
+ implicit none
+ integer, intent(in) :: n
+ integer(POINTER_SIZE), intent(inout) :: p
+ end subroutine gsl_permutation_alloc
+
+ subroutine gsl_permutation_free(p)
+ !Frees all the memory used by the permutation p
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: p
+ end subroutine gsl_permutation_free
+ end interface
+
+
+ ! Linear Algebra
+ interface
+ function gsl_linalg_lu_decomp(m, p, signum)
+ !Factorizes the square matrix A into the LU decomposition PA = LU
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: m, p
+ integer, intent(out) :: signum
+ integer :: gsl_linalg_lu_decomp
+ end function gsl_linalg_lu_decomp
+
+ function gsl_linalg_lu_invert(lu, p, inverse)
+ !Computes the inverse of a matrix A from its LU decomposition (LU,p)
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(in) :: lu, p
+ integer(POINTER_SIZE), intent(inout) :: inverse
+ integer :: gsl_linalg_lu_invert
+ end function gsl_linalg_lu_invert
+
+ function gsl_linalg_lu_solve(a, p, b, x)
+ !Solves the system A x = b using the LU decomposition of A into (LU, p)
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(in) :: b
+ integer(POINTER_SIZE), intent(inout) :: a, p, x
+ integer :: gsl_linalg_lu_solve
+ end function gsl_linalg_lu_solve
+ end interface
+
+
+ ! Ordinary Differential Equations
+ interface
+ subroutine gsl_odeiv_step_alloc(stepping_func, dim, stp)
+ !Returns a pointer to a newly allocated instance of a stepping function
+ use global_m
+ implicit none
+ integer, intent(in) :: stepping_func, dim
+ integer(POINTER_SIZE), intent(inout) :: stp
+ end subroutine gsl_odeiv_step_alloc
+
+ subroutine gsl_odeiv_step_free(stp)
+ !Frees all the memory associated with the stepping function stp
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: stp
+ end subroutine gsl_odeiv_step_free
+
+ subroutine gsl_odeiv_evolve_alloc(dim, evl)
+ !Returns a pointer to a newly allocated instance of an evolution function
+ use global_m
+ implicit none
+ integer, intent(in) :: dim
+ integer(POINTER_SIZE), intent(inout) :: evl
+ end subroutine gsl_odeiv_evolve_alloc
+
+ function gsl_odeiv_evolve_reset(evl)
+ !Resets the evolution function evl
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: evl
+ integer :: gsl_odeiv_evolve_reset
+ end function gsl_odeiv_evolve_reset
+
+ subroutine gsl_odeiv_evolve_free(evl)
+ !Frees all the memory associated with the evolution function evl
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: evl
+ end subroutine gsl_odeiv_evolve_free
+
+ subroutine gsl_odeiv_control_standart_new(ctrl, eps_abs, eps_rel, a_y, a_dydt)
+ !Creates a new control function. The standard control object is a four
+ !parameter heuristic based on absolute and relative errors eps_abs and
+ !eps_rel, and scaling factors a_y and a_dydt for the system state y(t)
+ !and derivatives dydt(t) respectively
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: ctrl
+ real(R8), intent(in) :: eps_abs, eps_rel, a_y, a_dydt
+ end subroutine gsl_odeiv_control_standart_new
+
+ subroutine gsl_odeiv_control_free(ctrl)
+ !Frees all the memory associated with the control function ctrl
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: ctrl
+ end subroutine gsl_odeiv_control_free
+ end interface
+
+
+ ! Interpolation
+ interface
+ subroutine gsl_spline_alloc(spl, n, opt)
+ !Returns a pointer to a newly allocated interpolation object
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: spl
+ integer, intent(in) :: opt, n
+ end subroutine gsl_spline_alloc
+
+ subroutine gsl_spline_init(spl, n, x, f)
+ !Initializes the interpolation object spl for the data (x,f)
+ use global_m
+ implicit none
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x, f
+ integer(POINTER_SIZE), intent(inout) :: spl
+ end subroutine gsl_spline_init
+
+ subroutine gsl_spline_free(spl)
+ !Frees the interpolation object spl
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: spl
+ end subroutine gsl_spline_free
+
+ subroutine gsl_interp_accel_alloc(acc)
+ !Returns a pointer to an accelerator object, which
+ !is a kind of iterator for interpolation lookups
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: acc
+ end subroutine gsl_interp_accel_alloc
+
+ subroutine gsl_interp_accel_free(acc)
+ !Frees the accelerator object acc
+ use global_m
+ integer(POINTER_SIZE), intent(inout) :: acc
+ end subroutine gsl_interp_accel_free
+
+ elemental function gsl_spline_eval(x, spl, acc)
+ !Returns the interpolated value for a given point x
+ use global_m
+ implicit none
+ real(R8), intent(in) :: x
+ integer(POINTER_SIZE), intent(in) :: spl, acc
+ real(R8) :: gsl_spline_eval
+ end function gsl_spline_eval
+
+ elemental function gsl_spline_eval_deriv(x, spl, acc)
+ !Returns the derivative of an interpolated function for a given point x
+ use global_m
+ implicit none
+ real(R8), intent(in) :: x
+ integer(POINTER_SIZE), intent(in) :: spl, acc
+ real(R8) :: gsl_spline_eval_deriv
+ end function gsl_spline_eval_deriv
+
+ elemental function gsl_spline_eval_deriv2(x, spl, acc)
+ !Returns the second derivative d2 of an interpolated function for a given
+ !point x
+ use global_m
+ implicit none
+ real(R8), intent(in) :: x
+ integer(POINTER_SIZE), intent(in) :: spl, acc
+ real(R8) :: gsl_spline_eval_deriv2
+ end function gsl_spline_eval_deriv2
+
+ function gsl_spline_eval_integ(a, b, spl, acc)
+ !Returns the numerical integral of an interpolated function over the range
+ ![a, b]
+ use global_m
+ implicit none
+ real(R8), intent(in) :: a, b
+ integer(POINTER_SIZE), intent(in) :: spl, acc
+ real(R8) :: gsl_spline_eval_integ
+ end function gsl_spline_eval_integ
+ end interface
+
+
+ !Multidimensional Root-Finding
+ interface
+ subroutine gsl_multiroot_fsolver_alloc(s, t, n)
+ !Returns a pointer to a newly allocated instance of a solver of type t for
+ !a system of n dimensions
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: s
+ integer, intent(in) :: t, n
+ end subroutine gsl_multiroot_fsolver_alloc
+
+ subroutine gsl_multiroot_fsolver_free(s)
+ !Frees all the memory associated with the solver s
+ use global_m
+ implicit none
+ integer(POINTER_SIZE), intent(inout) :: s
+ end subroutine gsl_multiroot_fsolver_free
+ end interface
+
+end module gsl_interface_m
diff --git a/src/hamann.F90 b/src/hamann.F90
new file mode 100644
index 0000000..810d8bc
--- /dev/null
+++ b/src/hamann.F90
@@ -0,0 +1,543 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: hamann.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module hamann_m
+ use global_m
+ use messages_m
+ use io_m
+ use output_m
+ use mesh_m
+ use quantum_numbers_m
+ use potentials_m
+ use wave_equations_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type ld_cl
+ real(R8) :: cl
+ real(R8) :: ldd
+ integer :: nnodes
+ type(ld_cl), pointer :: next
+ type(ld_cl), pointer :: prev
+ end type ld_cl
+
+
+ !---Global Variables---!
+
+ real(R8), parameter :: LAMBDA = 3.5_r8
+ real(R8), parameter :: M_TOL = 1.0e-18_r8
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: hamann_gen, &
+ hamann_match_radius
+
+
+contains
+
+ subroutine hamann_gen(qn, ev, wave_eq, tol, m, ae_potential, rc, integrator_sp,&
+ integrator_dp, ps_v, ps_wf, ps_wfp)
+ !-----------------------------------------------------------------------!
+ ! Generates the pseudo wave-functions and the corresponding !
+ ! pseudo-potential using the Hamann scheme. !
+ ! !
+ ! qn - quantum numbers of valence state !
+ ! ev - eigenvalue of valence state !
+ ! wave_eq - wave equation to use !
+ ! tol - tolerance !
+ ! m - mesh !
+ ! ae_potential - all-electron potential !
+ ! rc - cutoff radius !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ ! ps_v - pseudo-potential on the mesh !
+ ! ps_wf - all-electron/pseudo wavefunction !
+ ! ps_wfp - all-electron/pseudo wavefunction derivative !
+ ! !
+ ! On input qn, ps_wf and ps_wfp contain the all-electron !
+ ! quantum-numbers and wavefunctions and on exit the pseudo !
+ ! wavefunctions and quantum numbers. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(inout) :: qn
+ real(R8), intent(in) :: ev
+ integer, intent(in) :: wave_eq
+ real(R8), intent(in) :: tol
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: ae_potential
+ real(R8), intent(in) :: rc
+ type(integrator_t), intent(inout) :: integrator_sp, integrator_dp
+ real(R8), intent(out) :: ps_v(m%np)
+ real(R8), intent(inout) :: ps_wf(:, :) ! ps_wf(m%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wfp(:, :) ! ps_wfp(m%np, qn_wf_dim(qn)))
+
+ integer :: wf_dim, i, ierr
+ real(R8) :: ae_ld, aa, bb, cc, gamma, r, dlt, cl, factor
+ real(R8), allocatable :: f(:), vc(:), g(:), w2(:), v2(:)
+ real(R8), allocatable :: u(:,:), up(:,:), w1(:,:), w1p(:,:)
+ type(mesh_t) :: mr
+ type(ld_cl) :: cl_bracket(2)
+ type(potential_t) :: v1, ps_potential
+
+ call push_sub("hamann_gen")
+
+ !
+ call mesh_null(mr)
+ call potential_null(v1)
+ call potential_null(ps_potential)
+
+ wf_dim = qn_wf_dim(qn)
+
+ !New mesh
+ mr = m
+ call mesh_truncate(mr, hamann_match_radius(m, rc))
+ r = mr%r(mr%np)
+ allocate(f(mr%np), vc(mr%np), g(mr%np), w2(mr%np), v2(m%np))
+ allocate(u(mr%np, wf_dim), up(mr%np, wf_dim), w1(mr%np, wf_dim), w1p(mr%np, wf_dim))
+
+ !Cutoff function
+ do i = 1, mr%np
+ f(i) = exp(-(mr%r(i)/rc)**LAMBDA)
+ vc(i) = (1 - f(i)) * v(ae_potential, mr%r(i), qn)
+ end do
+
+ !Get logaritmic derivative and the all-electron wavefunction value at rc
+ call hamann_wavefunction(qn, ev, wave_eq, mr, ae_potential, integrator_dp, u, up)
+ ae_ld = up(mr%np,1)/u(mr%np,1)
+
+ !Bracket cl
+ ierr = bracket_cl(qn, ev, mr, f, vc, ae_ld, v(ae_potential, rc, qn), tol, integrator_sp, cl_bracket)
+ if (ierr /= 0) then
+ message(1) = "Unable to bracket cl in subroutine bracket_cl!"
+ call write_fatal(1)
+ end if
+
+ !Find cl more accuratly
+ cl = find_cl(qn, ev, mr, f, vc, ae_ld, tol, integrator_dp, cl_bracket)
+
+ !Get intermediate pseudo-potential and pseudo-wavefunction
+ call potential_init(v1, mr, vc + cl*f)
+ call hamann_wavefunction(qn, ev, SCHRODINGER, mr, v1, integrator_dp, w1, w1p)
+
+ !Get final pseudo-wavefunction
+ gamma = u(mr%np,1)/w1(mr%np,1)
+ g = f*mr%r**qn%l
+ aa = gamma**2*mesh_integrate(mr, g**2, b=r)
+ bb = M_TWO*gamma**2*mesh_integrate(mr, w1(:,1)*g, b=r)
+ cc = gamma**2 - M_ONE
+ dlt = (-bb + bb/abs(bb)*sqrt(bb**2 - M_FOUR*aa*cc))/M_TWO/aa
+ w2 = gamma * (w1(:,1) + dlt*g)
+
+ !Invert Schrodinger equation
+ do i = 1, mr%np
+ v2(i) = v(v1, m%r(i), qn) + gamma*dlt*g(i)/M_TWO/w2(i)* &
+ (LAMBDA**2/m%r(i)**2*(m%r(i)/rc)**(M_TWO*LAMBDA) - &
+ (M_TWO*LAMBDA*qn%l + LAMBDA*(LAMBDA + M_ONE))/m%r(i)**2* &
+ (m%r(i)/rc)**LAMBDA + M_TWO*ev - M_TWO*v(v1, m%r(i), qn))
+ end do
+ do i = mr%np+1, m%np
+ v2(i) = v(ae_potential, m%r(i), qn)
+ end do
+
+ !Get final pseudo-potential and pseudo-wavefunction
+ qn%n = qn%l + 1
+ ps_v = v2
+ call potential_init(ps_potential, m, ps_v)
+ call wavefunctions(qn, ev, wave_eq, mr, ps_potential, integrator_dp, u, up)
+ do i = 1, wf_dim
+ factor = u(mr%np,i)/ps_wf(mr%np,i)
+ ps_wf(1:mr%np,i) = u(1:mr%np,i)/factor
+ factor = up(mr%np,i)/ps_wfp(mr%np,i)
+ ps_wfp(1:mr%np,i) = up(1:mr%np,i)/factor
+ end do
+ factor = wavefunctions_norm(wave_eq, m, ps_wf)
+ ps_wf = ps_wf/sqrt(factor)
+ ps_wfp = ps_wfp/sqrt(factor)
+
+ !Write info
+ write(message(1),'(4x,"Core radius:",1x,f7.3,5x,"Matching Radius:",1x,f7.3)') rc, mr%r(mr%np)
+ write(message(2),'(4x,"cl =",1x,f16.10)') cl
+ call write_info(2,20)
+ call write_info(2,unit=info_unit("pp"))
+
+ !End potentials and deallocate arrays
+ call mesh_end(mr)
+ call potential_end(v1)
+ call potential_end(ps_potential)
+ deallocate(f, vc, u, up, w1, w1p, g, w2, v2)
+
+ call pop_sub()
+ end subroutine hamann_gen
+
+
+ function bracket_cl(qn, ev, mr, f, vc, ae_ld, cl_guess, tol, integrator, cl_bracket)
+ !-----------------------------------------------------------------------!
+ ! Bracket the parameter cl of the Hamann potential: !
+ ! V_1 = (1-f)*V_ae + cl*f !
+ ! !
+ ! qn - set of quantum numbers !
+ ! ev - eigenvalue !
+ ! mr - truncated mesh !
+ ! f - f(r) = exp(-(r/rcl)**lambda)) !
+ ! vc - (1-f(r))*V_ae !
+ ! ae_ld - all-electron wave-function logarithmic derivative at rc !
+ ! cl_guess - initial guess for cl !
+ ! tol - tolerance !
+ ! integrator - integrator object !
+ ! cl_bracket - information about upper and lower bounds of the !
+ ! interval containing cl !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: ev
+ type(mesh_t), intent(in) :: mr
+ real(R8), intent(in) :: f(mr%np), vc(mr%np)
+ real(R8), intent(in) :: ae_ld, cl_guess, tol
+ type(integrator_t), intent(inout) :: integrator
+ type(ld_cl), intent(out) :: cl_bracket(2)
+ integer :: bracket_cl
+
+ real(R8) :: h
+ type(potential_t) :: v1
+ type(ld_cl), pointer :: ptr, next, prev, new_ptr
+
+ call push_sub("bracket_cl")
+
+ !
+ nullify(ptr, next, prev, new_ptr)
+ call potential_null(v1)
+
+ !Initial values
+ allocate(ptr)
+ call ld_cl_null(ptr)
+ allocate(next)
+ call ld_cl_null(next)
+ ptr%cl = cl_guess - M_ONE
+ next%cl = cl_guess + M_ONE
+ ptr%next => next
+ next%prev => ptr
+ do
+ call potential_init(v1, mr, vc + ptr%cl*f)
+ ptr%ldd = hamann_ld(qn, ev, SCHRODINGER, mr, v1, integrator, ptr%nnodes) - ae_ld
+ if (.not. associated(ptr%next)) exit
+ call potential_end(v1)
+ ptr => ptr%next
+ end do
+
+ !Expand brackets to the left until we have wavefunctions with one node
+ call goto_first(ptr)
+ next => ptr%next
+ do
+ if (ptr%nnodes >= 1) exit
+
+ allocate(new_ptr)
+ call ld_cl_null(new_ptr)
+ ptr%prev => new_ptr
+ new_ptr%next => ptr
+ new_ptr%cl = ptr%cl - M_TWO*abs(next%cl - ptr%cl)
+ call potential_end(v1)
+ call potential_init(v1, mr, vc + new_ptr%cl*f)
+ new_ptr%ldd = hamann_ld(qn, ev, SCHRODINGER, mr, v1, integrator, new_ptr%nnodes) - ae_ld
+
+ ptr => new_ptr
+ next => ptr%next
+ nullify(new_ptr)
+ end do
+
+ !Expand brackets to the right until we have wavefunctions with no nodes and a positive value for the logaritmic derivative diference
+ call goto_last(ptr)
+ prev => ptr%prev
+ do
+ if (ptr%cl > M_ZERO .and. ptr%nnodes == 0) exit
+
+ allocate(new_ptr)
+ call ld_cl_null(new_ptr)
+ ptr%next => new_ptr
+ new_ptr%prev => ptr
+ new_ptr%cl = ptr%cl + M_TWO*abs(ptr%cl - prev%cl)
+ call potential_end(v1)
+ call potential_init(v1, mr, vc + new_ptr%cl*f)
+ new_ptr%ldd = hamann_ld(qn, ev, SCHRODINGER, mr, v1, integrator, new_ptr%nnodes) - ae_ld
+
+ ptr => new_ptr
+ prev => ptr%prev
+ nullify(new_ptr)
+ end do
+
+ call goto_last(ptr)
+ h = ptr%cl
+ call goto_first(ptr)
+ h = abs(h - ptr%cl)
+ next => ptr%next
+ main: do
+
+ !Check if the cl has been bracketed
+ do
+ if (ptr%ldd*next%ldd < M_ZERO .and. ptr%nnodes == 0 .and. next%nnodes == 0) then
+ cl_bracket(1) = ptr
+ cl_bracket(2) = next
+ exit main
+ end if
+ ptr => next
+ if (.not. associated(ptr%next)) exit
+ next => ptr%next
+ end do
+
+ if (abs(h) < sqrt(tol)) then !Theres something wrong
+ bracket_cl = 1
+ if (in_debug_mode) then
+ call bracket_cl_debug()
+ call potential_debug(v1)
+ end if
+ call potential_end(v1)
+ call end_ptr(ptr)
+ call pop_sub()
+ return
+ end if
+
+ !Refine brackets
+ h = h*M_HALF
+ call goto_first(ptr)
+ next => ptr%next
+ do
+ allocate(new_ptr)
+ call ld_cl_null(new_ptr)
+ new_ptr%cl = ptr%cl + (next%cl - ptr%cl)*M_HALF
+ call potential_end(v1)
+ call potential_init(v1, mr, vc + new_ptr%cl*f)
+ new_ptr%ldd = hamann_ld(qn, ev, SCHRODINGER, mr, v1, integrator, new_ptr%nnodes) - ae_ld
+ new_ptr%prev => ptr
+ new_ptr%next => next
+ ptr%next => new_ptr
+ next%prev => new_ptr
+ nullify(new_ptr)
+ ptr => next
+ if (.not. associated(ptr%next)) exit
+ next => ptr%next
+ end do
+
+ !Remove brackets with wrong number of nodes
+ call goto_first(ptr)
+ next => ptr%next
+ do
+ if (next%nnodes >= 1) then
+ nullify(next%prev)
+ deallocate(ptr)
+ end if
+ ptr => next
+ if (.not. associated(ptr%next)) exit
+ next => ptr%next
+ if (next%nnodes == 0) exit
+ end do
+
+ end do main
+
+ !Deallocate everything
+ call end_ptr(ptr)
+ call potential_end(v1)
+
+ bracket_cl = 0
+
+ call pop_sub()
+
+ contains
+
+ subroutine bracket_cl_debug()
+ integer :: unit
+
+ call io_open(unit, file='debug_info/bracket_cl')
+
+ call goto_first(ptr)
+ do
+ write(unit,'(F12.5,1X,ES10.3E2,1X,I2)') ptr%cl, ptr%ldd, ptr%nnodes
+ if (.not. associated(ptr%next)) exit
+ ptr => ptr%next
+ end do
+ close(unit)
+
+ end subroutine bracket_cl_debug
+
+ end function bracket_cl
+
+ subroutine ld_cl_null(ptr)
+ type(ld_cl), pointer :: ptr
+
+ ptr%cl = M_ZERO
+ ptr%ldd = M_ZERO
+ ptr%nnodes = 0
+ nullify(ptr%next)
+ nullify(ptr%prev)
+
+ end subroutine ld_cl_null
+
+ subroutine goto_first(ptr)
+ type(ld_cl), pointer :: ptr
+
+ do
+ if (.not. associated(ptr%prev)) exit
+ ptr => ptr%prev
+ end do
+
+ end subroutine goto_first
+
+ subroutine goto_last(ptr)
+ type(ld_cl), pointer :: ptr
+
+ do
+ if (.not. associated(ptr%next)) exit
+ ptr => ptr%next
+ end do
+
+ end subroutine goto_last
+
+ subroutine end_ptr(ptr)
+ type(ld_cl), pointer :: ptr
+
+ type(ld_cl), pointer :: next
+
+ call goto_first(ptr)
+ do
+ if (.not. associated(ptr%next)) exit
+ next => ptr%next
+ nullify(next%prev)
+ deallocate(ptr)
+ ptr => next
+ end do
+ deallocate(ptr)
+
+ end subroutine end_ptr
+
+ function find_cl(qn, ev, mr, f, vc, ae_ld, tol, integrator, cl_bracket)
+ !-----------------------------------------------------------------------!
+ ! Use Brents method to find the parameter cl. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! ev - eigenvalue !
+ ! mr - truncated mesh !
+ ! f - f(r) = exp(-(r/rcl)**lambda)) !
+ ! vc - (1-f(r))*V_ae !
+ ! ae_ld - all-electron wave-function logarithmic derivative at rc !
+ ! tol - tolerance !
+ ! integrator - integrator object !
+ ! cl_bracket - information about upper and lower bounds of the !
+ ! interval containing cl !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: ev, ae_ld, tol
+ type(mesh_t), intent(in) :: mr
+ real(R8), intent(in) :: f(mr%np), vc(mr%np)
+ type(integrator_t), intent(inout) :: integrator
+ type(ld_cl), intent(in) :: cl_bracket(2)
+ real(R8) :: find_cl
+
+ integer :: nnodes_dum
+ real(R8) :: a, b, c, fa, fb, fc, tol1, m, d, e, r, s, q, p
+ real(R8), parameter :: eps = epsilon(M_ONE)
+ type(potential_t) :: v1
+
+ call push_sub("find_cl")
+
+ call potential_null(v1)
+
+ a = cl_bracket(1)%cl
+ b = cl_bracket(2)%cl
+ fa = cl_bracket(1)%ldd
+ fb = cl_bracket(2)%ldd
+ c = b
+ fc = fb
+ call potential_init(v1, mr, vc)
+
+ do
+ if ((fb < M_ZERO .and. fc < M_ZERO) .or. (fb > M_ZERO .and. fc > M_ZERO)) then
+ c = a; fc = fa
+ d = b - a; e = d
+ end if
+
+ if (abs(fc) < abs(fb)) then
+ a = b; b = c; c = a
+ fa = fb; fb = fc; fc = fa
+ end if
+ tol1 = M_TWO*eps*abs(b) + M_HALF*tol
+ m = (c - b)*M_HALF
+
+ if (abs(m) <= tol .or. fb == M_ZERO) exit
+
+ if (abs(e) > tol .and. abs(fa) > abs(fb)) then
+ s = fb/fa
+ if (a == c) then !Linear interpolation
+ p = M_TWO*m*s
+ q = M_ONE - s
+ else !Inverse quadratic interpolation
+ q = fa / fc
+ r = fb / fc
+ p = s*(M_TWO*m*q*(q - r) - (b - a)*(r - M_ONE))
+ q = (q - M_ONE)*(r - M_ONE)*(s - M_ONE)
+ end if
+ if (p > M_ZERO) then
+ q = - q
+ else
+ p = abs(p)
+ end if
+ s = e
+ e = d
+ if (M_TWO*p < min(M_THREE*m*q - abs(tol1 * q), abs(M_HALF*s*q))) then
+ d = p/q
+ else
+ d = m
+ e = d
+ end if
+ end if
+
+ a = b
+ fa = fb
+ if (abs(d) > tol1) then
+ b = b + d
+ else
+ b = b + sign(tol1, m)
+ end if
+
+ call potential_end(v1)
+ call potential_init(v1, mr, vc+b*f)
+ fb = hamann_ld(qn, ev, SCHRODINGER, mr, v1, integrator, nnodes_dum) - ae_ld
+ end do
+
+ call potential_end(v1)
+ find_cl = b
+
+ call pop_sub()
+ end function find_cl
+
+ function hamann_match_radius(m, rc)
+ !-----------------------------------------------------------------------!
+ ! Returns the radius from which the all-electron and the pseudo !
+ ! wave-functions should be equal. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: rc
+ real(R8) :: hamann_match_radius
+
+ hamann_match_radius = minval(m%r, exp(-(m%r/rc)**LAMBDA) < M_TOL)
+
+ end function hamann_match_radius
+
+end module hamann_m
diff --git a/src/hartree.F90 b/src/hartree.F90
new file mode 100644
index 0000000..31d52d3
--- /dev/null
+++ b/src/hartree.F90
@@ -0,0 +1,127 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: hartree.F90 778 2013-07-11 15:49:39Z micael $
+
+module hartree_m
+ use global_m
+ use io_m
+ use units_m
+ use mesh_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: hartree_potential, &
+ hartree_output
+
+contains
+
+ subroutine hartree_potential(m, density, charge, vh, eh)
+ !-----------------------------------------------------------------------!
+ ! Calculates the Hartree potencial for a given density. !
+ ! !
+ ! m - the radial mesh !
+ ! density - the charge density !
+ ! vh - the Hartree potential !
+ ! eh - the Hartree energy !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: density(m%np), charge
+ real(R8), intent(out), optional :: vh(:,:)
+ real(R8), intent(out), optional :: eh
+
+ integer :: i
+ real(R8), allocatable :: vh_(:), int1(:), int2(:)
+
+ !Allocate memory
+ allocate(vh_(m%np), int1(m%np), int2(m%np))
+
+ !Calculate the total density and auxiliary functions
+ int1 = mesh_primitive(m, density)
+ int2 = mesh_primitive(m, density, dv=m%r)
+
+ !Calculate the potential
+ do i = 1, m%np
+ vh_(i) = (int1(i)/m%r(i) + int2(m%np) - int2(i))*M_FOUR*M_PI
+ end do
+
+ !Force potential to have the correct asymptotic limit
+ if (vh_(m%np) /= M_ZERO .and. charge /= M_ZERO) then
+ vh_ = vh_/vh_(m%np)*charge/m%r(m%np)
+ end if
+
+ if (present(vh)) then
+ do i = 1, m%np
+ vh(i,:) = vh_(i)
+ end do
+ end if
+
+ if (present(eh)) then
+ eh = M_TWO*M_PI*mesh_integrate(m, vh_*density)
+ end if
+
+ !Deallocate arrays
+ deallocate(vh_, int1, int2)
+
+ end subroutine hartree_potential
+
+ subroutine hartree_output(m, density, charge, dir)
+ !-----------------------------------------------------------------------!
+ ! Calculates the Hartree potencial for a given density. !
+ ! !
+ ! m - the radial mesh !
+ ! density - the charge density !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: density(m%np), charge
+ character(len=*), intent(in) :: dir
+
+ integer :: i, unit
+ real(R8), allocatable :: vh(:,:)
+
+ allocate(vh(m%np,1))
+
+ !Get hartree potential
+ call hartree_potential(m, density, charge, vh=vh)
+
+ !Open file
+ call io_open(unit, file=trim(dir)//"/v_h")
+
+ !Write header
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ write(unit,'("# ",36("-"))')
+ write(unit,'("# |",8X,"r",7X,"|",7X,"v(r)",6X,"|")')
+ write(unit,'("# ",36("-"))')
+
+ !Ouput
+ do i = 1, m%np
+ write(unit,'(4(3X,ES15.8E2))') m%r(i)/units_out%length%factor, &
+ vh(i,1)/units_out%energy%factor
+ end do
+
+ close(unit)
+ deallocate(vh)
+
+ end subroutine hartree_output
+
+end module hartree_m
diff --git a/src/io.F90 b/src/io.F90
new file mode 100644
index 0000000..0445314
--- /dev/null
+++ b/src/io.F90
@@ -0,0 +1,93 @@
+!! Copyright (C) 2004-2006,2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: io.F90 778 2013-07-11 15:49:39Z micael $
+
+module io_m
+ use global_m
+ use messages_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: io_open
+
+contains
+
+ subroutine io_open(unit, file, status, form)
+ !-----------------------------------------------------------------------!
+ ! Search for a non-opened unit and open a file. !
+ ! !
+ ! file - name of the file to open. !
+ ! unit - number of the unit. !
+ !-----------------------------------------------------------------------!
+ integer, intent(out) :: unit
+ character(len=*), intent(in) :: file
+ character(len=*), intent(in), optional :: status, form
+
+ integer :: iostat
+ character(len=20) :: status_, form_
+
+ call io_assign(unit)
+
+ if (present(status)) then
+ status_ = status
+ else
+ status_ = "unknown"
+ end if
+
+ if (present(form)) then
+ form_ = form
+ else
+ form_ = "formatted"
+ end if
+
+ open(unit, file=trim(file), form=trim(form_), status=trim(status_), iostat=iostat)
+ if (iostat > 0) then
+ write(message(1),'("Unable to open file ''",A,"''")') trim(file)
+ call write_fatal(1)
+ end if
+
+ end subroutine io_open
+
+ subroutine io_assign(unit)
+ !-----------------------------------------------------------------------!
+ ! Search for a non-opened unit between MIN_UNIT and MAX_UNIT. !
+ ! !
+ ! unit - number of the non-opened unit. !
+ !-----------------------------------------------------------------------!
+ integer, intent(out) :: unit
+
+ integer, parameter :: MIN_UNIT = 10, MAX_UNIT = 100
+ logical :: opened
+ integer :: iostat
+
+ do unit = MIN_UNIT, MAX_UNIT
+ inquire(unit, opened = opened, iostat = iostat)
+ if ((.not. opened) .and. (iostat == 0)) return
+ end do
+ message(1) = "No units available in io_assign"
+ call write_fatal(1)
+
+ end subroutine io_assign
+
+
+
+
+end module io_m
diff --git a/src/kb_projectors.F90 b/src/kb_projectors.F90
new file mode 100644
index 0000000..d44818b
--- /dev/null
+++ b/src/kb_projectors.F90
@@ -0,0 +1,426 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: kb_projectors.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module kb_projectors_m
+ use global_m
+ use messages_m
+ use io_m
+ use units_m
+ use splines_m
+ use mesh_m
+ use ps_io_m
+ use quantum_numbers_m
+ use loc_potentials_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type kb_projectors_t
+ private
+ !Local part
+ integer :: l_local
+ type(loc_potential_t) :: vl
+ !Projectors
+ integer :: nc
+ type(qn_t), pointer :: qn(:)
+ real(R8), pointer :: e(:)
+ real(R8), pointer :: p(:,:)
+ type(spline_t), pointer :: p_spl(:)
+ end type kb_projectors_t
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: kb_projectors_t, &
+ kb_projectors_null, &
+ kb_projectors_init, &
+ kb_projectors_copy, &
+ kb_projectors_end, &
+ kb_projectors_save, &
+ kb_projectors_load, &
+ kb_v, &
+ kb_dvdr, &
+ kb_d2vdr2, &
+ kb_projectors_energy, &
+ kb_projectors_debug, &
+ kb_projectors_output, &
+ kb_projectors_ps_io_set
+
+
+contains
+
+ subroutine kb_projectors_null(kb_proj)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the KB projectors. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(out) :: kb_proj
+
+ call push_sub("kb_projectors_null")
+
+ call loc_potential_null(kb_proj%vl)
+ kb_proj%nc = 0
+ nullify(kb_proj%qn)
+ nullify(kb_proj%e)
+ nullify(kb_proj%p)
+ nullify(kb_proj%p_spl)
+
+ call pop_sub()
+ end subroutine kb_projectors_null
+
+ subroutine kb_projectors_init(kb_proj, l_local, v_local, m, nc, qn, e, p)
+ !-----------------------------------------------------------------------!
+ ! Initialize a non-local potential !
+ ! !
+ ! l_local - which angular momentum component was used as local !
+ ! v_local - the local part of the KB projectors
+ ! kb_proj - KB projectors to be initialized !
+ ! m - mesh !
+ ! nc - number of projectors !
+ ! qn - quantum numbers of each projector !
+ ! e - KB energies !
+ ! p - values of the projectors functios on the mesh !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(inout) :: kb_proj
+ integer, intent(in) :: l_local
+ type(loc_potential_t), intent(in) :: v_local
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nc
+ type(qn_t), intent(in) :: qn(nc)
+ real(R8), intent(in) :: e(nc)
+ real(R8), intent(in) :: p(m%np, nc)
+
+ integer :: i, k
+
+ call push_sub("kb_projectors_init")
+
+ kb_proj%l_local = l_local
+ kb_proj%vl = v_local
+
+ kb_proj%nc = nc
+ allocate(kb_proj%qn(nc))
+ allocate(kb_proj%e(nc))
+ allocate(kb_proj%p(m%np, nc))
+ allocate(kb_proj%p_spl(nc))
+
+ do i = 1, nc
+ k = qn(i)%l + int(qn(i)%j) + 1
+ kb_proj%qn(k) = qn(i)
+ kb_proj%e(k) = e(i)
+ kb_proj%p(:, k) = p(:, i)
+ call spline_null(kb_proj%p_spl(k))
+ call spline_init(kb_proj%p_spl(k), m%np, m%r, kb_proj%p(:, k), 3)
+ end do
+
+ call pop_sub()
+ end subroutine kb_projectors_init
+
+ subroutine kb_projectors_copy(m, kb_proj_a, kb_proj_b)
+ !-----------------------------------------------------------------------!
+ ! Copies the KB projectors kb_proj_a to KB projectors kb_proj_b. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(kb_projectors_t), intent(inout) :: kb_proj_a
+ type(kb_projectors_t), intent(in) :: kb_proj_b
+
+ integer :: i
+
+ call push_sub("kb_projectors_copy")
+
+ call kb_projectors_end(kb_proj_a)
+
+ kb_proj_a%l_local = kb_proj_b%l_local
+ kb_proj_a%vl = kb_proj_b%vl
+
+ kb_proj_a%nc = kb_proj_b%nc
+
+ allocate(kb_proj_a%qn(kb_proj_a%nc))
+ kb_proj_a%qn = kb_proj_b%qn
+
+ allocate(kb_proj_a%e(kb_proj_a%nc))
+ kb_proj_a%e = kb_proj_b%e
+
+ allocate(kb_proj_a%p(m%np, kb_proj_a%nc))
+ kb_proj_a%p = kb_proj_b%p
+
+ allocate(kb_proj_a%p_spl(kb_proj_a%nc))
+ do i = 1, kb_proj_a%nc
+ call spline_null(kb_proj_a%p_spl(i))
+ kb_proj_a%p_spl(i) = kb_proj_b%p_spl(i)
+ end do
+
+ call pop_sub()
+ end subroutine kb_projectors_copy
+
+ subroutine kb_projectors_end(kb_proj)
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to the KB projectors. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(inout) :: kb_proj
+
+ integer :: i
+
+ call push_sub("kb_projectors_end")
+
+ call loc_potential_end(kb_proj%vl)
+
+ if (associated(kb_proj%qn)) then
+ deallocate (kb_proj%qn)
+ end if
+ if (associated(kb_proj%e)) then
+ deallocate (kb_proj%e)
+ end if
+ if (associated(kb_proj%p)) then
+ deallocate (kb_proj%p)
+ end if
+
+ if (associated(kb_proj%p_spl)) then
+ do i = 1, kb_proj%nc
+ call spline_end(kb_proj%p_spl(i))
+ end do
+ deallocate(kb_proj%p_spl)
+ end if
+
+ call pop_sub()
+ end subroutine kb_projectors_end
+
+ subroutine kb_projectors_save(unit, m, kb_proj)
+ !-----------------------------------------------------------------------!
+ ! Writes the KB projectors to a file. !
+ ! !
+ ! unit - file unit number !
+ ! m - mesh !
+ ! kb_proj - KB projectors to be written !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(kb_projectors_t), intent(in) :: kb_proj
+
+ integer :: k, i
+
+ call push_sub("kb_projectors_save")
+
+ write(unit) kb_proj%l_local
+ call loc_potential_save(unit, m, kb_proj%vl)
+
+ write(unit) kb_proj%nc
+ do k = 1, kb_proj%nc
+ write(unit) kb_proj%qn(k)
+ write(unit) kb_proj%e(k)
+ do i = 1, m%np
+ write(unit) kb_proj%p(i, k)
+ end do
+ end do
+
+ call pop_sub()
+ end subroutine kb_projectors_save
+
+ subroutine kb_projectors_load(unit, m, kb_proj)
+ !-----------------------------------------------------------------------!
+ ! Reads the KB projectors from a file. !
+ ! !
+ ! unit - file unit number !
+ ! m - mesh !
+ ! kb_proj - kb_proj to be read !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(kb_projectors_t), intent(inout) :: kb_proj
+
+ integer :: k, i
+
+ call push_sub("kb_projectors_load")
+
+ read(unit) kb_proj%l_local
+ call loc_potential_load(unit, m, kb_proj%vl)
+
+ read(unit) kb_proj%nc
+ allocate(kb_proj%qn(kb_proj%nc))
+ allocate(kb_proj%e(kb_proj%nc))
+ allocate(kb_proj%p(m%np, kb_proj%nc))
+ allocate(kb_proj%p_spl(kb_proj%nc))
+ do k = 1, kb_proj%nc
+ read(unit) kb_proj%qn(k)
+ read(unit) kb_proj%e(k)
+ do i = 1, m%np
+ read(unit) kb_proj%p(i, k)
+ end do
+ call spline_null(kb_proj%p_spl(k))
+ call spline_init(kb_proj%p_spl(k), m%np, m%r, kb_proj%p(:, k), 3)
+ end do
+
+ call pop_sub()
+ end subroutine kb_projectors_load
+
+ function kb_v(kb_proj, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the local potential felt by an electron at !
+ ! radius r. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+ real(R8), intent(in) :: r
+ real(R8) :: kb_v
+
+ kb_v = loc_v(kb_proj%vl, r)
+
+ end function kb_v
+
+ function kb_dvdr(kb_proj, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the first derivative of the local potential felt !
+ ! by an electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+ real(R8), intent(in) :: r
+ real(R8) :: kb_dvdr
+
+ kb_dvdr = loc_dvdr(kb_proj%vl, r)
+
+ end function kb_dvdr
+
+ function kb_d2vdr2(kb_proj, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the second derivative of the local potential !
+ ! felt by an electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+ real(R8), intent(in) :: r
+ real(R8) :: kb_d2vdr2
+
+ kb_d2vdr2 = loc_d2vdr2(kb_proj%vl, r)
+
+ end function kb_d2vdr2
+
+ function kb_projectors_energy(kb_proj, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the KB energy. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+ type(qn_t), intent(in) :: qn
+ real(R8) :: kb_projectors_energy
+
+ call push_sub("kb_projectors_energy")
+
+ kb_projectors_energy = kb_proj%e(qn%l + int(qn%j) + 1)
+
+ call pop_sub()
+ end function kb_projectors_energy
+
+ subroutine kb_projectors_debug(kb_proj)
+ !-----------------------------------------------------------------------!
+ ! Prints debug information to the "debug_info" directory. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+
+ call push_sub("kb_projectors_debug")
+
+ call pop_sub()
+ end subroutine kb_projectors_debug
+
+ subroutine kb_projectors_output(kb_proj, m, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file in a format suitable for plotting. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+ type(mesh_t), intent(in) :: m
+ character(len=*), intent(in) :: dir
+
+ integer :: i, k, unit
+ real(R8) :: ue, ul
+ character(len=10) :: label
+
+ call push_sub("kb_projectors_output")
+
+ !Output local part
+ call loc_potential_output(kb_proj%vl, m, trim(dir)//"/kb-local")
+
+
+ !Output KB projectors
+ ul = units_out%length%factor
+ ue = units_out%energy%factor
+
+ do k = 1, kb_proj%nc
+ if (abs(kb_proj%e(k)) == M_ZERO) cycle
+
+ label = qn_label(kb_proj%qn(k))
+ call io_open(unit, file=trim(dir)//"/kb-"//trim(label(2:)))
+
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ write(unit,'("# ",35("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",7X,"w(r)",6X,"|")')
+ write(unit,'("# ",35("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2)') m%r(i)/ul, kb_proj%p(i, k)/ue
+ end do
+
+ close(unit)
+ end do
+
+ call pop_sub()
+ end subroutine kb_projectors_output
+
+ subroutine kb_projectors_ps_io_set(kb_proj, m)
+ !-----------------------------------------------------------------------!
+ ! Pass the information about the KB projectors to the ps_io module. !
+ !-----------------------------------------------------------------------!
+ type(kb_projectors_t), intent(in) :: kb_proj
+ type(mesh_t), intent(in) :: m
+
+ integer :: np, i, n
+ integer, allocatable :: l(:)
+ real(R8), allocatable :: j(:), e(:), p(:,:), v_loc(:)
+
+ call push_sub("kb_projectors_ps_io_set")
+
+ np = count(kb_proj%e /= M_ZERO)
+ allocate(l(np))
+ allocate(j(np))
+ allocate(v_loc(m%np))
+ allocate(e(np))
+ allocate(p(m%np, np))
+
+ n = 0
+ do i = 1, kb_proj%nc
+ if (kb_proj%e(i) == M_ZERO) cycle
+ n = n + 1
+
+ l(n) = kb_proj%qn(i)%l
+ j(n) = kb_proj%qn(i)%j
+ e(n) = kb_proj%e(i)
+ p(:, n) = kb_proj%p(:, i)
+ end do
+
+ do i = 1, m%np
+ v_loc(i) = loc_v(kb_proj%vl, m%r(i))
+ end do
+
+ call ps_io_set_kb(m%np, kb_proj%l_local, v_loc, np, l, j, e, p)
+
+ deallocate(l, j, v_loc, e, p)
+
+ call pop_sub()
+ end subroutine kb_projectors_ps_io_set
+
+end module kb_projectors_m
diff --git a/src/liboct_parser.F90 b/src/liboct_parser.F90
new file mode 100644
index 0000000..bc2c0dc
--- /dev/null
+++ b/src/liboct_parser.F90
@@ -0,0 +1,298 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: liboct_parser.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+! This module contains the intefaces for the oct_parser library.
+
+module oct_parser_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: oct_parse_init, &
+ oct_parse_putsym, &
+ oct_parse_input, &
+ oct_parse_end, &
+ oct_parse_isdef, &
+ oct_parse_int, &
+ oct_parse_float, &
+ oct_parse_cmplx, &
+ oct_parse_string, &
+ oct_parse_logical, &
+ oct_parse_block, &
+ oct_parse_block_end, &
+ oct_parse_block_n, &
+ oct_parse_block_cols, &
+ oct_parse_block_int, &
+ oct_parse_block_float, &
+ oct_parse_block_cmplx, &
+ oct_parse_block_string, &
+ oct_parse_block_logical, &
+ oct_parse_potential
+
+
+ !---Interfaces---!
+
+ interface oct_parse_init
+ integer function oct_parse_init(file_out, mpiv_node)
+ character(len=*), intent(in) :: file_out
+ integer, intent(in) :: mpiv_node
+ end function oct_parse_init
+ end interface
+
+ interface oct_parse_putsym
+ subroutine oct_parse_putsym_int(sym, i)
+ character(len=*), intent(in) :: sym
+ integer, intent(in) :: i
+ end subroutine oct_parse_putsym_int
+ subroutine oct_parse_putsym_double(sym, d)
+ character(len=*), intent(in) :: sym
+ real(8), intent(in) :: d
+ end subroutine oct_parse_putsym_double
+ module procedure oct_parse_putsym_double4
+ end interface
+
+ interface oct_parse_input
+ integer function oct_parse_input(file_in)
+ character(len=*), intent(in) :: file_in
+ end function oct_parse_input
+ end interface
+
+ interface oct_parse_end
+ subroutine oct_parse_end()
+ end subroutine oct_parse_end
+ end interface
+
+ interface oct_parse_isdef
+ integer function oct_parse_isdef(name)
+ character(len=*), intent(in) :: name
+ end function oct_parse_isdef
+ end interface
+
+ interface oct_parse_int
+ subroutine oct_parse_int(name, def, res)
+ character(len=*), intent(in) :: name
+ integer, intent(in) :: def
+ integer, intent(out) :: res
+ end subroutine oct_parse_int
+ end interface
+
+ interface oct_parse_float
+ module procedure oct_parse_double4
+
+ subroutine oct_parse_double(name, def, res)
+ character(len=*), intent(in) :: name
+ real(8), intent(in) :: def
+ real(8), intent(out) :: res
+ end subroutine oct_parse_double
+ end interface
+
+ interface oct_parse_cmplx
+ module procedure oct_parse_complex4
+
+ subroutine oct_parse_complex(name, def, res)
+ character(len=*), intent(in) :: name
+ complex(8), intent(in) :: def
+ complex(8), intent(out) :: res
+ end subroutine oct_parse_complex
+ end interface
+
+ interface oct_parse_string
+ subroutine oct_parse_string(name, def, res)
+ character(len=*), intent(in) :: name, def
+ character(len=*), intent(out) :: res
+ end subroutine oct_parse_string
+ end interface
+
+ interface oct_parse_block
+ integer function oct_parse_block(name, blk)
+ character(len=*), intent(in) :: name
+ integer(POINTER_SIZE), intent(out) :: blk
+ end function oct_parse_block
+ end interface
+
+ interface oct_parse_block_end
+ subroutine oct_parse_block_end(blk)
+ integer(POINTER_SIZE), intent(in) :: blk
+ end subroutine oct_parse_block_end
+ end interface
+
+ interface oct_parse_block_n
+ integer function oct_parse_block_n(blk)
+ integer(POINTER_SIZE), intent(in) :: blk
+ end function oct_parse_block_n
+ end interface
+
+ interface oct_parse_block_cols
+ integer function oct_parse_block_cols(blk, line)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: line
+ end function oct_parse_block_cols
+ end interface
+
+ interface oct_parse_block_int
+ subroutine oct_parse_block_int(blk, l, c, res)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ integer, intent(out) :: res
+ end subroutine oct_parse_block_int
+ end interface
+
+ interface oct_parse_block_float
+ module procedure oct_parse_block_double4
+
+ subroutine oct_parse_block_double(blk, l, c, res)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ real(8), intent(out) :: res
+ end subroutine oct_parse_block_double
+ end interface
+
+ interface oct_parse_block_cmplx
+ module procedure oct_parse_block_complex4
+
+ subroutine oct_parse_block_complex(blk, l, c, res)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ complex(8), intent(out) :: res
+ end subroutine oct_parse_block_complex
+ end interface
+
+ interface oct_parse_block_string
+ subroutine oct_parse_block_string(blk, l, c, res)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ character(len=*), intent(out) :: res
+ end subroutine oct_parse_block_string
+ end interface
+
+ interface oct_parse_potential
+ module procedure oct_parse_potential4
+
+ real(8) function oct_parse_potential(x, y, z, r, pot)
+ real(8), intent(in) :: x, y, z, r
+ character(len=*), intent(in) :: pot
+ end function oct_parse_potential
+ end interface
+
+contains
+
+ ! logical is a FORTRAN type, so we emulate the routine with integers
+ subroutine oct_parse_logical(name, def, res)
+ character(len=*), intent(in) :: name
+ logical, intent(in) :: def
+ logical, intent(out) :: res
+
+ integer :: idef, ires
+
+ idef = 0
+ if(def) idef = 1
+
+ call oct_parse_int(name, idef, ires)
+ res = (ires .ne. 0)
+
+ end subroutine oct_parse_logical
+
+ subroutine oct_parse_block_logical(blk, l, c, res)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ logical, intent(out) :: res
+
+ integer :: ires
+
+ call oct_parse_block_int(blk, l, c, ires)
+ res = (ires .ne. 0)
+
+ end subroutine oct_parse_block_logical
+
+ ! The code may want to compile in single precision mode
+ ! As I did not want to change the parser library, these
+ ! driver functions just convert their arguments.
+
+ subroutine oct_parse_putsym_double4(sym, d4)
+ character(len=*), intent(in) :: sym
+ real(4), intent(in) :: d4
+
+ call oct_parse_putsym_double(sym, real(d4, 8))
+
+ end subroutine oct_parse_putsym_double4
+
+ subroutine oct_parse_double4(name, def4, res4)
+ character(len=*), intent(in) :: name
+ real(4), intent(in) :: def4
+ real(4), intent(out) :: res4
+
+ real(8) :: res8
+
+ call oct_parse_double(name, real(def4, 8), res8)
+ res4 = real(res8, kind=4)
+
+ end subroutine oct_parse_double4
+
+ subroutine oct_parse_complex4(name, def4, res4)
+ character(len=*), intent(in) :: name
+ complex(4), intent(in) :: def4
+ complex(4), intent(out) :: res4
+
+ complex(8) :: res8
+
+ call oct_parse_complex(name, cmplx(def4, kind=8), res8)
+ res4 = real(res8, kind=4)
+
+ end subroutine oct_parse_complex4
+
+ subroutine oct_parse_block_double4(blk, l, c, res4)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ real(4), intent(out) :: res4
+
+ real(8) :: res8
+
+ call oct_parse_block_double(blk, l, c, res8)
+ res4 = real(res8, kind=4)
+
+ end subroutine oct_parse_block_double4
+
+ subroutine oct_parse_block_complex4(blk, l, c, res4)
+ integer(POINTER_SIZE), intent(in) :: blk
+ integer, intent(in) :: l, c
+ complex(4), intent(out) :: res4
+
+ complex(8) :: res8
+
+ call oct_parse_block_complex(blk, l, c, res8)
+ res4 = cmplx(res8, kind=4)
+
+ end subroutine oct_parse_block_complex4
+
+ real(4) function oct_parse_potential4(x4, y4, z4, r4, pot)
+ real(4), intent(in) :: x4, y4, z4, r4
+ character(len=*), intent(in) :: pot
+
+ real(8) :: res
+
+ res = oct_parse_potential(real(x4, 8), real(y4, 8), real(z4, 8), real(r4, 8), pot)
+ oct_parse_potential4 = real(res, 4)
+
+ end function oct_parse_potential4
+
+end module oct_parser_m
diff --git a/src/linalg.F90 b/src/linalg.F90
new file mode 100644
index 0000000..06099a7
--- /dev/null
+++ b/src/linalg.F90
@@ -0,0 +1,166 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: linalg.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module linalg_m
+ use global_m
+ use gsl_interface_m
+ use messages_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: matrix_invert, solve_linear_system, gsl_vector_init
+
+contains
+
+ subroutine matrix_invert(n, matrix)
+ !-----------------------------------------------------------------------!
+ ! Computes the inverse of a square matrix from its LU decomposition !
+ ! using the GSL library. !
+ ! !
+ ! n - matrix dimension !
+ ! matrix (in) - matrix to be inverted !
+ ! matrix (out) - inverted matrix . !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n
+ real(R8), intent(inout) :: matrix(n, n)
+
+ integer(POINTER_SIZE) :: m, p, inv
+ integer :: ierr, i, j, signum
+
+ call gsl_matrix_init(n, n, matrix, m)
+ call gsl_permutation_alloc(n, p)
+ call gsl_matrix_alloc(n, n, inv)
+
+ ierr = gsl_linalg_lu_decomp(m, p, signum)
+ if (ierr /= 0) then
+ write(message(1),'(A,I4)') 'In matrix_invert, gsl_linalg_lu_decomp returned error code:', ierr
+ call write_fatal(1)
+ end if
+ ierr = gsl_linalg_lu_invert(m,p,inv)
+ if (ierr /= 0) then
+ write(message(1),'(A,I4)') 'In matrix_invert, gsl_linalg_lu_invert returned error code:', ierr
+ call write_fatal(1)
+ end if
+
+ forall (i=0:n-1,j=0:n-1) matrix(i+1,j+1) = gsl_matrix_get(inv, i, j)
+
+ call gsl_matrix_free(m)
+ call gsl_permutation_free(p)
+ call gsl_matrix_free(inv)
+
+ end subroutine matrix_invert
+
+ subroutine solve_linear_system(n, matrix_a, vector_b, vector_x)
+ !-----------------------------------------------------------------------!
+ ! Solves a linear system of equations of the form Ax = b using the GSL !
+ ! library. !
+ ! !
+ ! n - dimension of the system !
+ ! matrix_a - left hand side of the equations !
+ ! vector_b - righ hand side of the equations !
+ ! vector_x - solutions of the equations !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n
+ real(R8), intent(in) :: matrix_a(n, n)
+ real(R8), intent(in) :: vector_b(n)
+ real(R8), intent(out) :: vector_x(n)
+
+ integer(POINTER_SIZE) :: a, b, x, p
+ integer :: ierr, i, signum
+
+ call gsl_matrix_init(n, n, matrix_a, a)
+ call gsl_permutation_alloc(n, p)
+ call gsl_vector_init(n, vector_b, b)
+ call gsl_vector_alloc(n, x)
+
+ ierr = gsl_linalg_lu_decomp(a, p, signum)
+ if (ierr /= 0) then
+ write(message(1),'(A,I4)') 'In solve_linear_system, gsl_linalg_lu_decomp returned error code:', ierr
+ call write_fatal(1)
+ end if
+ ierr=gsl_linalg_lu_solve(a, p, b, x)
+ if (ierr /= 0) then
+ write(message(1),'(A,I4)') 'In solve_linear_system, gsl_linalg_lu_solve returned error code:', ierr
+ call write_fatal(1)
+ end if
+
+ forall (i=0:n-1) vector_x(i+1) = gsl_vector_get(x, i)
+
+ call gsl_matrix_free(a)
+ call gsl_permutation_free(p)
+ call gsl_vector_free(x)
+ call gsl_vector_free(b)
+
+ end subroutine solve_linear_system
+
+ subroutine gsl_vector_init(n, vector, v)
+ !-----------------------------------------------------------------------!
+ ! Initializes a GSL vector object setting its elements using the values !
+ ! stored in an array. !
+ ! !
+ ! n - size of the vector !
+ ! vector - array of vector elements !
+ ! v - pointer to the GSL vector object !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n
+ real(R8), intent(in) :: vector(n)
+ integer(POINTER_SIZE), intent(inout) :: v
+
+ integer :: i
+
+ v = 0
+ call gsl_vector_alloc(n, v)
+ do i = 0, n - 1
+ call gsl_vector_set(v, i, vector(i+1))
+ end do
+
+ end subroutine gsl_vector_init
+
+ subroutine gsl_matrix_init(n1, n2, matrix, m)
+ !-----------------------------------------------------------------------!
+ ! Initializes a GSL matrix object setting its elements using the values !
+ ! stored in an array. !
+ ! !
+ ! n1 - number of rows !
+ ! n2 - number of columns !
+ ! matrix - array of matrix elements !
+ ! m - pointer to the GSL matrix object !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n1, n2
+ real(R8), intent(in) :: matrix(n1, n2)
+ integer(POINTER_SIZE), intent(inout) :: m
+
+ integer :: i, j
+
+ m = 0
+ call gsl_matrix_alloc(n1, n2, m)
+ do i = 0, n1 - 1
+ do j = 0, n2 - 1
+ call gsl_matrix_set(m, i, j, matrix(i+1, j+1))
+ end do
+ end do
+
+ end subroutine gsl_matrix_init
+
+end module linalg_m
diff --git a/src/loc_potentials.F90 b/src/loc_potentials.F90
new file mode 100644
index 0000000..60326cd
--- /dev/null
+++ b/src/loc_potentials.F90
@@ -0,0 +1,419 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: loc_potentials.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module loc_potentials_m
+ use global_m
+ use messages_m
+ use io_m
+ use units_m
+ use splines_m
+ use mesh_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure loc_potential_copy
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type loc_potential_t
+ private
+ integer :: type ! All-electron (AE) or parametrized (PARAM)
+
+ !The nuclear part z/r of an all-electron potential
+ real(R8) :: z
+
+ !The parametrized potential
+ real(R8), pointer :: v(:)
+ type(spline_t) :: v_spl
+ type(spline_t) :: vp_spl
+ type(spline_t) :: vpp_spl
+ end type loc_potential_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: AE = 1, &
+ PARAM = 2
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: loc_potential_t, &
+ loc_potential_null, &
+ loc_potential_init, &
+ assignment(=), &
+ loc_potential_end, &
+ loc_potential_save, &
+ loc_potential_load, &
+ loc_v, &
+ loc_dvdr, &
+ loc_d2vdr2, &
+ loc_integral, &
+ loc_potential_nuclear_charge, &
+ loc_potential_is_ae, &
+ loc_potential_debug, &
+ loc_potential_output
+
+
+contains
+
+ subroutine loc_potential_null(potential)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the potential. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(out) :: potential
+
+ call push_sub("loc_potential_null")
+
+ potential%type = 0
+
+ potential%z = M_ZERO
+ nullify(potential%v)
+ call spline_null(potential%v_spl)
+ call spline_null(potential%vp_spl)
+ call spline_null(potential%vpp_spl)
+
+ call pop_sub()
+ end subroutine loc_potential_null
+
+ subroutine loc_potential_init(potential, m, z, v)
+ !-----------------------------------------------------------------------!
+ ! Initialize the potential. !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! z - nuclear charge !
+ ! v - values of the potential on the mesh !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in), optional :: z
+ real(R8), intent(in), optional :: v(m%np)
+
+ call push_sub("loc_potential_init")
+
+ ASSERT(potential%type == 0)
+ ASSERT(present(z) .or. present(v))
+
+ if (present(z)) then
+ potential%type = AE
+ potential%z = z
+ end if
+
+ if (present(v)) then
+ potential%type = PARAM
+ allocate(potential%v(m%np))
+ potential%v = v
+ call spline_init(potential%v_spl, m%np, m%r, v, 3)
+ call spline_init(potential%vp_spl, m%np, m%r, mesh_derivative(m, v), 3)
+ call spline_init(potential%vpp_spl, m%np, m%r, mesh_derivative2(m, v), 3)
+ end if
+
+ call pop_sub()
+ end subroutine loc_potential_init
+
+ subroutine loc_potential_copy(potential_a, potential_b)
+ !-----------------------------------------------------------------------!
+ ! Copies the potential potential_a to potential potential_b. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(inout) :: potential_a
+ type(loc_potential_t), intent(in) :: potential_b
+
+ call push_sub("loc_potential_copy")
+
+ ASSERT(potential_b%type /= 0)
+
+ call loc_potential_end(potential_a)
+
+ potential_a%type = potential_b%type
+
+ select case (potential_b%type)
+ case (AE)
+ potential_a%z = potential_b%z
+ case (PARAM)
+ allocate(potential_a%v(size(potential_b%v)))
+ potential_a%v = potential_b%v
+ potential_a%v_spl= potential_b%v_spl
+ potential_a%vp_spl= potential_b%vp_spl
+ potential_a%vpp_spl= potential_b%vpp_spl
+ end select
+
+ call pop_sub()
+ end subroutine loc_potential_copy
+
+ subroutine loc_potential_end(potential)
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to the potential. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(inout) :: potential
+
+ call push_sub("loc_potential_end")
+
+ potential%type = 0
+
+ potential%z = M_ZERO
+ if (associated(potential%v)) then
+ deallocate (potential%v)
+ end if
+ call spline_end(potential%v_spl)
+ call spline_end(potential%vp_spl)
+ call spline_end(potential%vpp_spl)
+
+ call pop_sub()
+ end subroutine loc_potential_end
+
+ subroutine loc_potential_save(unit, m, potential)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file. !
+ ! !
+ ! unit - file unit number !
+ ! mesh - the mesh !
+ ! potential - potential to be written !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(loc_potential_t), intent(in) :: potential
+
+ integer :: i
+
+ call push_sub("loc_potential_save")
+
+ ASSERT(potential%type /= 0)
+
+ write(unit) potential%type
+
+ select case (potential%type)
+ case (AE)
+ write(unit) potential%z
+ case (PARAM)
+ do i = 1, m%np
+ write(unit) potential%v(i)
+ end do
+ end select
+
+ call pop_sub()
+ end subroutine loc_potential_save
+
+ subroutine loc_potential_load(unit, m, potential)
+ !-----------------------------------------------------------------------!
+ ! Reads the potential from a file. !
+ ! !
+ ! unit - file unit number !
+ ! mesh - the mesh !
+ ! potential - potential to be read !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(loc_potential_t), intent(inout) :: potential
+
+ integer :: i
+
+ call push_sub("loc_potential_load")
+
+ ASSERT(potential%type == 0)
+
+ read(unit) potential%type
+
+ select case (potential%type)
+ case (AE)
+ read(unit) potential%z
+ case (PARAM)
+ allocate(potential%v(m%np))
+ do i = 1, m%np
+ read(unit) potential%v(i)
+ end do
+ call spline_init(potential%v_spl, m%np, m%r, potential%v, 3)
+ call spline_init(potential%vp_spl, m%np, m%r, mesh_derivative(m, potential%v), 3)
+ call spline_init(potential%vpp_spl, m%np, m%r, mesh_derivative2(m, potential%v), 3)
+ end select
+
+ call pop_sub()
+ end subroutine loc_potential_load
+
+ function loc_v(potential, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the loc potential felt by an electron at !
+ ! radius r. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ real(R8) :: loc_v
+
+ ASSERT(potential%type /= 0)
+
+ select case (potential%type)
+ case (AE)
+ loc_v = -potential%z/r
+ case (PARAM)
+ loc_v = spline_eval(potential%v_spl, r)
+ end select
+
+ end function loc_v
+
+ function loc_dvdr(potential, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the first derivative of the loc potential felt !
+ ! by an electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ real(R8) :: loc_dvdr
+
+ ASSERT(potential%type /= 0)
+
+ select case (potential%type)
+ case (AE)
+ loc_dvdr = potential%z/r**2
+ case (PARAM)
+ loc_dvdr = spline_eval(potential%vp_spl, r)
+ end select
+
+ end function loc_dvdr
+
+ function loc_d2vdr2(potential, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the second derivative of the loc potential !
+ ! felt by an electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ real(R8) :: loc_d2vdr2
+
+ ASSERT(potential%type /= 0)
+
+ select case (potential%type)
+ case (AE)
+ loc_d2vdr2 = -M_TWO*potential%z/r**3
+ case (PARAM)
+ loc_d2vdr2 = spline_eval(potential%vpp_spl, r)
+ end select
+
+ end function loc_d2vdr2
+
+ function loc_integral(potential, ra, rb)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the integral of the potential between ra and rb. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: ra, rb
+ real(R8) :: loc_integral
+
+ ASSERT(potential%type /= 0)
+ ASSERT(potential%type /= AE)
+
+ loc_integral = spline_eval_integ(potential%v_spl, ra, rb)
+
+ end function loc_integral
+
+ function loc_potential_nuclear_charge(potential)
+ !-----------------------------------------------------------------------!
+ ! Returns the nuclear charge. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ real(R8) :: loc_potential_nuclear_charge
+
+ loc_potential_nuclear_charge = potential%z
+
+ end function loc_potential_nuclear_charge
+
+ function loc_potential_is_ae(potential)
+ !-----------------------------------------------------------------------!
+ ! Returns true if the loc potential is an all-electron potential. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ logical :: loc_potential_is_ae
+
+ loc_potential_is_ae = potential%type == AE
+
+ end function loc_potential_is_ae
+
+ subroutine loc_potential_debug(unit, m, potential)
+ !-----------------------------------------------------------------------!
+ ! Prints debug information to a file. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(loc_potential_t), intent(in) :: potential
+
+ integer :: i
+
+ call push_sub("loc_potential_debug")
+
+ ASSERT(potential%type /= 0)
+
+ select case (potential%type)
+ case (AE)
+ write(unit,'("# Loc potential type: All-electron")')
+ write(unit,'("# Nuclear Charge: ",F10.4)') potential%z
+ case (PARAM)
+ write(unit,'("# Loc potential type: Parametrized")')
+ do i = 1, m%np
+ write(unit,'(ES10.3E2,1X,ES10.3E2)') m%r(i), potential%v(i)
+ end do
+ end select
+
+ call pop_sub()
+ end subroutine loc_potential_debug
+
+ subroutine loc_potential_output(potential, m, filename)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file in a format suitable for plotting. !
+ !-----------------------------------------------------------------------!
+ type(loc_potential_t), intent(in) :: potential
+ type(mesh_t), intent(in) :: m
+ character(len=*), intent(in) :: filename
+
+ integer :: i, unit
+ real(R8) :: ue, ul
+
+ call push_sub("loc_potential_output")
+
+ ASSERT(potential%type /= 0)
+
+ call io_open(unit, file=trim(filename))
+
+ ul = units_out%length%factor
+ ue = units_out%energy%factor
+
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+
+ write(unit,'("# ",34("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",6X,"v(r)",6X,"|")')
+ write(unit,'("# ",34("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2)') m%r(i)/ul, loc_v(potential, m%r(i))/ue
+ end do
+
+ close(unit)
+
+ call pop_sub()
+ end subroutine loc_potential_output
+
+end module loc_potentials_m
diff --git a/src/math.F90 b/src/math.F90
new file mode 100644
index 0000000..406c8f4
--- /dev/null
+++ b/src/math.F90
@@ -0,0 +1,116 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: math.F90 778 2013-07-11 15:49:39Z micael $
+
+module math_m
+ use global_m
+ use linalg_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: sort, &
+ polynomial_extrapolative_integration
+
+
+contains
+
+ subroutine sort(a, ind)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ real(R8), intent(inout) :: a(:)
+ integer, intent(inout), optional :: ind(:)
+
+ integer :: i, j, inc, n, indi, indj
+ real(R8) :: v
+
+ n = size(a)
+
+ if(present(ind)) then
+ do i = 1, n
+ ind(i) = i
+ end do
+ end if
+
+ inc = 1
+ do
+ inc = 3*inc + 1
+ if (inc > n) exit
+ end do
+
+ do
+ inc = inc/3
+ do i = inc + 1,n
+ v = a(i)
+ if (present(ind)) indi = ind(i)
+ j = i
+ do
+ if (a(j - inc) <= v) exit
+ !if (a(j-inc) >= v) exit
+ a(j) = a(j - inc)
+
+ !workaround to a bug in itanium ifort
+ !if(present(ind)) ind(j) = ind(j-inc)
+ if(present(ind)) indj = ind(j - inc)
+ if(present(ind)) ind(j) = indj
+
+ j = j - inc
+ if (j <= inc) exit
+ end do
+ a(j) = v
+ if(present(ind)) ind(j) = indi
+ end do
+ if (inc <= 1) exit
+ end do
+
+ end subroutine sort
+
+ function polynomial_extrapolative_integration(n, x, f, a, b) result(int)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n), f(n), a, b
+ real(R8) :: int
+
+ integer :: i, j
+ real(R8), allocatable :: eq(:,:), c(:)
+
+ !First we extrapolate. We will directly solve the system of
+ !equations for the coefficients of the polynomial. This is not
+ !very efficient, but we will assume "n" to be small.
+ allocate(eq(n,n), c(n))
+ do j = 1, n
+ do i = 1, n
+ eq(j, i) = x(j)**(i-1)
+ end do
+ end do
+ call solve_linear_system(n, eq, f, c)
+
+ !Then we compute the integral
+ int = M_ZERO
+ do i = 1, n
+ int = int + c(i)/real(i,R8)*(b**i - a**i)
+ end do
+
+ deallocate(eq, c)
+
+ end function polynomial_extrapolative_integration
+
+end module math_m
diff --git a/src/mesh.F90 b/src/mesh.F90
new file mode 100644
index 0000000..24da469
--- /dev/null
+++ b/src/mesh.F90
@@ -0,0 +1,924 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: mesh.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module mesh_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use utilities_m
+ use math_m
+ use splines_m
+ use finite_diff_m
+ use units_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure mesh_copy
+ end interface
+
+ interface operator (==)
+ module procedure equal_mesh
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type mesh_t
+ integer, private :: type !mesh type
+ real(R8), public :: a !mesh parameters
+ real(R8), public :: b !
+ integer, public :: np !mesh number of points
+ real(R8), public, pointer :: r(:) !mesh points
+
+ integer, private :: intrp_method ! Method to interpolate functions between meshes
+ integer, private :: integ_method ! Method used to calculate integrals
+ integer, private :: deriv_method ! Method used to calculate derivatives
+ integer, private :: interp_range
+ integer, private :: fd_order
+ type(fd_operator_t), private :: deriv
+ type(fd_operator_t), private :: deriv2
+ type(fd_operator_t), private :: deriv3
+ end type mesh_t
+
+
+ !---Global Variables---!
+
+ !Mesh types
+ integer, parameter :: MESH_LINEAR = 1, &
+ MESH_LOG1 = 2, &
+ MESH_LOG2 = 3
+
+ !Interpolation, derivatives, and integrals methods
+ integer, parameter :: MESH_CUBIC_SPLINE = 1, &
+ MESH_FINITE_DIFF = 2
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: mesh_t, &
+ mesh_null, &
+ mesh_init, &
+ mesh_init_from_input, &
+ mesh_generation, &
+ mesh_save, &
+ mesh_load, &
+ mesh_transfer, &
+ mesh_truncate, &
+ mesh_extrapolate, &
+ mesh_derivative, &
+ mesh_derivative2, &
+ mesh_derivative3, &
+ mesh_integrate, &
+ mesh_primitive, &
+ mesh_gradient, &
+ mesh_divergence, &
+ mesh_laplacian, &
+ mesh_output_params, &
+ mesh_end, &
+ assignment(=), &
+ operator(==), &
+ MESH_LOG1, &
+ MESH_LINEAR, &
+ MESH_LOG2, &
+ MESH_CUBIC_SPLINE, &
+ MESH_FINITE_DIFF
+
+contains
+
+ subroutine mesh_null(m)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of mesh m. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(out) :: m
+
+ call push_sub("mesh_null")
+
+ m%type = 0
+ m%a = M_ZERO
+ m%b = M_ZERO
+ m%np = 0
+ m%intrp_method = 0
+ m%interp_range = 0
+ m%deriv_method = 0
+ m%integ_method = 0
+ m%fd_order = 0
+ call fd_operator_null(m%deriv)
+ call fd_operator_null(m%deriv2)
+ call fd_operator_null(m%deriv3)
+ nullify(m%r)
+
+ call pop_sub()
+ end subroutine mesh_null
+
+ subroutine mesh_init(m, type, deriv_method, r1, rmax, np, a, fd_order)
+ !-----------------------------------------------------------------------!
+ ! Initializes the calculation mesh by reading the mesh parameter from !
+ ! the input file. The default parameters depend on the nuclear charge. !
+ ! !
+ ! !
+ ! m - mesh object !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(inout) :: m
+ integer, intent(in) :: type, deriv_method
+ real(R8), intent(in) :: r1, rmax
+ integer, intent(in), optional :: np, fd_order
+ real(R8), intent(in), optional :: a
+
+ call push_sub("mesh_init")
+
+ ASSERT(m%type == 0)
+ ASSERT(present(a) .or. present(np))
+ ASSERT(deriv_method /= MESH_FINITE_DIFF .or. (deriv_method == MESH_FINITE_DIFF .and. present(fd_order)))
+
+ !Generate mesh
+ if (present(a)) then
+ call mesh_generation(m, type, r1, rmax, a=a)
+ else
+ call mesh_generation(m, type, r1, rmax, n=np)
+ end if
+
+ m%deriv_method = deriv_method
+ if (m%deriv_method == MESH_FINITE_DIFF) then
+ m%fd_order = fd_order
+ call fd_operator_init(m%deriv, 1, m%fd_order, m%np, m%r)
+ call fd_operator_init(m%deriv2, 2, m%fd_order, m%np, m%r)
+ call fd_operator_init(m%deriv3, 3, m%fd_order, m%np, m%r)
+ end if
+ m%integ_method = MESH_CUBIC_SPLINE
+ m%intrp_method = MESH_CUBIC_SPLINE
+ m%interp_range = 25
+
+ call pop_sub()
+ end subroutine mesh_init
+
+ subroutine mesh_init_from_input(z, m)
+ !-----------------------------------------------------------------------!
+ ! Initializes the calculation mesh by reading the mesh parameter from !
+ ! the input file. The default parameters depend on the nuclear charge. !
+ ! !
+ ! z - nuclear charge !
+ ! m - mesh object !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(in) :: z
+ type(mesh_t), intent(inout) :: m
+
+ logical :: is_def_np, is_def_a
+ integer :: type, np, deriv_method, fd_order
+ real(R8) :: r1, rmax, a
+
+ call push_sub("mesh_init_from_input")
+
+ ASSERT(m%type == 0)
+
+ !Read input options
+ call oct_parse_int('MeshType', MESH_LOG1, type)
+ select case (type)
+ case (MESH_LOG1, MESH_LOG2, MESH_LINEAR)
+ case default
+ message(1) = "Illegal MeshType."
+ call write_fatal(1)
+ end select
+
+ call oct_parse_float('MeshStartingPoint', sqrt(z)*1.0E-5, r1)
+ if (r1 <= M_ZERO) then
+ message(1) = "MeshStartingPoint can not take negative values."
+ call write_fatal(1)
+ end if
+ r1 = r1*units_in%length%factor
+
+ call oct_parse_float('MeshOutmostPoint', sqrt(z)*M_THIRTY, rmax)
+ rmax = rmax*units_in%length%factor
+ if (rmax <= M_ZERO .or. rmax < r1) then
+ message(1) = "MeshOutmostPoint can''t take negative values"
+ message(2) = "and must be greater than the mesh start point."
+ call write_fatal(2)
+ end if
+
+ is_def_np = oct_parse_isdef('MeshNumberOfPoints') == 1
+ is_def_a = oct_parse_isdef('MeshParameter') == 1
+ if (is_def_np .and. is_def_a) then
+ message(1) = "MeshNumberOfPoints and MeshParameter input options"
+ message(2) = "can not be used at the same time."
+ call write_fatal(2)
+ end if
+
+ fd_order = 0
+ call oct_parse_int('MeshDerivMethod', MESH_CUBIC_SPLINE, deriv_method)
+ select case (deriv_method)
+ case (MESH_CUBIC_SPLINE)
+ case (MESH_FINITE_DIFF)
+ call oct_parse_int('MeshFiniteDiffOrder', 4, fd_order)
+ if (fd_order < 1) then
+ message(1) = "MeshFiniteDerivOrder must be greater than 0."
+ call write_fatal(1)
+ end if
+ case default
+ message(1) = "Illegal MeshDerivMethod."
+ call write_fatal(1)
+ end select
+
+ if (is_def_a) then
+ call oct_parse_float('MeshParameter', M_DIME, a)
+ if (a < M_ZERO) then
+ message(1) = "MeshParameter can not take negative values."
+ call write_fatal(1)
+ end if
+
+ call mesh_init(m, type, deriv_method, r1, rmax, a=a, fd_order=fd_order)
+ else
+ call oct_parse_int('MeshNumberOfPoints', int(sqrt(z))*200, np)
+ if (np <= 3) then
+ message(1) = "Mesh must have at least 3 points."
+ call write_fatal(1)
+ end if
+
+ call mesh_init(m, type, deriv_method, r1, rmax, np=np, fd_order=fd_order)
+ end if
+
+ call pop_sub()
+ end subroutine mesh_init_from_input
+
+ subroutine mesh_generation(m, type, r1, rn, n, a)
+ !-----------------------------------------------------------------------!
+ ! Initializes a mesh and generates the mesh points. Note that only one !
+ ! of the optional variables n and a should be used. !
+ ! !
+ ! m - mesh !
+ ! type - mesh type !
+ ! r1 - starting point !
+ ! rn - ending point !
+ ! n - number of points !
+ ! a - mesh parameter a !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(inout) :: m
+ integer, intent(in) :: type
+ real(R8), intent(in) :: r1, rn
+ integer, intent(in), optional :: n
+ real(R8), intent(in), optional :: a
+
+ integer :: i
+ real(R8) :: a1, a2, n1, n2, am, nm, f1, fm
+
+ call push_sub("mesh_generation")
+
+ !Check optional arguments
+ if (present(n) .and. present(a)) then
+ message(1) = "Only one optional argument can be set in mesh_generation"
+ call write_fatal(1)
+ end if
+
+ !Set the mesh type, the number of points, the first point and the parameter a
+ m%type = type
+ if (present(n)) then
+ m%np = n
+ allocate(m%r(m%np))
+ m%r(1) = r1
+ select case (m%type)
+ case (MESH_LINEAR)
+ m%a = (rn - r1)/real(n-1, R8)
+ case (MESH_LOG1)
+ m%a = log(rn/r1)/real(n - 1,R8)
+ case (MESH_LOG2)
+ a1 = 1.0e-8_r8
+ f1 = func(r1, rn, real(n,R8), a1)
+ a2 = M_ONE
+ do
+ am = (a2 + a1)*M_HALF
+ fm = func(r1, rn, real(n,R8), am)
+ if (M_HALF*abs(a1 - a2) < 1.0e-16) exit
+ if (fm*f1 > M_ZERO) then
+ a1 = am; f1 = fm
+ else
+ a2 = am
+ end if
+ end do
+ m%a = am
+ end select
+
+ elseif (present(a)) then
+ select case (m%type)
+ case (MESH_LINEAR)
+ m%np = int((rn - r1)/a)
+ case (MESH_LOG1)
+ m%np = int(log(rn/r1)/a) + 1
+ case (MESH_LOG2)
+ n1 = M_ONE
+ f1 = func(r1, rn, n1, a)
+ n2 = 10000.0_r8
+ do
+ nm = (n2 + n1)*M_HALF
+ fm = func(r1, rn, nm, a)
+ if (M_HALF*abs(n1 - n2) < 1.0e-12) exit
+ if (fm*f1 > M_ZERO) then
+ n1 = nm; f1 = fm
+ else
+ n2 = nm
+ end if
+ end do
+ m%np = int(nm)
+ end select
+ allocate(m%r(m%np))
+ m%r(1) = r1
+ m%a = a
+
+ end if
+
+ !Set the parameter b and the remaining points
+ select case (m%type)
+ case (MESH_LINEAR)
+ m%b = M_ZERO
+ do i = 2, m%np-1
+ m%r(i) = m%r(i-1) + m%a
+ end do
+ case (MESH_LOG1)
+ m%b = r1/exp(m%a)
+ do i = 2, m%np-1
+ m%r(i) = exp(m%a)*m%r(i-1)
+ end do
+ case (MESH_LOG2)
+ m%b = r1/(exp(m%a) - M_ONE)
+ do i = 2, m%np-1
+ m%r(i) = m%r(i-1)*exp(m%a) + r1
+ end do
+ end select
+ m%r(m%np) = rn
+
+ call pop_sub()
+ contains
+
+ real(R8) function func(r1, rn, n, a)
+ real(R8), intent(in) :: r1, rn, a, n
+ func = exp(n*a)*r1 - M_ONE*r1 - rn*exp(a) + rn*M_ONE
+ end function func
+
+ end subroutine mesh_generation
+
+ subroutine mesh_copy(m_a, m_b)
+ !-----------------------------------------------------------------------!
+ ! Copies m_a mesh to m_b. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(inout) :: m_a
+ type(mesh_t), intent(in) :: m_b
+
+ call push_sub("mesh_copy")
+
+ call mesh_end(m_a)
+ m_a%type = m_b%type
+ m_a%a = m_b%a
+ m_a%b = m_b%b
+ m_a%np = m_b%np
+ m_a%intrp_method = m_b%intrp_method
+ m_a%interp_range = m_b%interp_range
+ m_a%deriv_method = m_b%deriv_method
+ m_a%integ_method = m_b%integ_method
+ allocate(m_a%r(m_a%np))
+ m_a%r = m_b%r
+ if (m_a%deriv_method == MESH_FINITE_DIFF) then
+ m_a%fd_order = m_b%fd_order
+ m_a%deriv = m_b%deriv
+ m_a%deriv2 = m_b%deriv2
+ m_a%deriv3 = m_b%deriv3
+ end if
+
+ call pop_sub()
+ end subroutine mesh_copy
+
+ function equal_mesh(m_a, m_b)
+ !-----------------------------------------------------------------------!
+ ! Returns true if m_a and m_b are the same mesh; false otherwise. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m_a, m_b
+ logical :: equal_mesh
+
+ call push_sub("equal_mesh")
+
+ equal_mesh = (m_a%type == m_b%type .and. m_a%a == m_b%a .and. &
+ m_a%b == m_b%b .and. m_a%np == m_b%np)
+
+ call pop_sub()
+ end function equal_mesh
+
+ subroutine mesh_save(unit, m)
+ !-----------------------------------------------------------------------!
+ ! Writes the mesh information to a file. !
+ ! !
+ ! unit - file unit number !
+ ! m - mesh to be written !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+
+ integer :: i
+
+ call push_sub("mesh_save")
+
+ ASSERT(m%type /= 0)
+
+ write(unit) m%type, m%a, m%b, m%np, m%intrp_method, m%interp_range, m%deriv_method, &
+ m%integ_method, m%fd_order
+ write(unit) (m%r(i), i=1, m%np)
+
+ call pop_sub()
+ end subroutine mesh_save
+
+ subroutine mesh_load(unit, m)
+ !-----------------------------------------------------------------------!
+ ! Reads the mesh information from a file. !
+ ! !
+ ! unit - file unit number !
+ ! m - mesh to be read !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(inout) :: m
+
+ integer :: i
+
+ call push_sub("mesh_load")
+
+ ASSERT(m%type == 0)
+
+ read(unit) m%type, m%a, m%b, m%np, m%intrp_method, m%interp_range, m%deriv_method, &
+ m%integ_method, m%fd_order
+ allocate(m%r(m%np))
+ read(unit) (m%r(i), i=1, m%np)
+
+ if (m%deriv_method == MESH_FINITE_DIFF) then
+ call fd_operator_init(m%deriv, 1, m%fd_order, m%np, m%r)
+ call fd_operator_init(m%deriv2, 2, m%fd_order, m%np, m%r)
+ call fd_operator_init(m%deriv3, 3, m%fd_order, m%np, m%r)
+ end if
+
+ call pop_sub()
+ end subroutine mesh_load
+
+ subroutine mesh_truncate(m, rt)
+ !-----------------------------------------------------------------------!
+ ! Truncates a mesh so that the last point is rt !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(inout) :: m
+ real(R8), intent(in) :: rt
+
+ real(R8), allocatable :: r(:)
+
+ call push_sub("mesh_truncate")
+
+ ASSERT(m%type /= 0)
+
+ m%np = locate(m%r, rt, 0)
+ allocate(r(m%np+1))
+ r(1:m%np) = m%r(1:m%np)
+ if (m%r(m%np) /= rt) then
+ r(m%np + 1) = rt
+ m%np = m%np + 1
+ end if
+ deallocate(m%r)
+ allocate(m%r(m%np))
+ m%r(1:m%np) = r(1:m%np)
+ deallocate(r)
+
+ if (m%deriv_method == MESH_FINITE_DIFF) then
+ call fd_operator_end(m%deriv)
+ call fd_operator_end(m%deriv2)
+ call fd_operator_init(m%deriv, 1, m%fd_order, m%np, m%r)
+ call fd_operator_init(m%deriv2, 2, m%fd_order, m%np, m%r)
+ call fd_operator_init(m%deriv3, 3, m%fd_order, m%np, m%r)
+ end if
+
+ call pop_sub()
+ end subroutine mesh_truncate
+
+ subroutine mesh_transfer(m_a, fa, m_b, fb)
+ !-----------------------------------------------------------------------!
+ ! Having a function on a mesh m_a, this routines returns the values of !
+ ! that function on a mesh m_b, by interpolating the function. !
+ ! !
+ ! m_a - mesh m_a !
+ ! fa - values of the function on mesh A !
+ ! x_b - mesh m_b !
+ ! fa - values of the function on mesh A !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m_a, m_b
+ real(R8), intent(in) :: fa(m_a%np)
+ real(R8), intent(out) :: fb(m_b%np)
+
+ call push_sub("mesh_transfer")
+
+ ASSERT(m_a%type /= 0 .and. m_b%type /= 0)
+
+ select case (m_a%intrp_method)
+ case (MESH_CUBIC_SPLINE)
+ call spline_mesh_transfer(m_a%np, m_a%r, fa, m_b%np, m_b%r, fb, 3)
+
+ case default
+ write(message(1),'("Illegal interpolation method in mesh_transfer: ",I1)') &
+ m_a%intrp_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end subroutine mesh_transfer
+
+ function mesh_extrapolate(m, f, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of f at r !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ ! r - point where to evaluate the function !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8), intent(in) :: r
+ real(R8) :: mesh_extrapolate
+
+ integer :: i, ii, if
+ type(spline_t) :: spl
+
+ call push_sub("mesh_eval_deriv")
+
+ select case (m%intrp_method)
+ case (MESH_CUBIC_SPLINE)
+ i = locate(m%r, r, 0)
+ ii = max(1, i-m%interp_range)
+ if = min(m%np, i+m%interp_range)
+ call spline_null(spl)
+ call spline_init(spl, if-ii+1, m%r(ii:if), f(ii:if), 3)
+ mesh_extrapolate = spline_eval(spl, r)
+ call spline_end(spl)
+
+ case default
+ write(message(1),'("Illegal interpolation method in mesh_eval: ",I1)') &
+ m%intrp_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end function mesh_extrapolate
+
+ function mesh_derivative(m, f)
+ !-----------------------------------------------------------------------!
+ ! Returns the derivate of f !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8) :: mesh_derivative(m%np)
+
+ integer :: i
+ type(spline_t) :: spl
+
+ call push_sub("mesh_derivative")
+
+ select case (m%deriv_method)
+ case (MESH_CUBIC_SPLINE)
+ call spline_null(spl)
+ call spline_init(spl, m%np, m%r, f, 3)
+ do i = 1, m%np
+ mesh_derivative(i) = spline_eval_deriv(spl, m%r(i))
+ end do
+ call spline_end(spl)
+
+ case (MESH_FINITE_DIFF)
+ call fd_operator_apply(m%deriv, f, mesh_derivative)
+
+ case default
+ write(message(1),'("Illegal numerical derivative method in mesh_derivative: ",I1)') &
+ m%deriv_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end function mesh_derivative
+
+ function mesh_derivative2(m, f)
+ !-----------------------------------------------------------------------!
+ ! Returns the second derivate of f !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8) :: mesh_derivative2(m%np)
+
+ integer :: i
+ type(spline_t) :: spl
+
+ call push_sub("mesh_derivative2")
+
+ select case (m%deriv_method)
+ case (MESH_CUBIC_SPLINE)
+ call spline_null(spl)
+ call spline_init(spl, m%np, m%r, f, 3)
+ do i = 1, m%np
+ mesh_derivative2(i) = spline_eval_deriv2(spl, m%r(i))
+ end do
+ call spline_end(spl)
+
+ case (MESH_FINITE_DIFF)
+ call fd_operator_apply(m%deriv2, f, mesh_derivative2)
+
+ case default
+ write(message(1),'("Illegal numerical derivative method in mesh_derivative2: ",I1)') &
+ m%deriv_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end function mesh_derivative2
+
+ function mesh_derivative3(m, f)
+ !-----------------------------------------------------------------------!
+ ! Returns the third derivate of f !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8) :: mesh_derivative3(m%np)
+
+ integer :: i
+ type(spline_t) :: spl
+
+ call push_sub("mesh_derivative3")
+
+ select case (m%deriv_method)
+ case (MESH_CUBIC_SPLINE)
+ call spline_null(spl)
+ call spline_init(spl, m%np, m%r, mesh_derivative(m, f), 3)
+ do i = 1, m%np
+ mesh_derivative3(i) = spline_eval_deriv2(spl, m%r(i))
+ end do
+ call spline_end(spl)
+
+ case (MESH_FINITE_DIFF)
+ call fd_operator_apply(m%deriv3, f, mesh_derivative3)
+
+ case default
+ write(message(1),'("Illegal numerical derivative method in mesh_derivative3: ",I1)') &
+ m%deriv_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end function mesh_derivative3
+
+ function mesh_integrate(m, f, a, b, dv)
+ !-----------------------------------------------------------------------!
+ ! Returns the integral of f between a and b. Default values for a and b !
+ ! are 0 and the last point of the mesh. !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ ! a - lower bound of the integration interval !
+ ! b - upper bound of the integration interval !
+ ! dv - volume element for integration. Default is r**2 !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8), intent(in), optional :: a, b, dv(m%np)
+ real(R8) :: mesh_integrate
+
+ real(R8) :: a_, b_, dv_(m%np)
+ type(spline_t) :: spl
+
+ call push_sub("mesh_integrate")
+
+ if (present(a)) then
+ a_ = a
+ else
+ a_ = M_ZERO
+ end if
+
+ if (present(b)) then
+ b_ = b
+ else
+ b_ = m%r(m%np)
+ end if
+
+ if (present(dv)) then
+ dv_ = dv
+ else
+ dv_ = m%r**2
+ end if
+
+ select case (m%integ_method)
+ case (MESH_CUBIC_SPLINE)
+ call spline_null(spl)
+ call spline_init(spl, m%np, m%r, f*dv_, 3)
+ if (a_ < m%r(1)) then
+ mesh_integrate = polynomial_extrapolative_integration(4, m%r(1:4), f(1:4)*dv_(1:4), a_, m%r(1))
+ a_ = m%r(1)
+ else
+ mesh_integrate = M_ZERO
+ end if
+ mesh_integrate = mesh_integrate + spline_eval_integ(spl, a_, b_)
+ call spline_end(spl)
+
+ case default
+ write(message(1),'("Illegal numerical integration method in mesh_integrate: ",I1)') &
+ m%integ_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end function mesh_integrate
+
+ function mesh_primitive(m, f, dv)
+ !-----------------------------------------------------------------------!
+ ! Returns the primitive of f. !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ ! dv - volume element for integration. Default is r**2 !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8), intent(in), optional :: dv(m%np)
+ real(R8) :: mesh_primitive(m%np)
+
+ integer :: i
+ real(R8) :: dv_(m%np)
+ type(spline_t) :: spl
+
+ call push_sub("mesh_primitive")
+
+ if (present(dv)) then
+ dv_ = dv
+ else
+ dv_ = m%r**2
+ end if
+
+ select case (m%integ_method)
+ case (MESH_CUBIC_SPLINE)
+ call spline_null(spl)
+ call spline_init(spl, m%np, m%r, f*dv_, 3)
+ mesh_primitive(1) = polynomial_extrapolative_integration(4, m%r(1:4), f(1:4)*dv_(1:4), M_ZERO, m%r(1))
+ do i = 2, m%np
+ mesh_primitive(i) = mesh_primitive(i-1) + spline_eval_integ(spl, m%r(i-1), m%r(i))
+ end do
+ call spline_end(spl)
+
+ case default
+ write(message(1),'("Illegal numerical integration method in mesh_primitive: ",I1)') &
+ m%integ_method
+ call write_fatal(1)
+ end select
+
+ call pop_sub()
+ end function mesh_primitive
+
+ function mesh_gradient(m, f)
+ !-----------------------------------------------------------------------!
+ ! Returns the gradient of f !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8) :: mesh_gradient(m%np)
+
+ call push_sub("mesh_gradient")
+
+ mesh_gradient = mesh_derivative(m, f)
+
+ call pop_sub()
+ end function mesh_gradient
+
+ function mesh_divergence(m, f)
+ !-----------------------------------------------------------------------!
+ ! Returns the divergence of f !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8) :: mesh_divergence(m%np)
+
+ call push_sub("mesh_divergence")
+
+ mesh_divergence = M_TWO/m%r*f + mesh_derivative(m, f)
+
+ call pop_sub()
+ end function mesh_divergence
+
+ function mesh_laplacian(m, f)
+ !-----------------------------------------------------------------------!
+ ! Returns the laplacian of f !
+ ! !
+ ! m - mesh !
+ ! f - values of the function on mesh !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f(m%np)
+ real(R8) :: mesh_laplacian(m%np)
+
+ call push_sub("mesh_laplacian")
+
+ mesh_laplacian = M_TWO/m%r*mesh_derivative(m, f) + mesh_derivative2(m, f)
+
+ call pop_sub()
+ end function mesh_laplacian
+
+ subroutine mesh_output_params(m, unit, verbose_limit)
+ !-----------------------------------------------------------------------!
+ ! Writes the mesh input options and the mesh paremeters in a nice !
+ ! readable format. If a unit number is provided, it writes it to a file !
+ ! otherwise it writes it to the standard output. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ integer, intent(in), optional :: unit, verbose_limit
+
+ call push_sub("mesh_output_params")
+
+ ASSERT(m%type /= 0)
+
+ message(1) = ""
+ message(2) = "Mesh information:"
+ select case (m%type)
+ case (MESH_LINEAR)
+ message(3) = " Type: linear"
+ case (MESH_LOG1)
+ message(3) = " Type: logarithmic [ri = b*exp(a*i)]"
+ case (MESH_LOG2)
+ message(3) = " Type: logarithmic [ri = b*(exp(a*i) - 1)]"
+ end select
+ write(message(4), '(" Mesh starting point: ",ES8.2E2,1X,A)') m%r(1)/units_out%length%factor, trim(units_out%length%abbrev)
+ write(message(5), '(" Mesh outmost point: ",F7.3,1X,A)') m%r(m%np)/units_out%length%factor, trim(units_out%length%abbrev)
+ write(message(6), '(" Mesh parameters (a, b): ",ES12.5E2,", ",ES12.5E2)') m%a, m%b
+ write(message(7), '(" Mesh number of points: ",I5)') m%np
+ select case (m%deriv_method)
+ case (MESH_CUBIC_SPLINE)
+ message(8) = " Derivatives Method: Cubic slines"
+ case (MESH_FINITE_DIFF)
+ write(message(8), '(" Derivatives Method: Finite differences (order = ",I2,")")') m%fd_order
+ end select
+
+ if (present(unit)) then
+ call write_info(8, unit=unit)
+ else
+ if (present(verbose_limit)) then
+ call write_info(8, verbose_limit)
+ else
+ call write_info(8)
+ end if
+ end if
+
+ call pop_sub()
+ end subroutine mesh_output_params
+
+ subroutine mesh_end(m)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to the mesh object m. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(inout) :: m
+
+ call push_sub("mesh_end")
+
+ m%type = 0
+ m%a = M_ZERO
+ m%b = M_ZERO
+ m%np = 0
+ m%intrp_method = 0
+ m%interp_range = 0
+ m%deriv_method = 0
+ m%integ_method = 0
+ if (associated(m%r)) then
+ deallocate(m%r)
+ end if
+ m%fd_order = 0
+ call fd_operator_end(m%deriv)
+ call fd_operator_end(m%deriv2)
+ call fd_operator_end(m%deriv3)
+
+ call pop_sub()
+ end subroutine mesh_end
+
+end module mesh_m
diff --git a/src/messages.F90 b/src/messages.F90
new file mode 100644
index 0000000..1225fbd
--- /dev/null
+++ b/src/messages.F90
@@ -0,0 +1,305 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: messages.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module messages_m
+ use global_m
+ use oct_parser_m
+ use utilities_m
+ implicit none
+
+
+ !---Global Variables---!
+
+ !Default unit numbers
+ integer :: stderr = 0
+ integer :: stdin = 5
+ integer :: stdout = 6
+
+ !Array were the messages are stored
+ character(len=80) :: message(200)
+
+ !The verbosity level
+ integer :: verbose = 0
+
+ !Verbosity levels of warning and normal messages
+ integer, parameter :: WARNING = 0, &
+ NORMAL = 10, &
+ DEBUG = 1000
+
+ !Debug stuff
+ integer, parameter :: M_STACK_SIZE = 50
+ character(len=40) :: sub_stack(M_STACK_SIZE)
+ real(r8) :: time_stack(M_STACK_SIZE)
+ integer :: no_sub_stack = 0
+
+ integer, public :: s_epoch_sec, s_epoch_usec
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: messages_init, &
+ message, &
+ write_fatal, &
+ write_warning, &
+ write_info, &
+ print_date, &
+ push_sub, &
+ pop_sub, &
+ assert_die, &
+ stderr, &
+ stdin, &
+ stdout
+
+contains
+
+ subroutine messages_init()
+ !-----------------------------------------------------------------------!
+ ! Initializes the messages: gets the init time, the vervose level and !
+ ! checks if the code is in debug mode or not. !
+ !-----------------------------------------------------------------------!
+
+ ! Get epoch time
+ call sys_gettimeofday(s_epoch_sec, s_epoch_usec)
+
+ !Read verbose
+ call oct_parse_int('Verbose', 0, verbose)
+
+ !Are we in debug mode?
+ if (verbose >= DEBUG) then
+ in_debug_mode = .true.
+ else
+ in_debug_mode = .false.
+ end if
+
+ end subroutine messages_init
+
+ subroutine write_fatal(no_lines)
+ !-----------------------------------------------------------------------!
+ ! Writes a message and stops the programm. !
+ ! !
+ ! no_lines - number of lines to write !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: no_lines
+
+ integer :: i
+
+ write(stderr,'(//"Fatal Error (description follows)")')
+ do i = 1, no_lines
+ write(stderr,'(2X, A)') trim(message(i))
+ end do
+ write(stderr,*)
+ stop
+
+ end subroutine write_fatal
+
+ subroutine write_warning(no_lines)
+ !-----------------------------------------------------------------------!
+ ! If the verbosity level is greater than the WARNING level it writes a !
+ ! warning message. !
+ ! !
+ ! no_lines - number of lines to write !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: no_lines
+
+ integer :: i
+
+ if (verbose > WARNING) then
+ do i = 1, no_lines
+ write(stdout, '(A)') "Warning: "//trim(message(i))
+ end do
+ end if
+
+ end subroutine write_warning
+
+ subroutine write_info(no_lines, verbose_limit, unit)
+ !-----------------------------------------------------------------------!
+ ! If the verbosity level is greater than the NORMAL level it writes a !
+ ! message. !
+ ! !
+ ! no_lines - number of lines to write !
+ ! verbose_limit - if present, only writes the message if the verbosity !
+ ! level is greater than the verbose_limit !
+ ! unit - if present, writes the message to unit, instead of !
+ ! stdout, without taking into account the verbosity. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: no_lines
+ integer, intent(in), optional :: verbose_limit
+ integer, intent(in), optional :: unit
+
+ integer :: i
+
+ if (present(unit)) then
+ do i = 1, no_lines
+ write(unit, '(A)') trim(message(i))
+ end do
+ else
+ if (verbose > NORMAL) then
+ do i = 1, no_lines
+ if (.not.present(verbose_limit)) then
+ write(stdout, '(A)') trim(message(i))
+ else if (verbose > verbose_limit) then
+ write(stdout, '(A)') trim(message(i))
+ end if
+ end do
+ end if
+ end if
+
+ end subroutine write_info
+
+ subroutine assert_die(s, f, l)
+ !-----------------------------------------------------------------------!
+ ! Write a message about a failed assertion and stops the program. !
+ ! !
+ ! s - failed assertion !
+ ! f - number of the line where the assertion failed !
+ ! l - name of the file where the assertion failed !
+ !-----------------------------------------------------------------------!
+ character(len=*), intent(in) :: s, f
+ integer, intent(in) :: l
+
+ write(message(1), '(2a)') 'Assertion "', trim(s)
+ write(message(2), '(a,i5)') 'failed in line ', l
+ write(message(3), '(3a)') 'in file "', f, '"'
+ call write_fatal(3)
+
+ end subroutine assert_die
+
+ subroutine print_date(str)
+ !-----------------------------------------------------------------------!
+ ! Prints a string followed by the date and time. The format is the !
+ ! following: " 'str' YYYY/MM/DD at HH:MM " !
+ ! !
+ ! str - string to be written !
+ !-----------------------------------------------------------------------!
+ character(len = *), intent(in) :: str
+
+ integer :: val(8)
+
+ call date_and_time(values=val)
+ message(1) = ""
+ write(message(3),'(a,i4,a1,i2.2,a1,i2.2,a,i2.2,a1,i2.2,a1,i2.2)') &
+ str , val(1), "/", val(2), "/", val(3), &
+ " at ", val(5), ":", val(6), ":", val(7)
+ message(2) = str_center(trim(message(3)), 70)
+ message(3) = ""
+ call write_info(3)
+
+ end subroutine print_date
+
+ subroutine time_diff(sec1, usec1, sec2, usec2)
+ !-----------------------------------------------------------------------!
+ ! Computes t2 <- t2-t1. sec1,2 and usec1,2 are seconds, microseconds of !
+ ! t1,2 !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: sec1, usec1
+ integer, intent(inout) :: sec2, usec2
+
+ ! Correct overflow.
+ if(usec2 - usec1 < 0) then
+ usec2 = 1000000 + usec2
+ if(sec2 >= sec1) then
+ sec2 = sec2-1
+ end if
+ end if
+
+ ! Replace values.
+ if(sec2 >= sec1) then
+ sec2 = sec2-sec1
+ end if
+ usec2 = usec2-usec1
+
+ end subroutine time_diff
+
+ subroutine push_sub(sub_name)
+ !-----------------------------------------------------------------------!
+ ! This routine should be called at the very beginning of other !
+ ! subroutines. When runnint in debug mode it prints the name of the !
+ ! subroutine, the time and the memory used. !
+ ! It also places the name of the subroutine in a stack. The stack is !
+ ! used by subroutine pop_sub. !
+ ! !
+ ! sub_name - string with the name of the subroutine. !
+ !-----------------------------------------------------------------------!
+ character(len=*), intent(in) :: sub_name
+
+ integer i, sec, usec
+
+ if (verbose < DEBUG) return
+
+ call sys_gettimeofday(sec, usec)
+ call time_diff(s_epoch_sec, s_epoch_usec, sec, usec)
+
+ no_sub_stack = no_sub_stack + 1
+ if(no_sub_stack > 49) then
+ sub_stack(M_STACK_SIZE) = 'push_sub'
+ write(message(1),"('Too many recursion levels (max=)',I3)"), M_STACK_SIZE
+ call write_fatal(1)
+ else
+ sub_stack(no_sub_stack) = trim(sub_name)
+ time_stack(no_sub_stack) = sys_clock()
+
+ write(stderr,'(a,i6,a,i6.6,f12.6,i8, a)', advance='no') "* I ", &
+ sec,'.',usec, &
+ sys_clock()/1e6_r8, &
+ sys_getmem(), " | "
+ do i = no_sub_stack-1, 1, -1
+ write(stderr,'(a)', advance='no') "..|"
+ end do
+ write(stderr,'(a)') trim(sub_name)
+ end if
+
+ end subroutine push_sub
+
+ subroutine pop_sub()
+ !-----------------------------------------------------------------------!
+ ! This routine should be called at the very end of other subroutines. !
+ ! When running in debug mode it prints the name of the last subroutine !
+ ! in the stack, the time, the time spent and the memory used. !
+ !-----------------------------------------------------------------------!
+ integer i, sec, usec
+
+ if (verbose < DEBUG) return
+
+ call sys_gettimeofday(sec, usec)
+ call time_diff(s_epoch_sec, s_epoch_usec, sec, usec)
+
+ if(no_sub_stack > 0) then
+ write(stderr,'(a,i6,a,i6.6,f12.6,i8, a)', advance='no') "* O ", &
+ sec,'.',usec, &
+ (sys_clock()-time_stack(no_sub_stack))/1e6_r8, &
+ sys_getmem(), " | "
+ do i = no_sub_stack-1, 1, -1
+ write(stderr,'(a)', advance='no') "..|"
+ end do
+ write(stderr,'(a)') trim(sub_stack(no_sub_stack))
+
+ no_sub_stack = no_sub_stack - 1
+ else
+ no_sub_stack = 1
+ sub_stack(1) = 'pop_sub'
+ message(1) = 'Too few recursion levels'
+ call write_fatal(1)
+ end if
+
+ end subroutine pop_sub
+
+end module messages_m
diff --git a/src/mixing.F90 b/src/mixing.F90
new file mode 100644
index 0000000..e11ff13
--- /dev/null
+++ b/src/mixing.F90
@@ -0,0 +1,347 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! This module was originaly written by A. Castro and M. Oliveira
+!! for the Octopus program.
+!!
+!! $Id: mixing.F90 778 2013-07-11 15:49:39Z micael $
+
+module mixing_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use linalg_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type mixing_t
+ private
+ integer :: scheme
+ real(R8) :: alpha ! vnew = (1-alpha)*vin + alpha*vout
+ integer :: nsteps ! number of steps used to extrapolate the new vector
+ integer :: last_ipos
+ integer :: np
+ real(R8), pointer :: df(:,:)
+ real(R8), pointer :: dv(:,:)
+ real(R8), pointer :: f_old(:)
+ real(R8), pointer :: vin_old(:)
+ end type mixing_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: MIX_LINEAR = 1, &
+ MIX_BROYDEN = 2
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: mixing_t, &
+ mixing_null, &
+ mixing_init, &
+ mixing_end, &
+ mixing, &
+ MIX_LINEAR, &
+ MIX_BROYDEN
+
+contains
+
+ subroutine mixing_null(mix)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of mix. !
+ !-----------------------------------------------------------------------!
+ type(mixing_t), intent(out) :: mix
+
+ call push_sub("mixing_null")
+
+ mix%scheme = 0
+ mix%alpha = M_ZERO
+ mix%nsteps = 0
+ mix%last_ipos = 0
+ mix%np = 0
+ nullify(mix%df)
+ nullify(mix%dv)
+ nullify(mix%f_old)
+ nullify(mix%vin_old)
+
+ call pop_sub()
+ end subroutine mixing_null
+
+ subroutine mixing_init(mix, np)
+ !-----------------------------------------------------------------------!
+ ! Reads mixing parameters from the input file. If using the Broyden !
+ ! mixing, it also allocates arrays to store information from previous !
+ ! iterations needed for the extrapolation. !
+ ! !
+ ! mix - mixing object !
+ ! np - dimension of the vectors !
+ !-----------------------------------------------------------------------!
+ type(mixing_t), intent(inout) :: mix
+ integer, intent(in) :: np
+
+ call push_sub("mixing_init")
+
+ !Read and check input parameters
+ call oct_parse_int("MixingScheme", MIX_BROYDEN, mix%scheme)
+ if(mix%scheme < 1 .or. mix%scheme > 2) then
+ message(1) = 'Illegal MixingScheme.'
+ call write_fatal(1)
+ end if
+
+ call oct_parse_float("Mixing", 0.3_r8, mix%alpha)
+ if(mix%alpha <= M_ZERO .or. mix%alpha > M_ONE) then
+ write(message(1), '(a, f14.6,a)') "Input: '", mix%alpha, "' is not a valid Mixing"
+ message(2) = '(0 < Mixing <= 1)'
+ call write_fatal(2)
+ end if
+
+ if (mix%scheme == MIX_BROYDEN) then
+ call oct_parse_int("MixingSteps", 3, mix%nsteps)
+ if(mix%nsteps <= 1) then
+ write(message(1),'("Input: ",I4," is not a valid MixingSteps")') mix%nsteps
+ message(2) = '(1 < MixingSteps)'
+ call write_fatal(2)
+ end if
+ end if
+
+ if (mix%scheme == MIX_BROYDEN) then
+ !Allocate memory
+ allocate(mix%df(np, mix%nsteps), mix%dv(np, mix%nsteps), &
+ mix%vin_old(np), mix%f_old(np))
+ mix%df = M_ZERO
+ mix%vin_old = M_ZERO
+ mix%dv = M_ZERO
+ mix%f_old = M_ZERO
+ end if
+ mix%last_ipos = 0
+ mix%np = np
+
+ !Output input info
+ select case (mix%scheme)
+ case (MIX_LINEAR)
+ message(1) = " Mixing scheme: Linear Mixing"
+ case (MIX_BROYDEN)
+ message(1) = " Mixing scheme: Modified Broyden's Method"
+ end select
+ write(message(2),'(" Mixing: ",F5.3)') mix%alpha
+ call write_info(2,20)
+
+ call pop_sub()
+ end subroutine mixing_init
+
+ subroutine mixing_end(mix)
+ !-----------------------------------------------------------------------!
+ ! Deallocates all the memory associated with the mixing object. !
+ !-----------------------------------------------------------------------!
+ type(mixing_t), intent(inout) :: mix
+
+ call push_sub("mixing_end")
+
+ if (associated(mix%df)) deallocate(mix%df)
+ if (associated(mix%dv)) deallocate(mix%dv)
+ if (associated(mix%vin_old)) deallocate(mix%vin_old)
+ if (associated(mix%f_old)) deallocate(mix%f_old)
+
+ call pop_sub()
+ end subroutine mixing_end
+
+ subroutine mixing(mix, iter, vin, vout, vnew)
+ !-----------------------------------------------------------------------!
+ ! Driver routine that calls the appropriate extrapolation routine. !
+ ! !
+ ! mix - mixing object !
+ ! iter - iteration number !
+ ! np - dimension of the vectors !
+ ! vin - input vector from the current iteration !
+ ! vout - output vector from the current iteration !
+ ! vnew - extrapolated vector to be used as the input vector for the !
+ ! next iteration !
+ !-----------------------------------------------------------------------!
+ type(mixing_t), intent(inout) :: mix
+ integer, intent(in) :: iter
+ real(R8), intent(in) :: vin(mix%np), vout(mix%np)
+ real(R8), intent(out) :: vnew(mix%np)
+
+ call push_sub("mixing")
+
+ !Check the iteration number
+ if (iter < 1) then
+ message(1) = 'Wrong number of iterations in suboutine mixing.'
+ call write_fatal(1)
+ end if
+
+ !Call the appropriate extrapolation routine
+ select case (mix%scheme)
+ case (MIX_LINEAR)
+ call mixing_linear(mix%alpha, mix%np, vin, vout, vnew)
+ case (MIX_BROYDEN)
+ call mixing_broyden(mix, vin, vout, vnew, iter)
+ end select
+
+ call pop_sub()
+ end subroutine mixing
+
+ subroutine mixing_linear(alpha, np, vin, vout, vnew)
+ !-----------------------------------------------------------------------!
+ ! Performs the linear mixing. !
+ ! !
+ ! alpha - mixing parameter (vnew = alpha*vout + (1-alpha)*vin) !
+ ! np - dimension of the vectors !
+ ! vin - input vector from the current iteration !
+ ! vout - output vector from the current iteration !
+ ! vnew - extrapolated vector to be used as the input vector for the !
+ ! next iteration !
+ !-----------------------------------------------------------------------!
+ real(r8), intent(in) :: alpha
+ integer, intent(in) :: np
+ real(R8), intent(in) :: vin(np), vout(np)
+ real(R8), intent(out) :: vnew(np)
+
+ call push_sub("mixing_linear")
+
+ vnew = alpha*vout + (M_ONE - alpha)*vin
+
+ call pop_sub()
+ end subroutine mixing_linear
+
+ subroutine mixing_broyden(mix, vin, vout, vnew, iter)
+ !-----------------------------------------------------------------------!
+ ! Modified Broyden second method. !
+ ! This routines stores the information needed for future extrapolations !
+ ! and calls the extrapolation routine. !
+ ! !
+ ! mix - mixing object !
+ ! iter - iteration number !
+ ! np - dimension of the vectors !
+ ! vin - input vector from the current iteration !
+ ! vout - output vector from the current iteration !
+ ! vnew - extrapolated vector to be used as the input vector for the !
+ ! next iteration !
+ !-----------------------------------------------------------------------!
+ type(mixing_t), intent(inout) :: mix
+ integer, intent(in) :: iter
+ real(R8), intent(in) :: vin(mix%np), vout(mix%np)
+ real(R8), intent(out) :: vnew(mix%np)
+
+ integer :: ipos, iter_used
+ real(r8) :: gamma
+ real(R8), allocatable :: f(:)
+
+ call push_sub("mixing_broyden")
+
+ allocate(f(mix%np))
+ f = vout - vin
+ if(iter > 1) then
+ !Store df and dv from current iteration
+ ipos = mod(mix%last_ipos, mix%nsteps) + 1
+
+ mix%df(:, ipos) = f - mix%f_old
+ mix%dv(:, ipos) = vin - mix%vin_old
+
+ gamma = sqrt(dot_product(mix%df(:, ipos), mix%df(:, ipos)))
+ if(gamma > 1e-8_r8) then
+ gamma = M_ONE/gamma
+ else
+ gamma = M_ONE
+ endif
+ mix%df(:, ipos) = mix%df(:, ipos)*gamma
+ mix%dv(:, ipos) = mix%dv(:, ipos)*gamma
+
+ mix%last_ipos = ipos
+ end if
+
+ !Store residual and vin for next iteration
+ mix%vin_old = vin
+ mix%f_old = f
+
+ !Extrapotate new vector
+ iter_used = min(iter - 1, mix%nsteps)
+ call broyden_extrapolation(mix%alpha, mix%np, vin, vout, vnew, iter_used, f, &
+ mix%df(:, 1:iter_used), mix%dv(:, 1:iter_used))
+
+ deallocate(f)
+
+ call pop_sub()
+ end subroutine mixing_broyden
+
+ subroutine broyden_extrapolation(alpha, np, vin, vout, vnew, iter_used, f, df, dv)
+ !-----------------------------------------------------------------------!
+ ! Performs the Broyden extrapolation. !
+ ! !
+ ! alpha - mixing parameter for the linear terms !
+ ! np/nc - dimensions of the vectors !
+ ! vin - input vector from the current iteration !
+ ! vout - output vector from the current iteration !
+ ! vnew - extrapolated vector to be used as the input vector for the !
+ ! next iteration !
+ !-----------------------------------------------------------------------!
+ real(r8), intent(in) :: alpha
+ integer, intent(in) :: np, iter_used
+ real(r8), intent(in) :: vin(np), vout(np), f(np), df(np, iter_used), dv(np, iter_used)
+ real(r8), intent(out) :: vnew(np)
+
+ real(r8), parameter :: w0 = M_CENT
+
+ integer :: i, j
+ real(r8) :: beta(iter_used, iter_used), gamma, work(iter_used), w(iter_used)
+
+ call push_sub("broyden_extrapolation")
+
+ if (iter_used <= 2) then
+ !Linear mixing
+ vnew = alpha*vout + (M_ONE - alpha)*vin
+ return
+ end if
+
+ w = M_FIVE
+
+ !Compute matrix beta
+ beta = M_ZERO
+ do i = 1, iter_used
+ do j = i + 1, iter_used
+ beta(i, j) = w(i)*w(j)*dot_product(df(:, j), df(:, i))
+ beta(j, i) = beta(i, j)
+ end do
+ beta(i, i) = w0**2 + w(i)**2
+ end do
+
+ !Invert matrix beta
+ call matrix_invert(iter_used, beta)
+
+ do i = 1, iter_used
+ work(i) = dot_product(df(:, i), f(:))
+ end do
+
+ !Linear mixing term
+ vnew = vin + alpha*f
+
+ !Other terms
+ do i = 1, iter_used
+ gamma = M_ZERO
+ do j = 1, iter_used
+ gamma = gamma + beta(j, i)*w(j)*work(j)
+ end do
+ vnew = vnew - w(i)*gamma*(alpha*df(:, i) + dv(:, i))
+ end do
+
+ call pop_sub()
+ end subroutine broyden_extrapolation
+
+end module mixing_m
diff --git a/src/mrpp.F90 b/src/mrpp.F90
new file mode 100644
index 0000000..06fb715
--- /dev/null
+++ b/src/mrpp.F90
@@ -0,0 +1,265 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: mrpp.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module multireference_m
+ use global_m
+ use messages_m
+ use utilities_m
+ use output_m
+ use multiroot_m
+ use mesh_m
+ use quantum_numbers_m
+ use potentials_m
+ use wave_equations_m
+ use troullier_martins_m
+ use multireference_equations_m
+ implicit none
+
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: mrpp_gen
+
+contains
+
+ subroutine mrpp_gen(qn0, qn1, ev0, ev1, wave_eq, rel, tol, m, ae_potential, &
+ rc, integrator, ps_v, ps_wf0, ps_wf0p, ps_wf1, ps_wf1p)
+ !-----------------------------------------------------------------------!
+ ! Generates the pseudo wave-functions and the corresponding !
+ ! pseudo-potential using the Multireference Pseudo-potentials scheme. !
+ ! !
+ ! qn0 - quantum numbers of semi-core state !
+ ! qn1 - quantum numbers of valence state !
+ ! ev0 - eigenvalue of semi-core state !
+ ! ev1 - eigenvalue of valence state !
+ ! wave_eq - wave equation to use !
+ ! rel - if true, use the relativistic extension to the scheme !
+ ! tol - tolerance !
+ ! m - mesh !
+ ! ae_potential - all-electron potential !
+ ! rc - cutoff radius !
+ ! integrator - integrator object !
+ ! ps_v - pseudo-potential on the mesh !
+ ! ps_wf0 - semi-core all-electron/pseudo wavefunction !
+ ! ps_wf0p - semi-core all-electron/pseudo wavefunction derivative !
+ ! ps_wf1 - valence all-electron/pseudo wavefunction !
+ ! ps_wf1p - valence all-electron/pseudo wavefunction derivative !
+ ! !
+ ! On input qn, ps_f and ps_g contain the all-electron quantum-numbers !
+ ! and wavefunctions and on exit the pseudo wavefunctions and quantum !
+ ! numbers. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(inout) :: qn0, qn1
+ real(R8), intent(in) :: ev0, ev1
+ integer, intent(in) :: wave_eq
+ logical, intent(in) :: rel
+ real(R8), intent(in) :: tol
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: ae_potential
+ real(R8), intent(in) :: rc
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(out) :: ps_v(m%np)
+ real(R8), intent(inout) :: ps_wf0(:,:) ! ps_wf0(m%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wf0p(:,:) ! ps_wf0p(m%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wf1(:,:) ! ps_wf1(m%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wf1p(:,:) ! ps_wf1p(m%np, qn_wf_dim(qn))
+
+ integer :: wf_dim, i
+ real(R8) :: wf0_rc, wf0p_rc, wf1_rc, norm0
+ real(R8) :: rhs(9), c(9)
+ real(R8), allocatable :: ae_wf0(:,:), ae_wf0p(:,:)
+ real(R8), allocatable :: ae_wf1(:,:), ae_wf1p(:,:)
+ type(mesh_t) :: mrc
+
+ call push_sub("mrpp_gen")
+
+ !
+ call mesh_null(mrc)
+
+ !Write core radii
+ write(message(1),'(4x,"Core radius:",1x,f7.3)') rc
+ call write_info(1,20)
+ call write_info(1,unit=info_unit("pp"))
+
+ !Copy all-electron wavefunctions
+ wf_dim = qn_wf_dim(qn0)
+ allocate(ae_wf0(m%np, wf_dim), ae_wf0p(m%np, wf_dim))
+ allocate(ae_wf1(m%np, wf_dim), ae_wf1p(m%np, wf_dim))
+ ae_wf0 = ps_wf0
+ ae_wf0p = ps_wf0p
+ ae_wf1 = ps_wf1
+ ae_wf1p = ps_wf1p
+
+ !Semi-core wavefunctions and norm at rc
+ wf0_rc = rc*mesh_extrapolate(m, ae_wf0(:,1), rc)
+ wf0p_rc = rc*mesh_extrapolate(m, ae_wf0p(:,1), rc) + wf0_rc/rc
+ if (wf0_rc < M_ZERO) then
+ ae_wf0 = -ae_wf0
+ ae_wf0p = -ae_wf0p
+ wf0_rc = -wf0_rc
+ wf0p_rc = -wf0p_rc
+ end if
+ if (rel) then
+ norm0 = mesh_integrate(m, sum(ae_wf0**2,dim=2), b=rc)
+ else
+ select case (wave_eq)
+ case (SCHRODINGER, SCALAR_REL)
+ norm0 = mesh_integrate(m, ae_wf0(:,1)**2, b=rc)
+ case (DIRAC)
+ norm0 = mesh_integrate(m, ae_wf0(:,1)**2, b=rc) + mesh_integrate(m, ae_wf0(:,2)**2)
+ end select
+ end if
+
+ !Valence wavefunctions at rc
+ wf1_rc = rc*mesh_extrapolate(m, ae_wf1(:,1), rc)
+
+ !Get right hand side of equations to solve
+ call tm_equations_rhs(m, rc, rel, qn0, ev0, wf0_rc, wf0p_rc, norm0, ae_potential, rhs(1:7))
+ rhs(8) = wf1_rc
+ rhs(9) = M_ZERO
+
+ !New mesh
+ mrc = m
+ call mesh_truncate(mrc, rc)
+
+ !Set the quantum numbers to their correct value
+ qn0%n = qn0%l + 1
+ qn1%n = qn1%l + 2
+
+ !Solve the system of equations
+ call mrpp_solve_system(m, mrc, .false., wave_eq, integrator, ae_potential,&
+ rc, qn0, qn1, ev0, ev1, rhs, tol, c, ps_wf0(1:mrc%np,:), &
+ ps_wf0p(1:mrc%np,:), ps_wf1(1:mrc%np,:), ps_wf1p(1:mrc%np,:), ps_v(1:mrc%np))
+
+ !Compute the pseudo-wavefunction and the pseudopotential
+ ps_wf0(mrc%np:m%np,1:wf_dim) = ae_wf0(mrc%np:m%np,1:wf_dim)
+ ps_wf0p(mrc%np:m%np,1:wf_dim) = ae_wf0p(mrc%np:m%np,1:wf_dim)
+ ps_wf1(mrc%np:m%np,1:wf_dim) = ae_wf1(mrc%np:m%np,1:wf_dim)
+ ps_wf1p(mrc%np:m%np,1:wf_dim) = ae_wf1p(mrc%np:m%np,1:wf_dim)
+ if (wave_eq == DIRAC .and. .not. rel) then
+ ps_wf0(mrc%np:m%np,2) = M_ZERO
+ ps_wf0p(mrc%np:m%np,2) = M_ZERO
+ ps_wf1(mrc%np:m%np,2) = M_ZERO
+ ps_wf1p(mrc%np:m%np,2) = M_ZERO
+ end if
+ do i = mrc%np, m%np
+ ps_v(i) = v(ae_potential, m%r(i), qn0)
+ end do
+
+ !Free memory
+ deallocate(ae_wf0, ae_wf0p, ae_wf1, ae_wf1p)
+ call mesh_end(mrc)
+
+ call pop_sub()
+ end subroutine mrpp_gen
+
+ subroutine mrpp_solve_system(m, mrc, rel, wave_eq, integrator, ae_potential,&
+ rc, qn0, qn1, ev0, ev1, rhs, tol, c, &
+ ps_wf0, ps_wf0p, ps_wf1, ps_wf1p, ps_v)
+ !-----------------------------------------------------------------------!
+ ! Solve the MRPP set of non-linear equations. !
+ ! !
+ ! m - mesh !
+ ! mrc - truncated mesh !
+ ! rel - if true, use the relativistic extension to the scheme !
+ ! wave_eq - wave equation to use !
+ ! integrator - integrator object !
+ ! ae_potential - all-electron potential !
+ ! rc - cutoff radius !
+ ! qn0 - quantum numbers of semi-core state !
+ ! qn1 - quantum numbers of valence state !
+ ! ev0 - eigenvalue of semi-core state !
+ ! ev1 - eigenvalue of valence state !
+ ! rhs - right-hand side of equations !
+ ! tol - tolerance !
+ ! c - coeficients of the polynomial !
+ ! ps_wf0 - semi-core state pseudo wavefunction !
+ ! ps_wf0p - semi-core state pseudo wavefunction derivatives !
+ ! ps_wf1 - valence state pseudo wavefunction !
+ ! ps_wf1p - valence state pseudo wavefunction derivatives !
+ ! ps_v - pseudo-potential !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m, mrc
+ logical, intent(in) :: rel
+ integer, intent(in) :: wave_eq
+ type(integrator_t), intent(inout) :: integrator
+ type(potential_t), intent(in) :: ae_potential
+ type(qn_t), intent(in) :: qn0, qn1
+ real(R8), intent(in) :: rc, ev0, ev1, rhs(9), tol
+ real(R8), intent(out) :: c(9)
+ real(R8), intent(inout) :: ps_wf0(:,:) ! ps_wf0(mrc%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wf0p(:,:) ! ps_wf0p(mrc%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wf1(:,:) ! ps_wf1(mrc%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: ps_wf1p(:,:) ! ps_wf1p(mrc%np, qn_wf_dim(qn))
+ real(R8), intent(out) :: ps_v(mrc%np)
+
+ real(R8) :: ldd, cc(4), f(4)
+ type(multiroot_solver_t) :: mr_solver
+
+ call push_sub("mrpp_solve_system")
+
+ !Solve TM system: we will use it as a starting point
+ c = M_ZERO
+ call tm_solve_system(mrc, rc, rel, qn0, ev0, rhs(1:7), tol, c(1:7), ps_wf0, ps_wf0p, ps_v, .true.)
+
+ !Allocate memory
+ call mrpp_equations_init(m, mrc, rel, wave_eq, integrator, ae_potential, rc, qn0, qn1, ev0, ev1, rhs)
+
+ !Solve system
+ cc(1) = c(1)
+ cc(2:4) = c(7:9)
+ call multiroot_solver_init(4, M_ZERO, tol, M_ZERO, 300, BROYDEN, mr_solver)
+ call multiroot_solve_system(mr_solver, cc, mrpp_equations, mrpp_equations_write_info)
+
+ !Get the final coefficients
+ c(1) = cc(1)
+ c(7:9) = cc(2:4)
+ call mrpp_solve_linear_system(c)
+
+ !Compute the final pseudo-wavefunction and the pseudopotential
+ call mrpp_ps_wavefunctions(c, ps_wf0, ps_wf0p, ps_v, ldd, ps_wf1, ps_wf1p)
+
+ !Write final results
+ call mrpp_equations(4, cc, f)
+ write(message(1), '(4x,"Coefficients:")')
+ write(message(2), '(6x,"c0 =",1x,es16.9e2,3x,"c2 =",1x,es16.9e2)') c(1), c(2)
+ write(message(3), '(6x,"c4 =",1x,es16.9e2,3x,"c6 =",1x,es16.9e2)') c(3), c(4)
+ write(message(4), '(6x,"c8 =",1x,es16.9e2,3x,"c10 =",1x,es16.9e2)') c(5), c(6)
+ write(message(5), '(6x,"c12 =",1x,es16.9e2,3x,"c14 =",1x,es16.9e2)') c(7), c(8)
+ write(message(6), '(6x,"c16 =",1x,es16.9e2)') c(9)
+ write(message(7), '(4x,"Residues:")')
+ write(message(8), '(6X,"c2**2 + c4(2l+5) =",1x,ES16.9e2)') f(1)
+ write(message(9), '(6X,"norm_sc[AE] - norm_sc[PP] =",1x,ES16.9e2)') f(2)
+ write(message(10),'(6X,"R(rc)[AE] - R(rc)[PP] =",1x,ES16.9e2)') f(3)
+ write(message(11),'(6X,"R''/R(rc)[AE] - R''/R(rc)[PP] =",1x,ES16.9e2)') f(4)
+ message(12) = ""
+ call write_info(12,20)
+ call write_info(12,unit=info_unit("pp"))
+
+ !Free memory
+ call mrpp_equations_end()
+
+ call pop_sub()
+ end subroutine mrpp_solve_system
+
+end module multireference_m
diff --git a/src/mrpp_equations.F90 b/src/mrpp_equations.F90
new file mode 100644
index 0000000..7d83f77
--- /dev/null
+++ b/src/mrpp_equations.F90
@@ -0,0 +1,334 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: mrpp_equations.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module multireference_equations_m
+ use global_m
+ use messages_m
+ use mesh_m
+ use quantum_numbers_m
+ use potentials_m
+ use linalg_m
+ use wave_equations_m
+ implicit none
+
+
+ !---Global Variables---!
+
+ logical :: rel
+ integer :: wave_eq, wf_dim
+ real(R8) :: rc, ev0, ev1, rhs(9)
+ type(mesh_t) :: m, mrc
+ type(potential_t) :: ae_potential
+ type(integrator_t) :: integrator
+ type(qn_t) :: qn0, qn1
+
+ !Stuff to compute the polynomial
+ real(R8) :: p0_rc(8), p1_rc(8), p2_rc(8), p3_rc(8), p4_rc(8)
+
+ real(R8), allocatable :: p0_r(:,:), p1_r(:,:), p2_r(:,:)
+
+ !Work arrays
+ real(R8), allocatable :: ps_wf0(:,:), ps_wf0p(:,:), ps_wf1(:,:), ps_wf1p(:,:), ps_v(:)
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: mrpp_equations_init, &
+ mrpp_equations, &
+ mrpp_equations_end, &
+ mrpp_ps_wavefunctions, &
+ mrpp_solve_linear_system, &
+ mrpp_equations_write_info
+
+
+contains
+
+ subroutine mrpp_equations_init(mp, mrcp, relp, wave_eqp, integratorp, &
+ ae_potentialp, rcp, qn0p, qn1p, ev0p, ev1p, rhsp)
+ !-----------------------------------------------------------------------!
+ ! Initializes global data needed to solve the MRPP set of non-linear !
+ ! equations. !
+ ! !
+ ! mp - mesh !
+ ! mrcp - truncated mesh !
+ ! relp - if true, use the relativistic extension to the scheme!
+ ! wave_eqp - wave equation to use !
+ ! integratorp - integrator object !
+ ! ae_potentialp - all-electron potential !
+ ! rcp - cutoff radius !
+ ! qn0p - quantum numbers of semi-core state !
+ ! qn1p - quantum numbers of valence state !
+ ! ev0p - eigenvalue of semi-core state !
+ ! ev1p - eigenvalue of valence state !
+ ! rhsp - right-hand side of equations !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: mp, mrcp
+ logical, intent(in) :: relp
+ integer, intent(in) :: wave_eqp
+ type(integrator_t), intent(in) :: integratorp
+ type(potential_t), intent(in) :: ae_potentialp
+ type(qn_t), intent(in) :: qn0p, qn1p
+ real(R8), intent(in) :: rcp, ev0p, ev1p, rhsp(9)
+
+ integer :: i
+ real(R8), parameter :: FACTORS(8) = (/M_TWO, M_FOUR, M_SIX, M_EIGHT, M_TEN, &
+ M_TWELVE, M_FOURTEEN, M_SIXTEEN/)
+
+ !
+ call mesh_null(m)
+ call mesh_null(mrc)
+ call potential_null(ae_potential)
+
+ !
+ m = mp; mrc = mrcp
+ rel = relp
+ wave_eq = wave_eqp
+ integrator = integratorp
+ ae_potential = ae_potentialp
+ rc = rcp
+ qn0 = qn0p; qn1 = qn1p
+ ev0 = ev0p; ev1 = ev1p
+ rhs = rhsp
+
+ !Initialize stuff to compute the polynomial
+ allocate(p0_r(mrc%np, 9), p1_r(mrc%np, 9), p2_r(mrc%np, 9))
+
+ p0_r(:, 1) = mrc%r**2; p1_r(:, 1) = mrc%r; p2_r(:, 1) = M_ONE;
+ p0_r(:, 2) = mrc%r**4; p1_r(:, 2) = mrc%r**3; p2_r(:, 2) = mrc%r**2;
+ p0_r(:, 3) = mrc%r**6; p1_r(:, 3) = mrc%r**5; p2_r(:, 3) = mrc%r**4;
+ p0_r(:, 4) = mrc%r**8; p1_r(:, 4) = mrc%r**7; p2_r(:, 4) = mrc%r**6;
+ p0_r(:, 5) = mrc%r**10; p1_r(:, 5) = mrc%r**9; p2_r(:, 5) = mrc%r**8;
+ p0_r(:, 6) = mrc%r**12; p1_r(:, 6) = mrc%r**11; p2_r(:, 6) = mrc%r**10;
+ p0_r(:, 7) = mrc%r**14; p1_r(:, 7) = mrc%r**13; p2_r(:, 7) = mrc%r**12
+ p0_r(:, 8) = mrc%r**16; p1_r(:, 8) = mrc%r**15; p2_r(:, 8) = mrc%r**14
+
+ do i = 1, 8
+ p1_r(:, i) = p1_r(:, i)*FACTORS(i)
+ p2_r(:, i) = p2_r(:, i)*(FACTORS(i) - M_ONE)*FACTORS(i)
+ end do
+
+ p0_rc(1) = rc**2; p1_rc(1) = rc; p2_rc(1) = M_ONE; p3_rc(1) = M_ZERO; p4_rc(1) = M_ZERO
+ p0_rc(2) = rc**4; p1_rc(2) = rc**3; p2_rc(2) = rc**2; p3_rc(2) = rc; p4_rc(2) = M_ONE
+ p0_rc(3) = rc**6; p1_rc(3) = rc**5; p2_rc(3) = rc**4; p3_rc(3) = rc**3; p4_rc(3) = rc**2
+ p0_rc(4) = rc**8; p1_rc(4) = rc**7; p2_rc(4) = rc**6; p3_rc(4) = rc**5; p4_rc(4) = rc**4
+ p0_rc(5) = rc**10; p1_rc(5) = rc**9; p2_rc(5) = rc**8; p3_rc(5) = rc**7; p4_rc(5) = rc**6
+ p0_rc(6) = rc**12; p1_rc(6) = rc**11; p2_rc(6) = rc**10; p3_rc(6) = rc**9; p4_rc(6) = rc**8
+ p0_rc(7) = rc**14; p1_rc(7) = rc**13; p2_rc(7) = rc**12; p3_rc(7) = rc**11; p4_rc(7) = rc**10
+ p0_rc(8) = rc**16; p1_rc(8) = rc**15; p2_rc(8) = rc**14; p3_rc(8) = rc**13; p4_rc(8) = rc**12
+
+ p1_rc = p1_rc*FACTORS
+ p2_rc = p2_rc*(FACTORS - M_ONE)*FACTORS
+ p3_rc = p3_rc*(FACTORS - M_TWO)*(FACTORS - M_ONE)*FACTORS
+ p4_rc = p4_rc*(FACTORS - M_THREE)*(FACTORS - M_TWO)*(FACTORS - M_ONE)*FACTORS
+
+ !
+ wf_dim = qn_wf_dim(qn0)
+ allocate(ps_wf0(mrc%np, wf_dim), ps_wf0p(mrc%np, wf_dim))
+ allocate(ps_wf1(mrc%np, wf_dim), ps_wf1p(mrc%np, wf_dim))
+ allocate(ps_v(mrc%np))
+
+ end subroutine mrpp_equations_init
+
+ subroutine mrpp_equations(n, x, f_x)
+ !-----------------------------------------------------------------------!
+ ! For a given set of coefficients x, returns the difference f_x between !
+ ! the left-hand side and the right-hand side of the equations. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n)
+ real(R8), intent(out) :: f_x(n)
+
+ real(R8) :: xx(9), ldd
+
+ xx = M_ZERO
+ xx(1) = x(1)
+ xx(7:9) = x(2:4)
+
+ !Solve linear system
+ call mrpp_solve_linear_system(xx)
+
+ !Get the pseudopotential and the wavefunctions
+ call mrpp_ps_wavefunctions(xx, ps_wf0, ps_wf0p, ps_v, ldd, ps_wf1, ps_wf1p)
+
+ !Return the values we want to be zero
+ f_x(1) = (xx(2)**2 + (M_TWO*qn0%l + M_FIVE)*xx(3) - rhs(6))
+ if (rel) then
+ f_x(2) = mesh_integrate(mrc, sum(ps_wf0**2, dim=2), b=rc) - rhs(7)
+ else
+ f_x(2) = mesh_integrate(mrc, ps_wf0(:,1)**2, b=rc) - rhs(7)
+ end if
+ f_x(3) = ps_wf1(mrc%np,1)*rc - rhs(8)
+ f_x(4) = ldd - rhs(9)
+
+ end subroutine mrpp_equations
+
+ subroutine mrpp_solve_linear_system(c)
+ !-----------------------------------------------------------------------!
+ ! Solve the linear part of the system of equations. !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(inout) :: c(9)
+
+ real(R8) :: lsrhs(5), r(5,5)
+
+ lsrhs(1) = rhs(1) - sum(p0_rc(6:8)*c(7:9)) - c(1)
+ lsrhs(2) = rhs(2) - sum(p1_rc(6:8)*c(7:9))
+ lsrhs(3) = rhs(3) - sum(p2_rc(6:8)*c(7:9))
+ lsrhs(4) = rhs(4) - sum(p3_rc(6:8)*c(7:9))
+ lsrhs(5) = rhs(5) - sum(p4_rc(6:8)*c(7:9))
+ r(1,:) = p0_rc(1:5)
+ r(2,:) = p1_rc(1:5)
+ r(3,:) = p2_rc(1:5)
+ r(4,:) = p3_rc(1:5)
+ r(5,:) = p4_rc(1:5)
+ call solve_linear_system(5, r, lsrhs, c(2:6))
+
+ end subroutine mrpp_solve_linear_system
+
+ subroutine mrpp_ps_wavefunctions(c, wf0, wf0p, pot, ldd, wf1, wf1p)
+ !-----------------------------------------------------------------------!
+ ! For a given set of coefficients c, returns the corresponding pseudo !
+ ! wave-functions and pseudo-potential. !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(in) :: c(9)
+ real(R8), intent(out) :: wf0(mrc%np, wf_dim), wf0p(mrc%np, wf_dim)
+ real(R8), intent(out) :: pot(mrc%np)
+ real(R8), intent(out) :: wf1(mrc%np, wf_dim), wf1p(mrc%np, wf_dim)
+ real(R8), intent(out) :: ldd
+
+ integer :: i, nnodes
+ real(R8), allocatable :: p(:), pp(:), ppp(:), vpp(:), wf(:,:), wfp(:,:)
+ type(potential_t) :: ps_potential
+
+ call potential_null(ps_potential)
+
+ !Compute the polynomial and its derivatives
+ allocate(p(mrc%np), pp(mrc%np), ppp(mrc%np))
+ p = c(1)
+ pp = M_ZERO
+ ppp = M_ZERO
+ do i = 1, 8
+ p = p + c(1+i)*p0_r(:,i)
+ pp = pp + c(1+i)*p1_r(:,i)
+ ppp = ppp + c(1+i)*p2_r(:,i)
+ end do
+
+ pot = ev0 + (real(qn0%l,r8) + M_ONE)/mrc%r*pp + (ppp + pp**2)/M_TWO
+ wf0(:,1) = mrc%r**qn0%l*exp(p)
+ if (qn0%l == 0) then
+ wf0p(:,1) = pp*exp(p)
+ else
+ wf0p(:,1) = real(qn0%l,R8)*mrc%r**(qn0%l-1)*exp(p) + mrc%r**qn0%l*pp*exp(p)
+ end if
+
+
+ if (rel) then
+ !Relativistic correction to the pseudopotential
+ call potential_init(ps_potential, mrc, pot)
+ do i = 1, mrc%np
+ pot(i) = pot(i) + (pot(i) - ev0)**2/M_TWO/M_C2 + dvdr(ps_potential, mrc%r(i), qn0)/M_FOUR/M_C2*(wf0p(i,1)/wf0(i,1)&
+ + (qn0%k + M_ONE)/mrc%r(i))
+ end do
+ call potential_end(ps_potential)
+
+ !Minor component
+ wf0(:,2) = M_C*((real(qn0%l,R8) + M_ONE + qn0%k)/mrc%r + pp)*wf0(:,1)/(M_TWO*M_C2 - pot + ev0)
+ wf0p(:,2) = mesh_derivative(m, wf0(:,2))
+ else
+ wf0(:,2:wf_dim) = M_ZERO
+ wf0p(:,2:wf_dim) = M_ZERO
+ end if
+ deallocate(p, pp, ppp)
+
+ !
+ allocate(vpp(m%np), wf(m%np, wf_dim), wfp(m%np, wf_dim))
+ vpp(1:mrc%np) = pot
+ do i = mrc%np+1, m%np
+ vpp(i) = v(ae_potential, m%r(i), qn1)
+ end do
+ call potential_init(ps_potential, m, vpp)
+ if (rel) then
+ call wavefunctions(qn1, ev1, DIRAC, m, ps_potential, integrator, wf, wfp)
+ ldd = wave_equation_ld_diff(qn1, ev1, DIRAC, ps_potential, integrator, nnodes)
+ else
+ call wavefunctions(qn1, ev1, wave_eq, m, ps_potential, integrator, wf, wfp)
+ ldd = wave_equation_ld_diff(qn1, ev1, wave_eq, ps_potential, integrator, nnodes)
+ wf(:,2:wf_dim) = M_ZERO
+ wfp(:,2:wf_dim) = M_ZERO
+ end if
+ do i = 1, wf_dim
+ call mesh_transfer(m, wf(:,i), mrc, wf1(:,i))
+ call mesh_transfer(m, wfp(:,i), mrc, wf1p(:,i))
+ end do
+ ldd = ldd*10.0
+ call potential_end(ps_potential)
+ deallocate(vpp, wf, wfp)
+
+ end subroutine mrpp_ps_wavefunctions
+
+ subroutine mrpp_equations_write_info(iter, n, c, f)
+ !-----------------------------------------------------------------------!
+ ! Writes to the screen some information about the multiroot solving. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: iter, n
+ real(R8), intent(in) :: c(n), f(n)
+
+ real(R8) :: cc(9)
+
+ ASSERT(n == 4)
+
+ cc = M_ZERO
+ cc(1) = c(1)
+ cc(7:9) = c(2:4)
+ call mrpp_solve_linear_system(cc)
+
+ write(message(1), '(6x,"Iteration number: ",I3)') iter
+ write(message(2), '(6x,"Coefficients:")')
+ write(message(3), '(8x,"c0 =",1x,es16.9e2,3x,"c2 =",1x,es16.9e2)') cc(1), cc(2)
+ write(message(4), '(8x,"c4 =",1x,es16.9e2,3x,"c6 =",1x,es16.9e2)') cc(3), cc(4)
+ write(message(5), '(8x,"c8 =",1x,es16.9e2,3x,"c10 =",1x,es16.9e2)') cc(5), cc(6)
+ write(message(6), '(8x,"c12 =",1x,es16.9e2,3x,"c14 =",1x,es16.9e2)') cc(7), cc(8)
+ write(message(7), '(8x,"c16 =",1x,es16.9e2)') cc(9)
+ write(message(8), '(6x,"Residues:")')
+ write(message(9), '(8X,"c2**2 + c4(2l+5) =",1x,ES16.9e2)') f(1)
+ write(message(10),'(8X,"norm_sc[AE] - norm_sc[PP] =",1x,ES16.9e2)') f(2)
+ write(message(11),'(8X,"R(rc)[AE] - R(rc)[PP] =",1x,ES16.9e2)') f(3)
+ write(message(12),'(8X,"R''/R(rc)[AE] - R''/R(rc)[PP] =",1x,ES16.9e2)') f(4)
+ message(13) = ""
+ call write_info(13, 30)
+
+ end subroutine mrpp_equations_write_info
+
+ subroutine mrpp_equations_end()
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to the global data needed to solve !
+ ! the MRPP set of non-linear equations. !
+ !-----------------------------------------------------------------------!
+
+ deallocate(p0_r, p1_r, p2_r)
+ deallocate(ps_wf0, ps_wf0p, ps_wf1, ps_wf1p, ps_v)
+ call mesh_end(m)
+ call mesh_end(mrc)
+ call potential_end(ae_potential)
+
+ end subroutine mrpp_equations_end
+
+end module multireference_equations_m
diff --git a/src/multiroot_c.c b/src/multiroot_c.c
new file mode 100644
index 0000000..4416c7c
--- /dev/null
+++ b/src/multiroot_c.c
@@ -0,0 +1,131 @@
+/*
+ Copyright (C) 2004-2009 M. Oliveira, F. Nogueira
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: multiroot_c.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <config.h>
+
+#include <gsl/gsl_math.h>
+#include <gsl/gsl_errno.h>
+#include <gsl/gsl_vector.h>
+#include <gsl/gsl_multiroots.h>
+
+struct mr_type_struct
+{
+ void (* func) (int *n, double *px, double *pf);
+ int *n;
+ double px[10], pf[10];
+};
+
+typedef struct mr_type_struct mr_type;
+
+static void my_work_f(mr_type *p)
+{
+ (*(p->func))(p->n, p->px, p->pf);
+}
+
+int my_f (const gsl_vector *x, void *params, gsl_vector *f)
+{
+ mr_type *p = (mr_type *)params;
+ int i;
+ int n = x->size;
+
+ p->n = &n;
+ for (i = 0; i < n; i++) p->px[i] = gsl_vector_get(x, i);
+ my_work_f( p );
+ for (i = 0; i < n; i++) gsl_vector_set (f, i, p->pf[i]);
+ return GSL_SUCCESS;
+}
+
+int FC_FUNC_ (non_linear_system_solve, NON_LINEAR_SYSTEM_SOLVE)
+ (void **s, int *n, double *tol_x_abs, double *tol_x_rel, double *tol_f_abs, int *max_iter, void **x_guess, double x[], void(* forfunc)(int *, double *, double *), void(* write_info)(int *, int *, double *, double *))
+{
+ int i, status, iter = 0;
+ double f[*n];
+ mr_type p;
+
+ //Set parameters to be passed to the function
+ p.func = forfunc;
+
+ //Initialize objects
+ gsl_multiroot_function mr_f = {&my_f, *n, &p};
+ gsl_multiroot_fsolver_set ((gsl_multiroot_fsolver *)(*s), &mr_f, (gsl_vector *)(*x_guess));
+
+ do
+ {
+ //Iterate
+ iter++;
+ status = gsl_multiroot_fsolver_iterate ((gsl_multiroot_fsolver *)(*s));
+ get_current(x, f, (gsl_multiroot_fsolver *)(*s));
+
+ //Check if a problem occurred
+ if (status) break;
+
+ //Print information
+ write_info (&iter, n, x, f);
+
+ //Check convergence criteria
+ status = test_convergence(*tol_x_abs, *tol_x_rel, *tol_f_abs, (gsl_multiroot_fsolver *)(*s));
+
+ //Check if solver is stuck
+ if ((status == GSL_CONTINUE) && (iter >= *max_iter)) status = GSL_EMAXITER;
+ }
+ while (status == GSL_CONTINUE);
+
+ return (status);
+}
+
+
+int get_current(double x[], double f[], const gsl_multiroot_fsolver * s)
+{
+ int i;
+ const int n = s->x->size;
+
+ for (i = 0; i < n; i++) x[i] = gsl_vector_get(s->x, i);
+ for (i = 0; i < n; i++) f[i] = gsl_vector_get(s->f, i);
+}
+
+
+int test_convergence (const double tol_x_abs, const double tol_x_rel, const double tol_f_abs, const gsl_multiroot_fsolver * s)
+{
+ int i, status;
+ int ok = 1;
+ const int n = s->x->size;
+
+ status = gsl_multiroot_test_delta (s->dx, s->x, tol_x_abs, tol_x_rel);
+
+ for (i = 0 ; i < n ; i++)
+ {
+ double fi = gsl_vector_get(s->f, i);
+
+ if (fabs(fi) < tol_f_abs)
+ {
+ ok = 1;
+ }
+ else
+ {
+ ok = 0;
+ break;
+ }
+ }
+
+ if (ok || status == GSL_SUCCESS) return(GSL_SUCCESS);
+
+ return (GSL_CONTINUE);
+}
diff --git a/src/multiroot_f.F90 b/src/multiroot_f.F90
new file mode 100644
index 0000000..5236b3b
--- /dev/null
+++ b/src/multiroot_f.F90
@@ -0,0 +1,177 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: multiroot_f.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module multiroot_m
+ use global_m
+ use messages_m
+ use gsl_interface_m
+ use linalg_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface
+ function non_linear_system_solve(s, n, tol_x_abs, tol_x_rel, tol_f_abs, max_iter, x_guess, x, myfunc, write_info)
+ use global_m
+ integer(POINTER_SIZE) :: s, x_guess
+ integer, intent(in) :: n, max_iter
+ real(R8), intent(in) :: tol_x_abs, tol_x_rel, tol_f_abs
+ real(R8), intent(out) :: x(n)
+ integer :: non_linear_system_solve
+ interface
+ subroutine myfunc(n, x, f)
+ use global_m
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n)
+ real(R8), intent(out) :: f(n)
+ end subroutine myfunc
+ end interface
+ interface
+ subroutine write_info(iter, n, x, f)
+ use global_m
+ integer, intent(in) :: iter
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n)
+ real(R8), intent(in) :: f(n)
+ end subroutine write_info
+ end interface
+ end function non_linear_system_solve
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type multiroot_solver_t
+ integer :: type ! What solver to use (Hydrid, Discrete Newton, etc)
+ integer :: n ! Dimension of the problem (number of roots)
+ real(R8) :: tol_x_rel ! Absolute tolerance for the positions x
+ real(R8) :: tol_x_abs ! Relative tolerance for the positions x
+ real(R8) :: tol_f_abs ! Absolute tolerance for the residues f
+ integer :: max_iter ! Maximum number of iterations
+ end type multiroot_solver_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: HYBRIDS = 1, &
+ HYBRID = 2, &
+ DNEWTON = 3, &
+ BROYDEN = 4
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: multiroot_solver_t, &
+ multiroot_solver_init, &
+ multiroot_solve_system, &
+ HYBRIDS, HYBRID, DNEWTON, BROYDEN
+
+contains
+
+ subroutine multiroot_solver_init(n, tol_x_abs, tol_x_rel, tol_f_abs, max_iter, type, solver)
+ !-----------------------------------------------------------------------!
+ ! Initialize the multiroot solver object. !
+ ! !
+ ! n - dimension of the problem !
+ ! tol_x_abs - absolute tolerance for the positions x !
+ ! tol_x_rel - relative tolerance for the positions x !
+ ! tol_f_abs - absolute tolerance for the residues f !
+ ! max_iter - maximum number of iterations !
+ ! type - what solver to use !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n, max_iter, type
+ real(R8), intent(in) :: tol_x_abs, tol_x_rel, tol_f_abs
+ type(multiroot_solver_t), intent(out) :: solver
+
+ call push_sub("multiroot_solver_init")
+
+ solver%type = type
+ solver%n = n
+ solver%tol_x_abs = tol_x_abs
+ solver%tol_x_rel = tol_x_rel
+ solver%tol_f_abs = tol_f_abs
+ solver%max_iter = max_iter
+
+ call pop_sub()
+ end subroutine multiroot_solver_init
+
+ subroutine multiroot_solve_system(solver, x, myfunc, write_info)
+ !-----------------------------------------------------------------------!
+ ! Find the roots of a set of non-linear equations. !
+ ! !
+ ! solver - the solver to use !
+ ! x - contains a guess on input and the solution on output !
+ ! myfunc - subroutine returning the residues for a given set of !
+ ! positions. !
+ ! write_info - subroutine that prints relevant information at each !
+ ! iteration. !
+ !-----------------------------------------------------------------------!
+ type(multiroot_solver_t), intent(in) :: solver
+ real(R8), intent(inout) :: x(solver%n)
+ interface
+ subroutine myfunc(n, x, f)
+ use global_m
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n)
+ real(R8), intent(out) :: f(n)
+ end subroutine myfunc
+ end interface
+ interface
+ subroutine write_info(iter, n, x, f)
+ use global_m
+ integer, intent(in) :: iter
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n)
+ real(R8), intent(in) :: f(n)
+ end subroutine write_info
+ end interface
+
+ integer :: ierr
+ integer(POINTER_SIZE) :: gsl_solver, x_guess
+
+ call push_sub("multiroot_solve_system")
+
+ !Initialize gsl solver
+ call gsl_multiroot_fsolver_alloc(gsl_solver, solver%type, solver%n)
+
+ !Initialize guess
+ call gsl_vector_init(solver%n, x, x_guess)
+
+ !Solve non-linear system
+ ierr = non_linear_system_solve(gsl_solver, solver%n, solver%tol_x_abs, &
+ solver%tol_x_rel, solver%tol_f_abs, solver%max_iter, &
+ x_guess, x, myfunc, write_info)
+ if (ierr /= 0) then
+ message(1) = "Error in subtoutine multiroot_solve_system. GSL error message:"
+ call gsl_strerror(ierr, message(2))
+ call write_fatal(2)
+ end if
+
+ !Free memory
+ call gsl_vector_free(x_guess)
+ call gsl_multiroot_fsolver_free(gsl_solver)
+
+ call pop_sub()
+ end subroutine multiroot_solve_system
+
+end module multiroot_m
diff --git a/src/numerical_tests.F90 b/src/numerical_tests.F90
new file mode 100644
index 0000000..4066fb8
--- /dev/null
+++ b/src/numerical_tests.F90
@@ -0,0 +1,567 @@
+!! Copyright (C) 2011 M. Oliveira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: mesh.F90 569 2011-02-17 17:02:26Z micael $
+
+#include "global.h"
+
+module numerical_tests_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use io_m
+ use output_m
+ use utilities_m
+ use mesh_m
+ use hartree_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type function_t
+ private
+ integer :: type
+ integer :: n_params
+ real(R8) :: params(3)
+ character(20) :: name
+ end type function_t
+
+
+ !---Global Variables---!
+
+ ! Functions type
+ integer, parameter :: GAUSSIAN = 1, & ! A*exp(-(r-B)**2/(2*C))
+ INVERSE = 2, & ! A/(r-B)
+ EXPONENTIAL = 3 ! A*exp(B*(r-C))
+
+ ! Type of tests
+ integer, parameter :: TEST_DERIVATIVES = 1, &
+ TEST_INTEGRATION = 2, &
+ TEST_HARTREE = 4
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: numerical_tests_run, &
+ GAUSSIAN, INVERSE, EXPONENTIAL, &
+ TEST_DERIVATIVES, TEST_INTEGRATION, TEST_HARTREE
+
+contains
+
+ subroutine numerical_tests_run()
+ !-----------------------------------------------------------------------!
+ ! Performs several tests to check the numerical accuracy of the code. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t) :: m
+
+ integer :: i, p, n_funcs, tests
+ integer(POINTER_SIZE) :: blk
+ type(function_t), allocatable :: functions(:)
+
+ call push_sub("numerical_tests_run")
+
+ !Initialize mesh mesh
+ call mesh_null(m)
+ call mesh_init_from_input(50.0_r8, m)
+ call mesh_output_params(m)
+ call mesh_output_params(m,unit=info_unit("nt"))
+
+ !Read functions to use during the test
+ if (oct_parse_block("TestFunctions", blk) == 0) then
+ n_funcs = oct_parse_block_n(blk)
+ else
+ n_funcs = 0
+ end if
+ allocate(functions(n_funcs))
+ do i = 1, n_funcs
+ !Check if we have at least the name and type of the function
+ if (oct_parse_block_cols(blk, i-1) < 2) then
+ write(message(1),'("Wrong number of columns in line ",I1," of the TestFunctions block")') i
+ call write_fatal(1)
+ end if
+
+ !Read name and type of the function and set the number of parameters
+ call oct_parse_block_string(blk, i-1, 0, functions(i)%name)
+ call oct_parse_block_int(blk, i-1, 1, functions(i)%type)
+ select case (functions(i)%type)
+ case (GAUSSIAN)
+ functions(i)%n_params = 3
+ case (INVERSE)
+ functions(i)%n_params = 2
+ case (EXPONENTIAL)
+ functions(i)%n_params = 3
+ case default
+ write(message(1),'("Unknown function type in line ",I1," of the TestFunctions block")') i
+ call write_fatal(1)
+ end select
+
+ !Read the parameters
+ if (oct_parse_block_cols(blk, i-1) < 2+functions(i)%n_params) then
+ write(message(1),'("Not enough parameters in line ",I1," of the TestFunctions block")') i
+ call write_fatal(1)
+ end if
+ do p = 1, functions(i)%n_params
+ call oct_parse_block_float(blk, i-1, 1+p, functions(i)%params(p))
+ end do
+
+ end do
+ call oct_parse_block_end(blk)
+
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- Numerical Tests --", 70)
+ call write_info(3)
+
+ !What tests should we perform?
+ call oct_parse_int("NumericalTests", TEST_DERIVATIVES + TEST_INTEGRATION + TEST_HARTREE, tests)
+
+ if (iand(tests, TEST_DERIVATIVES) /= 0) then
+ !Test derivatives
+ message(1) = ""
+ message(2) = "Testing Derivatives:"
+ call write_info(2)
+ call write_info(2, unit=info_unit("nt"))
+ do i = 1, n_funcs
+ call test_function_derivatives(m, functions(i))
+ end do
+ end if
+
+ if (iand(tests, TEST_INTEGRATION) /= 0) then
+ !Test integration
+ message(1) = ""
+ message(2) = "Testing Integration:"
+ call write_info(2)
+ call write_info(2, unit=info_unit("nt"))
+ do i = 1, n_funcs
+ if (functions(i)%type == GAUSSIAN) then
+ write(message(1),'(" Skipping function ",A)') trim(functions(i)%name)
+ message(2) = ""
+ call write_info(2)
+ cycle
+ end if
+ call test_function_integration(m, functions(i), m%r(1), m%r(m%np))
+ end do
+ end if
+
+ if (iand(tests, TEST_HARTREE) /= 0) then
+ !Test Hartree potential
+ message(1) = ""
+ message(2) = "Testing Hartree Potential:"
+ call write_info(2)
+ call write_info(2, unit=info_unit("nt"))
+ do i = 1, n_funcs
+ if (functions(i)%type == GAUSSIAN .or. functions(i)%type == INVERSE) then
+ write(message(1),'(" Skipping function ",A)') trim(functions(i)%name)
+ message(2) = ""
+ call write_info(2)
+ cycle
+ end if
+ call test_function_hartree_potential(m, functions(i))
+ end do
+ end if
+
+ !Free memory
+ deallocate(functions)
+ call mesh_end(m)
+
+ call pop_sub()
+ end subroutine numerical_tests_run
+
+ subroutine test_function_derivatives(m, myfunc)
+ !-----------------------------------------------------------------------!
+ ! Test derivatives.
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(function_t), intent(in) :: myfunc
+
+ integer :: i, unit
+ real(R8), allocatable :: f(:), fp(:), fpp(:), l(:), num_fp(:), num_fpp(:), num_l(:)
+ character(len=30) :: dir
+
+ call push_sub("test_function_derivatives")
+
+ !Print information about function
+ message(1) = ""
+ call write_info(1)
+ call write_info(1, unit=info_unit("nt"))
+ call function_output_info(myfunc)
+ call function_output_info(myfunc, unit=info_unit("nt"))
+
+ !Compute derivatives
+ allocate(f(m%np), fp(m%np), fpp(m%np), l(m%np))
+ allocate(num_fp(m%np), num_fpp(m%np), num_l(m%np))
+
+ call function_eval(myfunc, m, f)
+ call function_eval_derivs(myfunc, m, fp, fpp, l)
+ num_fp = mesh_derivative(m, f)
+ num_fpp = mesh_derivative2(m, f)
+ num_l = mesh_laplacian(m, f)
+
+ !Statistics
+ write(message(1), '(4X,"Maximum error:")')
+ write(message(2), '(16X,"r",8X,"Analitic",5X,"Computed",4X,"Difference")')
+ write(message(3), '(6X,"f''",2X,A)') trim(get_max_error(m, fp, num_fp))
+ write(message(4), '(6X,"f''''",1X,A)') trim(get_max_error(m, fpp, num_fpp))
+ write(message(5), '(6X,"lapl",A)') trim(get_max_error(m, l, num_l))
+ write(message(6), '(4X,"Minimum error:")')
+ write(message(7), '(16X,"r",8X,"Analitic",5X,"Computed",4X,"Difference")')
+ write(message(8), '(6X,"f''",2X,A)') trim(get_min_error(m, fp, num_fp))
+ write(message(9), '(6X,"f''''",1X,A)') trim(get_min_error(m, fpp, num_fpp))
+ write(message(10), '(6X,"lapl",A)') trim(get_min_error(m, l, num_l))
+ write(message(11), '(4X,"Average error: ")')
+ write(message(12), '(6X,"f''",2X,A)') trim(get_avg_error(m, fp, num_fp))
+ write(message(13), '(6X,"f''''",1X,A)') trim(get_avg_error(m, fpp, num_fpp))
+ write(message(14), '(6X,"lapl",A)') trim(get_avg_error(m, l, num_l))
+ call write_info(14)
+ call write_info(14, unit=info_unit("nt"))
+
+ !Output to files
+ write(dir, '("nt/",A)') trim(myfunc%name)
+ call sys_mkdir(dir)
+
+ call io_open(unit, file=trim(dir)//"/derivs")
+
+ do i = 1, m%np
+ write(unit, '(8(2X,ES16.8E3))') m%r(i), f(i), fp(i), num_fp(i), fpp(i), num_fpp(i), l(i), num_l(i)
+ end do
+
+ close(unit)
+
+ !Free memory
+ deallocate(f, fp, fpp, l, num_fp, num_fpp, num_l)
+
+ call pop_sub()
+ end subroutine test_function_derivatives
+
+ subroutine test_function_hartree_potential(m, myfunc)
+ !-----------------------------------------------------------------------!
+ ! Test the calculation of the hartree potential. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(function_t), intent(in) :: myfunc
+
+ integer :: i, unit
+ real(R8), allocatable :: f(:), vh(:), num_vh(:,:)
+ character(len=30) :: dir
+
+ call push_sub("test_function_hartree_potential")
+
+ !Print information about function
+ message(1) = ""
+ call write_info(1)
+ call write_info(1, unit=info_unit("nt"))
+ call function_output_info(myfunc)
+ call function_output_info(myfunc, unit=info_unit("nt"))
+
+ !Compute derivatives
+ allocate(f(m%np), vh(m%np), num_vh(m%np, 1))
+
+ call function_eval(myfunc, m, f)
+ call function_hartree_potential(myfunc, m, vh)
+ call hartree_potential(m, f, M_ZERO, vh=num_vh)
+
+ !Statistics
+ write(message(1), '(4X,"Maximum error:")')
+ write(message(2), '(10X,"r",8X,"Analitic",5X,"Computed",4X,"Difference")')
+ write(message(3), '(4X,A)') trim(get_max_error(m, vh, num_vh(:,1)))
+ write(message(4), '(4X,"Minimum error:")')
+ write(message(5), '(10X,"r",8X,"Analitic",5X,"Computed",4X,"Difference")')
+ write(message(6), '(4X,A)') trim(get_min_error(m, vh, num_vh(:,1)))
+ write(message(7), '(4X,"Average error: ")')
+ write(message(8), '(4X,A)') trim(get_avg_error(m, vh, num_vh(:,1)))
+ call write_info(8)
+ call write_info(8, unit=info_unit("nt"))
+
+ !Output to files
+ write(dir, '("nt/",A)') trim(myfunc%name)
+ call sys_mkdir(dir)
+
+ call io_open(unit, file=trim(dir)//"/vh")
+
+ do i = 1, m%np
+ write(unit, '(4(2X,ES16.8E3))') m%r(i), f(i), vh(i), num_vh(i,1)
+ end do
+
+ close(unit)
+
+ !Free memory
+ deallocate(f, vh, num_vh)
+
+ call pop_sub()
+ end subroutine test_function_hartree_potential
+
+ subroutine test_function_integration(m, myfunc, a, b)
+ !-----------------------------------------------------------------------!
+ ! Test numerical integration. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(function_t), intent(in) :: myfunc
+ real(r8), intent(in) :: a, b
+
+ real(R8) :: int, num_int
+ real(R8), allocatable :: f(:)
+
+ call push_sub("test_function_integration")
+
+ !Print information about function
+ message(1) = ""
+ call write_info(1)
+ call write_info(1, unit=info_unit("nt"))
+ call function_output_info(myfunc)
+ call function_output_info(myfunc, unit=info_unit("nt"))
+
+ allocate(f(m%np))
+ call function_eval(myfunc, m, f)
+ int = function_integ(myfunc, a, b)
+ num_int = mesh_integrate(m, f, a=a, b=b)
+
+ write(message(1), '(12X,"Interval",10X,"Analitic",5X,"Computed",4X,"Difference")')
+ write(message(2), '(4X,2(1X,ES10.3E2),3(2X,ES11.3E3))') a, b, int, num_int, abs(int - num_int)
+ call write_info(2)
+ call write_info(2, unit=info_unit("nt"))
+
+ !Free memory
+ deallocate(f)
+
+ call pop_sub()
+ end subroutine test_function_integration
+
+ function get_max_error(m, f1, f2)
+ !-----------------------------------------------------------------------!
+ ! Compare two functions and return the maximum error, the position at !
+ ! which this error occurs, and the values of the functions at that !
+ ! point in a nicely formated string. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f1(m%np), f2(m%np)
+ character(len=80) :: get_max_error
+
+ integer, target :: pos(1)
+ integer, pointer :: i
+
+ i => pos(1)
+ pos = maxloc(abs(f1 - f2))
+ write(get_max_error, '(2X,ES9.2E2,4(2X,ES11.3E3))') &
+ m%r(i), f1(i), f2(i), abs(f1(i) - f2(i))
+
+ end function get_max_error
+
+ function get_min_error(m, f1, f2)
+ !-----------------------------------------------------------------------!
+ ! Compare two functions and return the minimum error, the position at !
+ ! which this error occurs, and the values of the functions at that !
+ ! point in a nicely formated string. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f1(m%np), f2(m%np)
+ character(len=80) :: get_min_error
+
+ integer, target :: pos(1)
+ integer, pointer :: i
+
+ i => pos(1)
+ pos = minloc(abs(f1 - f2))
+ write(get_min_error, '(2X,ES9.2E2,4(2X,ES11.3E3))') &
+ m%r(i), f1(i), f2(i), abs(f1(i) - f2(i))
+
+ end function get_min_error
+
+ function get_avg_error(m, f1, f2)
+ !-----------------------------------------------------------------------!
+ ! Compare two functions and return the average error in a nicely !
+ ! formated string. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: f1(m%np), f2(m%np)
+ character(len=80) :: get_avg_error
+
+ write(get_avg_error, '(2X,ES11.3E3)') sum(abs(f1 - f2))/m%np
+
+ end function get_avg_error
+
+ subroutine function_output_info(myfunc, unit)
+ !-----------------------------------------------------------------------!
+ ! Print information about myfunc to the screen or to unit. !
+ !-----------------------------------------------------------------------!
+ type(function_t), intent(in) :: myfunc
+ integer, intent(in), optional :: unit
+
+ call push_sub("function_output_info")
+
+ write(message(1), '(2X,"Function: ",A)') trim(myfunc%name)
+ select case(myfunc%type)
+ case (GAUSSIAN)
+ write(message(2), '(4X,"Definition: ",F6.2," * exp(-(r - ",F6.2,")**2/(2 * ",F6.2,"))")') &
+ myfunc%params(1), myfunc%params(2), myfunc%params(3)
+ case (INVERSE)
+ write(message(2), '(4X,"Definition: ",F6.2," / (r - ",F6.2,")")') &
+ myfunc%params(1), myfunc%params(2)
+ case (EXPONENTIAL)
+ write(message(2), '(4X,"Definition: ",F6.2," * exp(",F6.2," * (r - ",F6.2,"))")') &
+ myfunc%params(1), myfunc%params(2), myfunc%params(3)
+ end select
+
+ if (present(unit)) then
+ call write_info(2, unit=unit)
+ else
+ call write_info(2)
+ end if
+
+ call pop_sub()
+ end subroutine function_output_info
+
+ subroutine function_eval(myfunc, m, f)
+ !-----------------------------------------------------------------------!
+ ! Evaluate the values of function myfunc at the points of mesh m. !
+ !-----------------------------------------------------------------------!
+ type(function_t), intent(in) :: myfunc
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(out) :: f(m%np)
+
+ real(R8) :: A, B, C
+
+ A = myfunc%params(1)
+ B = myfunc%params(2)
+ C = myfunc%params(3)
+
+ select case(myfunc%type)
+ case (GAUSSIAN)
+ f = A*exp(-(m%r - B)**2/(M_TWO*C**2))
+
+ case (INVERSE)
+ f = A/(m%r - B)
+
+ case (EXPONENTIAL)
+ f = A*exp(B*(m%r - C))
+
+ case default
+ write(message(1),'("I dont know how to evaluate function: ",A)') trim(myfunc%name)
+ call write_fatal(1)
+ end select
+
+ end subroutine function_eval
+
+ subroutine function_eval_derivs(myfunc, m, fp, fpp, l)
+ !-----------------------------------------------------------------------!
+ ! Evaluate the derivatives of function myfunc at the points of mesh m. !
+ ! !
+ ! myfunc - function !
+ ! m - mesh !
+ ! fp - first derivative !
+ ! fpp - second derivative !
+ ! l - laplacian (in spherical coordinates) !
+ !-----------------------------------------------------------------------!
+ type(function_t), intent(in) :: myfunc
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(out) :: fp(m%np)
+ real(R8), intent(out) :: fpp(m%np)
+ real(R8), intent(out) :: l(m%np)
+
+ real(R8) :: A, B, C
+ real(R8), allocatable :: f(:), rmb(:)
+
+ A = myfunc%params(1)
+ B = myfunc%params(2)
+ C = myfunc%params(3)
+
+ select case(myfunc%type)
+ case (GAUSSIAN)
+ allocate(f(m%np), rmb(m%np))
+ rmb = m%r - B
+ f = A*exp(-rmb**2/(M_TWO*C**2))
+ fp = -rmb/C**2*f
+ fpp = ( (rmb/C)**2 - M_ONE)*f/C**2
+ deallocate(f, rmb)
+
+ case (INVERSE)
+ fp = -A/(m%r - B)**2
+ fpp = M_TWO*A/(m%r - B)**3
+
+ case (EXPONENTIAL)
+ fp = A*B*exp(B*(m%r - C))
+ fpp = A*B**2*exp(B*(m%r - C))
+
+ case default
+ write(message(1),'("I dont know how to calculate the derivatives of function:",A)') trim(myfunc%name)
+ call write_fatal(1)
+ end select
+ l = M_TWO*fp/m%r + fpp
+
+ end subroutine function_eval_derivs
+
+ function function_integ(myfunc, ra, rb)
+ !-----------------------------------------------------------------------!
+ ! Evaluates the integral of function myfunc between ra and rb (assuming !
+ ! spherical coordinates). !
+ !-----------------------------------------------------------------------!
+ type(function_t), intent(in) :: myfunc
+ real(R8), intent(in) :: ra, rb
+ real(R8) :: function_integ
+
+ real(R8) :: A, B, C, fa, fb
+
+ A = myfunc%params(1)
+ B = myfunc%params(2)
+ C = myfunc%params(3)
+
+ select case(myfunc%type)
+ case (INVERSE)
+ fa = A*(log(ra - B)*B**2 + (M_TWO*ra*B + ra**2)/M_TWO)
+ fb = A*(log(rb - B)*B**2 + (M_TWO*rb*B + rb**2)/M_TWO)
+
+ case (EXPONENTIAL)
+ fa = A*((ra*B)**2 - M_TWO*ra + M_TWO)/B**3*exp(B*(ra - C))
+ fb = A*((rb*B)**2 - M_TWO*rb + M_TWO)/B**3*exp(B*(rb - C))
+
+ case default
+ write(message(1),'("I dont know how to calculate integrals for function: ",A)') trim(myfunc%name)
+ call write_fatal(1)
+ end select
+ function_integ = fb - fa
+
+ end function function_integ
+
+ subroutine function_hartree_potential(myfunc, m, vh)
+ !-----------------------------------------------------------------------!
+ ! Evaluates the hartree potential generated by function myfunc (assuming!
+ ! spherical coordinates). !
+ !-----------------------------------------------------------------------!
+ type(function_t), intent(in) :: myfunc
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(out) :: vh(m%np)
+
+ real(R8) :: A, B, C
+
+ A = myfunc%params(1)
+ B = myfunc%params(2)
+ C = myfunc%params(3)
+
+ select case(myfunc%type)
+ case (EXPONENTIAL)
+ vh = A/B**3*( (-B + M_TWO/m%r)*exp(B*(m%r - C)) - M_TWO/m%r*exp(-B*C))
+
+ case default
+ write(message(1),'("I dont know how to calculate the hartree potential for function: ",A)') trim(myfunc%name)
+ call write_fatal(1)
+ end select
+ vh = M_FOUR*M_PI*vh
+
+ end subroutine function_hartree_potential
+
+end module numerical_tests_m
diff --git a/src/ode_integrator.F90 b/src/ode_integrator.F90
new file mode 100644
index 0000000..c3c562d
--- /dev/null
+++ b/src/ode_integrator.F90
@@ -0,0 +1,866 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: ode_integrator.F90 780 2013-07-22 12:53:03Z micael $
+
+#include "global.h"
+
+module ode_integrator_m
+ use global_m
+ use messages_m
+ use io_m
+ use gsl_interface_m
+ use quantum_numbers_m
+ use potentials_m
+ implicit none
+
+ integer, external :: ode_solve
+
+ !---Derived Data Types---!
+
+ type ode_integrator_t
+ integer :: ode
+ integer :: dim
+ integer :: nstepmax
+ integer(POINTER_SIZE) :: evl, stp, ctrl
+ type(qn_t) :: qn
+ real(R8) :: e
+ type(potential_t) :: potential
+ end type ode_integrator_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: ODE_RK2 = 1, &
+ ODE_RK4 = 2, &
+ ODE_RKF4 = 3, &
+ ODE_RKCK4 = 4, &
+ ODE_RKPD8 = 5
+
+ integer, parameter :: ODE_SCHRODINGER = 11, &
+ ODE_SCALAR_REL = 22, &
+ ODE_DIRAC = 33, &
+ ODE_DIRAC_POL1 = 44, &
+ ODE_DIRAC_POL2 = 55
+
+
+ !Functions values at infinity
+ real(R8), parameter :: ODE_FINF = 1.0E-20_r8
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: ode_integrator_t, &
+ ode_integrator_null, &
+ ode_integrator_init, &
+ ode_integrator_end, &
+ ode_integration, &
+ ode_function_to_wavefunction, &
+ ode_match_functions, &
+ ode_function_mismatch, &
+ ode_practical_infinity, &
+ ODE_FINF, &
+ ODE_RK2, &
+ ODE_RK4, &
+ ODE_RKF4, &
+ ODE_RKCK4, &
+ ODE_RKPD8, &
+ ODE_SCHRODINGER, &
+ ODE_SCALAR_REL, &
+ ODE_DIRAC, &
+ ODE_DIRAC_POL1, &
+ ODE_DIRAC_POL2
+
+contains
+
+ subroutine ode_integrator_null(odeint)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the ODE integrator. !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(out) :: odeint
+
+ odeint%ode = 0
+ odeint%dim = 0
+ odeint%nstepmax = 0
+ odeint%qn = QN_NULL
+ odeint%e = M_ZERO
+ call potential_null(odeint%potential)
+
+ end subroutine ode_integrator_null
+
+ subroutine ode_integrator_init(odeint, ode, stepping_function, nstepmax, tol, qn, ev, potential)
+ !-----------------------------------------------------------------------!
+ ! Initialize the ODE integrator. !
+ ! !
+ ! odeint - ODE integrator !
+ ! ode - equation to be integrated !
+ ! stepping_function - stepping function used during integration !
+ ! nstepmax - maximum number of steps allowed during integration !
+ ! tol - tolerance !
+ ! qn - set of quantum numbers !
+ ! ev - energy !
+ ! potential - potential object !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(inout) :: odeint
+ integer, intent(in) :: ode
+ integer, intent(in) :: stepping_function
+ integer, intent(in) :: nstepmax
+ real(R8), intent(in) :: tol
+ type(qn_t), intent(in) :: qn
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: ev
+
+ call push_sub("ode_integrator_init")
+
+ odeint%ode = ode
+ odeint%dim = 2
+ if (ode == ODE_DIRAC_POL2) odeint%dim = 8
+ odeint%nstepmax = nstepmax
+ odeint%qn = qn
+ odeint%e = ev
+ odeint%potential = potential
+
+ !Initialize GSL objects
+ call gsl_odeiv_step_alloc(stepping_function, odeint%dim, odeint%stp)
+ call gsl_odeiv_evolve_alloc(odeint%dim, odeint%evl)
+ call gsl_odeiv_control_standart_new(odeint%ctrl, 1.0E-22_r8, tol, M_ONE, M_ONE)
+
+ call pop_sub()
+ end subroutine ode_integrator_init
+
+ subroutine ode_integrator_end(odeint)
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated with the GSL objects used by the !
+ ! ODE solver. !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(inout) :: odeint
+
+ call push_sub("ode_integrator_end")
+
+ if (odeint%nstepmax > 0) then
+ !Free GSL objects for simple precision integrations
+ call gsl_odeiv_step_free(odeint%stp)
+ call gsl_odeiv_evolve_free(odeint%evl)
+ call gsl_odeiv_control_free(odeint%ctrl)
+ end if
+
+ odeint%ode = 0
+ odeint%dim = 0
+ odeint%nstepmax = 0
+ odeint%qn = QN_NULL
+ odeint%e = 0
+ call potential_end(odeint%potential)
+
+ call pop_sub()
+ end subroutine ode_integrator_end
+
+ subroutine ode_integration(odeint, r1, r2, nstep, r, f)
+ !-----------------------------------------------------------------------!
+ ! Integrates the radial wave-equation from r1 to r2. !
+ ! !
+ ! odeint - ode integrator object !
+ ! r1 - starting point for integration !
+ ! r2 - final point for integration !
+ ! nstep - number of steps taken by the solver !
+ ! r - mesh used by the ODE solver !
+ ! f - functions !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: r1, r2
+ integer, intent(out) :: nstep
+ real(R8), pointer :: r(:), f(:,:)
+
+ integer :: ierr
+ real(R8), allocatable :: rmax(:), fmax(:,:)
+
+ call push_sub("ode_integration")
+
+ !Allocate work arrays
+ allocate(rmax(odeint%nstepmax), fmax(odeint%nstepmax, odeint%dim))
+
+ !Set initial points for integration
+ rmax(1) = r1
+ if (r1 < r2) then
+ !Outward integration
+ call ode_bc_origin(odeint, rmax(1), fmax(1,:))
+ else
+ !Inward integration
+ call ode_bc_infinity(odeint, rmax(1), fmax(1,:))
+ end if
+
+ !Integrate the equation from r1 to r2
+ ierr = ode_solve(r2, odeint%stp, odeint%evl, odeint%ctrl, &
+ (r1+r2)/M_TWO, odeint%nstepmax, nstep, rmax, &
+ odeint%dim, fmax, odeint, ode_derivatives)
+ if (ierr /= 0) then
+ if (in_debug_mode) then
+ call ode_integrator_debug(odeint, r1, r2, nstep, rmax, fmax)
+ end if
+ message(1) = "Error in subtoutine ode_integration. Error message:"
+ call gsl_strerror(ierr, message(2))
+ call write_fatal(2)
+ end if
+
+ !Copy the functions to new arrays
+ allocate(r(nstep), f(nstep, odeint%dim))
+ r(1:nstep) = rmax(1:nstep)
+ f(1:nstep,1:odeint%dim) = fmax(1:nstep,1:odeint%dim)
+
+ !Deallocate arrays
+ deallocate(rmax, fmax)
+
+ call pop_sub()
+ end subroutine ode_integration
+
+ subroutine ode_function_to_wavefunction(odeint, r, f, wf, wfp)
+ !-----------------------------------------------------------------------!
+ ! Given a set of solutions to the ODE, returns the corresponding !
+ ! wave-functions and wave-functions derivatives. !
+ ! !
+ ! odeint - ode integrator object !
+ ! r - r coodinate !
+ ! f - ODE solution at r !
+ ! wf - wave-functions at r !
+ ! wfp - wave-functions derivatives at r !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: r
+ real(R8), intent(in) :: f(odeint%dim)
+ real(R8), intent(out) :: wf(:), wfp(:)
+
+ real(R8) :: fp(odeint%dim)
+
+ call push_sub("ode_function_to_wavefunction")
+
+ call ode_derivatives(odeint, r, f, fp)
+
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER, ODE_SCALAR_REL)
+ wf(1) = f(1)
+ wfp(1) = fp(1)
+
+ case (ODE_DIRAC, ODE_DIRAC_POL1)
+ if (odeint%qn%sg == M_ZERO) then
+ wf(1:2) = f(1:2)
+ wfp(1:2) = fp(1:2)
+ elseif (odeint%qn%sg == -M_HALF) then
+ wf(1:2) = f(1:2)
+ wfp(1:2) = fp(1:2)
+ wf(3:4) = M_ZERO
+ wfp(3:4) = M_ZERO
+ elseif (odeint%qn%sg == M_HALF) then
+ wf(3:4) = f(1:2)
+ wfp(3:4) = fp(1:2)
+ wf(1:2) = M_ZERO
+ wfp(1:2) = M_ZERO
+ end if
+
+ case (ODE_DIRAC_POL2)
+ wf(1:4) = f(1:4) + f(5:8)
+ wfp(1:4) = fp(1:4) + fp(5:8)
+
+ case default
+ message(1) = "Error in ode_function_to_wavefunction"
+ call write_fatal(1)
+
+ end select
+
+ call pop_sub()
+ end subroutine ode_function_to_wavefunction
+
+ subroutine ode_match_functions(odeint, nstep_out, nstep_in, f_out, f_in)
+ !-----------------------------------------------------------------------!
+ ! Given the outward and inward solutions to the ODE, match all !
+ ! functions minus one. !
+ ! !
+ ! odeint - ode integrator object !
+ ! nstep_out - number of points of f_out !
+ ! nstep_in - number of points of f_in !
+ ! f_out - outward solutions !
+ ! f_in - inward solutions !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ integer, intent(in) :: nstep_out, nstep_in
+ real(R8), intent(inout) :: f_out(nstep_out, odeint%dim)
+ real(R8), intent(inout) :: f_in (nstep_in, odeint%dim)
+
+ real(R8) :: a, b, c
+ real(R8) :: ap1_o, ap2_o, ap1_i, ap2_i
+ real(R8) :: am1_o, am2_o, am1_i, am2_i
+ real(R8) :: bp1_o, bp2_o, bp1_i, bp2_i
+ real(R8) :: bm1_o, bm2_o, bm1_i, bm2_i
+
+ call push_sub("ode_match_functions")
+
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER, ODE_SCALAR_REL, ODE_DIRAC, ODE_DIRAC_POL1)
+ f_out = f_out*f_in(nstep_in,1)/f_out(nstep_out,1)
+
+ case (ODE_DIRAC_POL2)
+ ap1_o = f_out(nstep_out, 1) ; ap1_i = f_in(nstep_in, 1)
+ bp1_o = f_out(nstep_out, 2) ; bp1_i = f_in(nstep_in, 2)
+ am1_o = f_out(nstep_out, 3) ; am1_i = f_in(nstep_in, 3)
+ bm1_o = f_out(nstep_out, 4) ; bm1_i = f_in(nstep_in, 4)
+ ap2_o = f_out(nstep_out, 5) ; ap2_i = f_in(nstep_in, 5)
+ bp2_o = f_out(nstep_out, 6) ; bp2_i = f_in(nstep_in, 6)
+ am2_o = f_out(nstep_out, 7) ; am2_i = f_in(nstep_in, 7)
+ bm2_o = f_out(nstep_out, 8) ; bm2_i = f_in(nstep_in, 8)
+
+ a = ((am1_i*ap2_i-ap1_i*am2_i)*bm2_o + (ap1_i*am2_o-am1_i*ap2_o)*bm2_i + &
+ (am2_i*ap2_o-am2_o*ap2_i)*bm1_i)/((am1_i*ap1_o-ap1_i*am1_o)*bm2_o + &
+ (ap1_i*am2_o-am1_i*ap2_o)*bm1_o + (am1_o*ap2_o-am2_o*ap1_o)*bm1_i)
+ b = ((am1_i*ap1_o-ap1_i*am1_o)*bm2_i + (ap1_i*am2_i-am1_i*ap2_i)*bm1_o + &
+ (am1_o*ap2_i-am2_i*ap1_o)*bm1_i)/((am1_i*ap1_o-ap1_i*am1_o)*bm2_o + &
+ (ap1_i*am2_o-am1_i*ap2_o)*bm1_o + (am1_o*ap2_o-am2_o*ap1_o)*bm1_i)
+ c = ((am1_o*ap2_i-am2_i*ap1_o)*bm2_o + (am2_o*ap1_o-am1_o*ap2_o)*bm2_i + &
+ (am2_i*ap2_o-am2_o*ap2_i)*bm1_o)/((am1_i*ap1_o-ap1_i*am1_o)*bm2_o + &
+ (ap1_i*am2_o-am1_i*ap2_o)*bm1_o + (am1_o*ap2_o-am2_o*ap1_o)*bm1_i)
+
+ f_out(1:nstep_out,1:4) = a*f_out(1:nstep_out,1:4)
+ f_out(1:nstep_out,5:8) = b*f_out(1:nstep_out,5:8)
+ f_in(1:nstep_in,1:4) = c*f_in(1:nstep_in,1:4)
+
+ case default
+ message(1) = "Error in ode_match_functions"
+ call write_fatal(1)
+
+ end select
+
+ call pop_sub()
+ end subroutine ode_match_functions
+
+ function ode_function_mismatch(odeint, r, f_out, f_in)
+ !-----------------------------------------------------------------------!
+ ! Given the outward and inward solutions to the ODE, match all !
+ ! functions minus one and return the mismatch of the remaining function.!
+ ! !
+ ! odeint - ode integrator object !
+ ! r - coordinate where to evaluate the mismatch !
+ ! f_out - outward solutions !
+ ! f_in - inward solutions !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: r
+ real(R8), intent(in) :: f_out(odeint%dim)
+ real(R8), intent(in) :: f_in(odeint%dim)
+ real(R8) :: ode_function_mismatch
+
+ real(R8) :: fp_out(odeint%dim), fp_in(odeint%dim)
+
+ call push_sub("ode_function_mismatch")
+
+ !Calculate the function mismatch
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER, ODE_SCALAR_REL, ODE_DIRAC, ODE_DIRAC_POL1)
+ call ode_derivatives(odeint, r, f_out, fp_out)
+ call ode_derivatives(odeint, r, f_in, fp_in)
+
+ ode_function_mismatch = fp_out(1)/f_out(1) - fp_in(1)/f_in(1)
+
+ case (ODE_DIRAC_POL2)
+ ode_function_mismatch = (f_out(2) + f_out(6)) - (f_in(2) + f_in(6))
+
+ case default
+ message(1) = "Error in ode_function_mismatch"
+ call write_fatal(1)
+
+ end select
+
+ call pop_sub()
+ end function ode_function_mismatch
+
+ subroutine ode_bc_origin(odeint, r0, f)
+ !-----------------------------------------------------------------------!
+ ! Set the value of the functions at a point close to the origin. !
+ ! !
+ ! odeint - integrator object !
+ ! r0 - point close to origin !
+ ! f - function at r0 !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: r0
+ real(R8), intent(out) :: f(odeint%dim)
+
+ real(R8) :: e, z, vp0, s, a0, a1, a2, a3, b0, b1, b2, w
+ real(R8) :: a01, a12, b01, d02, d11, bxc_0, clm, c02, b12, c11
+ type(qn_t) :: qn
+
+ call push_sub("ode_bc_origin")
+
+ ! For a potential v(r) = vp(r) - Z/r, the general solutions of the equations
+ ! when r->0 are of the form:
+ !
+ ! g(r) = r**(s-1) (a0 + a1 r + a2 r**2 + ...)
+ ! f(r) = r**(s-1) (b0 + b1 r + b2 r**2 + ...)
+ !
+ ! Schrodinger equation:
+ ! s = l
+ ! a0 = 0
+ ! a2 = - Z/(l + 1) a1
+ ! a3 = [-Z a2 + (vp - e) a1]/(2l + 3)
+ ! b0 = l a1
+ ! b1 = (l + 1) a2
+ ! b2 = (l + 2) a3
+ !
+ ! Scalar-relativistic equation:
+ ! s = sqrt(l(l + 1) + 1 - (Z/c)**2)
+ ! a1 = [(e + 2c**2 - vp) b0 - Z/c (2e + 2c**2 - vp) a0]/[(2s + 1)c]
+ ! a2 = [(e + 2c**2 - vp)(vp - e)/c a0 + (e + 2c**2 - vp) b1 - Z/c (2e + 2c**2 - vp) a1]/[2(2s + 2)c]
+ ! b0 = c/Z (s - 1) a0
+ ! b1 = c/Z [s a1 - (e + 2c**2 - vp)/c b0]
+ ! b2 = c/Z [(s + 1) a2 - (e + 2c**2 - vp)/c b1]
+ !
+ ! Dirac equation:
+ ! s = sqrt(k**2 - (Z/c)**2)
+ ! a0 = Z/c b0/(s + k) v a0 = - c/Z (s - k) b0
+ ! a1 = [(s + 1 - k)(e + 2c**2 - vp) b0 - Z/c (e - vp) a0]/(2s + 1)/c
+ ! a2 = [(s + 2 - k)(e + 2c**2 - vp) b1 - Z/c (e - vp) a1]/(2s + 2)/(2c)
+ ! b0 = -Z/c a0/(s - k) v b0 = c/Z (s + k) a0
+ ! b1 = [-(e - vp)/c a0 - Z/c a1]/(s + 1 - k)
+ ! b2 = [-(e - vp)/c a1 - Z/c a2]/(s + 2 - k)
+ !
+ ! Polarized Spin Dirac equation:
+ ! g1(r) = r^(s1-1) a01 + r^s2 b11
+ ! f1(r) = r^(s1-1) c01 + r^s2 d11
+ ! g2(r) = r^s1 a12 + r^(s2-1) b02
+ ! f2(r) = r^s1 c12 + r^(s2-1) d02
+ !
+ ! s1 = sqrt( (l + 1)**2 - (z/c)**2 ) - 1
+ ! s2 = sqrt( l**2 - (z/c)**2 ) - 1
+ ! clm = sqrt( (2l + 1)**2 - (2m)**2 ) / (2l + 1)
+ ! c01 = - Z/c a01 / (s1+l+1)
+ ! a12 = + Z/c a01/c B0/2 Clm / (l+s1+1)
+ ! c12 = + B0/2 Clm/c a01
+ ! b02 = Z/c d02/(s2+l)
+ ! b11 = - B0/2 Clm/c d02
+ ! d11 = Z/c d02/c B0/2 Clm / (l+s2)
+
+ !
+ ! NOTE: for the scalar-relativistic equation and for Dirac's
+ ! equation Z=0 is a special case.
+
+ z = potential_nuclear_charge(odeint%potential)
+ vp0 = v(odeint%potential, r0, odeint%qn) + z/r0
+ e = odeint%e
+ qn = odeint%qn
+
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER)
+ s = qn%l
+ a0 = M_ZERO
+ a1 = M_ONE
+ a2 = -z/(s + M_ONE)*a1
+ a3 = (-z*a2 + (vp0 - e)*a1)/(M_TWO*s + M_THREE)
+ b0 = s*a1
+ b1 = (s + 1)*a2
+ b2 = (s + 2)*a3
+
+ case (ODE_SCALAR_REL)
+ w = e + M_TWO*M_C**2 - vp0
+ if (z /= M_ZERO) then
+ s = sqrt(qn%l*(qn%l + M_ONE) + M_ONE - (z/M_C)**2)
+ a0 = M_ONE
+ b0 = M_C/z*(s - M_ONE)*a0
+ a1 = (w*b0 - z/M_C*M_TWO*(e + M_C - vp0)*a0)/(M_TWO*s + M_ONE)/M_C
+ b1 = M_C/z*(s*a1 - w*b0/M_C)
+ a2 = (w*(vp0 - e)*a0/M_C + w*b1 - z/M_C*M_TWO*(e + M_C - vp0)*a1)/(M_FOUR*s + M_FOUR)/M_C
+ b2 = M_C/z*((s + M_ONE)*a2 - w*b1/M_C)
+ a3 = M_ZERO
+ else
+ if (qn%l == 0) then
+ s = M_ONE
+ a0 = M_ONE
+ b1 = (vp0 - e)*a0/M_THREE
+ a2 = w/(M_TWO*M_C)*b1
+ b0 = M_ZERO ; a1 = M_ZERO ; b2 = M_ZERO ; a3 = M_ZERO
+ else
+ s = qn%l
+ b0 = M_ONE
+ a1 = w/(s*M_C)*b0
+ a0 = M_ZERO ; b1 = M_ZERO ; a2 = M_ZERO ; b2 = M_ZERO ; a3 = M_ZERO
+ end if
+ end if
+
+ case (ODE_DIRAC)
+ if (z /= M_ZERO) then
+ a0 = M_ONE
+ s = sqrt(qn%k**2 - (z/M_C)**2)
+ b0 = M_C/z*(s + qn%k)*a0
+ else
+ if (qn%k < 0) then
+ s = -qn%k
+ a0 = M_ONE
+ b0 = M_ZERO
+ else
+ s = qn%k
+ a0 = M_ZERO
+ b0 = M_ONE
+ end if
+ end if
+ w = e + M_TWO*M_C**2 - vp0
+ a1 = (w*(s + M_ONE - qn%k)*b0 - z/M_C*(e - vp0)*a0)/(M_TWO*s + M_ONE)/M_C
+ b1 = -((e - vp0)*a0 + z*a1)/(s + M_ONE - qn%k)/M_C
+ a2 = (w*(s + M_TWO - qn%k)*b1 - z/M_C*(e - vp0)*a1)/(M_TWO*s + M_TWO)/(M_TWO*M_C)
+ b2 = -((e - vp0)*a1 + z*a2)/(s + M_TWO - qn%k)/M_C
+ a3 = M_ZERO
+
+ case (ODE_DIRAC_POL1)
+ s = sqrt( (qn%l + M_ONE)**2 - (z/M_C)**2 )
+ a0 = M_ONE
+ b0 = -Z/M_C*a0/(s+qn%l+M_ONE)
+ a1 = M_ZERO
+ b1 = M_ZERO
+ a2 = M_ZERO
+ b2 = M_ZERO
+ a3 = M_ZERO
+
+ case (ODE_DIRAC_POL2)
+ clm = -sqrt( (M_TWO*qn%l + M_ONE)**2 - M_FOUR*qn%m**2 )/(M_TWO*qn%l + M_ONE)
+ bxc_0 = bxc(odeint%potential, r0)
+
+ !Set 1
+ s = sqrt( (qn%l + M_ONE)**2 - (z/M_C)**2 )
+ a01 = M_ONE
+ b01 = -Z/M_C*a01/(s+qn%l+M_ONE)
+ a12 = Z/M_C*a01/M_C*bxc_0/M_TWO*Clm/(qn%l + s + M_ONE)
+ b12 = bxc_0/M_TWO*clm/M_C*a01
+
+ f(1) = a01*r0**(s - M_ONE)
+ f(2) = b01*r0**(s - M_ONE)
+ f(3) = a12*r0**s
+ f(4) = b12*r0**s
+
+ !Set 2
+ s = sqrt( qn%l**2 - (z/M_C)**2 )
+ d02 = M_ONE
+ c02 = + Z/M_C*d02/(s + qn%l)
+ c11 = - bxc_0/M_TWO*clm/M_C*d02
+ d11 = + Z/M_C*d02/M_C*bxc_0/M_TWO*Clm/(qn%l + s)
+
+ f(5) = c11*r0**s
+ f(6) = d11*r0**s
+ f(7) = c02*r0**(s - M_ONE)
+ f(8) = d02*r0**(s - M_ONE)
+
+ case default
+ message(1) = "Error in ode_bc_origin"
+ call write_fatal(1)
+
+ end select
+
+ if (odeint%ode /= ODE_DIRAC_POL2) then
+ f(1) = r0**(s - M_ONE)*(a0 + a1*r0 + a2*r0**2 + a3*r0**3)
+ f(2) = r0**(s - M_ONE)*(b0 + b1*r0 + b2*r0**2)
+ end if
+
+ ! MGGA term
+ if (odeint%ode == ODE_SCHRODINGER) then
+ f(2) = f(2)*(M_ONE + M_TWO*vtau(odeint%potential, r0, qn))
+ end if
+
+ call pop_sub()
+ end subroutine ode_bc_origin
+
+ subroutine ode_bc_infinity(odeint, rinf, f)
+ !-----------------------------------------------------------------------!
+ ! Set the value of the functions at a point far awy from the nucleus. !
+ ! !
+ ! odeint - integrator object !
+ ! rinf - point far away !
+ ! f - function at rinf !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: rinf
+ real(R8), intent(out) :: f(odeint%dim)
+
+ real(R8) :: e, vinf, minf, clm, alpha, bxc_i, bxc_r
+ type(qn_t) :: qn
+
+ call push_sub("ode_bc_infinity")
+
+ e = odeint%e
+ qn = odeint%qn
+
+ !Values of the functions at infinity
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER)
+ f(1) = ODE_FINF
+ f(2) = -sqrt(-M_TWO*e)*f(1)*(M_ONE + M_TWO*vtau(odeint%potential, rinf, qn))
+
+ case (ODE_SCALAR_REL)
+ f(1) = ODE_FINF
+ vinf = v(odeint%potential, rinf, qn)
+ minf = M_ONE + (e - vinf)/M_TWO/M_C2
+ f(2) = -sqrt(-M_TWO*minf*e)/(M_TWO*minf*M_C)*f(1)
+
+ case (ODE_DIRAC, ODE_DIRAC_POL1)
+ f(1) = ODE_FINF !a01*rinf**h *EXP(-alpha*rinf)
+ if (e /= M_ZERO) then
+ f(2) = e/(M_C*sqrt(-e)*sqrt(M_TWO + e/M_C2))*f(1)
+ else
+ f(2) = M_ZERO
+ end if
+
+ case (ODE_DIRAC_POL2)
+ !first set
+ f(1) = ODE_FINF !a01*rinf**h *EXP(-alpha*rinf)
+ if (e /= M_ZERO) then
+ clm = -sqrt( (M_TWO*qn%l + M_ONE)**2 - M_FOUR*qn%m**2 )/(M_TWO*qn%l + M_ONE)
+ bxc_i = -bxc_integral(odeint%potential, ra=rinf)
+ bxc_r = bxc(odeint%potential, rinf)
+ alpha = sqrt(-e)*sqrt(M_TWO + e/M_C2)
+
+ f(2) = e/(M_C*alpha)*f(1)
+ f(3) = alpha*clm*bxc_i/(M_TWO*e)*f(1)
+
+ f(4) = clm/(M_TWO*M_C)*(bxc_i - bxc_r/alpha)*f(1)
+ else
+ f(2) = M_ZERO
+ f(3) = M_ZERO
+ f(4) = M_ZERO
+ end if
+
+ !second set
+ f(5) = f(3)
+ f(6) = f(4)
+ f(7) = f(1)
+ f(8) = f(2)
+
+ case default
+ message(1) = "Error in ode_bc_infinity"
+ call write_fatal(1)
+
+ end select
+
+ call pop_sub()
+ end subroutine ode_bc_infinity
+
+ function ode_practical_infinity(odeint, ri, tol)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the practical infinity. The practical infinity !
+ ! is such that function at the practical infinity is of the order of !
+ ! magnitude of ODE_FINF. !
+ ! !
+ ! odeint - integrator object !
+ ! tol - tolerance !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: ri
+ real(R8), intent(in) :: tol
+ real(R8) :: ode_practical_infinity
+
+ real(R8) :: vinf, k, x, f, xm, d, h, e_max
+
+ call push_sub("ode_practical_infinity")
+
+ e_max = min(odeint%e, -1.0e-12_r8)
+
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER)
+ ode_practical_infinity = -log(ODE_FINF)/sqrt(-M_TWO*e_max)
+
+ case (ODE_SCALAR_REL)
+ ode_practical_infinity = -log(ODE_FINF)/sqrt(-M_TWO*(M_ONE + e_max/M_TWO/M_C**2)*e_max)
+
+ case (ODE_DIRAC, ODE_DIRAC_POL1, ODE_DIRAC_POL2)
+ k = sqrt(-e_max)*sqrt(M_TWO + e_max/M_C2)
+ x = ri
+ vinf = v(odeint%potential, x, odeint%qn)*x
+ h = -vinf*(e_max + M_C2)/(k*M_C2) - M_ONE
+ f = h*log(x) - k*x - log(ODE_FINF)
+ d = -log(ODE_FINF)/k - x
+ do
+ d = d*M_HALF
+ xm = x + d
+ vinf = v(odeint%potential, xm, odeint%qn)*xm
+ h = -vinf*(e_max+M_C2)/(k*M_C2) - 1.0
+ if (f*(h*log(xm) - k*xm - log(ODE_FINF)) > M_ZERO) x = xm
+ if (h*log(xm) - k*xm - log(ODE_FINF) == M_ZERO .or. d <= tol) exit
+ end do
+ ode_practical_infinity = xm
+
+ case default
+ message(1) = "Error in ode_practical_infinity"
+ call write_fatal(1)
+
+ end select
+
+ !Make sure the practical infinity is always larger than the classical turning point
+ if (ode_practical_infinity <= ri) ode_practical_infinity = ri + tol
+
+ call pop_sub()
+ end function ode_practical_infinity
+
+ subroutine ode_derivatives(odeint, r, y, f)
+ !-----------------------------------------------------------------------!
+ ! This subroutine is supposed to be called from the GSL ODE solver. It !
+ ! basically defines the system of equations to be solved by returning !
+ ! the values of the derivatives of the functions. !
+ ! !
+ ! The system of differential equations should be written in the !
+ ! following way: !
+ ! !
+ ! d y_i !
+ ! ----- = f_i (r, y_1(r), ... , y_2(r)) !
+ ! d r !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: r
+ real(R8), intent(in) :: y(odeint%dim)
+ real(R8), intent(out) :: f(odeint%dim)
+
+ real(R8) :: k, vr_m_e, dvdr_r, m, dmdr_r, mi, ci, c2i, ri, r2i, optvtau, llp1
+ real(R8) :: clm, bxc_r, two_l, two_m
+ real(R8) :: c11, c12, c33, c34, c21, c23, c22, c41, c43, c44
+
+ vr_m_e = v(odeint%potential, r, odeint%qn) - odeint%e
+ ri = M_ONE/r
+
+ select case (odeint%ode)
+ case (ODE_SCHRODINGER)
+ ! Schrodinger equation
+ !
+ ! d R
+ ! y_1 = R y_2 = (1 + 2 v_t) ---
+ ! d r
+ !
+ ! f_1 = y_2
+ !
+ ! 2 l(l+1)
+ ! f_2 = - - y_2 + [(1 + 2 v_t)------ + 2(v_ks - e)] y_1
+ ! r r^2
+ optvtau = M_ONE + M_TWO*vtau(odeint%potential, r, odeint%qn)
+ llp1 = real(odeint%qn%l, R8)*(real(odeint%qn%l, R8) + M_ONE)
+ r2i = ri*ri
+
+ f(1) = y(2)/optvtau
+ f(2) = (M_TWO*vr_m_e + optvtau*llp1*r2i)*y(1) - M_TWO*ri*y(2)
+
+ case (ODE_SCALAR_REL)
+ ! Scalar-relativistic equation
+ r2i = ri*ri
+ dvdr_r = dvdr(odeint%potential, r, odeint%qn)
+ ci = M_ONE/M_C
+ c2i = ci*ci
+ m = M_ONE - vr_m_e*M_HALF*c2i
+ mi = M_ONE/m
+ dmdr_r = -dvdr_r*M_HALF*c2i
+ llp1 = real(odeint%qn%l, R8)*(real(odeint%qn%l, R8) + M_ONE)
+
+ f(1) = M_TWO*m*M_C*y(2)
+ f(2) = (llp1*M_HALF*mi*r2i + vr_m_e)*ci*y(1) - M_TWO*ri*y(2)
+
+ case (ODE_DIRAC)
+ ! Spin-unpolarized Dirac equation
+ k = real(odeint%qn%k, R8)
+
+ ci = M_ONE/M_C
+ f(1) = -(k + M_ONE)*ri*y(1) + (M_TWO*M_C2 - vr_m_e)*ci*y(2)
+ f(2) = vr_m_e*ci*y(1) + (k - M_ONE)*ri*y(2)
+
+ case (ODE_DIRAC_POL1)
+ ! Spin-polarized Dirac equation for m == 2l+1
+ ci = M_ONE/M_C
+ bxc_r = bxc(odeint%potential, r)
+
+ c11 = odeint%qn%l*ri
+ c12 = ci*(M_TWO*M_C2 - (vr_m_e + M_TWO*odeint%qn%m/(M_TWO*odeint%qn%l + M_THREE)*bxc_r))
+ c21 = ci*(vr_m_e + M_TWO*odeint%qn%m/(M_TWO*odeint%qn%l + M_ONE)*bxc_r)
+ c22 = -(odeint%qn%l + M_TWO)*ri
+
+ f(1) = c11*y(1) + c12*y(2)
+ f(2) = c21*y(1) + c22*y(2)
+
+ case (ODE_DIRAC_POL2)
+ ! Spin-polarized Dirac equation for m /= 2l+1
+ ci = M_ONE/M_C
+ two_l = M_TWO*odeint%qn%l
+ two_m = M_TWO*odeint%qn%m
+ bxc_r = bxc(odeint%potential, r)
+ clm = -sqrt( (two_l + M_ONE)**2 - two_m**2 )/(two_l + M_ONE)
+
+ c11 = odeint%qn%l*ri
+ c12 = ci*(M_TWO*M_C2 - (vr_m_e + two_m/(two_l + M_THREE)*bxc_r))
+ c21 = ci*(vr_m_e + two_m/(two_l + M_ONE)*bxc_r)
+ c22 = -(odeint%qn%l + M_TWO)*ri
+ c23 = ci*clm*bxc_r
+ c33 = -(odeint%qn%l + M_ONE)*ri
+ c34 = ci*(M_TWO*M_C2 - (vr_m_e - two_m/(two_l - M_ONE) *bxc_r))
+ c41 = c23
+ c43 = ci*(vr_m_e - two_m/(two_l + M_ONE)*bxc_r)
+ c44 = (odeint%qn%l - M_ONE)*ri
+
+ f(1) = c11*y(1) + c12*y(2)
+ f(2) = c21*y(1) + c22*y(2) + c23*y(3)
+ f(3) = c33*y(3) + c34*y(4)
+ f(4) = c41*y(1) + c43*y(3) + c44*y(4)
+ f(5) = c11*y(5) + c12*y(6)
+ f(6) = c21*y(5) + c22*y(6) + c23*y(7)
+ f(7) = c33*y(7) + c34*y(8)
+ f(8) = c41*y(5) + c43*y(7) + c44*y(8)
+
+ end select
+
+ end subroutine ode_derivatives
+
+ subroutine ode_integrator_debug(odeint, ri, rf, nstep, r, f)
+ !-----------------------------------------------------------------------!
+ ! Prints debug information to the "debug_info/ode_integrator" file. !
+ ! !
+ ! odeint - integrator object !
+ ! ri - initial integration point !
+ ! rf - final integration point !
+ ! nstep - number of steps taken by the solver !
+ ! r - mesh used by the ODE solver !
+ ! f - integrated function !
+ !-----------------------------------------------------------------------!
+ type(ode_integrator_t), intent(in) :: odeint
+ real(R8), intent(in) :: ri, rf
+ integer, intent(in) :: nstep
+ real(R8), intent(in) :: r(odeint%nstepmax)
+ real(R8), intent(in) :: f(odeint%nstepmax, odeint%dim)
+
+ character(len=80) :: fmt
+ integer :: unit, i
+
+ call push_sub("ode_integrator_debug")
+
+ call io_open(unit, file='debug_info/ode_integrator')
+ write(unit,'("ODE Integrator maximum number of steps: ",I6)') odeint%nstepmax
+ write(unit,'("Quantum numbers:")')
+ write(unit,'(" l = ",I2)') odeint%qn%l
+ write(unit,'(" k = ",I2)') odeint%qn%k
+ write(unit,'(" s = ",F4.1)') odeint%qn%s
+ write(unit,'(" m = ",F4.1)') odeint%qn%m
+ write(unit,'(" sg = ",F4.1)') odeint%qn%sg
+ write(unit,'("Energy:",F12.5)') odeint%e
+ close(unit)
+
+ call io_open(unit, file='debug_info/ode_functions')
+ write(unit,'("# Integration Starting Point: ",ES10.3E2)') ri
+ write(unit,'("# Integration Ending Point: ",ES10.3E2)') rf
+ write(fmt,'(A,I1,A)') "(ES15.8E2,1X,", odeint%dim,"(ES15.8E2,1X))"
+ do i = 1, nstep
+ write(unit,fmt) r(i), f(i,1:odeint%dim)
+ end do
+ close(unit)
+
+ call pop_sub()
+ end subroutine ode_integrator_debug
+
+end module ode_integrator_m
diff --git a/src/odeint.c b/src/odeint.c
new file mode 100644
index 0000000..bee1af3
--- /dev/null
+++ b/src/odeint.c
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: odeint.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <config.h>
+
+#include <gsl/gsl_errno.h>
+#include <gsl/gsl_matrix.h>
+#include <gsl/gsl_odeiv.h>
+#include <math.h>
+
+
+struct ode_type_struct
+{
+ void (* fdf) (void *func_params, double *pt, double *py, double *pf);
+ double *pt, *py, *pf;
+ int *s_dim;
+ void *func_params;
+};
+
+typedef struct ode_type_struct ode_type;
+
+
+int f (double t, const double y[], double z[], void *params)
+{
+ int i;
+ ode_type *p = (ode_type *)params;
+ p->pt = &t;
+
+ for (i = 0; i < *(p->s_dim); i++) {
+ p->py[i] = y[i];
+ }
+
+ (*(p->fdf))(p->func_params, p->pt, p->py, p->pf);
+
+ for (i = 0; i < *(p->s_dim); i++) {
+ z[i] = p->pf[i];
+ }
+ return GSL_SUCCESS;
+}
+
+
+int FC_FUNC_ (ode_solve, ODE_SOLVE)
+ (double *t1, void **s, void **e, void **c, double *h1, int *nstepmax,
+ int *nstep, double x[], int *s_dim, double *y1, void *func_params,
+ void(* forfunc)(void *, double *, double *, double *) )
+{
+ double t, y[*s_dim], h, sign;
+ int i, j, k, status;
+ ode_type p;
+ p.fdf = forfunc;
+ p.s_dim = s_dim;
+ p.func_params = func_params;
+ p.py = malloc(*s_dim * sizeof(double));
+ p.pf = malloc(*s_dim * sizeof(double));
+
+ sign = (*t1-x[0])/fabs(*t1-x[0]);
+ h = sign*(*h1);
+ gsl_odeiv_system sys = { f, NULL, *s_dim, &p };
+
+ status = gsl_odeiv_evolve_reset ((gsl_odeiv_evolve *)(*e));
+ if ( status != GSL_SUCCESS ) return(status);
+
+ i = 0;
+ t = x[0];
+
+ for (j = 0; j < *s_dim; j++) {
+ y[j] = *(y1+*nstepmax*j);
+ }
+
+ while ( (*t1-t)*sign > 0.0 ) {
+
+ status = gsl_odeiv_evolve_apply( (gsl_odeiv_evolve *)(*e),
+ (gsl_odeiv_control *)(*c), (gsl_odeiv_step *)(*s), &sys, &t, *t1, &h, y );
+
+ if ( status != GSL_SUCCESS ) break;
+ i += 1;
+ x[i] = t;
+
+ for (j = 0; j < *s_dim; j++) {
+ *(y1+*nstepmax*j+i) = y[j];
+ }
+
+ //Check if the maximum number of steps has been reached
+ if ( i+1 > *nstepmax ) {
+ status = GSL_EMAXITER;
+ break;
+ }
+
+ }
+
+ *nstep = i+1;
+
+ free(p.pf);
+ free(p.py);
+
+ return (status);
+}
diff --git a/src/output.F90 b/src/output.F90
new file mode 100644
index 0000000..b611766
--- /dev/null
+++ b/src/output.F90
@@ -0,0 +1,137 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: output.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module output_m
+ use global_m
+ use io_m
+ use messages_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type info_file_t
+ integer :: unit
+ character(10) :: dir
+ end type info_file_t
+
+
+ !---Global Variables---!
+
+ integer :: n_files = 0
+ type(info_file_t), pointer :: info_files(:)
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: output_init, &
+ info_unit, &
+ output_end
+
+contains
+
+ subroutine output_init(dir)
+ !-----------------------------------------------------------------------!
+ ! Creates the output directory and opens the file "info". !
+ !-----------------------------------------------------------------------!
+ character(len=*), intent(in) :: dir
+
+ type(info_file_t), allocatable :: tmp(:)
+
+ call push_sub("output_init")
+
+ !Create directory
+ call sys_mkdir(trim(dir))
+
+ !Open file
+ if (n_files == 0) then
+ n_files = 1
+ allocate(info_files(1))
+ else
+ allocate(tmp(n_files))
+ tmp = info_files
+ deallocate(info_files)
+ allocate(info_files(n_files+1))
+ info_files(1:n_files) = tmp(1:n_files)
+ n_files = n_files + 1
+ end if
+ info_files(n_files)%dir = trim(dir)
+ call io_open(info_files(n_files)%unit, trim(dir)//"/info")
+
+ call pop_sub()
+ end subroutine output_init
+
+ function info_unit(dir)
+ !-----------------------------------------------------------------------!
+ ! Returns the unit number for the "dir/info" file. !
+ !-----------------------------------------------------------------------!
+ character(len=*), intent(in) :: dir
+ integer :: info_unit
+
+ integer :: i
+
+ ASSERT(n_files > 0)
+
+ do i = 1, n_files
+ if (trim(info_files(i)%dir) == trim(dir)) then
+ info_unit = info_files(i)%unit
+ exit
+ end if
+ end do
+
+ end function info_unit
+
+ subroutine output_end(dir)
+ !-----------------------------------------------------------------------!
+ ! Closes the "dir/info" file. !
+ !-----------------------------------------------------------------------!
+ character(len=*), intent(in) :: dir
+
+ integer :: i
+ type(info_file_t), allocatable :: tmp(:)
+
+ call push_sub("output_end")
+
+ ASSERT(n_files > 0)
+
+ if (n_files == 1) then
+ close(info_files(1)%unit)
+ deallocate(info_files)
+ n_files = 0
+ else
+ do i = 1, n_files
+ if (trim(info_files(i)%dir) == trim(dir)) exit
+ end do
+ close(info_files(i)%unit)
+ allocate(tmp(n_files-1))
+ tmp(1:i-1) = info_files(1:i-1)
+ tmp(i:n_files-1) = info_files(i+1:n_files)
+ deallocate(info_files)
+ allocate(info_files(n_files-1))
+ info_files = tmp
+ n_files = n_files - 1
+ end if
+
+ call pop_sub()
+ end subroutine output_end
+
+end module output_m
diff --git a/src/parser_symbols.F90 b/src/parser_symbols.F90
new file mode 100644
index 0000000..7aa4c82
--- /dev/null
+++ b/src/parser_symbols.F90
@@ -0,0 +1,405 @@
+!! Copyright (C) 2004-2013 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: parser_symbols.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module parser_symbols_m
+ use global_m
+ use oct_parser_m
+ use mesh_m
+ use mixing_m
+ use libxc_funcs_m
+ use functionals_m
+ use xc_m
+ use ode_integrator_m
+ use wave_equations_m
+ use states_m
+ use states_batch_m
+ use ps_io_m
+ use atom_m
+ use numerical_tests_m
+ use run_ape_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: set_parser_symbols
+
+contains
+
+ subroutine set_parser_symbols()
+ !-----------------------------------------------------------------------!
+ ! This subroutine defines some parser symbols. Basically they assign !
+ ! parameters used in the code to possible values of input variables. !
+ !-----------------------------------------------------------------------!
+
+ ! CalculationMode
+ call oct_parse_putsym("ae", AE)
+ call oct_parse_putsym("pp", PP_GEN)
+ call oct_parse_putsym("pp_test", PP_TEST)
+ call oct_parse_putsym("nt", NUM_TESTS)
+ call oct_parse_putsym("xc", XC_EVAL)
+ call oct_parse_putsym("ip", IP_CALC)
+
+ ! PPScheme
+ call oct_parse_putsym("ham", HAM)
+ call oct_parse_putsym("tm", TM)
+ call oct_parse_putsym("rtm", RTM)
+ call oct_parse_putsym("mrpp", MRPP)
+ call oct_parse_putsym("rmrpp", RMRPP)
+ call oct_parse_putsym("mtm", MTM)
+
+ ! TheoryLevel
+ call oct_parse_putsym("independent_particles", INDEPENDENT_PARTICLES)
+ call oct_parse_putsym("dft", DFT)
+
+ ! WaveEquation
+ call oct_parse_putsym("schrodinger", SCHRODINGER)
+ call oct_parse_putsym("dirac", DIRAC)
+ call oct_parse_putsym("scalar_rel", SCALAR_REL)
+
+ ! SpinMode
+ call oct_parse_putsym("unpolarized", 1)
+ call oct_parse_putsym("polarized", 2)
+
+ ! MixingScheme
+ call oct_parse_putsym("linear", MIX_LINEAR)
+ call oct_parse_putsym("broyden", MIX_BROYDEN)
+
+ !MeshType
+ call oct_parse_putsym("linear", MESH_LINEAR)
+ call oct_parse_putsym("log1", MESH_LOG1)
+ call oct_parse_putsym("log2", MESH_LOG2)
+
+ !MeshDerivMethod
+ call oct_parse_putsym("cubic_spline", MESH_CUBIC_SPLINE)
+ call oct_parse_putsym("finite_diff", MESH_FINITE_DIFF)
+
+ !SmearingFunction
+ call oct_parse_putsym("fixed_occ", OCC_FIXED)
+ call oct_parse_putsym("semiconducting", OCC_SEMICONDUCTING)
+ call oct_parse_putsym("averill_painter", OCC_AVERILL_PAINTER)
+
+ ! XC
+ call oct_parse_putsym("none", 0)
+
+ ! LDAs
+ call oct_parse_putsym("lda_x", XC_LDA_X)
+
+ call oct_parse_putsym("lda_c_wigner", XC_LDA_C_WIGNER*1000)
+ call oct_parse_putsym("lda_c_rpa", XC_LDA_C_RPA*1000)
+ call oct_parse_putsym("lda_c_hl", XC_LDA_C_HL*1000)
+ call oct_parse_putsym("lda_c_gl", XC_LDA_C_GL*1000)
+ call oct_parse_putsym("lda_c_xalpha", XC_LDA_C_XALPHA*1000)
+ call oct_parse_putsym("lda_c_vwn", XC_LDA_C_VWN*1000)
+ call oct_parse_putsym("lda_c_pz", XC_LDA_C_PZ*1000)
+ call oct_parse_putsym("lda_c_pz_mod", XC_LDA_C_PZ_MOD*1000)
+ call oct_parse_putsym("lda_c_ob_pz", XC_LDA_C_OB_PZ*1000)
+ call oct_parse_putsym("lda_c_pw", XC_LDA_C_PW*1000)
+ call oct_parse_putsym("lda_c_pw_mod", XC_LDA_C_PW_MOD*1000)
+ call oct_parse_putsym("lda_c_ob_pw", XC_LDA_C_OB_PW*1000)
+ call oct_parse_putsym("lda_c_vbh", XC_LDA_C_vBH*1000)
+ call oct_parse_putsym("lda_c_ml1", XC_LDA_C_ML1*1000)
+ call oct_parse_putsym("lda_c_ml2", XC_LDA_C_ML2*1000)
+ call oct_parse_putsym("lda_c_vwn_rpa", XC_LDA_C_VWN_RPA*1000)
+
+ call oct_parse_putsym("lda_xc_teter93", XC_LDA_XC_TETER93)
+
+ ! GGAs
+ call oct_parse_putsym("gga_x_pbe", XC_GGA_X_PBE)
+ call oct_parse_putsym("gga_x_pbe_r", XC_GGA_X_PBE_R)
+ call oct_parse_putsym("gga_x_b86", XC_GGA_X_B86)
+ call oct_parse_putsym("gga_x_b86_mgc", XC_GGA_X_B86_MGC)
+ call oct_parse_putsym("gga_x_b88", XC_GGA_X_B88)
+ call oct_parse_putsym("gga_x_g96", XC_GGA_X_G96)
+ call oct_parse_putsym("gga_x_pw86", XC_GGA_X_PW86)
+ call oct_parse_putsym("gga_x_pw91", XC_GGA_X_PW91)
+ call oct_parse_putsym("gga_x_optx", XC_GGA_X_OPTX)
+ call oct_parse_putsym("gga_x_dk87_r1", XC_GGA_X_DK87_R1)
+ call oct_parse_putsym("gga_x_dk87_r2", XC_GGA_X_DK87_R2)
+ call oct_parse_putsym("gga_x_lg93", XC_GGA_X_LG93)
+ call oct_parse_putsym("gga_x_ft97_a", XC_GGA_X_FT97_A)
+ call oct_parse_putsym("gga_x_ft97_b", XC_GGA_X_FT97_B)
+ call oct_parse_putsym("gga_x_pbe_sol", XC_GGA_X_PBE_SOL)
+ call oct_parse_putsym("gga_x_rpbe", XC_GGA_X_RPBE )
+ call oct_parse_putsym("gga_x_wc", XC_GGA_X_WC)
+ call oct_parse_putsym("gga_x_mpw91", XC_GGA_X_mPW91)
+ call oct_parse_putsym("gga_x_am05", XC_GGA_X_AM05)
+ call oct_parse_putsym("gga_x_pbea", XC_GGA_X_PBEA)
+ call oct_parse_putsym("gga_x_mpbe", XC_GGA_X_MPBE)
+ call oct_parse_putsym("gga_x_xpbe", XC_GGA_X_XPBE)
+ call oct_parse_putsym("gga_x_bayesian", XC_GGA_X_BAYESIAN)
+ call oct_parse_putsym("gga_x_pbe_jsjr", XC_GGA_X_PBE_JSJR)
+ call oct_parse_putsym("gga_x_optb88_vdw", XC_GGA_X_OPTB88_VDW)
+ call oct_parse_putsym("gga_x_pbek1_vdw", XC_GGA_X_PBEK1_VDW)
+ call oct_parse_putsym("gga_x_optpbe_vdw", XC_GGA_X_OPTPBE_VDW)
+ call oct_parse_putsym("gga_x_rge2", XC_GGA_X_RGE2)
+#if LIBXC_VERSION == 100
+ call oct_parse_putsym("gga_x_lb", XC_GGA_XC_LB)
+ call oct_parse_putsym("gga_xc_lb", XC_GGA_XC_LB)
+#else
+ call oct_parse_putsym("gga_x_lb", XC_GGA_X_LB)
+ call oct_parse_putsym("gga_xc_lb", XC_GGA_X_LB)
+#endif
+
+ call oct_parse_putsym("gga_c_pbe", XC_GGA_C_PBE*1000)
+ call oct_parse_putsym("gga_c_lyp", XC_GGA_C_LYP*1000)
+ call oct_parse_putsym("gga_c_p86", XC_GGA_C_P86*1000)
+ call oct_parse_putsym("gga_c_pbe_sol", XC_GGA_C_PBE_SOL*1000)
+ call oct_parse_putsym("gga_c_pw91", XC_GGA_C_PW91*1000)
+ call oct_parse_putsym("gga_c_am05", XC_GGA_C_AM05*1000)
+ call oct_parse_putsym("gga_c_xpbe", XC_GGA_C_XPBE*1000)
+ call oct_parse_putsym("gga_c_lm", XC_GGA_C_LM*1000)
+ call oct_parse_putsym("gga_c_pbe_jrgx", XC_GGA_C_PBE_JRGX*1000)
+ call oct_parse_putsym("gga_c_rge2", XC_GGA_C_RGE2*1000)
+
+ call oct_parse_putsym("gga_xc_hcth_93", XC_GGA_XC_HCTH_93 )
+ call oct_parse_putsym("gga_xc_hcth_120", XC_GGA_XC_HCTH_120)
+ call oct_parse_putsym("gga_xc_hcth_147", XC_GGA_XC_HCTH_147)
+ call oct_parse_putsym("gga_xc_hcth_407", XC_GGA_XC_HCTH_407)
+ call oct_parse_putsym("gga_xc_edf1", XC_GGA_XC_EDF1)
+ call oct_parse_putsym("gga_xc_xlyp", XC_GGA_XC_XLYP)
+ call oct_parse_putsym("gga_xc_b97", XC_GGA_XC_B97)
+ call oct_parse_putsym("gga_xc_b97_1", XC_GGA_XC_B97_1)
+ call oct_parse_putsym("gga_xc_b97_2", XC_GGA_XC_B97_2)
+ call oct_parse_putsym("gga_xc_b97_d", XC_GGA_XC_B97_D)
+ call oct_parse_putsym("gga_xc_b97_k", XC_GGA_XC_B97_K)
+ call oct_parse_putsym("gga_xc_b97_3", XC_GGA_XC_B97_3)
+ call oct_parse_putsym("gga_xc_pbe1w", XC_GGA_XC_PBE1W)
+ call oct_parse_putsym("gga_xc_mpwlyp1w", XC_GGA_XC_MPWLYP1W)
+ call oct_parse_putsym("gga_xc_pbelyp1w", XC_GGA_XC_PBELYP1W)
+ call oct_parse_putsym("gga_xc_sb98_1a", XC_GGA_XC_SB98_1A)
+ call oct_parse_putsym("gga_xc_sb98_1b", XC_GGA_XC_SB98_1B)
+ call oct_parse_putsym("gga_xc_sb98_1c", XC_GGA_XC_SB98_1C)
+ call oct_parse_putsym("gga_xc_sb98_2a", XC_GGA_XC_SB98_2A)
+ call oct_parse_putsym("gga_xc_sb98_2b", XC_GGA_XC_SB98_2B)
+ call oct_parse_putsym("gga_xc_sb98_2c", XC_GGA_XC_SB98_2C)
+
+ ! metaGGAs
+ call oct_parse_putsym("mgga_x_lta", XC_MGGA_X_LTA)
+ call oct_parse_putsym("mgga_x_tpss", XC_MGGA_X_TPSS)
+#if LIBXC_VERSION >= 200
+ ! This functional was renamed in libxc-2.0
+ call oct_parse_putsym("mgga_x_m06_l", XC_MGGA_X_M06_L)
+ call oct_parse_putsym("mgga_x_m06l", XC_MGGA_X_M06_L)
+#else
+ call oct_parse_putsym("mgga_x_m06l", XC_MGGA_X_M06L)
+#endif
+ call oct_parse_putsym("mgga_x_gvt4", XC_MGGA_X_GVT4)
+ call oct_parse_putsym("mgga_x_tau_hcth", XC_MGGA_X_TAU_HCTH)
+ call oct_parse_putsym("mgga_x_br89", XC_MGGA_X_BR89)
+ call oct_parse_putsym("mgga_x_bj06", XC_MGGA_X_BJ06)
+ call oct_parse_putsym("mgga_x_tb09", XC_MGGA_X_TB09)
+ call oct_parse_putsym("mgga_x_rpp09", XC_MGGA_X_RPP09)
+
+ call oct_parse_putsym("mgga_c_tpss", XC_MGGA_C_TPSS*1000)
+ call oct_parse_putsym("mgga_c_vsxc", XC_MGGA_C_VSXC*1000)
+
+ ! Kinetic energy functionals
+ call oct_parse_putsym("mgga_k_ge2", XC_MGGA_K_GE2)
+
+
+ ! Functinals added in libxc-1.1
+#if LIBXC_VERSION >= 110
+ ! LDAs
+ call oct_parse_putsym("lda_c_gombas", XC_LDA_C_GOMBAS*1000)
+
+ ! GGAs
+ call oct_parse_putsym("gga_x_rpw86", XC_GGA_X_RPW86)
+ call oct_parse_putsym("gga_x_kt1", XC_GGA_X_KT1)
+ call oct_parse_putsym("gga_x_herman", XC_GGA_X_HERMAN)
+ call oct_parse_putsym("gga_x_apbe", XC_GGA_X_APBE)
+ call oct_parse_putsym("gga_x_mb88", XC_GGA_X_MB88)
+ call oct_parse_putsym("gga_x_ol2", XC_GGA_X_OL2)
+ call oct_parse_putsym("gga_x_lbm", XC_GGA_X_LBM)
+
+ call oct_parse_putsym("gga_c_wl", XC_GGA_C_WL*1000)
+ call oct_parse_putsym("gga_c_wi", XC_GGA_C_WI*1000)
+ call oct_parse_putsym("gga_c_apbe", XC_GGA_C_APBE*1000)
+
+ call oct_parse_putsym("gga_xc_kt2", XC_GGA_XC_KT2)
+ call oct_parse_putsym("gga_x_lbm", XC_GGA_X_LBM)
+
+ ! metaGGAs
+
+
+ ! Kinetic energy functionals
+ call oct_parse_putsym("lda_k_tf", XC_LDA_K_TF)
+ call oct_parse_putsym("lda_k_lp", XC_LDA_K_LP)
+ call oct_parse_putsym("gga_k_vw", XC_GGA_K_VW)
+ call oct_parse_putsym("gga_k_ge2", XC_GGA_K_GE2)
+ call oct_parse_putsym("gga_k_golden", XC_GGA_K_GOLDEN)
+ call oct_parse_putsym("gga_k_yt65", XC_GGA_K_YT65)
+ call oct_parse_putsym("gga_k_baltin", XC_GGA_K_BALTIN)
+ call oct_parse_putsym("gga_k_lieb", XC_GGA_K_LIEB)
+ call oct_parse_putsym("gga_k_absr1", XC_GGA_K_ABSR1)
+ call oct_parse_putsym("gga_k_absr2", XC_GGA_K_ABSR2)
+ call oct_parse_putsym("gga_k_gr", XC_GGA_K_GR)
+ call oct_parse_putsym("gga_k_ludena", XC_GGA_K_LUDENA)
+ call oct_parse_putsym("gga_k_gp85", XC_GGA_K_GP85)
+ call oct_parse_putsym("gga_k_pearson", XC_GGA_K_PEARSON)
+ call oct_parse_putsym("gga_k_llp", XC_GGA_K_LLP)
+ call oct_parse_putsym("gga_k_ol1", XC_GGA_K_OL1)
+ call oct_parse_putsym("gga_k_ol2", XC_GGA_K_OL2)
+ call oct_parse_putsym("gga_k_fr_b88", XC_GGA_K_FR_B88)
+ call oct_parse_putsym("gga_k_fr_pw86", XC_GGA_K_FR_PW86)
+ call oct_parse_putsym("gga_k_dk", XC_GGA_K_DK)
+ call oct_parse_putsym("gga_k_perdew", XC_GGA_K_PERDEW)
+ call oct_parse_putsym("gga_k_vsk", XC_GGA_K_VSK)
+ call oct_parse_putsym("gga_k_vjks", XC_GGA_K_VJKS)
+ call oct_parse_putsym("gga_k_ernzerhof", XC_GGA_K_ERNZERHOF)
+ call oct_parse_putsym("gga_k_lc94", XC_GGA_K_LC94)
+ call oct_parse_putsym("gga_k_thakkar", XC_GGA_K_THAKKAR)
+ call oct_parse_putsym("gga_k_apbe", XC_GGA_K_APBE)
+ call oct_parse_putsym("gga_k_tw1", XC_GGA_K_TW1)
+ call oct_parse_putsym("gga_k_tw2", XC_GGA_K_TW2)
+ call oct_parse_putsym("gga_k_tw3", XC_GGA_K_TW3)
+ call oct_parse_putsym("gga_k_tw4", XC_GGA_K_TW4)
+#endif
+
+ ! Functinals added in libxc-1.2
+#if LIBXC_VERSION >= 120
+ ! LDAs
+ call oct_parse_putsym("lda_c_pw_rpa", XC_LDA_C_PW_RPA*1000)
+
+ ! GGAs
+ call oct_parse_putsym("gga_x_airy", XC_GGA_X_AIRY)
+ call oct_parse_putsym("gga_x_lag", XC_GGA_X_LAG)
+ call oct_parse_putsym("gga_x_htbs", XC_GGA_X_HTBS)
+ call oct_parse_putsym("gga_x_sogga", XC_GGA_X_SOGGA)
+ call oct_parse_putsym("gga_x_sogga11", XC_GGA_X_SOGGA11)
+ call oct_parse_putsym("gga_x_c09x", XC_GGA_X_C09X)
+
+ call oct_parse_putsym("gga_c_sogga11", XC_GGA_C_SOGGA11*1000)
+ call oct_parse_putsym("gga_c_sogga11_x", XC_GGA_C_SOGGA11_X*1000)
+ call oct_parse_putsym("gga_c_wi0", XC_GGA_C_WI0*1000)
+
+ call oct_parse_putsym("gga_xc_th1", XC_GGA_XC_TH1)
+ call oct_parse_putsym("gga_xc_th2", XC_GGA_XC_TH2)
+ call oct_parse_putsym("gga_xc_th3", XC_GGA_XC_TH3)
+ call oct_parse_putsym("gga_xc_th4", XC_GGA_XC_TH4)
+ call oct_parse_putsym("gga_xc_mohlyp", XC_GGA_XC_MOHLYP)
+ call oct_parse_putsym("gga_xc_mohlyp2", XC_GGA_XC_MOHLYP2)
+ call oct_parse_putsym("gga_xc_th_fl", XC_GGA_XC_TH_FL)
+ call oct_parse_putsym("gga_xc_th_fc", XC_GGA_XC_TH_FC)
+ call oct_parse_putsym("gga_xc_th_fcfo", XC_GGA_XC_TH_FCFO)
+ call oct_parse_putsym("gga_xc_th_fco", XC_GGA_XC_TH_FCO)
+#endif
+
+ ! Functinals added in libxc-2.0
+#if LIBXC_VERSION >= 200
+ ! LDAs
+ call oct_parse_putsym("lda_c_rc04", XC_LDA_C_RC04*1000)
+ call oct_parse_putsym("lda_c_vwn_1", XC_LDA_C_VWN_1*1000)
+ call oct_parse_putsym("lda_c_vwn_2", XC_LDA_C_VWN_2*1000)
+ call oct_parse_putsym("lda_c_vwn_3", XC_LDA_C_VWN_3*1000)
+ call oct_parse_putsym("lda_c_vwn_4", XC_LDA_C_VWN_4*1000)
+
+ ! GGAs
+ call oct_parse_putsym("gga_x_ssb_sw", XC_GGA_X_SSB_SW)
+ call oct_parse_putsym("gga_x_ssb", XC_GGA_X_SSB)
+ call oct_parse_putsym("gga_x_ssb_d", XC_GGA_X_SSB_D)
+ call oct_parse_putsym("gga_x_bpccac", XC_GGA_X_BPCCAC)
+ call oct_parse_putsym("gga_x_wpbeh", XC_GGA_X_WPBEH)
+ call oct_parse_putsym("gga_x_hjs_pbe", XC_GGA_X_HJS_PBE)
+ call oct_parse_putsym("gga_x_hjs_pbe_sol", XC_GGA_X_HJS_PBE_SOL)
+ call oct_parse_putsym("gga_x_hjs_b88", XC_GGA_X_HJS_B88)
+ call oct_parse_putsym("gga_x_hjs_b97x", XC_GGA_X_HJS_B97X)
+ call oct_parse_putsym("gga_x_ityh", XC_GGA_X_ITYH)
+
+ call oct_parse_putsym("gga_c_op_xalpha", XC_GGA_C_OP_XALPHA*1000)
+ call oct_parse_putsym("gga_c_op_g96", XC_GGA_C_OP_G96*1000)
+ call oct_parse_putsym("gga_c_op_pbe", XC_GGA_C_OP_PBE*1000)
+ call oct_parse_putsym("gga_c_op_b88", XC_GGA_C_OP_B88*1000)
+ call oct_parse_putsym("gga_c_ft97", XC_GGA_C_FT97*1000)
+ call oct_parse_putsym("gga_c_spbe", XC_GGA_C_SPBE*1000)
+ call oct_parse_putsym("gga_c_revtca", XC_GGA_C_REVTCA*1000)
+ call oct_parse_putsym("gga_c_tca", XC_GGA_C_TCA*1000)
+ call oct_parse_putsym("gga_c_optc", XC_GGA_C_OPTC*1000)
+
+ call oct_parse_putsym("gga_xc_hcth_407p", XC_GGA_XC_HCTH_407P)
+ call oct_parse_putsym("gga_xc_hcth_p76", XC_GGA_XC_HCTH_P76)
+ call oct_parse_putsym("gga_xc_hcth_p14", XC_GGA_XC_HCTH_P14)
+ call oct_parse_putsym("gga_xc_b97_gga1", XC_GGA_XC_B97_GGA1)
+ call oct_parse_putsym("gga_xc_hcth_a", XC_GGA_XC_HCTH_A)
+
+ ! MGGAs
+ call oct_parse_putsym("mgga_x_revtpss", XC_MGGA_X_REVTPSS)
+ call oct_parse_putsym("mgga_x_pkzb", XC_MGGA_X_PKZB)
+ call oct_parse_putsym("mgga_x_m05", XC_MGGA_X_M05)
+ call oct_parse_putsym("mgga_x_m05_2x", XC_MGGA_X_M05_2X)
+ call oct_parse_putsym("mgga_x_m06_hf", XC_MGGA_X_M06_HF)
+ call oct_parse_putsym("mgga_x_m06", XC_MGGA_X_M06)
+ call oct_parse_putsym("mgga_x_m06_2x", XC_MGGA_X_M06_2X)
+ call oct_parse_putsym("mgga_x_m08_hx", XC_MGGA_X_M08_HX)
+ call oct_parse_putsym("mgga_x_m08_so", XC_MGGA_X_M08_SO)
+
+ call oct_parse_putsym("mgga_c_m06_l", XC_MGGA_C_M06_L*1000)
+ call oct_parse_putsym("mgga_c_m06_hf", XC_MGGA_C_M06_HF*1000)
+ call oct_parse_putsym("mgga_c_m06", XC_MGGA_C_M06*1000)
+ call oct_parse_putsym("mgga_c_m06_2x", XC_MGGA_C_M06_2X*1000)
+ call oct_parse_putsym("mgga_c_m05", XC_MGGA_C_M05*1000)
+ call oct_parse_putsym("mgga_c_m05_2x", XC_MGGA_C_M05_2X*1000)
+ call oct_parse_putsym("mgga_c_pkzb", XC_MGGA_C_PKZB*1000)
+ call oct_parse_putsym("mgga_c_bc95", XC_MGGA_C_BC95*1000)
+#endif
+
+ ! XC corrections
+ call oct_parse_putsym("rel_c", XC_CORRECTION_REL_C)
+ call oct_parse_putsym("rel_x", XC_CORRECTION_REL_X)
+ call oct_parse_putsym("sic", XC_CORRECTION_SIC)
+ call oct_parse_putsym("adsic", XC_CORRECTION_ADSIC)
+ call oct_parse_putsym("rhoxc", XC_CORRECTION_RHOXC)
+
+ ! PPOutputFileFormat
+ call oct_parse_putsym("siesta", PSIO_SIESTA )
+ call oct_parse_putsym("fhi", PSIO_FHI )
+ call oct_parse_putsym("abinit5", PSIO_ABINIT5 )
+ call oct_parse_putsym("abinit6", PSIO_ABINIT6 )
+ call oct_parse_putsym("upf", PSIO_UPF )
+ call oct_parse_putsym("parsec", PSIO_PARSEC )
+ call oct_parse_putsym("latepp_so", PSIO_LATEPP_SO)
+
+ ! ODESteppingFunction
+ call oct_parse_putsym("rk2", ODE_RK2 )
+ call oct_parse_putsym("rk4", ODE_RK4 )
+ call oct_parse_putsym("rkf4", ODE_RKF4 )
+ call oct_parse_putsym("rkck4", ODE_RKCK4)
+ call oct_parse_putsym("rkpd8", ODE_RKPD8)
+
+ ! PPTests
+ call oct_parse_putsym("ld", TEST_LD)
+ call oct_parse_putsym("dm", TEST_DM)
+ call oct_parse_putsym("ip_test", TEST_IP)
+
+ ! Numerical tests
+ call oct_parse_putsym("derivatives", TEST_DERIVATIVES)
+ call oct_parse_putsym("integration", TEST_INTEGRATION)
+ call oct_parse_putsym("hartree", TEST_HARTREE)
+
+ ! Test functions
+ call oct_parse_putsym("gaussian", GAUSSIAN)
+ call oct_parse_putsym("inverse", INVERSE)
+ call oct_parse_putsym("exponential", EXPONENTIAL)
+
+ end subroutine set_parser_symbols
+
+end module parser_symbols_m
diff --git a/src/potentials.F90 b/src/potentials.F90
new file mode 100644
index 0000000..5c012de
--- /dev/null
+++ b/src/potentials.F90
@@ -0,0 +1,1088 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: potentials.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module potentials_m
+ use global_m
+ use messages_m
+ use mesh_m
+ use mixing_m
+ use quantum_numbers_m
+ use loc_potentials_m
+ use sl_potentials_m
+ use kb_projectors_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure potential_copy
+ end interface
+
+ interface potential_init
+ module procedure potential_init_ae, potential_init_ps, &
+ potential_init_ps_scr, potential_init_ps_full, &
+ potential_init_kb
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type potential_t
+ private
+ integer :: type
+ type(mesh_t) :: m
+
+ type(loc_potential_t), pointer :: vl
+ type(sl_potential_t), pointer :: vsl
+ type(kb_projectors_t), pointer :: kb
+
+ !Screening will be treated as a local potential
+ logical :: screened
+ logical :: polarized
+ integer :: nspin
+ type(loc_potential_t), pointer :: vhxc(:)
+ type(loc_potential_t), pointer :: vxctau(:)
+ end type potential_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: LOC = 1, &
+ SL = 2, &
+ KBP = 3
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: potential_t, &
+ potential_null, &
+ potential_init, &
+ assignment(=), &
+ potential_end, &
+ potential_save, &
+ potential_load, &
+ classical_turning_point, &
+ v, &
+ dvdr, &
+ d2vdr2, &
+ bxc, &
+ vtau, &
+ dvtaudr, &
+ bxc_integral, &
+ potential_debug, &
+ potential_update_vhxc, &
+ potential_mix, &
+ potential_nuclear_charge, &
+ potential_is_polarized, &
+ potential_min, &
+ potential_max, &
+ potential_rmin, &
+ potential_rmax, &
+ potential_kb_energy, &
+ potential_output, &
+ potential_ps_io_set
+
+
+contains
+
+ subroutine potential_null(potential)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the potential. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(out) :: potential
+
+ call push_sub("potential_null")
+
+ potential%type = 0
+ call mesh_null(potential%m)
+
+ nullify(potential%vl)
+ nullify(potential%vsl)
+ nullify(potential%kb)
+
+ potential%screened = .false.
+ potential%polarized = .false.
+ potential%nspin = 0
+ nullify(potential%vhxc)
+ nullify(potential%vxctau)
+
+ call pop_sub()
+ end subroutine potential_null
+
+ subroutine potential_init_ae(potential, m, nspin, vhxc, vxctau, z)
+ !-----------------------------------------------------------------------!
+ ! Initialize the potential. !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! vhxc - Hartree and exchange-correlation potential !
+ ! vxctau - extra exchange-correlation term from MGGA !
+ ! z - nuclear charge !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nspin
+ real(R8), intent(in) :: vhxc(m%np, nspin)
+ real(R8), intent(in) :: vxctau(m%np, nspin)
+ real(R8), intent(in) :: z
+
+ call push_sub("potential_init_ae")
+
+ ASSERT(potential%type == 0)
+
+ potential%type = LOC
+ potential%m = m
+
+ allocate(potential%vl)
+ call loc_potential_null(potential%vl)
+ call loc_potential_init(potential%vl, m, z=z)
+
+ potential%screened = .true.
+ call potential_init_vhxc(potential, nspin, vhxc, vxctau)
+
+ call pop_sub()
+ end subroutine potential_init_ae
+
+ subroutine potential_init_ps(potential, m, v)
+ !-----------------------------------------------------------------------!
+ ! Initialize a single pseudo-potential without screening. !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! v - values of the potential on the mesh !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: v(m%np)
+
+ call push_sub("potential_init_ps")
+
+ ASSERT(potential%type == 0)
+
+ potential%type = LOC
+ potential%m = m
+
+ allocate(potential%vl)
+ call loc_potential_null(potential%vl)
+ call loc_potential_init(potential%vl, m, v=v)
+
+ potential%screened = .false.
+
+ call pop_sub()
+ end subroutine potential_init_ps
+
+ subroutine potential_init_ps_scr(potential, m, nspin, vhxc, vxctau, v)
+ !-----------------------------------------------------------------------!
+ ! Initialize a single pseudo-potential with screening. !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! vhxc - Hartree and exchange-correlation potential !
+ ! vxctau - extra exchange-correlation term from MGGA !
+ ! v - values of the potential on the mesh !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nspin
+ real(R8), intent(in) :: vhxc(m%np, nspin)
+ real(R8), intent(in) :: vxctau(m%np, nspin)
+ real(R8), intent(in) :: v(m%np)
+
+ call push_sub("potential_init_ps_scr")
+
+ ASSERT(potential%type == 0)
+
+ potential%type = LOC
+ potential%m = m
+
+ allocate(potential%vl)
+ call loc_potential_null(potential%vl)
+ call loc_potential_init(potential%vl, m, v=v)
+
+ potential%screened = .true.
+ call potential_init_vhxc(potential, nspin, vhxc, vxctau)
+
+ call pop_sub()
+ end subroutine potential_init_ps_scr
+
+ subroutine potential_init_ps_full(potential, m, nspin, vhxc, vxctau, nc, qn, v)
+ !-----------------------------------------------------------------------!
+ ! Initialize a full set of pseudo-potentials with screening. !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! vhxc - Hartree and exchange-correlation potential !
+ ! vxctau - extra exchange-correlation term from MGGA !
+ ! nc - number of components !
+ ! qn - quantum numbers of each component !
+ ! v - values of the potentials on the mesh for each component !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nspin
+ real(R8), intent(in) :: vhxc(m%np, nspin)
+ real(R8), intent(in) :: vxctau(m%np, nspin)
+ integer, intent(in) :: nc
+ type(qn_t), intent(in) :: qn(nc)
+ real(R8), intent(in) :: v(m%np, nc)
+
+ call push_sub("potential_init_ps_full")
+
+ ASSERT(potential%type == 0)
+
+ potential%type = SL
+ potential%m = m
+
+ allocate(potential%vsl)
+ call sl_potential_null(potential%vsl)
+ call sl_potential_init(potential%vsl, m, nc, qn, v)
+
+ potential%screened = .true.
+ call potential_init_vhxc(potential, nspin, vhxc, vxctau)
+
+ call pop_sub()
+ end subroutine potential_init_ps_full
+
+ subroutine potential_init_kb(potential, m, l_local, v_local, nc, qn, e, proj_f)
+ !-----------------------------------------------------------------------!
+ ! Initialize a full set of pseudo-potentials with screening. !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! l_local - local potential angular momentum !
+ ! v_local - the local part of the potential !
+ ! nc - the number of KB projectors !
+ ! qn - quantum numbers of each component !
+ ! e - the KB energies !
+ ! proj_f - values of the projectors on the mesh !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: l_local
+ type(potential_t), intent(in) :: v_local
+ integer, intent(in) :: nc
+ type(qn_t), intent(in) :: qn(nc)
+ real(R8), intent(in) :: e(nc)
+ real(R8), intent(in) :: proj_f(m%np, nc)
+
+ integer :: is
+
+ call push_sub("potential_init_kb")
+
+ ASSERT(potential%type == 0)
+ ASSERT(v_local%type == LOC)
+
+ potential%type = KBP
+ potential%m = m
+
+ allocate(potential%kb)
+ call kb_projectors_null(potential%kb)
+ call kb_projectors_init(potential%kb, l_local, v_local%vl, m, nc, qn, e, proj_f)
+
+ potential%screened = v_local%screened
+ if (v_local%screened) then
+ potential%nspin = v_local%nspin
+ allocate(potential%vhxc(potential%nspin), potential%vxctau(potential%nspin))
+ do is = 1, potential%nspin
+ call loc_potential_null(potential%vhxc(is))
+ call loc_potential_null(potential%vxctau(is))
+ potential%vhxc(is) = v_local%vhxc(is)
+ potential%vxctau(is) = v_local%vxctau(is)
+ end do
+ end if
+
+ call pop_sub()
+ end subroutine potential_init_kb
+
+ subroutine potential_init_vhxc(potential, nspin, vhxc, vxctau)
+ !-----------------------------------------------------------------------!
+ ! Initialize the Hartree and exchange-correlation part of the potential.!
+ ! !
+ ! potential - potential to be initialized !
+ ! nspin - number of spin channels !
+ ! vhxc - Hartree and exchange-correlation potential !
+ ! vxctau - extra exchange-correlation term from MGGA !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ integer, intent(in) :: nspin
+ real(R8), intent(in) :: vhxc(potential%m%np, nspin)
+ real(R8), intent(in) :: vxctau(potential%m%np, nspin)
+
+ integer :: is
+ real(R8) :: ra, rb, bxc_int
+
+ call push_sub("potential_init_vhxc")
+
+ ASSERT(potential%type /= 0)
+
+ potential%nspin = nspin
+ allocate(potential%vhxc(nspin), potential%vxctau(nspin))
+ do is = 1, nspin
+ call loc_potential_null(potential%vhxc(is))
+ call loc_potential_null(potential%vxctau(is))
+ call loc_potential_init(potential%vhxc(is), potential%m, v=vhxc(:, is))
+ call loc_potential_init(potential%vxctau(is), potential%m, v=vxctau(:, is))
+ end do
+
+ if (nspin == 2) then
+ ra = potential_rmin(potential)
+ rb = potential_rmax(potential)
+ bxc_int = M_HALF*(loc_integral(potential%vhxc(2), ra, rb) - &
+ loc_integral(potential%vhxc(1), ra, rb))
+ potential%polarized = abs(bxc_int) > 1e-10
+ else
+ potential%polarized = .false.
+ end if
+
+ call pop_sub()
+ end subroutine potential_init_vhxc
+
+ subroutine potential_copy(potential_a, potential_b)
+ !-----------------------------------------------------------------------!
+ ! Copies the potential potential_a to potential potential_b. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential_a
+ type(potential_t), intent(in) :: potential_b
+
+ integer :: is
+
+ call push_sub("potential_copy")
+
+ ASSERT(potential_b%type /= 0)
+
+ call potential_end(potential_a)
+
+ potential_a%type = potential_b%type
+ potential_a%m = potential_b%m
+
+ select case (potential_b%type)
+ case (LOC)
+ allocate(potential_a%vl)
+ call loc_potential_null(potential_a%vl)
+ potential_a%vl = potential_b%vl
+ case (SL)
+ allocate(potential_a%vsl)
+ call sl_potential_null(potential_a%vsl)
+ call sl_potential_copy(potential_a%m, potential_a%vsl, potential_b%vsl)
+ case (KBP)
+ allocate(potential_a%kb)
+ call kb_projectors_null(potential_a%kb)
+ call kb_projectors_copy(potential_a%m, potential_a%kb, potential_b%kb)
+ end select
+
+ potential_a%screened = potential_b%screened
+ potential_a%polarized = potential_b%polarized
+ potential_a%nspin = potential_b%nspin
+ if (potential_b%screened) then
+ allocate(potential_a%vhxc(potential_a%nspin), potential_a%vxctau(potential_a%nspin))
+ do is = 1, potential_a%nspin
+ call loc_potential_null(potential_a%vhxc(is))
+ call loc_potential_null(potential_a%vxctau(is))
+ potential_a%vhxc(is) = potential_b%vhxc(is)
+ potential_a%vxctau(is) = potential_b%vxctau(is)
+ end do
+ end if
+
+ call pop_sub()
+ end subroutine potential_copy
+
+ subroutine potential_end(potential)
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to the potential. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+
+ integer :: is
+
+ call push_sub("potential_end")
+
+ potential%type = 0
+ call mesh_end(potential%m)
+
+ if (associated(potential%vl)) then
+ call loc_potential_end(potential%vl)
+ deallocate(potential%vl)
+ end if
+
+ if (associated(potential%vsl)) then
+ call sl_potential_end(potential%vsl)
+ deallocate(potential%vsl)
+ end if
+
+ if (associated(potential%kb)) then
+ call kb_projectors_end(potential%kb)
+ deallocate(potential%kb)
+ end if
+
+ if (associated(potential%vhxc)) then
+ do is = 1, potential%nspin
+ call loc_potential_end(potential%vhxc(is))
+ call loc_potential_end(potential%vxctau(is))
+ end do
+ deallocate(potential%vhxc, potential%vxctau)
+ end if
+ potential%nspin = 0
+ potential%screened = .false.
+
+ call pop_sub()
+ end subroutine potential_end
+
+ subroutine potential_save(unit, potential)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file. !
+ ! !
+ ! uni - file unit number !
+ ! potential - potential to be written !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(potential_t), intent(in) :: potential
+
+ integer :: is
+
+ call push_sub("potential_save")
+
+ ASSERT(potential%type /= 0)
+
+ write(unit) potential%type
+ call mesh_save(unit, potential%m)
+
+ select case (potential%type)
+ case (LOC)
+ call loc_potential_save(unit, potential%m, potential%vl)
+ case (SL)
+ call sl_potential_save(unit, potential%m, potential%vsl)
+ case (KBP)
+ call kb_projectors_save(unit, potential%m, potential%kb)
+ end select
+
+ write(unit) potential%screened
+ if (potential%screened) then
+ write(unit) potential%nspin
+ do is = 1, potential%nspin
+ call loc_potential_save(unit, potential%m, potential%vhxc(is))
+ call loc_potential_save(unit, potential%m, potential%vxctau(is))
+ end do
+ end if
+
+ call pop_sub()
+ end subroutine potential_save
+
+ subroutine potential_load(unit, potential)
+ !-----------------------------------------------------------------------!
+ ! Reads the potential from a file. !
+ ! !
+ ! unit - file unit number !
+ ! potential - potential to be read !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(potential_t), intent(inout) :: potential
+
+ integer :: is
+
+ call push_sub("potential_load")
+
+ ASSERT(potential%type == 0)
+
+ read(unit) potential%type
+ call mesh_load(unit, potential%m)
+
+ select case (potential%type)
+ case (LOC)
+ allocate(potential%vl)
+ call loc_potential_null(potential%vl)
+ call loc_potential_load(unit, potential%m, potential%vl)
+ case (SL)
+ allocate(potential%vsl)
+ call sl_potential_null(potential%vsl)
+ call sl_potential_load(unit, potential%m, potential%vsl)
+ case (KBP)
+ allocate(potential%kb)
+ call kb_projectors_null(potential%kb)
+ call kb_projectors_load(unit, potential%m, potential%kb)
+ end select
+
+ read(unit) potential%screened
+ if (potential%screened) then
+ read(unit) potential%nspin
+ allocate(potential%vhxc(potential%nspin), potential%vxctau(potential%nspin))
+ do is = 1, potential%nspin
+ call loc_potential_null(potential%vhxc(is))
+ call loc_potential_null(potential%vxctau(is))
+ call loc_potential_load(unit, potential%m, potential%vhxc(is))
+ call loc_potential_load(unit, potential%m, potential%vxctau(is))
+ end do
+ end if
+
+ call pop_sub()
+ end subroutine potential_load
+
+ function classical_turning_point(potential, e, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the closest mesh point to the point at which the potential is !
+ ! equal to a given energy. !
+ ! !
+ ! m - mesh !
+ ! potential - potential !
+ ! e - energy !
+ ! qn - set of quantum numbers !
+
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: e
+ type(qn_t), intent(in) :: qn
+ real(R8) :: classical_turning_point
+
+ integer :: i
+ real(R8) :: d
+
+ call push_sub("classical_turning_point")
+
+ ASSERT(potential%type /= 0)
+
+ if (e == M_ZERO) then
+ classical_turning_point = potential%m%r(potential%m%np - 1)
+ else
+ d = v(potential, potential%m%r(potential%m%np), qn) - e
+ do i = potential%m%np - 1, 1, -1
+ if ((v(potential, potential%m%r(i), qn) - e)*d <= M_ZERO) then
+ classical_turning_point = potential%m%r(i)
+ exit
+ end if
+ if (i == 1) then
+ classical_turning_point = potential%m%r(potential%m%np - 1)
+ end if
+ end do
+ end if
+
+ call pop_sub()
+ end function classical_turning_point
+
+ function v(potential, r, qn, unscreened)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the potential felt by an electron of at radius r.!
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ logical, intent(in), optional :: unscreened
+ real(R8) :: v
+
+ logical :: unscreened_
+
+ ASSERT(potential%type /= 0)
+
+ if( r <= potential%m%r(potential%m%np)) then
+ select case (potential%type)
+ case (LOC)
+ v = loc_v(potential%vl, r)
+ case (SL)
+ v = sl_v(potential%vsl, r, qn)
+ case (KBP)
+ v = kb_v(potential%kb, r)
+ end select
+
+ if (potential%screened) then
+ unscreened_ = .false.
+ if (present(unscreened)) unscreened_ = unscreened
+ if (.not. unscreened_) then
+ if (qn%s == M_ZERO .and. qn%m /= M_ZERO) then
+ v = v + M_HALF*(loc_v(potential%vhxc(1), r) + loc_v(potential%vhxc(2), r))
+ else
+ v = v + loc_v(potential%vhxc(int(qn%s + 1.5_r8)), r)
+ end if
+ end if
+ end if
+
+ else
+ v = M_ZERO
+ end if
+
+ end function v
+
+ function dvdr(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the first derivative of the potential felt by an !
+ ! electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: dvdr
+
+ ASSERT(potential%type /= 0)
+
+ if( r <= potential%m%r(potential%m%np)) then
+ select case (potential%type)
+ case (LOC)
+ dvdr = loc_dvdr(potential%vl, r)
+ case (SL)
+ dvdr = sl_dvdr(potential%vsl, r, qn)
+ case (KBP)
+ dvdr = kb_dvdr(potential%kb, r)
+ end select
+
+ if (potential%screened) then
+ if (qn%s == M_ZERO .and. qn%m /= M_ZERO) then
+ dvdr = dvdr + M_HALF*(loc_dvdr(potential%vhxc(1), r) + loc_dvdr(potential%vhxc(2), r))
+ else
+ dvdr = dvdr + loc_dvdr(potential%vhxc(int(qn%s + 1.5_r8)), r)
+ end if
+ end if
+
+ else
+ dvdr = M_ZERO
+ end if
+
+ end function dvdr
+
+ function d2vdr2(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the second derivative of the potential felt by !
+ ! an electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: d2vdr2
+
+ ASSERT(potential%type /= 0)
+
+ if( r <= potential%m%r(potential%m%np)) then
+ select case (potential%type)
+ case (LOC)
+ d2vdr2 = loc_d2vdr2(potential%vl, r)
+ case (SL)
+ d2vdr2 = sl_d2vdr2(potential%vsl, r, qn)
+ case (KBP)
+ d2vdr2 = kb_d2vdr2(potential%kb, r)
+ end select
+
+ if (potential%screened) then
+ if (qn%s == M_ZERO .and. qn%m /= M_ZERO) then
+ d2vdr2 = d2vdr2 + M_HALF*(loc_d2vdr2(potential%vhxc(1), r) + loc_d2vdr2(potential%vhxc(2), r))
+ else
+ d2vdr2 = d2vdr2 + loc_d2vdr2(potential%vhxc(int(qn%s + 1.5_r8)), r)
+ end if
+ end if
+
+ else
+ d2vdr2 = M_ZERO
+ end if
+
+ end function d2vdr2
+
+ function bxc(potential, r)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the potential felt by an electron of at radius r.!
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ real(R8) :: bxc
+
+ ASSERT(potential%type /= 0)
+ ASSERT(potential%screened)
+
+ if(potential%nspin == 2 .and. r <= potential%m%r(potential%m%np)) then
+ bxc = M_HALF*(loc_v(potential%vhxc(2), r) - loc_v(potential%vhxc(1), r))
+ else
+ bxc = M_ZERO
+ end if
+
+ end function bxc
+
+ function vtau(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the extra exchange-correlation term from MGGA !
+ ! at radius r. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: vtau
+
+ ASSERT(potential%type /= 0)
+
+ if( r <= potential%m%r(potential%m%np) .and. potential%screened) then
+ vtau = loc_v(potential%vxctau(int(qn%s + 1.5_r8)), r)
+ else
+ vtau = M_ZERO
+ end if
+
+ end function vtau
+
+ function dvtaudr(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the first derivative of the extra !
+ ! exchange-correlation term from MGGA at radius r. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: dvtaudr
+
+ ASSERT(potential%type /= 0)
+
+ if( r <= potential%m%r(potential%m%np) .and. potential%screened) then
+ dvtaudr = loc_dvdr(potential%vxctau(int(qn%s + 1.5_r8)), r)
+ else
+ dvtaudr = M_ZERO
+ end if
+
+ end function dvtaudr
+
+ function bxc_integral(potential, ra, rb)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the integral of bxc between ra and rb. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8), optional, intent(in) :: ra, rb
+ real(R8) :: bxc_integral
+
+ real(R8) :: ra_, rb_
+
+ ASSERT(potential%type /= 0)
+ ASSERT(potential%screened)
+
+ if (present(ra)) then
+ ra_ = ra
+ ra_ = max(potential_rmin(potential), ra_)
+ ra_ = min(potential_rmax(potential), ra_)
+ else
+ ra_ = potential_rmin(potential)
+ end if
+
+ if (present(rb)) then
+ rb_ = rb
+ rb_ = max(potential_rmin(potential), rb_)
+ rb_ = min(potential_rmax(potential), rb_)
+ else
+ rb_ = potential_rmax(potential)
+ end if
+
+ if (potential%nspin == 2) then
+ bxc_integral = M_HALF*(loc_integral(potential%vhxc(2), ra_, rb_) - &
+ loc_integral(potential%vhxc(1), ra_, rb_))
+ else
+ bxc_integral = M_ZERO
+ end if
+
+ end function bxc_integral
+
+ subroutine potential_debug(potential)
+ !-----------------------------------------------------------------------!
+ ! Prints debug information to the "debug_info" directory. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+
+ call push_sub("potential_debug")
+
+ ASSERT(potential%type /= 0)
+
+ call potential_output(potential, "debug_info")
+
+ call pop_sub()
+ end subroutine potential_debug
+
+ subroutine potential_update_vhxc(potential, vhxc, vxctau)
+ !-----------------------------------------------------------------------!
+ ! Update the value of the Hartree and exchange-correlation part of the !
+ ! potential. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: potential
+ real(R8), intent(in) :: vhxc(:,:)
+ real(R8), intent(in) :: vxctau(:,:)
+
+ integer :: is
+
+ call push_sub("potential_update_vhxc")
+
+ ASSERT(potential%type /= 0 .and. potential%screened)
+
+ do is = 1, potential%nspin
+ call loc_potential_end(potential%vhxc(is))
+ call loc_potential_end(potential%vxctau(is))
+ end do
+ deallocate(potential%vhxc, potential%vxctau)
+
+ call potential_init_vhxc(potential, potential%nspin, vhxc, vxctau)
+
+ call pop_sub()
+ end subroutine potential_update_vhxc
+
+ subroutine potential_mix(pot_in, pot_out, nit, mix)
+ !-----------------------------------------------------------------------!
+ ! Mix input and output all-electron potentials. This subroutine should !
+ ! be used during an self-consistent field cycle and is only valid for !
+ ! all-electron potentials. On exit the input potential. !
+ ! is replaced by the mixed potential. !
+ ! !
+ ! m - mesh !
+ ! pot_in - input potential/new potential !
+ ! pot_out - output potential !
+ ! nit - number of iteration of the SCF cycle !
+ ! mix_info - information about the mixing procedure !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(inout) :: pot_in
+ integer, intent(in) :: nit
+ type(potential_t), intent(in) :: pot_out
+ type(mixing_t), intent(inout) :: mix
+
+ integer :: is, i, np, nspin
+ real(R8), allocatable :: vhxc_in(:), vhxc_out(:), vhxc_new(:), vhxc(:,:), vxctau(:,:)
+
+ call push_sub("potential_mix")
+
+ ASSERT(pot_in%type == pot_out%type)
+ ASSERT(pot_in%screened .and. pot_out%screened)
+
+ np = pot_in%m%np
+ nspin = pot_in%nspin
+
+ !Put all the components of vhxc in a single vector
+ allocate(vhxc_in(np*pot_in%nspin*2))
+ allocate(vhxc_out(np*pot_in%nspin*2))
+ allocate(vhxc_new(np*pot_in%nspin*2))
+ do is = 1, pot_in%nspin
+ do i = 1, np
+ vhxc_in(np*(is - 1) + i) = loc_v(pot_in%vhxc(is), pot_in%m%r(i))
+ vhxc_out(np*(is - 1) + i) = loc_v(pot_out%vhxc(is), pot_in%m%r(i))
+ vhxc_in(np*(is + nspin - 1) + i) = loc_v(pot_in%vxctau(is), pot_in%m%r(i))
+ vhxc_out(np*(is + nspin - 1) + i) = loc_v(pot_out%vxctau(is), pot_in%m%r(i))
+ end do
+ end do
+
+ !Mix
+ call mixing(mix, nit, vhxc_in, vhxc_out, vhxc_new)
+
+ !Put the components of vhxc_new back to the original ordering
+ allocate(vhxc(np, pot_in%nspin), vxctau(np, pot_in%nspin))
+ do is = 1, pot_in%nspin
+ do i = 1, np
+ vhxc(i, is) = vhxc_new(np*(is - 1) + i)
+ vxctau(i, is) = vhxc_new(np*(is + nspin - 1) + i)
+ end do
+ end do
+
+ !Replace vhxc part of the input potential by the new vhxc
+ call potential_update_vhxc(pot_in, vhxc, vxctau)
+ deallocate(vhxc_in, vhxc_out, vhxc_new, vhxc, vxctau)
+
+ call pop_sub()
+ end subroutine potential_mix
+
+ function potential_nuclear_charge(potential)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the nuclear charge of an all-electron potential. !
+ ! Returns zero for other types of potentials. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8) :: potential_nuclear_charge
+
+ call push_sub("potential_nuclear_charge")
+
+ ASSERT(potential%type /= 0)
+
+ potential_nuclear_charge = M_ZERO
+ if (potential%type == LOC) then
+ potential_nuclear_charge = loc_potential_nuclear_charge(potential%vl)
+ end if
+
+ call pop_sub()
+ end function potential_nuclear_charge
+
+function potential_is_polarized(potential)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ logical :: potential_is_polarized
+
+ call push_sub("potential_is_polarized")
+
+ ASSERT(potential%type /= 0)
+
+ potential_is_polarized = potential%polarized
+
+ call pop_sub()
+ end function potential_is_polarized
+
+ function potential_min(potential, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the minimum value of the potential. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ type(qn_t), intent(in) :: qn
+ real(R8) :: potential_min
+
+ integer :: i
+ real(R8) :: vv
+
+ call push_sub("potential_min")
+
+ ASSERT(potential%type /= 0)
+
+ if (potential%type == LOC) then
+ if (loc_potential_is_ae(potential%vl)) then
+ message(1) = "Trying to find the minimun of an all-electron potential."
+ call write_fatal(1)
+ end if
+ end if
+
+ potential_min = M_ZERO
+ do i = 1, potential%m%np
+ vv = v(potential, potential%m%r(i), qn)
+ if (vv < potential_min) potential_min = vv
+ end do
+
+ call pop_sub()
+ end function potential_min
+
+ function potential_max(potential, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the maximum value of the potential. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ type(qn_t), intent(in) :: qn
+ real(R8) :: potential_max
+
+ integer :: i
+ real(R8) :: vv
+
+ call push_sub("potential_max")
+
+ ASSERT(potential%type /= 0)
+
+ potential_max = v(potential, potential%m%r(1), qn)
+ do i = 2, potential%m%np
+ vv = v(potential, potential%m%r(i), qn)
+ if (vv > potential_max) potential_max = vv
+ end do
+
+ call pop_sub()
+ end function potential_max
+
+ function potential_rmin(potential)
+ !-----------------------------------------------------------------------!
+ ! Closest point to the origin that can be safely used. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8) :: potential_rmin
+
+ call push_sub("potential_rmin")
+
+ ASSERT(potential%type /= 0)
+
+ potential_rmin = potential%m%r(1)
+
+ call pop_sub()
+ end function potential_rmin
+
+ function potential_rmax(potential)
+ !-----------------------------------------------------------------------!
+ ! Larger point that can be safely used. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ real(R8) :: potential_rmax
+
+ call push_sub("potential_rmax")
+
+ ASSERT(potential%type /= 0)
+
+ potential_rmax = potential%m%r(potential%m%np)
+
+ call pop_sub()
+ end function potential_rmax
+
+ function potential_kb_energy(potential, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the KB energy. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ type(qn_t), intent(in) :: qn
+ real(R8) :: potential_kb_energy
+
+ call push_sub("potential_kb_energy")
+
+ ASSERT(potential%type == KBP)
+
+ potential_kb_energy = kb_projectors_energy(potential%kb, qn)
+
+ call pop_sub()
+ end function potential_kb_energy
+
+ subroutine potential_output(potential, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file in a format suitable for plotting. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+ character(len=*), intent(in) :: dir
+
+ call push_sub("potential_output")
+
+ ASSERT(potential%type /= 0)
+
+ select case (potential%type)
+ case (LOC)
+ call loc_potential_output(potential%vl, potential%m, trim(dir)//"/v_ext")
+ case (SL)
+ call sl_potential_output(potential%vsl, potential%m, dir)
+ case (KBP)
+ call kb_projectors_output(potential%kb, potential%m, dir)
+ end select
+
+ if (potential%screened .and. potential%type /= KBP) then
+ if (potential%nspin == 1) then
+ call loc_potential_output(potential%vhxc(1), potential%m, trim(dir)//"/v_hxc")
+ else
+ call loc_potential_output(potential%vhxc(1), potential%m, trim(dir)//"/v_hxc_dn")
+ call loc_potential_output(potential%vhxc(2), potential%m, trim(dir)//"/v_hxc_up")
+ end if
+ end if
+
+ call pop_sub()
+ end subroutine potential_output
+
+ subroutine potential_ps_io_set(potential)
+ !-----------------------------------------------------------------------!
+ ! Pass the information about the pseudopotentials to the ps_io module. !
+ !-----------------------------------------------------------------------!
+ type(potential_t), intent(in) :: potential
+
+ call push_sub("potential_ps_io_set")
+
+ ASSERT(potential%type == SL .or. potential%type == KBP)
+
+ select case (potential%type)
+ case (SL)
+ call sl_potential_ps_io_set(potential%vsl, potential%m)
+ case (KBP)
+ call kb_projectors_ps_io_set(potential%kb, potential%m)
+ end select
+
+ call pop_sub()
+ end subroutine potential_ps_io_set
+
+end module potentials_m
diff --git a/src/ps_io.F90 b/src/ps_io.F90
new file mode 100644
index 0000000..0e4b2c3
--- /dev/null
+++ b/src/ps_io.F90
@@ -0,0 +1,1347 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira, D. Naveh
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: ps_io.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module ps_io_m
+ use global_m
+ use io_m
+ use messages_m
+ use mesh_m
+ use xc_f90_lib_m
+#if HAVE_PSPIO
+ use pspio_f90_types_m
+ use pspio_f90_lib_m
+#endif
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type ps_io_t
+ private
+#if HAVE_PSPIO
+ type(pspio_f90_pointer_t) :: pspdata
+#endif
+
+ integer :: file_format
+
+ type(mesh_t) :: m
+
+ !Generalities
+ character(3) :: symbol
+ real(R8) :: z_nuc
+ real(R8) :: z_val
+ real(R8) :: z_ion
+ integer :: wave_eq
+ integer :: scheme
+
+ !Pseudo potentials
+ logical :: have_psp
+ integer :: n_psp
+ integer, pointer :: psp_l(:)
+ real(R8), pointer :: psp_j(:)
+ real(R8), pointer :: psp_v(:,:)
+
+ !Pseudo wavefunctions
+ logical :: have_wfs
+ integer :: n_wfs
+ integer, pointer :: wfs_n(:)
+ integer, pointer :: wfs_l(:)
+ real(R8), pointer :: wfs_j(:)
+ character(len=5), pointer :: wfs_label(:)
+ real(R8), pointer :: wfs_rc(:)
+ real(R8), pointer :: wfs_occ(:)
+ real(R8), pointer :: wfs_ev(:)
+ real(R8), pointer :: wfs(:,:)
+ real(R8), pointer :: rho_val(:)
+
+ !XC
+ integer :: ixc
+
+ !Non-linear core-corrections
+ logical :: nlcc
+ real(R8) :: nlcc_rc
+ real(R8), pointer :: rho_core(:)
+ real(R8), pointer :: tau_core(:)
+
+ !Kleinman-Bylander projectors
+ logical :: have_kb
+ integer :: kb_l_local
+ integer :: kb_n_proj
+ integer, pointer :: kb_l(:)
+ real(R8), pointer :: kb_j(:)
+ real(R8), pointer :: kb_v_local(:)
+ real(R8), pointer :: kb_e(:)
+ real(R8), pointer :: kb_proj(:,:)
+ end type ps_io_t
+
+
+ !---Global Variables---!
+
+
+ integer, parameter :: HAM = 1, &
+ TM = 2, &
+ RTM = 3, &
+ MRPP = 4
+
+ integer, parameter :: AVERAGED = 1, &
+ J_DEP = 2
+
+ integer, parameter :: SCHRODINGER = 1, &
+ SCALAR_REL = 2, &
+ DIRAC = 3
+
+ integer, parameter :: PSIO_SIESTA = 1, &
+ PSIO_FHI = 2, &
+ PSIO_ABINIT5 = 4, &
+ PSIO_ABINIT6 = 8, &
+ PSIO_UPF = 16, &
+ PSIO_PARSEC = 32, &
+ PSIO_LATEPP_SO = 64
+
+ type(ps_io_t) :: info
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: ps_io_init, &
+ ps_io_set_psp, &
+ ps_io_set_wfs, &
+ ps_io_set_kb, &
+ ps_io_set_xc, &
+ ps_io_set_nlcc, &
+ ps_io_save, &
+ PSIO_SIESTA, &
+ PSIO_FHI, &
+ PSIO_ABINIT5, &
+ PSIO_ABINIT6, &
+ PSIO_UPF, &
+ PSIO_PARSEC, &
+ PSIO_LATEPP_SO
+
+contains
+
+ subroutine ps_io_init(m, wave_eq, scheme, z_nuc, z_ion, z_val, symbol, file_format)
+ !-----------------------------------------------------------------------!
+ ! First step of the initialization of the info structure: perform some !
+ ! checks and set some components of the structure. !
+ ! !
+ ! m - mesh !
+ ! wave_eq - wave-equation to integrate !
+ ! scheme - scheme used to generate the pseudo-potentials !
+ ! z_nuc - the nuclear charge !
+ ! z_ion - the charge of the ion !
+ ! z_val - the charge of the valence states !
+ ! symbol - atom symbol !
+ ! file_format - format to use to output the pseudo-potential stuff !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: wave_eq, scheme
+ real(R8), intent(in) :: z_nuc, z_ion, z_val
+ character(3), intent(in) :: symbol
+ integer, intent(in) :: file_format
+
+ call push_sub("ps_io_init")
+
+ !Checks
+ if (.not. (iand(file_format, PSIO_SIESTA) /= 0 .or. &
+ iand(file_format, PSIO_FHI) /= 0 .or. &
+ iand(file_format, PSIO_ABINIT5) /= 0 .or. &
+ iand(file_format, PSIO_ABINIT6) /= 0 .or. &
+ iand(file_format, PSIO_PARSEC) /= 0 .or. &
+ iand(file_format, PSIO_LATEPP_SO) /= 0 .or. &
+ iand(file_format, PSIO_UPF) /= 0 )) then
+ message(1) = "Unknown file format"
+ call write_fatal(1)
+ end if
+
+ if (wave_eq == DIRAC .and. &
+ (iand(file_format, PSIO_FHI) /= 0 .or. iand(file_format, PSIO_ABINIT6) /= 0)) then
+ message(1) = "One of the formats does not accept fully-relativistic pseudopotentials."
+ call write_fatal(1)
+ end if
+
+ if (wave_eq /= DIRAC .and. (iand(file_format, PSIO_LATEPP_SO) /= 0 )) then
+ message(1) = "The format requires fully-relativistic treatment."
+ call write_fatal(1)
+ end if
+
+ info%file_format = file_format
+
+ info%have_psp = .false.
+ info%have_wfs = .false.
+ info%have_kb = .false.
+ info%nlcc = .false.
+
+ call mesh_null(info%m)
+ info%m = m
+
+ info%z_nuc = z_nuc
+ info%z_val = z_val
+ info%z_ion = z_ion
+
+ info%wave_eq = wave_eq
+ info%symbol = symbol
+ info%scheme = scheme
+
+ call pop_sub()
+ end subroutine ps_io_init
+
+ subroutine ps_io_set_psp(np, n_psp, l , j, v)
+ !-----------------------------------------------------------------------!
+ ! Initialize the pseudopotential data in the info structure. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: np, n_psp
+ integer, intent(in) :: l(n_psp)
+ real(R8), intent(in) :: j(n_psp)
+ real(R8), intent(in) :: v(np, n_psp)
+
+ call push_sub("ps_io_set_psp")
+
+ info%have_psp = .true.
+
+ info%n_psp = n_psp
+ allocate(info%psp_l(n_psp))
+ allocate(info%psp_j(n_psp))
+ allocate(info%psp_v(np, n_psp))
+
+ info%psp_l = l
+ info%psp_j = j
+ info%psp_v = v
+
+ call pop_sub()
+ end subroutine ps_io_set_psp
+
+ subroutine ps_io_set_wfs(np, n_wfs, n, l, j, occ, ev, rc, wfs, rho_val)
+ !-----------------------------------------------------------------------!
+ ! Initialize the pseudo wavefunctions data in the info structure. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: np, n_wfs
+ integer, intent(in) :: n(n_wfs)
+ integer, intent(in) :: l(n_wfs)
+ real(R8), intent(in) :: j(n_wfs)
+ real(R8), intent(in) :: occ(n_wfs), ev(n_wfs), rc(n_wfs)
+ real(R8), intent(in) :: wfs(np, n_wfs)
+ real(R8), intent(in) :: rho_val(np)
+
+ integer :: i
+
+ call push_sub("ps_io_set_wfs")
+
+ info%have_wfs = .true.
+
+ info%n_wfs = n_wfs
+
+ allocate(info%wfs_n(n_wfs))
+ allocate(info%wfs_l(n_wfs))
+ allocate(info%wfs_j(n_wfs))
+ allocate(info%wfs_label(n_wfs))
+ allocate(info%wfs_occ(n_wfs))
+ allocate(info%wfs_ev(n_wfs))
+ allocate(info%wfs_rc(n_wfs))
+ allocate(info%wfs(np, n_wfs))
+ allocate(info%rho_val(np))
+
+ info%wfs_n = n
+ info%wfs_l = l
+ info%wfs_j = j
+ info%wfs_occ = occ
+ info%wfs_ev = ev
+ info%wfs_rc = rc
+ info%wfs = wfs
+ info%rho_val = rho_val
+
+ do i = 1, n_wfs
+ write(info%wfs_label(i),'(I1)') n(i)
+ select case (l(i))
+ case (0)
+ info%wfs_label(i) = trim(info%wfs_label(i))//"s"
+ case (1)
+ info%wfs_label(i) = trim(info%wfs_label(i))//"p"
+ case (2)
+ info%wfs_label(i) = trim(info%wfs_label(i))//"d"
+ case (3)
+ info%wfs_label(i) = trim(info%wfs_label(i))//"f"
+ end select
+ if (j(i) /= 0) then
+ write(info%wfs_label(i),'(A,I1,".5")') trim(info%wfs_label(i)), int(j(i) - M_HALF)
+ end if
+ end do
+
+ call pop_sub()
+ end subroutine ps_io_set_wfs
+
+ subroutine ps_io_set_kb(np, l_local, v_local, n_proj, l, j, e, proj)
+ !-----------------------------------------------------------------------!
+ ! Initialize the KB projectors data in the info structure. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: np, l_local, n_proj
+ real(R8), intent(in) :: v_local(np)
+ integer, intent(in) :: l(n_proj)
+ real(R8), intent(in) :: j(n_proj)
+ real(R8), intent(in) :: e(n_proj)
+ real(R8), intent(in) :: proj(np, n_proj)
+
+ call push_sub("ps_io_set_kb")
+
+ info%have_kb = .true.
+
+ info%kb_l_local = l_local
+ allocate(info%kb_v_local(np))
+ info%kb_v_local = v_local
+
+ info%kb_n_proj = n_proj
+ allocate(info%kb_l(info%kb_n_proj))
+ allocate(info%kb_j(info%kb_n_proj))
+ allocate(info%kb_e(info%kb_n_proj))
+ allocate(info%kb_proj(np, info%kb_n_proj))
+ info%kb_l = l
+ info%kb_j = j
+ info%kb_e = e
+ info%kb_proj = proj
+
+ call pop_sub()
+ end subroutine ps_io_set_kb
+
+ subroutine ps_io_set_xc(ixc)
+ !-----------------------------------------------------------------------!
+ ! Initialize the xc data in the info structure. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: ixc
+
+ call push_sub("ps_io_set_xc")
+
+ info%ixc = ixc
+
+ call pop_sub()
+ end subroutine ps_io_set_xc
+
+ subroutine ps_io_set_nlcc(rc, np, rho_core, tau_core)
+ !-----------------------------------------------------------------------!
+ ! Initialize the non-linear core corrections data in the info structure.!
+ !-----------------------------------------------------------------------!
+ real(R8), intent(in) :: rc
+ integer, intent(in) :: np
+ real(R8), intent(in) :: rho_core(np), tau_core(np)
+
+ call push_sub("ps_io_set_nlcc")
+
+ if (iand(info%file_format, PSIO_ABINIT5) /= 0) then
+ message(1) = "Non linear core-corrections are not available in abinit5 format."
+ call write_fatal(1)
+ end if
+
+ info%nlcc = .true.
+ info%nlcc_rc = rc
+ allocate(info%rho_core(np))
+ info%rho_core = rho_core
+ allocate(info%tau_core(np))
+ info%tau_core = tau_core
+
+ call pop_sub()
+ end subroutine ps_io_set_nlcc
+
+ subroutine ps_io_end()
+ !-----------------------------------------------------------------------!
+ ! Deallocate all memory. !
+ !-----------------------------------------------------------------------!
+
+ call push_sub("ps_io_end")
+
+ call mesh_end(info%m)
+
+ !Pseudopotentials
+ if (info%have_psp) then
+ deallocate(info%psp_l)
+ deallocate(info%psp_j)
+ deallocate(info%psp_v)
+ end if
+
+ !Pseudo wavefunctions
+ if (info%have_wfs) then
+ deallocate(info%wfs_n)
+ deallocate(info%wfs_l)
+ deallocate(info%wfs_j)
+ deallocate(info%wfs_label)
+ deallocate(info%wfs_occ)
+ deallocate(info%wfs_ev)
+ deallocate(info%wfs_rc)
+ deallocate(info%wfs)
+ deallocate(info%rho_val)
+ end if
+
+ !NLCC
+ if (info%nlcc) then
+ deallocate(info%rho_core)
+ deallocate(info%tau_core)
+ end if
+
+ !KB
+ if (info%have_kb) then
+ deallocate(info%kb_l)
+ deallocate(info%kb_j)
+ deallocate(info%kb_v_local)
+ deallocate(info%kb_e)
+ deallocate(info%kb_proj)
+ end if
+
+ call pop_sub()
+ end subroutine ps_io_end
+
+ subroutine ps_io_save()
+ !-----------------------------------------------------------------------!
+ ! Writes the pseudo-atom information to a file so it can be used by !
+ ! other codes. !
+ !-----------------------------------------------------------------------!
+ integer :: unit
+ character(len=20) :: filename
+
+ call push_sub("ps_io_save")
+
+ !Write data to the files
+ if (iand(info%file_format, PSIO_SIESTA) /= 0) then
+ filename = trim(info%symbol)//'.ascii'
+ call io_open(unit, file=trim(filename))
+ call siesta_save(unit, .false.)
+ close(unit)
+ end if
+
+ if (iand(info%file_format, PSIO_FHI) /= 0) then
+ filename = trim(info%symbol)//'.cpi'
+ call io_open(unit, file=trim(filename))
+ call fhi_save(unit)
+ close(unit)
+ end if
+
+ if (iand(info%file_format, PSIO_ABINIT5) /= 0) then
+ if (int(info%z_nuc) < 10) then
+ write(filename,'(I1,A)') int(info%z_nuc), '-'//trim(info%symbol)//'.pseu'
+ else if (int(info%z_nuc) < 100) then
+ write(filename,'(I2,A)') int(info%z_nuc), '-'//trim(info%symbol)//'.pseu'
+ else
+ write(filename,'(I3,A)') int(info%z_nuc), '-'//trim(info%symbol)//'.pseu'
+ end if
+ call io_open(unit, file=trim(filename))
+ call abinit5_save(unit)
+ close(unit)
+ end if
+
+ if (iand(info%file_format, PSIO_ABINIT6) /= 0) then
+ if (int(info%z_nuc) < 10) then
+ write(filename,'(I1,A)') int(info%z_nuc), '-'//trim(info%symbol)//'.fhi'
+ else if (int(info%z_nuc) < 100) then
+ write(filename,'(I2,A)') int(info%z_nuc), '-'//trim(info%symbol)//'.fhi'
+ else
+ write(filename,'(I3,A)') int(info%z_nuc), '-'//trim(info%symbol)//'.fhi'
+ end if
+ call io_open(unit, file=trim(filename))
+ call abinit6_save(unit)
+ close(unit)
+ end if
+
+ if (iand(info%file_format, PSIO_UPF) /= 0) then
+ filename = trim(info%symbol)//'.UPF'
+ call io_open(unit, file=trim(filename))
+ call upf_save(unit)
+ close(unit)
+ end if
+
+ if (iand(info%file_format, PSIO_PARSEC) /= 0) then
+ filename = trim(info%symbol)//'.ascii2'
+ call io_open(unit, file=trim(filename))
+ call siesta_save(unit, .true.)
+ close(unit)
+ end if
+
+ if (iand(info%file_format, PSIO_LATEPP_SO) /= 0) then
+ filename = trim(info%symbol)//'.sodiff'
+ call io_open(unit, file=trim(filename))
+ call latepp_so_save(unit)
+ close(unit)
+ end if
+
+ call pop_sub()
+ end subroutine ps_io_save
+
+ subroutine siesta_save(unit, parsec)
+ !-----------------------------------------------------------------------!
+ ! Write the pseudo-potential stuff using the format of the SIESTA code. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ logical, intent(in) :: parsec
+
+ integer :: i, l, n_dn, n_up, values(8), n, ir
+ real(R8) :: j, occ
+ character(3) :: irel
+ character(4) :: icore
+ character(60) :: header
+ character(70) :: title
+ type(mesh_t) :: new_m
+ real(R8), allocatable :: dum(:)
+
+ call push_sub("siesta_save")
+
+ !Get spin/relativistic mode and number of states
+ select case (info%wave_eq)
+ case (DIRAC)
+ irel = "rel"
+ n_up = 0
+ n_dn = 0
+ do i = 1, info%n_psp
+ if (info%psp_l(i) == 0 .or. (info%psp_l(i) /= 0 .and. &
+ info%psp_j(i) == info%psp_l(i) - M_HALF)) then
+ n_dn = n_dn + 1
+ elseif (info%psp_l(i) /= 0 .and. &
+ (info%psp_j(i) == info%psp_l(i) + M_HALF)) then
+ n_up = n_up + 1
+
+ end if
+ end do
+ case (SCHRODINGER, SCALAR_REL)
+ irel = "nrl"
+ n_dn = info%n_psp
+ n_up = 0
+ end select
+
+ call date_and_time(values=values)
+ write(header,'(A,A,3X,I4.4,"/",I2.2,"/",I2.2)') "APE Version-", PACKAGE_VERSION, values(1), values(2), values(3)
+ select case (info%scheme)
+ case (HAM)
+ header = trim(header)//" Hamann"
+ case (TM)
+ header = trim(header)//" Troullier-Martins"
+ end select
+
+ !Core corrections mode
+ if (info%nlcc) then
+ icore = "pcec"
+ else
+ icore = "nc "
+ end if
+
+ !
+ title = ""
+ do l = 0, 3
+ n = minval(info%wfs_n, mask=info%wfs_l == l)
+ j = minval(info%wfs_j, mask=(info%wfs_l == l .and. info%wfs_n == n))
+
+ do i = 1, info%n_wfs
+ if (info%wfs_n(i) == n .and. info%wfs_l(i) == l .and. info%wfs_j(i) == j) then
+ select case (irel)
+ case('nrl')
+ write(title,'(A)') trim(title)
+ write(title,'(A,A2,F5.2," r=",F5.2,"/")') trim(title), &
+ info%wfs_label(i), info%wfs_occ(i), info%wfs_rc(i)
+ case ('rel')
+ occ = sum(info%wfs_occ(:), mask=(info%wfs_l == l .and. &
+ (info%wfs_j == l + M_HALF .or. info%wfs_j == l - M_HALF)))
+ write(title,'(A,A2,F5.2," r=",F5.2,"/")') trim(title), &
+ info%wfs_label(i), occ, info%wfs_rc(i)
+ end select
+ end if
+ end do
+
+ end do
+
+ !Mesh
+ call mesh_null(new_m)
+ call mesh_generation(new_m, MESH_LOG2, info%m%r(1), info%m%r(info%m%np), n=info%m%np)
+
+ !General info
+ write(unit,'(1X,A2,1X,A2,1X,A3,1X,A4)') info%symbol(1:2), ixc_to_icorr(info%ixc), irel, icore
+ write(unit,'(1X,A60)') header
+ write(unit,'(1X,A70)') title
+ write(unit,'(1X,2I3,I5,3F20.10)') n_dn, n_up, new_m%np, new_m%b, new_m%a, info%z_val
+
+ !Write radial grid
+ write(unit,'(" Radial grid follows")')
+ write(unit,'(4(g20.12))') (new_m%r(i),i = 1, new_m%np)
+
+ allocate(dum(new_m%np))
+
+ !Down pseudopotentials
+ do l = 0, 3
+ if (info%wave_eq == DIRAC) then
+ j = max(l - M_HALF, M_HALF)
+ else
+ j = M_ZERO
+ end if
+
+ do i = 1, info%n_psp
+ if (info%psp_l(i) == l .and. info%psp_j(i) == j) then
+ write(unit,'(" Down Pseudopotential follows (l on next line)")')
+ write(unit,'(1X,I2)') info%psp_l(i)
+
+ call mesh_transfer(info%m, info%psp_v(:, i)*info%m%r, new_m, dum)
+ where (abs(dum) < 1.0E-30)
+ dum = M_ZERO
+ end where
+ write(unit,'(4(g20.12))') (dum(ir)*M_TWO, ir = 1, new_m%np)
+ end if
+ end do
+ end do
+
+ !Up pseudopotentials
+ if (n_up /= 0) then
+ do l = 0, 3
+ do i = 1, info%n_psp
+ if (l /= 0 .and. info%wave_eq == DIRAC) then
+ j = l + M_HALF
+ else
+ j = M_ZERO
+ end if
+
+ if (info%psp_l(i) == l .and. info%psp_j(i) == j) then
+ write(unit,'(" Up Pseudopotential follows (l on next line)")')
+ write(unit,'(1X,I2)') info%psp_l(i)
+
+ call mesh_transfer(info%m, info%psp_v(:, i)*info%m%r, new_m, dum)
+ where (abs(dum) < 1.0E-30)
+ dum = M_ZERO
+ end where
+ write(unit,'(4(g20.12))') (dum(ir)*M_TWO, ir = 1, new_m%np)
+ end if
+ end do
+ end do
+ end if
+
+ !Write core charge
+ write(unit,'(" Core charge follows")')
+ if (icore == "nc ") then
+ dum = M_ZERO
+ else
+ call mesh_transfer(info%m, info%rho_core*info%m%r**2, new_m, dum)
+ where (abs(dum) < 1.0E-30)
+ dum = M_ZERO
+ elsewhere
+ dum = M_FOUR*M_PI*dum
+ end where
+ end if
+ write(unit,'(4(g20.12))') (dum(i), i = 1, new_m%np)
+
+ !Write valence charge
+ write(unit,'(" Valence charge follows")')
+ call mesh_transfer(info%m, info%rho_val*info%m%r**2, new_m, dum)
+ where (abs(dum) < 1.0E-30)
+ dum = M_ZERO
+ end where
+ write(unit,'(4(g20.12))') (dum(i)*M_FOUR*M_PI, i = 1, new_m%np)
+
+ if (parsec) then
+ !Write pseudo-wave-functions
+ do l = 0, 3
+ n = minval(info%wfs_n, mask=info%wfs_l == l)
+ j = minval(info%wfs_j, mask=(info%wfs_l == l .and. info%wfs_n == n))
+
+ do i = 1, info%n_wfs
+ if (info%wfs_n(i) == n .and. info%wfs_l(i) == l .and. info%wfs_j(i) == j) then
+
+ call mesh_transfer(info%m, info%wfs(:, i)*info%m%r, new_m, dum)
+
+ write(unit,'(1X,A,A2)') 'Pseudo-wave-function follows (l, zelect, rc) ',info%wfs_label(i)
+ write(unit,'(I2,F6.2,2X,F6.2)') info%wfs_l(i), &
+ info%wfs_occ(i), info%wfs_rc(i)
+ write(unit,'(1P4E19.11)') (dum(ir), ir = 1, new_m%np)
+
+ end if
+ end do
+
+ end do
+ end if
+
+ deallocate(dum)
+ call mesh_end(new_m)
+
+ call pop_sub()
+ end subroutine siesta_save
+
+ subroutine fhi_save(unit)
+ !-----------------------------------------------------------------------!
+ ! Write the pseudo-potential stuff using the format of the FHI98PP code.!
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+
+ integer :: n, l, i, k, ir
+ type(mesh_t) :: new_m
+ real(R8), allocatable :: v_dum(:), u_dum(:), cd(:), cdp(:), cdpp(:)
+
+ call push_sub("fhi_save")
+
+ !Mesh
+ call mesh_null(new_m)
+ call mesh_init(new_m, MESH_LOG1, MESH_FINITE_DIFF, info%m%r(1), info%m%r(info%m%np), np=info%m%np, fd_order=4)
+
+ !Header
+ write(unit,'(e20.14,3X,I1)') info%z_val, info%n_psp
+ write(unit,'(" 0.0000 0.0000 0.0000 0.0000")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+ write(unit,'(" 0.0000 .00e+00 .00e+00")')
+
+ allocate(u_dum(new_m%np), v_dum(new_m%np))
+ do l = 0, 3
+
+ do i = 1, info%n_psp
+ if (info%psp_l(i) == l) then
+ !Get pseudopotential
+ call mesh_transfer(info%m, info%psp_v(:, i), new_m, v_dum)
+
+ !Get corresponding wavefunction
+ n = minval(info%wfs_n, mask=info%wfs_l == l)
+ do k = 1, info%n_wfs
+ if (info%wfs_n(k) == n .and. info%wfs_l(k) == l) then
+ call mesh_transfer(info%m, info%wfs(:, k)*info%m%r, new_m, u_dum)
+ end if
+ end do
+
+ !Write pseudo-potentials and pseudo-wavefunctions
+ write(unit,'(I5,1X,E20.14)') new_m%np, new_m%r(2)/new_m%r(1)
+ do ir = 1, new_m%np
+ write(unit,'(I4,1X,E20.14,2(1X,E20.14))') ir, new_m%r(ir), u_dum(ir), v_dum(ir)
+ end do
+
+ end if
+ end do
+
+ end do
+ deallocate(u_dum, v_dum)
+
+ !Write the core density and its first and second derivatives on the FHI mesh
+ if (info%nlcc) then
+ allocate(cd(new_m%np), cdp(new_m%np), cdpp(new_m%np))
+ call mesh_transfer(info%m, info%rho_core, new_m, cd)
+ cd = cd*M_FOUR*M_PI
+ where(cd < M_EPSILON) cd = M_ZERO
+ cdp = mesh_derivative(new_m, cd)
+ cdpp = mesh_derivative2(new_m, cd)
+ where(abs(cdp) < M_EPSILON) cdp = M_ZERO
+ where(abs(cdpp) < M_EPSILON) cdpp = M_ZERO
+ do i = 1, new_m%np
+ write(unit,'(4(1X,E18.12))') new_m%r(i), cd(i), cdp(i), cdpp(i)
+ end do
+ deallocate(cd, cdp, cdpp)
+ endif
+
+ call mesh_end(new_m)
+
+ call pop_sub()
+ end subroutine fhi_save
+
+ subroutine latepp_so_save(unit)
+ !-----------------------------------------------------------------------!
+ ! Write the pseudo-potential stuff for the LATEPP spin-orbit code !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+
+ integer :: i, ir, l
+ real(R8) :: j
+ integer :: n_up
+ type(mesh_t) :: new_m
+ real(R8), allocatable :: vd_dum(:), ud_dum(:), vu_dum(:), uu_dum(:)
+ real(R8), allocatable :: vlso(:), vlsr(:)
+
+ call push_sub("latepp_so_save")
+
+ do i = 1, info%n_psp
+ if (info%psp_l(i) /= 0 .and. &
+ (info%psp_j(i) == info%psp_l(i) + M_HALF)) then
+ n_up = n_up + 1
+ endif
+ end do
+
+ !Mesh: logarithmic mesh required
+ call mesh_null(new_m)
+ call mesh_init(new_m, MESH_LOG1, MESH_FINITE_DIFF, &
+ info%m%r(1), info%m%r(info%m%np), np=info%m%np, fd_order=4)
+
+ !Header: number of angular momenta considered for spin-orbit
+ write(unit,'(I1,1X,I5)') n_up, info%m%np
+
+ allocate(ud_dum(new_m%np), uu_dum(new_m%np))
+ allocate(vd_dum(new_m%np), vu_dum(new_m%np))
+ allocate(vlso(new_m%np), vlsr(new_m%np))
+
+ do l = 1, n_up
+
+ do i = 1, info%n_psp
+ !Get down pseudopotential and pseudo-wavefunction (times radius)
+ j = l - M_HALF
+ if (info%psp_l(i) == l .and. info%psp_j(i) == j) then
+ call mesh_transfer(info%m, info%psp_v(:, i), new_m, vd_dum)
+ endif
+ if (info%wfs_l(i) == l .and. info%wfs_j(i) == j) then
+ call mesh_transfer(info%m, info%wfs(:, i)*info%m%r, new_m, ud_dum)
+ endif
+ !Get up pseudopotential and pseudo-wavefunction (times radius)
+ j = l + M_HALF
+ if (info%psp_l(i) == l .and. info%psp_j(i) == j) then
+ call mesh_transfer(info%m, info%psp_v(:, i), new_m, vu_dum)
+ endif
+ if (info%wfs_l(i) == l .and. info%wfs_j(i) == j) then
+ call mesh_transfer(info%m, info%wfs(:, i)*info%m%r, new_m, uu_dum)
+ endif
+ end do
+
+ !Write channel l
+ do ir = 1, new_m%np
+ ! spin-orbit difference potential
+ vlso(ir) = M_TWO/(M_TWO*l + 1)*(vu_dum(ir) - vd_dum(ir))
+ ! scalar relativistic potential
+ vlsr(ir) = ((l+M_ONE)*vu_dum(ir) + l*vd_dum(ir))/(M_TWO*l + M_ONE)
+ write(unit,'(5(1X,E20.14))') new_m%r(ir), ud_dum(ir), uu_dum(ir), &
+ vlso(ir), vlsr(ir)
+ end do
+
+ end do
+
+ deallocate(ud_dum,uu_dum,vd_dum,vu_dum,vlso,vlsr)
+ call mesh_end(new_m)
+
+ call pop_sub()
+ end subroutine latepp_so_save
+
+ subroutine abinit6_save(unit)
+ !-----------------------------------------------------------------------!
+ ! Write the pseudo-potential stuff using the format number 6 of the !
+ ! ABINIT code. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+
+ integer :: i, values(8)
+ real(R8) :: rc
+ character(60) :: header
+
+ call push_sub("abinit6_save")
+
+ !Header
+ write(header,'(1X,A3,2X,A3,1X,A," :")') trim(info%symbol), "APE", PACKAGE_VERSION
+ select case (info%scheme)
+ case (HAM)
+ header = trim(header)//" Hamann scheme"
+ case (TM)
+ header = trim(header)//" Troullier-Martins scheme"
+ case (RTM)
+ header = trim(header)//"Relativistic Troullier-Martins scheme"
+ case (MRPP)
+ header = trim(header)//"MRPP scheme"
+ end select
+ write(unit,'(A,", ",A,", llocal=",I2)') trim(header), trim(ixc_description(info%ixc)), info%kb_l_local
+ call date_and_time(values=values)
+ write(unit,'(2F10.5,2X,I4.4,I2.2,I2.2,T47,"zatom,zion,pspdat")') info%z_nuc, &
+ info%z_ion, values(1), values(2), values(3)
+ write(unit,'(4I5,I10,F10.5,T47,"pspcod,pspxc,lmax,llocal,mmax,r2well")') 6, &
+ ixc_to_abinit(info%ixc), maxval(info%psp_l), info%kb_l_local, info%m%np, 0.0
+ if (info%nlcc) then
+ do i = info%m%np, 1, -1
+ if (info%rho_core(i) > 1.e-6) then
+ rc = info%m%r(i)
+ exit
+ end if
+ end do
+ write(unit,'(3F20.14,T64,A)') rc, 1.0, M_FOUR*M_PI*mesh_integrate(info%m, info%rho_core), 'rchrg,fchrg,qchrg'
+ else
+ write(unit,'(3F20.14,T64,A)') 0.0, 0.0, 0.0, 'rchrg,fchrg,qchrg'
+ end if
+ write(unit,'("5--- These two lines are available for giving more information, later")')
+ write(unit,'("6")')
+ write(unit,'("7--- Here follows the equivalente of the cpi file from the fhi98pp code")')
+
+ call fhi_save(unit)
+
+ call pop_sub()
+ end subroutine abinit6_save
+
+ subroutine abinit5_save(unit)
+ !-----------------------------------------------------------------------!
+ ! Write the pseudo-potential stuff using the format number 5 of the !
+ ! ABINIT code. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+
+ integer :: i, k, n, l, j_dim, ir, values(8)
+ real(R8) :: j
+ type(mesh_t) :: new_m
+ real(R8), allocatable :: dum(:)
+ character(100) :: header
+
+ call push_sub("abinit5_save")
+
+ !Mesh
+ call mesh_null(new_m)
+ call mesh_generation(new_m, MESH_LOG1, info%m%r(1), info%m%r(info%m%np), info%m%np)
+
+ !Header
+ write(header,'("Psp for ",A," (",A," -")') trim(info%symbol), trim(ixc_description(info%ixc))
+ if (info%wave_eq == SCHRODINGER) then
+ header = trim(header)//" non-relativ."
+ else if (info%wave_eq == SCALAR_REL) then
+ header = trim(header)//" scalar relativ."
+ else
+ header = trim(header)//" fully relativ."
+ end if
+ header = trim(header)//") using"
+ select case (info%scheme)
+ case (HAM)
+ header = trim(header)//" Hamann scheme"
+ case (TM)
+ header = trim(header)//" Troullier-Martins scheme"
+ case (RTM)
+ header = trim(header)//" Relativistic Troullier-Martins scheme"
+ case (MRPP)
+ header = trim(header)//" MRPP scheme"
+ end select
+ write(unit,'(A," (from APE ",A,")")') trim(header), PACKAGE_VERSION
+ call date_and_time(values=values)
+ values(1) = mod(mod(values(1),1000),100)
+ write(unit,'(F3.0,2X,F5.2,2X,I2.2,I2.2,I2.2,30X,A)') info%z_nuc, &
+ info%z_ion, values(1), values(2), &
+ values(3), " : zatom,zion,pspdat"
+ write(unit,'(I1,2X,I2,2X,I1,2X,I1,2X,I4,2X,F3.1,26X,A)') 5, &
+ ixc_to_abinit(info%ixc), maxval(info%psp_l), info%kb_l_local, new_m%np, 0.0, &
+ " : pspcod,pspxc,lmax,lloc,mmax,r2well"
+
+ if (info%wave_eq == DIRAC) then
+ write(unit,'(ES22.15,1X,ES22.15,2X,I1,A)') new_m%r(1), new_m%a, 2, " : aa,bb,pspso"
+ else
+ write(unit,'(ES22.15,1X,ES22.15,2X,I1,A)') new_m%r(1), new_m%a, 1, " : aa,bb,pspso"
+ end if
+
+ do l = 0, 3
+ n = minval(info%wfs_n, mask=info%wfs_l == l)
+ j_dim = 1
+ if (info%wave_eq == DIRAC .and. l /= 0) j_dim = 2
+ do k = 1, j_dim
+ if (info%wave_eq == DIRAC) then
+ j = max(l + k - M_THREE/M_TWO, M_HALF)
+ else
+ j = M_ZERO
+ end if
+ do i = 1, info%n_wfs
+ if (info%wfs_n(i) == n .and. info%wfs_l(i) == l .and. info%wfs_j(i) == j) then
+ write(unit,'(I1,2(2X,F3.0),2X,I1,2X,F8.6,24X,A,I1,A)') l, &
+ M_ZERO, M_ZERO, j_dim, info%wfs_rc(i), &
+ " : l,e99.0,e99.9,nproj,rcpsp"
+ write(unit,'(A,30X,A)') "0.0 0.0 0.0 0.0"," : rms,ekb1,ekb2,epsatm"
+ end if
+ end do
+ end do
+ end do
+ write(unit,'(A,35X,A)') "0.0 0.0 0.0"," : rchrg,fchrg,qchrg"
+
+ !Write the pseudo-potentials
+ allocate(dum(new_m%np))
+ do l = 0, 3
+ j_dim = 1
+ if (info%wave_eq == DIRAC .and. l /= 0) j_dim = 2
+
+ do k = 1, j_dim
+ if (info%wave_eq == DIRAC) then
+ j = max(l + k - M_THREE/M_TWO, M_HALF)
+ else
+ j = M_ZERO
+ end if
+
+ do i = 1, info%n_psp
+
+ if (info%psp_l(i) == l .and. info%psp_j(i) == j) then
+ call mesh_transfer(info%m, info%psp_v(:, i), new_m, dum)
+ where (abs(dum) < 1.0E-30)
+ dum = M_ZERO
+ end where
+
+ write(unit,'(2X,I1,A)') info%psp_l(i), " =l for pseudopotential"
+ write(unit,'(3ES21.13)') (dum(ir), ir = 1, new_m%np)
+ end if
+ end do
+ end do
+ end do
+ deallocate(dum)
+
+ allocate(dum(new_m%np))
+ do l = 0, 3
+ n = minval(info%wfs_n, mask=info%wfs_l == l)
+
+ j_dim = 1
+ if (info%wave_eq == DIRAC .and. l /= 0) j_dim = 2
+ do k = 1, j_dim
+ if (info%wave_eq == DIRAC) then
+ j = max(l + k - M_THREE/M_TWO, M_HALF)
+ else
+ j = M_ZERO
+ end if
+
+ do i = 1, info%n_wfs
+ if (info%wfs_n(i) == n .and. info%wfs_l(i) == l .and. info%wfs_j(i) == j) then
+ !Get the wavefunctions in the correct mesh
+ call mesh_transfer(info%m, info%wfs(:, i), new_m, dum)
+ where (abs(dum) < 1.0E-30)
+ dum = M_ZERO
+ end where
+
+ !Write the pseudo wavefunctions
+ write(unit,'(2X,I1,A)') l, " =l for pseudo wavefunction"
+ write(unit,'(3ES21.13)') (dum(ir)*new_m%r(ir), ir = 1, new_m%np)
+ end if
+ end do
+
+ end do
+
+ end do
+ deallocate(dum)
+
+ call mesh_end(new_m)
+
+ call pop_sub()
+ end subroutine abinit5_save
+
+ subroutine upf_save(unit)
+ !-----------------------------------------------------------------------!
+ ! Write the pseudo-potential stuff using the Unified Pseudo-potential !
+ ! Format of the PWScf code. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+
+ integer :: values(8), i, ir, max_l
+ real(R8) :: xmin, zmesh
+ character(4) :: shortname
+ character(20) :: longname
+
+ call push_sub("upf_save")
+
+ !Info
+ write(unit,'(A9)') "<PP_INFO>"
+ write(unit,'(A,A)') "Generated using APE Version-", PACKAGE_VERSION
+ call date_and_time(values=values)
+ write(unit,'(A,I4.4,A,I2.2,A,I2.2)') "Author: Unknown Generation date: ", values(1), "/", values(2), "/", values(3)
+ write(unit,'("Pseudopotential for: ",A)') trim(info%symbol)
+ write(unit,'("Exchange-correlation: ",A)') trim(ixc_description(info%ixc))
+ select case (info%wave_eq)
+ case (SCHRODINGER)
+ write(unit,'(I5,T14,A)') 0, "The Pseudo was generated with a Non-Relativistic Calculation"
+ case (SCALAR_REL)
+ write(unit,'(I5,T14,A)') 1, "The Pseudo was generated with a Scalar-Relativistic Calculation"
+ case (DIRAC)
+ write(unit,'(I5,T14,A)') 2, "The Pseudo was generated with a Fully-Relativistic Calculation"
+ end select
+ write(unit,'("State n l occ rc ev")')
+ do i = 1, info%n_wfs
+ select case (len_trim(info%wfs_label(i)))
+ case (2)
+ write(unit,'(A2,5X,I2,2X,I2,2X,F6.2,2X,F6.2,2X,F12.6)') &
+ info%wfs_label(i), info%wfs_n(i), info%wfs_l(i), &
+ info%wfs_occ(i), info%wfs_rc(i), info%wfs_ev(i)
+ case (5)
+ write(unit,'(A5,2X,I2,2X,I2,2X,F6.2,2X,F6.2,2X,F12.6)') &
+ info%wfs_label(i), info%wfs_n(i), info%wfs_l(i), &
+ info%wfs_occ(i), info%wfs_rc(i), info%wfs_ev(i)
+ end select
+ end do
+ write(unit,'(A10)') "</PP_INFO>"
+
+ !Header
+ write(unit,'(A11)') "<PP_HEADER>"
+ write(unit,'(T3,I2,T24,A)') 0, "Version Number"
+ write(unit,'(T3,A,T24,A)') trim(info%symbol), "Element"
+ write(unit,'(A5,T24,A)') "NC", "Norm - Conserving pseudopotential"
+ write(unit,'(L5,T24,A)') info%nlcc, "Nonlinear Core Correction"
+ call ixc_to_espresso(info%ixc, longname, shortname)
+ write(unit,'(A,T24,A4," Exchange-Correlation functional")') longname, shortname
+ write(unit,'(F17.11,T24,A)') info%z_val, "Z valence"
+ write(unit,'(F17.11,T24,A)') 0.0, "Total energy"
+ write(unit,'(2F11.7,T24,A)') 0.0, 0.0, "Suggested cutoff for wfc and rho"
+ if (info%kb_n_proj == 0) then
+ max_l = 0
+ else
+ max_l = maxval(info%kb_l)
+ end if
+ write(unit,'(I5,T24,A)') max_l, "Max angular momentum component"
+ write(unit,'(I5,T24,A)') info%m%np, "Number of points in mesh"
+ write(unit,'(2I5,T24,A)') info%n_wfs, info%kb_n_proj, "Number of Wavefunctions, Number of Projectors"
+ write(unit,'(A,T24,A2,A3,A6)') " Wavefunctions", "nl", "l", "occ"
+ do i = 1, info%n_wfs
+ write(unit,'(T24,A2,I3,F6.2)') info%wfs_label(i), info%wfs_l(i), &
+ info%wfs_occ(i)
+ end do
+ write(unit,'(A12)') "</PP_HEADER>"
+
+ !Mesh
+ write(unit,'(A9)') "<PP_MESH>"
+ write(unit,'(T3,A6)') "<PP_R>"
+ write(unit,'(1P4E19.11)') (info%m%r(ir), ir = 1, info%m%np)
+ write(unit,'(T3,A7)') "</PP_R>"
+ write(unit,'(T3,A8)') "<PP_RAB>"
+ write(unit,'(1P4E19.11)') (info%m%r(ir)*info%m%a, ir = 1, info%m%np)
+ write(unit,'(T3,A9)') "</PP_RAB>"
+ write(unit,'(A10)') "</PP_MESH>"
+
+ !Non-linear core-corrections
+ if (info%nlcc) then
+ write(unit,'(A9)') "<PP_NLCC>"
+ write(unit,'(1P4E19.11)') (info%rho_core(ir), ir = 1, info%m%np)
+ write(unit,'(A10)') "</PP_NLCC>"
+ write(unit,'(A13)') "<PP_NLCC_TAU>"
+ write(unit,'(1P4E19.11)') (info%tau_core(ir), ir = 1, info%m%np)
+ write(unit,'(A14)') "</PP_NLCC_TAU>"
+ end if
+
+ !Local component
+ write(unit,'(A10)') "<PP_LOCAL>"
+ write(unit,'(1P4E19.11)') (info%kb_v_local(ir)*M_TWO, ir = 1, info%m%np)
+ write(unit,'(A11)') "</PP_LOCAL>"
+
+ !Non-local components
+ write(unit,'(A13)') "<PP_NONLOCAL>"
+
+ do i = 1, info%kb_n_proj
+ write(unit,'(T3,A9)') "<PP_BETA>"
+ write(unit,'(2I5,T24,A)') i, info%kb_l(i), "Beta L"
+ write(unit,'(I6)') info%m%np
+ write(unit,'(1P4E19.11)') (info%kb_proj(ir, i)*M_TWO*info%m%r(ir), ir = 1, info%m%np)
+ write(unit,'(T3,A10)') "</PP_BETA>"
+ end do
+ write(unit,'(T3,A8)') "<PP_DIJ>"
+ write(unit,'(1P,I5,T24,A)') info%kb_n_proj, "Number of nonzero Dij"
+ do i = 1, info%kb_n_proj
+ write(unit,'(1P,2I5,E19.11)') i, i, info%kb_e(i)/M_TWO
+ end do
+ write(unit,'(T3,A9)') "</PP_DIJ>"
+ write(unit,'(A14)') "</PP_NONLOCAL>"
+
+ !Pseudo wave-functions
+ write(unit,'(A10)') "<PP_PSWFC>"
+ do i = 1, info%n_wfs
+ write(unit,'(A2,I5,F6.2,T24,A)') info%wfs_label(i), info%wfs_l(i), &
+ info%wfs_occ(i), "Wavefunction"
+ write(unit,'(1P4E19.11)') (info%wfs(ir, i)*info%m%r(ir), ir = 1, info%m%np)
+ end do
+ write(unit,'(A11)') "</PP_PSWFC>"
+
+ !Valence charge
+ write(unit,'(A12)') "<PP_RHOATOM>"
+ write(unit,'(1P4E19.11)') (info%rho_val(i)*info%m%r(i)**2*M_FOUR*M_PI, i = 1, info%m%np)
+ write(unit,'(A13)') "</PP_RHOATOM>"
+
+ !This tag emulates PWSCF PP_ADDINFO tag for j-dependent pseudopotentials
+ if (info%wave_eq == DIRAC) then
+ write(unit,'(A13)') "<PP_ADDINFO>"
+ do i = 1, info%n_wfs
+ write(unit,'(A2,2(2X,I1),2(2X,F4.2))') info%wfs_label(i), &
+ info%wfs_n(i), info%wfs_l(i), info%wfs_j(i), info%wfs_occ(i)
+ end do
+
+ do i = 1, info%kb_n_proj
+ write(unit,'(2X,I2,2X,F4.2)') info%kb_l(i), info%kb_j(i)
+ end do
+
+ xmin = (info%m%np-1)*info%m%a/(M_ONE/log(info%m%r(1)/info%m%r(info%m%np))-M_ONE)
+ zmesh = exp((info%m%np-1)*info%m%a+xmin)/info%m%r(info%m%np)
+
+ write(unit,'(2X,4F12.6)') xmin, info%m%r(info%m%np), zmesh, info%m%a
+
+ write(unit,'(A14)') "</PP_ADDINFO>"
+ end if
+
+ call pop_sub()
+ end subroutine upf_save
+
+ function ixc_to_icorr(ixc)
+ !-----------------------------------------------------------------------!
+ ! Returns a label to identify the xc model compatible with the atom !
+ ! code from Jose Luis Martins. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: ixc
+ character(2) :: ixc_to_icorr
+
+ select case (ixc)
+ case (XC_LDA_X + XC_LDA_C_PZ*1000)
+ ixc_to_icorr = "ca"
+ case (XC_LDA_X + XC_LDA_C_PW*1000)
+ ixc_to_icorr = "pw"
+ case (XC_GGA_X_PBE + XC_GGA_C_PBE)
+ ixc_to_icorr = "pb"
+ case default
+ ixc_to_icorr = " "
+ end select
+
+ end function ixc_to_icorr
+
+ function ixc_to_abinit(ixc)
+ !-----------------------------------------------------------------------!
+ ! Maps xc models to those used in ABINIT. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: ixc
+ integer :: ixc_to_abinit
+
+ select case (ixc)
+ case (XC_LDA_X + XC_LDA_C_PZ*1000)
+ ixc_to_abinit = 2
+ case (XC_LDA_X + XC_LDA_C_PW*1000)
+ ixc_to_abinit = 7
+ case (XC_GGA_X_PBE + XC_GGA_C_PBE*1000)
+ ixc_to_abinit = 11
+ case default
+ ixc_to_abinit = 0
+ end select
+
+ end function ixc_to_abinit
+
+ function ixc_description(ixc)
+ !-----------------------------------------------------------------------!
+ ! Describes the xc model being used. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: ixc
+ character(40) :: ixc_description
+
+ select case (ixc)
+ case (XC_LDA_X + XC_LDA_C_PZ*1000)
+ ixc_description = "Perdew-Zunger LDA"
+ case (XC_LDA_X + XC_LDA_C_PW*1000)
+ ixc_description = "Perdew-Wang LDA"
+ case (XC_GGA_X_PBE + XC_GGA_C_PBE)
+ ixc_description = "Perdew-Burke-Ernzerhof GGA"
+ case default
+ ixc_description = ""
+ end select
+
+ end function ixc_description
+
+ subroutine ixc_to_espresso(ixc, longname, shortname)
+ !-----------------------------------------------------------------------!
+ ! Returns a label to identify the xc model compatible with the codes !
+ ! in the Quantum Espresso package. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: ixc
+ character(4), intent(out) :: shortname
+ character(20), intent(out) :: longname
+
+ character(4) :: exch, corr, gradx, gradc
+
+ select case (ixc - (ixc/1000)*1000)
+ case (0)
+ exch = "NOX "
+ gradx = "NOGX"
+ case (XC_LDA_X)
+ exch = "SLA "
+ gradx = "NOGX"
+ case (XC_GGA_X_B88)
+ exch = "SLA "
+ gradx = "B88 "
+ case (XC_GGA_X_PW91)
+ exch = "SLA "
+ gradx = "GGX "
+ case (XC_GGA_X_PBE)
+ exch = "SLA "
+ gradx = "PBX "
+ case (XC_GGA_X_PBE_SOL)
+ corr = "PW "
+ gradc = "PSX "
+ case (XC_GGA_X_PBE_R)
+ exch = "SLA "
+ gradx = "RPB "
+ case (XC_GGA_X_WC)
+ exch = "SLA "
+ gradx = "WCX "
+ case (XC_MGGA_X_TPSS)
+ exch = "SLA "
+ gradx = "TPSS"
+ case default
+ exch = " "
+ gradx = " "
+ end select
+
+ select case (ixc/1000)
+ case (0)
+ corr = "NOC "
+ gradc = "NOGC"
+ case (XC_LDA_C_PZ)
+ corr = "PZ "
+ gradc = "NOGC"
+ case (XC_LDA_C_VWN)
+ corr = "VWN "
+ gradc = "NOGC"
+ case (XC_LDA_C_PW)
+ corr = "PW "
+ gradc = "NOGC"
+ case (XC_LDA_C_WIGNER)
+ corr = "WIG "
+ gradc = "NOGC"
+ case (XC_LDA_C_HL)
+ corr = "HL "
+ gradc = "NOGC"
+ case (XC_LDA_C_OB_PZ)
+ corr = "OBZ "
+ gradc = "NOGC"
+ case (XC_LDA_C_OB_PW)
+ corr = "OBW "
+ gradc = "NOGC"
+ case (XC_LDA_C_GL)
+ corr = "GL "
+ gradc = "NOGC"
+ case (XC_GGA_C_PW91)
+ corr = "PW "
+ gradc = "GGC "
+ case (XC_GGA_C_PBE)
+ corr = "PW "
+ gradc = "PBC "
+ case (XC_GGA_C_P86)
+ corr = "PZ "
+ gradc = "P86 "
+ case (XC_GGA_C_PBE_SOL)
+ corr = "PW "
+ gradc = "PSC "
+ case (XC_MGGA_C_TPSS)
+ corr = "PW "
+ gradc = "TPSS"
+ case default
+ corr = " "
+ gradc = " "
+ end select
+
+ !Shorname
+ select case (ixc)
+ case (XC_LDA_X)
+ shortname = corr
+ case (XC_GGA_X_PBE + XC_GGA_C_PBE*1000)
+ shortname = "PBE"
+ case (XC_GGA_X_B88 + XC_LDA_C_PZ*1000)
+ shortname = "B88"
+ case (XC_GGA_X_B88 + XC_GGA_C_P86*1000)
+ shortname = "BP"
+ case (XC_GGA_X_WC + XC_GGA_C_PBE*1000)
+ shortname = "WC"
+ case (XC_MGGA_X_TPSS + XC_MGGA_C_TPSS*1000)
+ shortname = "TPSS"
+ case default
+ shortname = " "
+ end select
+
+ !Longname
+ write(longname,'(4A5)') exch, corr, gradx, gradc
+
+ end subroutine ixc_to_espresso
+
+end module ps_io_m
diff --git a/src/quantum_numbers.F90 b/src/quantum_numbers.F90
new file mode 100644
index 0000000..9bfb86a
--- /dev/null
+++ b/src/quantum_numbers.F90
@@ -0,0 +1,263 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: quantum_numbers.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module quantum_numbers_m
+ use global_m
+ use messages_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface operator (==)
+ module procedure qn_equal
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type qn_t
+ integer :: n
+ integer :: l
+ real(R8) :: j
+ real(R8) :: s
+ real(R8) :: m
+ real(R8) :: sg
+ integer :: k
+ end type qn_t
+
+
+ !---Global Variables---!
+
+ type(qn_t), parameter :: QN_NULL = qn_t(0, 0, M_ZERO, M_ZERO, M_ZERO, M_ZERO, 0)
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: qn_t, &
+ QN_NULL, &
+ qn_init, &
+ qn_number_of_nodes, &
+ qn_label, &
+ qn_max_occ, &
+ operator(==), &
+ qn_wf_dim, &
+ qn_equal_fold
+
+
+contains
+
+ function qn_init(n, l, s, j, m, sg)
+ !-----------------------------------------------------------------------!
+ ! Initialize a set of quantum numbers. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n, l
+ real(R8), intent(in) :: s
+ real(R8), intent(in), optional :: j, m, sg
+ type(qn_t) :: qn_init
+
+ call push_sub("qn_init")
+
+ ASSERT(.not. (present(j) .and. present(m)))
+
+ !Set quantum numbers
+ qn_init%n = n
+ qn_init%l = l
+ qn_init%s = s
+ if (present(j)) then
+ qn_init%j = j
+ else
+ qn_init%j = M_ZERO
+ end if
+ if (present(m)) then
+ qn_init%m = m
+ else
+ qn_init%m = M_ZERO
+ end if
+ if (present(sg)) then
+ qn_init%sg = sg
+ else
+ qn_init%sg = M_ZERO
+ end if
+ if (qn_init%j /= M_ZERO) then
+ qn_init%k = -int(2*(j - real(l,R8))*(j + M_HALF))
+ elseif (qn_init%sg == -M_HALF) then
+ qn_init%k = - (l + 1)
+ elseif (qn_init%sg == M_HALF) then
+ qn_init%k = l
+ else
+ qn_init%k = 0
+ end if
+
+ !Check consistency, unless n=0
+ if (((l < 0) .or. ( l > n - 1)) .and. n /= 0) then
+ message(1) = "Bad angular quantum number in qn_init."
+ write(message(2), '("n = ",I2,", l = ",I2)') n, l
+ call write_fatal(2)
+ end if
+ if (qn_init%j /= M_ZERO) then
+ if(((j /= l - M_HALF) .and. (j /= l + M_HALF)) .and. n /= 0) then
+ message(1) = "Bad total angular quantum number in qn_init."
+ write(message(2), '("n = ",I2,", l = ",I2,", j = ",F4.1)') n, l, j
+ call write_fatal(2)
+ end if
+ end if
+ if (abs(qn_init%m) == l + M_HALF .and. qn_init%sg /= M_ZERO .and. n /= 0) then
+ message(1) = "Bad sigma quantum number in qn_init."
+ write(message(2), '("n = ",I2,", m = ",F4.1,", sg = ",F4.1)') n, qn_init%m, qn_init%sg
+ call write_fatal(2)
+ end if
+
+ call pop_sub()
+ end function qn_init
+
+ elemental function qn_equal(qn_a, qn_b)
+ !-----------------------------------------------------------------------!
+ ! True if all components of qn_a and qn_b are equal; false otherwise. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn_a, qn_b
+ logical :: qn_equal
+
+ qn_equal = qn_a%n == qn_b%n .and. qn_a%l == qn_b%l .and. &
+ qn_a%j == qn_b%j .and. qn_a%s == qn_b%s .and. &
+ qn_a%m == qn_b%m .and. qn_a%sg == qn_b%sg
+
+ end function qn_equal
+
+ elemental function qn_number_of_nodes(qn)
+ !-----------------------------------------------------------------------!
+ ! Returns how many nodes the wavefuntion should have. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ integer :: qn_number_of_nodes
+
+ qn_number_of_nodes = qn%n - qn%l - 1
+
+ end function qn_number_of_nodes
+
+ function qn_label(qn, full)
+ !-----------------------------------------------------------------------!
+ ! Returns a label that identifies the set of quantum numbers. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ logical, intent(in), optional :: full
+
+ character(len=10) :: qn_label
+ character(len=1) :: sgn
+
+ select case (qn%l)
+ case (0)
+ write(qn_label,'(I1,A)') qn%n, "s"
+ case (1)
+ write(qn_label,'(I1,A)') qn%n, "p"
+ case (2)
+ write(qn_label,'(I1,A)') qn%n, "d"
+ case (3)
+ write(qn_label,'(I1,A)') qn%n, "f"
+ case default
+
+ end select
+
+ if (qn%j /= M_ZERO) then
+ write(qn_label,'(A,I1,".5")') trim(qn_label), int(qn%j - M_HALF)
+ elseif (qn%m /= M_ZERO) then
+ sgn = '-'
+ if (qn%m > 0) sgn = '+'
+ write(qn_label,'(A,I1,".5")') trim(qn_label)//trim(sgn), int(abs(qn%m) - M_HALF)
+ end if
+
+ if (present(full)) then
+ if (full) then
+ if (qn%s == M_HALF .or. qn%sg == M_HALF) then
+ qn_label = trim(qn_label)//"_up"
+ elseif (qn%s == -M_HALF .or. qn%sg == -M_HALF) then
+ qn_label = trim(qn_label)//"_dn"
+ end if
+ end if
+ end if
+
+ end function qn_label
+
+ elemental function qn_max_occ(qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the maximum occupancy for a given set of quantum numbers. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8) :: qn_max_occ
+
+ if (qn%j == M_ZERO .and. qn%m == M_ZERO) then
+ if (qn%s == M_ZERO) then
+ qn_max_occ = M_TWO*(M_TWO*qn%l + M_ONE)
+ else
+ qn_max_occ = M_TWO*qn%l + M_ONE
+ end if
+ else if (qn%m /= M_ZERO) then
+ qn_max_occ = M_ONE
+ else
+ qn_max_occ = M_TWO*qn%j + M_ONE
+ end if
+
+ end function qn_max_occ
+
+ elemental function qn_wf_dim(qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the dimension of the wavefunction for a given set of quantum !
+ ! numbers. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ integer :: qn_wf_dim
+
+ if (qn%j /= M_ZERO) then
+ qn_wf_dim = 2
+ else if (qn%m /= M_ZERO) then
+ if (abs(qn%m) == qn%l + M_HALF) then
+ qn_wf_dim = 2
+ else
+ qn_wf_dim = 4
+ end if
+ else
+ qn_wf_dim = 1
+ end if
+
+ end function qn_wf_dim
+
+ elemental function qn_equal_fold(qn_a, qn_b, polarized)
+ !-----------------------------------------------------------------------!
+ ! Returns true if qn_a and qn_b belong to the same fold. This is the !
+ ! case if all the quantum numbers that appear on the wave-equation of !
+ ! sets a and b are the same, i.e., they only differ in the number of !
+ ! nodes quantum number. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn_a, qn_b
+ logical, intent(in) :: polarized
+ logical :: qn_equal_fold
+
+ qn_equal_fold = ( (qn_a%l == qn_b%l) .and. &
+ (qn_a%j == qn_b%j) .and. &
+ (qn_a%s == qn_b%s) .and. &
+ (qn_a%m == qn_b%m) )
+
+ qn_equal_fold = qn_equal_fold .and. (polarized .or. qn_a%sg == qn_b%sg)
+
+ end function qn_equal_fold
+
+end module quantum_numbers_m
diff --git a/src/run_ape.F90 b/src/run_ape.F90
new file mode 100644
index 0000000..3b2e1e4
--- /dev/null
+++ b/src/run_ape.F90
@@ -0,0 +1,326 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!! Copyright (C) 2012 T. Cerqueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: run_ape.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module run_ape_m
+ use global_m
+ use oct_parser_m
+ use utilities_m
+ use messages_m
+ use units_m
+ use output_m
+ use eigensolver_m
+ use atom_m
+ use numerical_tests_m
+ implicit none
+
+
+ !---Global Variables---!
+
+ !The stack
+ integer :: stack(100) = 0
+ integer :: n_inst = 0
+
+ !Modes
+ integer, parameter :: AE = 1, &
+ PP_GEN = 2, &
+ PP_TEST = 4, &
+ PP_CONVERT = 8, &
+ NUM_TESTS = 16, &
+ XC_EVAL = 32, &
+ IP_CALC = 64
+
+ !Instructions
+ integer, parameter :: ATOM_AE_CREATE = 1, &
+ ATOM_AE_SAVE = 2, &
+ ATOM_AE_LOAD = 3, &
+ ATOM_AE_XC_EVAL = 4, &
+ ATOM_AE_END = 5, &
+ ATOM_PS_CREATE = 11, &
+ ATOM_PS_SAVE = 12, &
+ ATOM_PS_LOAD = 13, &
+ ATOM_PS_TEST = 14, &
+ ATOM_PS_END = 15, &
+ ATOM_KB_END = 16, &
+ NUMERICAL_TESTS = 30, &
+ ATOM_CALC_IP = 41, &
+ LEAVE = 100
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: run, AE, PP_GEN, PP_TEST, NUM_TESTS, XC_EVAL, IP_CALC
+
+
+contains
+
+ subroutine run()
+ !-----------------------------------------------------------------------!
+ ! This subroutine reads the run mode and puts the corresponding tasks !
+ ! in a stack. It then performs all the tasks that are in the stack by !
+ ! calling the appropriate subroutines. !
+ ! !
+ !-----------------------------------------------------------------------!
+ integer :: calcmode, mode_test, inst, message_length
+ type(eigensolver_t) :: eigensolver
+ type(atom_t) :: ae_atom, ps_atom, kb_atom
+
+ call push_sub("run")
+
+ !Read calculation mode
+ call oct_parse_int('CalculationMode', AE + PP_GEN, calcmode)
+
+ !Write what the code is going to do and check the input
+ message(1) = "Calculation Type:"
+ message_length = 1
+ mode_test = calcmode
+ if (iand(calcmode, AE) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " Atomic Calculation"
+ mode_test = mode_test - iand(AE, calcmode)
+ end if
+ if (iand(calcmode, PP_GEN) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " PseudoPotential Generation"
+ mode_test = mode_test - iand(PP_GEN, calcmode)
+ end if
+ if (iand(calcmode, PP_TEST) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " PseudoPotential Test"
+ mode_test = mode_test - iand(PP_TEST, calcmode)
+ end if
+ if (iand(calcmode, PP_CONVERT) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " PseudoPotential File Conversion"
+ mode_test = mode_test - iand(PP_CONVERT, calcmode)
+ end if
+ if (iand(calcmode, NUM_TESTS) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " Numerical Tests"
+ mode_test = mode_test - iand(NUM_TESTS, calcmode)
+ end if
+ if (iand(calcmode, XC_EVAL) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " Exchange-Correlation Evaluation"
+ mode_test = mode_test - iand(XC_EVAL, calcmode)
+ end if
+ if (iand(calcmode, IP_CALC) /= 0) then
+ message_length = message_length + 1
+ message(message_length) = " Ionization Potential Calculation"
+ mode_test = mode_test - iand(IP_CALC, calcmode)
+ end if
+ if (mode_test /= 0) then
+ write(message(1), '(A,I2,A)') "Input: '", calcmode, "' is not a valid CalculationMode"
+ call write_fatal(1)
+ else
+ call write_info(message_length)
+ end if
+
+ !Initialize stack
+ !Remember this is a stack: first in last out!
+ call push(LEAVE) !Last thing to do is always to exit
+
+ !Are we going to do determine the ionization potential?
+ if (iand(calcmode, IP_CALC) /= 0) then
+ call push(ATOM_AE_END)
+ call push(ATOM_CALC_IP)
+ call push(ATOM_AE_LOAD)
+ end if
+
+ !Are we going to evaluate the xc potential and energy?
+ if (iand(calcmode, XC_EVAL) /= 0) then
+ call push(ATOM_AE_END)
+ call push(ATOM_AE_XC_EVAL)
+ call push(ATOM_AE_LOAD)
+ end if
+
+ !Are we going to convert the pseudopotential data?
+ if (iand(calcmode, PP_CONVERT) /= 0) then
+ call push(ATOM_PS_END)
+ call push(ATOM_PS_LOAD)
+ end if
+
+ !Are we going to test the pseudopotentials?
+ if (iand(calcmode, PP_TEST) /= 0) then
+ call push(ATOM_PS_END)
+ call push(ATOM_PS_TEST)
+ call push(ATOM_PS_LOAD)
+ end if
+
+ !Are we going to do a pseudopotential generation?
+ if (iand(calcmode, PP_GEN) /= 0) then
+ call push(ATOM_AE_END)
+ call push(ATOM_PS_END)
+ call push(ATOM_KB_END)
+ call push(ATOM_PS_SAVE)
+ call push(ATOM_PS_CREATE)
+ call push(ATOM_AE_LOAD)
+ end if
+
+ !Are we going to do an all-electron calculation?
+ if (iand(calcmode, AE) /= 0) then
+ call push(ATOM_AE_END)
+ call push(ATOM_AE_SAVE)
+ call push(ATOM_AE_CREATE)
+ end if
+
+ !Are we going to perform numerical tests?
+ if (iand(calcmode, NUM_TESTS) /= 0) then
+ call push(NUMERICAL_TESTS)
+ end if
+
+ !Initialize things needed for all modes
+ call units_init()
+ call eigensolver_init(eigensolver)
+
+ !Main loop: do everything that is in the stack
+ do
+ call pop(inst)
+ select case (inst)
+ case (ATOM_AE_CREATE)
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- All Electron Calculation --", 70)
+ call write_info(3)
+
+ call output_init("ae")
+ call atom_null(ae_atom)
+ call atom_create_ae(ae_atom, eigensolver)
+ call atom_output(ae_atom, "ae")
+ call output_end("ae")
+
+ case (ATOM_AE_SAVE)
+ call atom_save(ae_atom, "ae")
+
+ case (ATOM_AE_LOAD)
+ call atom_null(ae_atom)
+ call atom_load(ae_atom, "ae")
+
+ case (ATOM_AE_XC_EVAL)
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- Exchage-Correlation Evaluation --", 70)
+ call output_init("xc")
+ call atom_xc_eval(ae_atom)
+ call output_end("xc")
+
+ case (ATOM_AE_END)
+ call atom_end(ae_atom)
+
+ case (ATOM_PS_CREATE)
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- Pseudopotential Generation --", 70)
+ call write_info(3)
+
+ call output_init("pp")
+ call output_init("kb")
+ call atom_null(ps_atom)
+ call atom_null(kb_atom)
+ call atom_create_ps(ps_atom, ae_atom, eigensolver)
+ call atom_create_kb(kb_atom, ps_atom, eigensolver)
+ call atom_output(ps_atom, "pp")
+ call atom_output(kb_atom, "kb")
+ call output_end("pp")
+ call output_end("kb")
+
+ case (ATOM_PS_SAVE)
+ call atom_save(ps_atom, "pp")
+
+ case (ATOM_PS_LOAD)
+ call atom_null(ps_atom)
+ call atom_load(ps_atom, "pp")
+
+ case (ATOM_PS_TEST)
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- Pseudopotential Testing --", 70)
+ call write_info(3)
+
+ call output_init("tests")
+ call atom_test(ps_atom, eigensolver)
+ call output_end("tests")
+
+ case (ATOM_PS_END)
+ call atom_end(ps_atom)
+
+ case (ATOM_KB_END)
+ call atom_end(kb_atom)
+
+ case (NUMERICAL_TESTS)
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- Numerical Tests --", 70)
+ call output_init("nt")
+ call numerical_tests_run()
+ call output_end("nt")
+
+ case (ATOM_CALC_IP)
+ message(1) = ""
+ message(2) = ""
+ message(3) = str_center("-- Ionization Potential Calculation --", 70)
+ call write_info(3)
+
+ call output_init("ip")
+ call atom_ip(ae_atom, eigensolver)
+ call atom_output(ae_atom, "ip")
+ call output_end("ip")
+
+ case (LEAVE)
+ exit
+ end select
+ end do
+
+ !End things needed for all modes
+ call eigensolver_end(eigensolver)
+
+ call pop_sub()
+ contains
+
+ subroutine push(inst)
+ integer, intent(in) :: inst
+
+ if (n_inst == 100) then
+ message(1) = "Too many instructions in stack"
+ call write_fatal(1)
+ end if
+ n_inst = n_inst + 1
+ stack(n_inst) = inst
+
+ end subroutine push
+
+ subroutine pop(inst)
+ integer, intent(out) :: inst
+
+ if (n_inst == 0) then
+ message(1) = "Not enough instructions in stack"
+ call write_fatal(1)
+ end if
+ inst = stack(n_inst)
+ stack(n_inst) = 0
+ n_inst = n_inst - 1
+
+ end subroutine pop
+
+ end subroutine run
+
+end module run_ape_m
diff --git a/src/sl_potentials.F90 b/src/sl_potentials.F90
new file mode 100644
index 0000000..b0cec61
--- /dev/null
+++ b/src/sl_potentials.F90
@@ -0,0 +1,371 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: sl_potentials.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module sl_potentials_m
+ use global_m
+ use messages_m
+ use io_m
+ use units_m
+ use splines_m
+ use mesh_m
+ use quantum_numbers_m
+ use ps_io_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type sl_potential_t
+ private
+ integer :: nc
+ type(qn_t), pointer :: qn(:)
+ real(R8), pointer :: v(:,:)
+ type(spline_t), pointer :: v_spl(:)
+ type(spline_t), pointer :: vp_spl(:)
+ type(spline_t), pointer :: vpp_spl(:)
+ end type sl_potential_t
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: sl_potential_t, &
+ sl_potential_null, &
+ sl_potential_init, &
+ sl_potential_copy, &
+ sl_potential_end, &
+ sl_potential_save, &
+ sl_potential_load, &
+ sl_v, &
+ sl_dvdr, &
+ sl_d2vdr2, &
+ sl_potential_debug, &
+ sl_potential_output, &
+ sl_potential_ps_io_set
+
+
+contains
+
+ subroutine sl_potential_null(potential)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the potential. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(out) :: potential
+
+ call push_sub("sl_potential_null")
+
+ potential%nc = 0
+ nullify(potential%qn)
+ nullify(potential%v)
+ nullify(potential%v_spl)
+ nullify(potential%vp_spl)
+ nullify(potential%vpp_spl)
+
+ call pop_sub()
+ end subroutine sl_potential_null
+
+ subroutine sl_potential_init(potential, m, nc, qn, v)
+ !-----------------------------------------------------------------------!
+ ! Initialize a semi-local potential !
+ ! !
+ ! potential - potential to be initialized !
+ ! m - mesh !
+ ! nc - number of components !
+ ! qn - quantum numbers of each component !
+ ! v - values of the potentials on the mesh for each component !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(inout) :: potential
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nc
+ type(qn_t), intent(in) :: qn(nc)
+ real(R8), intent(in) :: v(m%np, nc)
+
+ integer :: i, k
+
+ call push_sub("sl_potential_init")
+
+ potential%nc = nc
+ allocate(potential%qn(nc))
+ allocate(potential%v(m%np, nc))
+ allocate(potential%v_spl(nc))
+ allocate(potential%vp_spl(nc))
+ allocate(potential%vpp_spl(nc))
+ do i = 1, nc
+ k = qn(i)%l + int(qn(i)%j) + 1
+ potential%qn(k) = qn(i)
+ potential%v(:, k) = v(:, i)
+ call spline_null(potential%v_spl(k))
+ call spline_null(potential%vp_spl(k))
+ call spline_null(potential%vpp_spl(k))
+ call spline_init(potential%v_spl(k), m%np, m%r, potential%v(:, k), 3)
+ call spline_init(potential%vp_spl(k), m%np, m%r, mesh_derivative(m, potential%v(:, k)), 3)
+ call spline_init(potential%vpp_spl(k), m%np, m%r, mesh_derivative2(m, potential%v(:, k)), 3)
+ end do
+
+ call pop_sub()
+ end subroutine sl_potential_init
+
+ subroutine sl_potential_copy(m, potential_a, potential_b)
+ !-----------------------------------------------------------------------!
+ ! Copies the potential potential_a to potential potential_b. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(sl_potential_t), intent(inout) :: potential_a
+ type(sl_potential_t), intent(in) :: potential_b
+
+ integer :: i
+
+ call push_sub("sl_potential_copy")
+
+ call sl_potential_end(potential_a)
+
+ potential_a%nc = potential_b%nc
+
+ allocate(potential_a%qn(potential_a%nc))
+ potential_a%qn = potential_b%qn
+ allocate(potential_a%v(m%np, potential_a%nc))
+ potential_a%v = potential_b%v
+ allocate(potential_a%v_spl(potential_a%nc))
+ allocate(potential_a%vp_spl(potential_a%nc))
+ allocate(potential_a%vpp_spl(potential_a%nc))
+ do i = 1, potential_a%nc
+ call spline_null(potential_a%v_spl(i))
+ call spline_null(potential_a%vp_spl(i))
+ call spline_null(potential_a%vpp_spl(i))
+ potential_a%v_spl(i) = potential_b%v_spl(i)
+ potential_a%vp_spl(i) = potential_b%vp_spl(i)
+ potential_a%vpp_spl(i) = potential_b%vpp_spl(i)
+ end do
+
+ call pop_sub()
+ end subroutine sl_potential_copy
+
+ subroutine sl_potential_end(potential)
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to the potential. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(inout) :: potential
+
+ integer :: i
+
+ call push_sub("sl_potential_end")
+
+ if (associated(potential%qn)) then
+ deallocate (potential%qn)
+ end if
+ if (associated(potential%v)) then
+ deallocate (potential%v)
+ end if
+ if (associated(potential%v_spl)) then
+ do i = 1, potential%nc
+ call spline_end(potential%v_spl(i))
+ end do
+ deallocate(potential%v_spl)
+ end if
+ if (associated(potential%vp_spl)) then
+ do i = 1, potential%nc
+ call spline_end(potential%vp_spl(i))
+ end do
+ deallocate(potential%vp_spl)
+ end if
+ if (associated(potential%vpp_spl)) then
+ do i = 1, potential%nc
+ call spline_end(potential%vpp_spl(i))
+ end do
+ deallocate(potential%vpp_spl)
+ end if
+
+ call pop_sub()
+ end subroutine sl_potential_end
+
+ subroutine sl_potential_save(unit, m, potential)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file. !
+ ! !
+ ! unit - file unit number !
+ ! m - mesh !
+ ! potential - potential to be written !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(sl_potential_t), intent(in) :: potential
+
+ integer :: k, i
+
+ call push_sub("sl_potential_save")
+
+ write(unit) potential%nc
+ do k = 1, potential%nc
+ write(unit) potential%qn(k)
+ do i = 1, m%np
+ write(unit) potential%v(i, k)
+ end do
+ end do
+
+ call pop_sub()
+ end subroutine sl_potential_save
+
+ subroutine sl_potential_load(unit, m, potential)
+ !-----------------------------------------------------------------------!
+ ! Reads the potential from a file. !
+ ! !
+ ! unit - file unit number !
+ ! m - mesh !
+ ! potential - potential to be read !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(mesh_t), intent(in) :: m
+ type(sl_potential_t), intent(inout) :: potential
+
+ integer :: k, i
+
+ call push_sub("sl_potential_load")
+
+ read(unit) potential%nc
+ allocate(potential%qn(potential%nc))
+ allocate(potential%v(m%np, potential%nc))
+ allocate(potential%v_spl(potential%nc))
+ allocate(potential%vp_spl(potential%nc))
+ allocate(potential%vpp_spl(potential%nc))
+ do k = 1, potential%nc
+ read(unit) potential%qn(k)
+ do i = 1, m%np
+ read(unit) potential%v(i, k)
+ end do
+ call spline_null(potential%v_spl(k))
+ call spline_null(potential%vp_spl(k))
+ call spline_null(potential%vpp_spl(k))
+ call spline_init(potential%v_spl(k), m%np, m%r, potential%v(:, k), 3)
+ call spline_init(potential%vp_spl(k), m%np, m%r, mesh_derivative(m, potential%v(:, k)), 3)
+ call spline_init(potential%vpp_spl(k), m%np, m%r, mesh_derivative2(m, potential%v(:, k)), 3)
+ end do
+
+ call pop_sub()
+ end subroutine sl_potential_load
+
+ function sl_v(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the potential felt by an electron at radius r. !
+ ! If the potential is j-averaged and qn%j = 0, then the j-averaged !
+ ! pseudopotential is used. If j = l +- 1/2 we assume that the !
+ ! spin-orbit part should also be aplied. In that case, the j-dependent !
+ ! pseudopotentials are used, which in this case is perfectly equivalent.!
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: sl_v
+
+ sl_v = spline_eval(potential%v_spl(qn%l + int(qn%j) + 1), r)
+
+ end function sl_v
+
+ function sl_dvdr(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the first derivative of the potential felt by an !
+ ! electron at radius r. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: sl_dvdr
+
+ sl_dvdr = spline_eval(potential%vp_spl(qn%l + int(qn%j) + 1), r)
+
+ end function sl_dvdr
+
+ function sl_d2vdr2(potential, r, qn)
+ !-----------------------------------------------------------------------!
+ ! Returns the value of the second derivative of the potential felt by !
+ ! an electron radius r. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(in) :: potential
+ real(R8), intent(in) :: r
+ type(qn_t), intent(in) :: qn
+ real(R8) :: sl_d2vdr2
+
+ sl_d2vdr2 = spline_eval(potential%vpp_spl(qn%l + int(qn%j) + 1), r)
+
+ end function sl_d2vdr2
+
+ subroutine sl_potential_debug(potential)
+ !-----------------------------------------------------------------------!
+ ! Prints debug information to the "debug_info" directory. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(in) :: potential
+
+ call push_sub("sl_potential_debug")
+
+ call pop_sub()
+ end subroutine sl_potential_debug
+
+ subroutine sl_potential_output(potential, m, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the potential to a file in a format suitable for plotting. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(in) :: potential
+ type(mesh_t), intent(in) :: m
+ character(len=*), intent(in) :: dir
+
+ integer :: i, k, unit
+ real(R8) :: ue, ul
+ character(len=10) :: label
+ character(len=20) :: filename
+
+ call push_sub("sl_potential_output")
+
+ ul = units_out%length%factor
+ ue = units_out%energy%factor
+
+ do k = 1, potential%nc
+ label = qn_label(potential%qn(k))
+ filename = trim(dir)//"/pp-"//trim(label(2:))
+ call io_open(unit, file=trim(filename))
+
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ write(unit,'("# ",34("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",6X,"v(r)",6X,"|")')
+ write(unit,'("# ",34("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2)') m%r(i)/ul, &
+ sl_v(potential, m%r(i), potential%qn(k))/ue
+ end do
+ close(unit)
+ end do
+
+ call pop_sub()
+ end subroutine sl_potential_output
+
+ subroutine sl_potential_ps_io_set(potential, m)
+ !-----------------------------------------------------------------------!
+ ! Pass the information about the pseudopotentials to the ps_io module. !
+ !-----------------------------------------------------------------------!
+ type(sl_potential_t), intent(in) :: potential
+ type(mesh_t), intent(in) :: m
+
+ call ps_io_set_psp(m%np, potential%nc, potential%qn%l, potential%qn%j, potential%v)
+
+ end subroutine sl_potential_ps_io_set
+
+end module sl_potentials_m
diff --git a/src/splines.F90 b/src/splines.F90
new file mode 100644
index 0000000..a3eb068
--- /dev/null
+++ b/src/splines.F90
@@ -0,0 +1,275 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: splines.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module splines_m
+ use global_m
+ use messages_m
+ use gsl_interface_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure copy_splines
+ end interface
+
+ interface operator (==)
+ module procedure equal_splines
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type spline_t
+ !This derived data type is the only one acessible to other modules.
+ !It is just a pointer to the splines information
+ private
+ type(spline_info_t), pointer :: info
+ end type spline_t
+
+ type spline_info_t
+ !acc and spl are the gsl objects
+ !n_ptrs is the number of spline_type objects pointing to this spline
+ integer(POINTER_SIZE) :: acc, spl
+ integer :: n_ptrs
+ end type spline_info_t
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: spline_t, &
+ spline_null, &
+ spline_init, &
+ assignment(=), &
+ operator(==), &
+ spline_end, &
+ spline_eval, &
+ spline_eval_deriv, &
+ spline_eval_deriv2, &
+ spline_eval_integ, &
+ spline_mesh_transfer
+
+
+contains
+
+ subroutine spline_null(spline)
+ !-----------------------------------------------------------------------!
+ ! Nullifies the components of the spline. !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(out) :: spline
+
+ nullify(spline%info)
+
+ end subroutine spline_null
+
+ subroutine spline_init(spline, n, x, y, interp_type)
+ !-----------------------------------------------------------------------!
+ ! Given a set of data points (x_i,y_i) it computes an interpolation !
+ ! function of a chosen type. !
+ ! !
+ ! spline - pointer to the spline information !
+ ! n - number of data-points !
+ ! x - x coordinates of the data points !
+ ! y - y coordinates of the data points !
+ ! interp_type - interpolation type. Possible values are: !
+ ! 1 -> linear !
+ ! 2 -> polynomial !
+ ! 3 -> cubic spline with natural boundary conditions !
+ ! 4 -> cubic spline with periodic boundary conditions !
+ ! 5 -> Akima spline with natural boundary conditions !
+ ! 6 -> Akima spline with periodic boundary conditions !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(inout) :: spline
+ integer, intent(in) :: interp_type, n
+ real(R8), intent(in) :: x(n), y(n)
+
+ real(R8), allocatable :: auxx(:), auxy(:)
+
+ ASSERT(.not.associated(spline%info))
+
+ !Allocate memory
+ allocate(spline%info)
+
+ !Store all the information about the interpolation function
+ spline%info%n_ptrs = 1
+ spline%info%acc = 0
+ spline%info%spl = 0
+ call gsl_interp_accel_alloc(spline%info%acc)
+ call gsl_spline_alloc(spline%info%spl, n, interp_type)
+ allocate(auxx(n), auxy(n))
+ auxy = y !The use of an auxiliary array prevents some types of errors
+ auxx = x
+ call gsl_spline_init(spline%info%spl, n, auxx(1), auxy(1))
+ deallocate(auxx, auxy)
+
+ end subroutine spline_init
+
+ subroutine copy_splines(spline_a, spline_b)
+ !-----------------------------------------------------------------------!
+ ! Makes spline_a equal to spline_b. That is done by making both splines !
+ ! component info point to the same interpolation information. !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(inout) :: spline_a
+ type(spline_t), intent(in) :: spline_b
+
+ ASSERT(associated(spline_b%info))
+
+ !Deallocate the memory previously assigned to spline_a
+ call spline_end(spline_a)
+
+ !Make spline_a point to the same interpolation info than spline_b
+ spline_a%info => spline_b%info
+
+ !Now we have an addicional pointer to the spline information
+ spline_a%info%n_ptrs = spline_a%info%n_ptrs + 1
+
+ end subroutine copy_splines
+
+ function equal_splines(spline_a, spline_b)
+ !-----------------------------------------------------------------------!
+ ! Returns true if spline_a and spline_b interpolation objects are equal.!
+ ! Returns false if they are not. !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(in) :: spline_a, spline_b
+ logical :: equal_splines
+
+ equal_splines = associated(spline_a%info, spline_b%info)
+
+ end function equal_splines
+
+ subroutine spline_end(spline)
+ !-----------------------------------------------------------------------!
+ ! Frees the interpolation object spline. !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(inout) :: spline
+
+ if (associated(spline%info)) then
+ if (spline%info%n_ptrs > 1) then
+ !There are more pointers pointing to this spline information
+ spline%info%n_ptrs = spline%info%n_ptrs - 1
+ nullify(spline%info)
+ else
+ !This is the only pointer pointing to this spline information
+ call gsl_spline_free(spline%info%spl)
+ call gsl_interp_accel_free(spline%info%acc)
+ deallocate(spline%info)
+ end if
+ end if
+
+ end subroutine spline_end
+
+ function spline_eval(spline, x)
+ !-----------------------------------------------------------------------!
+ ! Returns the interpolated value for a given point. !
+ ! !
+ ! spline - interpolation object !
+ ! x - point where to evaluate the function !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(in) :: spline
+ real(R8), intent(in) :: x
+ real(R8) :: spline_eval
+
+ spline_eval = gsl_spline_eval(x, spline%info%spl, spline%info%acc)
+
+ end function spline_eval
+
+ function spline_eval_deriv(spline, x)
+ !-----------------------------------------------------------------------!
+ ! Returns the derivative of an interpolated function for a given point. !
+ ! !
+ ! spline - interpolation object !
+ ! x - point where to evaluate the derivative !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(in) :: spline
+ real(R8), intent(in) :: x
+ real(R8) :: spline_eval_deriv
+
+ spline_eval_deriv = gsl_spline_eval_deriv(x, spline%info%spl, spline%info%acc)
+
+ end function spline_eval_deriv
+
+ function spline_eval_deriv2(spline, x)
+ !-----------------------------------------------------------------------!
+ ! Returns the second derivative of an interpolated function for a given !
+ ! point. !
+ ! !
+ ! spline - interpolation object !
+ ! x - point where to evaluate the second derivativ !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(in) :: spline
+ real(R8), intent(in) :: x
+ real(R8) :: spline_eval_deriv2
+
+ spline_eval_deriv2 = gsl_spline_eval_deriv2(x, spline%info%spl, spline%info%acc)
+
+ end function spline_eval_deriv2
+
+ function spline_eval_integ(spline, a, b)
+ !-----------------------------------------------------------------------!
+ ! Returns the numerical integral of an interpolated function over the !
+ ! range [a,b]. !
+ ! !
+ ! spline - interpolation object !
+ ! a, b - upper and lower integration bounds !
+ !-----------------------------------------------------------------------!
+ type(spline_t), intent(in) :: spline
+ real(R8), intent(in) :: a, b
+ real(R8) :: spline_eval_integ
+
+ spline_eval_integ = gsl_spline_eval_integ(a, b, spline%info%spl, spline%info%acc)
+
+ end function spline_eval_integ
+
+ subroutine spline_mesh_transfer(np_a, x_a, y_a, np_b, x_b, y_b, interp_type)
+ !-----------------------------------------------------------------------!
+ ! Having a function on a given mesh A, this routines returns the values !
+ ! of that function on a mesh B, by interpolating the function. !
+ ! !
+ ! np_a - mesh A number of points !
+ ! x_a - mesh A points !
+ ! y_a - values of the function on mesh A !
+ ! np_a - mesh B number of points !
+ ! x_b - mesh B points !
+ ! y_b - values of the function on mesh B !
+ ! interp_type - interpolation type !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: np_a, np_b, interp_type
+ real(R8), intent(in) :: x_a(np_a), y_a(np_a), x_b(np_b)
+ real(R8), intent(out) :: y_b(np_b)
+
+ integer :: i
+ type(spline_t) :: spl
+
+ call push_sub("spline_mesh_transfer")
+
+ call spline_null(spl)
+ call spline_init(spl, np_a, x_a, y_a, interp_type)
+ do i = 1, np_b
+ y_b(i) = spline_eval(spl, x_b(i))
+ end do
+ call spline_end(spl)
+
+ call pop_sub()
+ end subroutine spline_mesh_transfer
+
+end module splines_m
diff --git a/src/states.F90 b/src/states.F90
new file mode 100644
index 0000000..efbee4f
--- /dev/null
+++ b/src/states.F90
@@ -0,0 +1,1396 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: states.F90 782 2013-08-02 14:41:58Z micael $
+
+#include "global.h"
+
+module states_m
+ use global_m
+ use oct_parser_m
+ use io_m
+ use messages_m
+ use utilities_m
+ use units_m
+ use output_m
+ use mesh_m
+ use quantum_numbers_m
+ use potentials_m
+ use wave_equations_m
+ use eigensolver_m
+ use hamann_m
+ use troullier_martins_m
+ use multireference_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure state_copy
+ end interface
+
+ interface operator (==)
+ module procedure state_equal
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type state_t
+ ! General information about the state
+ type(qn_t) :: qn ! state quantum numbers
+ real(R8) :: occ ! occupation
+ real(R8) :: ev ! eigenvalue
+ character(len=6) :: label ! a label to identify the state
+ integer :: wave_eq ! wave-equation used to obtain the wave-functions
+
+ ! The wavefunctions
+ integer :: np, wf_dim
+ real(R8), pointer :: wf(:,:) ! Schrodinger equation:
+ ! wf(:,1) -> wavefunction
+ ! Scalar-relativistic equation
+ ! wf(:,1) -> wavefunction
+ ! Dirac equation:
+ ! wf(:,1) -> spinor major component
+ ! wf(:,2) -> spinor minor component
+ ! Dirac equation with spin-polarization:
+ ! wf(:,1) -> spinor major component +
+ ! wf(:,2) -> spinor minor component +
+ ! wf(:,3) -> spinor major component -
+ ! wf(:,4) -> spinor minor component -
+ real(R8), pointer :: wfp(:,:) ! Derivative of the wavefunction
+
+ ! Some information about the wavefunctions
+ real(R8) :: peak ! outermost peak position
+ real(R8) :: node ! outermost node position
+ end type state_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: NONE = 0, &
+ HAM = 1, &
+ TM = 2, &
+ RTM = 3, &
+ MRPP = 4, &
+ RMRPP = 5, &
+ MTM = 6
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: state_t, &
+ state_null, &
+ state_init, &
+ state_end, &
+ state_save, &
+ state_load, &
+ assignment(=), &
+ operator(==), &
+ state_density, &
+ state_density_grad, &
+ state_density_lapl, &
+ state_charge_density, &
+ state_magnetization_density, &
+ state_tau, &
+ state_eigenvalue, &
+ state_charge, &
+ state_density_moment, &
+ state_kinetic_energy, &
+ state_label, &
+ state_qn, &
+ state_update, &
+ state_ld, &
+ state_dipole_matrix_element, &
+ state_output_wf, &
+ state_outermost_peak, &
+ state_outermost_node, &
+ state_default_rc, &
+ state_psp_generation, &
+ state_test_consistency, &
+ state_kb_projector, &
+ state_test_ghost, &
+ NONE, HAM, TM, RTM, MRPP, RMRPP, MTM
+
+contains
+
+ subroutine state_null(state)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(out) :: state
+
+ call push_sub("state_null")
+
+ state%qn = QN_NULL
+ state%ev = M_ZERO
+ state%occ = M_ZERO
+ state%label = ""
+ state%wave_eq = 0
+ state%peak = M_ZERO
+ state%node = M_ZERO
+ state%np = 0
+ state%wf_dim = 0
+ nullify(state%wf, state%wfp)
+
+ call pop_sub()
+ end subroutine state_null
+
+ subroutine state_init(state, m, qn, occ, label)
+ !-----------------------------------------------------------------------!
+ ! Inititalizes a state. At this stage only the quantum numbers and the !
+ ! occupations are set. Wavefunctions are allocated and set to a !
+ ! constant. !
+ ! !
+ ! state - the state to be initialized !
+ ! m - the mesh !
+ ! qn - the quantum numbers !
+ ! occ - the occupation !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(inout) :: state
+ type(mesh_t), intent(in) :: m
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: occ
+ character(len=6), intent(in) :: label
+
+ call push_sub("state_init")
+
+ state%qn = qn
+ state%occ = occ
+ state%label = label
+
+ state%np = m%np
+ state%wf_dim = qn_wf_dim(state%qn)
+ allocate(state%wf(m%np, state%wf_dim))
+ allocate(state%wfp(m%np, state%wf_dim))
+ state%wf = M_ZERO
+ state%wfp = M_ZERO
+
+ call pop_sub()
+ end subroutine state_init
+
+ subroutine state_end(state)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to a state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(inout) :: state
+
+ call push_sub("state_end")
+
+ state%qn = QN_NULL
+ state%ev = M_ZERO
+ state%occ = M_ZERO
+ state%label = ""
+ state%wave_eq = 0
+ state%peak = M_ZERO
+ state%node = M_ZERO
+ state%np = 0
+ state%wf_dim = 0
+ if (associated(state%wf)) deallocate(state%wf)
+ if (associated(state%wfp)) deallocate(state%wfp)
+
+ call pop_sub()
+ end subroutine state_end
+
+ subroutine state_copy(state_a, state_b)
+ !-----------------------------------------------------------------------!
+ ! Copies state_b to state_a. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(inout) :: state_a
+ type(state_t), intent(in) :: state_b
+
+ call push_sub("state_copy")
+
+ call state_end(state_a)
+
+ state_a%qn = state_b%qn
+ state_a%ev = state_b%ev
+ state_a%occ = state_b%occ
+ state_a%label = state_b%label
+ state_a%wave_eq = state_b%wave_eq
+ state_a%peak = state_b%peak
+ state_a%node = state_b%node
+ state_a%np = state_b%np
+ state_a%wf_dim = state_b%wf_dim
+ allocate(state_a%wf(state_b%np, state_b%wf_dim))
+ allocate(state_a%wfp(state_b%np, state_b%wf_dim))
+ state_a%wf = state_b%wf
+ state_a%wfp = state_b%wfp
+
+ call pop_sub()
+ end subroutine state_copy
+
+ subroutine state_save(unit, state)
+ !-----------------------------------------------------------------------!
+ ! Writes the state information to a file. !
+ ! !
+ ! unit - file unit number !
+ ! state - state to be written !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(state_t), intent(in) :: state
+
+ integer :: i, n
+
+ call push_sub("state_save")
+
+ write(unit) state%qn
+ write(unit) state%occ, state%ev, state%label, state%wave_eq, &
+ state%np, state%wf_dim, state%peak, state%node
+
+ do i = 1, state%wf_dim
+ do n = 1, state%np
+ write(unit) state%wf(n, i), state%wfp(n, i)
+ end do
+ end do
+
+ call pop_sub()
+ end subroutine state_save
+
+ subroutine state_load(unit, state)
+ !-----------------------------------------------------------------------!
+ ! Reads the state information from a file. !
+ ! !
+ ! unit - file unit number !
+ ! state - state to be read !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(state_t), intent(inout) :: state
+
+ integer :: i, n
+
+ call push_sub("state_load")
+
+ read(unit) state%qn
+ read(unit) state%occ, state%ev, state%label, state%wave_eq, &
+ state%np, state%wf_dim, state%peak, state%node
+
+ allocate(state%wf(state%np, state%wf_dim))
+ allocate(state%wfp(state%np, state%wf_dim))
+ do i = 1, state%wf_dim
+ do n = 1, state%np
+ read(unit) state%wf(n, i), state%wfp(n, i)
+ end do
+ end do
+
+ call pop_sub()
+ end subroutine state_load
+
+ elemental function state_equal(state_a, state_b)
+ !-----------------------------------------------------------------------!
+ ! Returns true if state_a and state_b have the same label. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state_a, state_b
+ logical :: state_equal
+
+ state_equal = state_a%label == state_b%label
+
+ end function state_equal
+
+ function state_density(nspin, state)
+ !-----------------------------------------------------------------------!
+ ! Computes the spin density associated with a state. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: nspin
+ type(state_t), intent(in) :: state
+ real(R8) :: state_density(state%np, nspin)
+
+ real(R8) :: clm
+
+ call push_sub("state_density")
+
+ select case (nspin)
+ case (1)
+ state_density(:,1) = sum(state%wf**2, dim=2)
+ case (2)
+ if (state%qn%m == M_ZERO) then
+ if (state%qn%s == -M_HALF) then
+ state_density(:,1) = state%wf(:,1)**2
+ state_density(:,2) = M_ZERO
+ elseif(state%qn%s == M_HALF) then
+ state_density(:,1) = M_ZERO
+ state_density(:,2) = state%wf(:,1)**2
+ else
+ message(1) = "Error in state_density: invalid spin quantum number"
+ call write_fatal(1)
+ end if
+
+ else
+ state_density(:,1) = (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE)) *state%wf(:,1)**2 + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_THREE))*state%wf(:,2)**2
+ state_density(:,2) = (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE)) *state%wf(:,1)**2 + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_THREE))*state%wf(:,2)**2
+
+ if (abs(state%qn%m) /= state%qn%l + M_HALF) then
+ clm = -sqrt( (M_TWO*state%qn%l + M_ONE)**2 - M_FOUR*state%qn%m**2 )/(M_TWO*state%qn%l + M_ONE)
+
+ state_density(:,1) = state_density(:,1) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE))*state%wf(:,3)**2 + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l - M_ONE))*state%wf(:,4)**2 - &
+ M_TWO*clm*state%wf(:,1)*state%wf(:,3)
+ state_density(:,2) = state_density(:,2) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE))*state%wf(:,3)**2 + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l - M_ONE))*state%wf(:,4)**2 + &
+ M_TWO*clm*state%wf(:,1)*state%wf(:,3)
+ end if
+
+ state_density = M_HALF*state_density
+ end if
+
+ end select
+
+ state_density = state_density/(M_FOUR*M_PI)*state%occ
+
+ call pop_sub()
+ end function state_density
+
+ function state_density_grad(nspin, state, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the gradient of the electronic density associated with a !
+ ! state. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: nspin
+ type(state_t), intent(in) :: state
+ type(mesh_t), intent(in) :: m
+ real(R8) :: state_density_grad(m%np, nspin)
+
+ integer :: i
+ real(R8) :: clm
+
+ call push_sub("state_density_grad")
+
+ state_density_grad = M_ZERO
+ select case(nspin)
+ case(1)
+ do i = 1, state%wf_dim
+ state_density_grad(:,1) = state_density_grad(:,1) + &
+ M_TWO*(state%wf(:,i)*state%wfp(:,i))
+ end do
+ case(2)
+ if (state%qn%m == M_ZERO) then
+ if (state%qn%s == -M_HALF) then
+ do i = 1, state%wf_dim
+ state_density_grad(:,1) = state_density_grad(:,1) + &
+ M_TWO*(state%wf(:,i)*state%wfp(:,i))
+ end do
+ elseif (state%qn%s == M_HALF) then
+ do i = 1, state%wf_dim
+ state_density_grad(:,2) = state_density_grad(:,2) + &
+ M_TWO*(state%wf(:,i)*state%wfp(:,i))
+ end do
+ else
+ message(1) = "Error in state_density_grad: invalid spin quantum number"
+ call write_fatal(1)
+ end if
+ else
+
+ state_density_grad(:,1) = &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE)) *(state%wf(:,1)*state%wfp(:,1)) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_THREE))*(state%wf(:,2)*state%wfp(:,2))
+ state_density_grad(:,2) = &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE)) *(state%wf(:,1)*state%wfp(:,1)) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_THREE))*(state%wf(:,2)*state%wfp(:,2))
+
+ if (abs(state%qn%m) /= state%qn%l + M_HALF) then
+ clm = -sqrt( (M_TWO*state%qn%l + M_ONE)**2 - M_FOUR*state%qn%m**2 )/(M_TWO*state%qn%l + M_ONE)
+
+ state_density_grad(:,1) = state_density_grad(:,1) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE))*(state%wf(:,3)*state%wfp(:,3)) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l - M_ONE))*(state%wf(:,4)*state%wfp(:,4)) - &
+ clm*(state%wfp(:,1)*state%wf(:,3) + state%wf(:,1)*state%wfp(:,3))
+ state_density_grad(:,2) = state_density_grad(:,2) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE))*(state%wf(:,3)*state%wfp(:,3)) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l - M_ONE))*(state%wf(:,4)*state%wfp(:,4)) + &
+ clm*(state%wfp(:,1)*state%wf(:,3) + state%wf(:,1)*state%wfp(:,3))
+ end if
+
+ end if
+ end select
+
+ state_density_grad = state_density_grad/(M_FOUR*M_PI)*state%occ
+
+ call pop_sub()
+ end function state_density_grad
+
+ function state_density_lapl(nspin, state, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the laplacian of the electronic density associated with a !
+ ! state. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: nspin
+ type(state_t), intent(in) :: state
+ type(mesh_t), intent(in) :: m
+ real(R8) :: state_density_lapl(state%np, nspin)
+
+ integer :: i
+ real(R8) :: clm
+ real(R8), allocatable :: wfpp(:,:)
+
+ call push_sub("state_density_lapl")
+
+ state_density_lapl = M_ZERO
+ select case(nspin)
+ case(1)
+ do i = 1, state%wf_dim
+ state_density_lapl(:,1) = state_density_lapl(:,1) + &
+ M_TWO*(M_TWO*state%wf(:,i)*state%wfp(:,i)/m%r + state%wfp(:,i)**2 + &
+ state%wf(:,i)*mesh_derivative(m, state%wfp(:,i)))
+ end do
+ case(2)
+ if (state%qn%m == M_ZERO) then
+ if (state%qn%s == -M_HALF) then
+ do i = 1, state%wf_dim
+ state_density_lapl(:,1) = state_density_lapl(:,1) + &
+ M_TWO*(M_TWO*state%wf(:,i)*state%wfp(:,i)/m%r + state%wfp(:,i)**2 + &
+ state%wf(:,i)*mesh_derivative(m, state%wfp(:,i)))
+ end do
+ elseif (state%qn%s == M_HALF) then
+ do i = 1, state%wf_dim
+ state_density_lapl(:,2) = state_density_lapl(:,2) + &
+ M_TWO*(M_TWO*state%wf(:,i)*state%wfp(:,i)/m%r + state%wfp(:,i)**2 + &
+ state%wf(:,i)*mesh_derivative(m, state%wfp(:,i)))
+ end do
+ else
+ message(1) = "Error in state_density_lapl: invalid spin quantum number"
+ call write_fatal(1)
+ end if
+ else
+ allocate(wfpp(m%np, state%wf_dim))
+ do i = 1, state%wf_dim
+ wfpp(:,i) = mesh_derivative(m, state%wfp(:,i))
+ end do
+
+ state_density_lapl(:,1) = &
+ ((M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE)) *(state%wf(:,1)*state%wfp(:,1)) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_THREE))*(state%wf(:,2)*state%wfp(:,2)))* &
+ M_TWO/m%r
+ state_density_lapl(:,2) = &
+ ((M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE)) *(state%wf(:,1)*state%wfp(:,1)) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_THREE))*(state%wf(:,2)*state%wfp(:,2)))* &
+ M_TWO/m%r
+
+ state_density_lapl(:,1) = state_density_lapl(:,1) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE)) *(state%wfp(:,1)**2 + state%wf(:,1)*wfpp(:,1)) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_THREE))*(state%wfp(:,2)**2 + state%wf(:,2)*wfpp(:,2))
+ state_density_lapl(:,2) = state_density_lapl(:,2) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE))* (state%wfp(:,1)**2 + state%wf(:,1)*wfpp(:,1)) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_THREE))*(state%wfp(:,2)**2 + state%wf(:,2)*wfpp(:,2))
+
+ if (abs(state%qn%m) /= state%qn%l + M_HALF) then
+ clm = -sqrt( (M_TWO*state%qn%l + M_ONE)**2 - M_FOUR*state%qn%m**2 )/(M_TWO*state%qn%l + M_ONE)
+
+ state_density_lapl(:,1) = state_density_lapl(:,1) + &
+ ((M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE))*(state%wf(:,3)*state%wfp(:,3)) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l - M_ONE))*(state%wf(:,4)*state%wfp(:,4)) - &
+ clm*(state%wfp(:,1)*state%wf(:,3)) - clm*(state%wf(:,1)*state%wfp(:,3)))* &
+ M_TWO/m%r
+ state_density_lapl(:,2) = state_density_lapl(:,2) + &
+ ((M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE))*(state%wf(:,3)*state%wfp(:,3)) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l - M_ONE))*(state%wf(:,4)*state%wfp(:,4)) + &
+ clm*(state%wfp(:,1)*state%wf(:,3)) + clm*(state%wf(:,1)*state%wfp(:,3)))* &
+ M_TWO/m%r
+ state_density_lapl(:,1) = state_density_lapl(:,1) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l + M_ONE))*(state%wfp(:,3)**2 + state%wf(:,3)*wfpp(:,3)) + &
+ (M_ONE + (2*state%qn%m)/(2*state%qn%l - M_ONE))*(state%wfp(:,4)**2 + state%wf(:,4)*wfpp(:,4)) - &
+ clm*(M_TWO*state%wfp(:,1)*state%wfp(:,3) + wfpp(:,1)*state%wf(:,3) + wfpp(:,3)*state%wf(:,1))
+ state_density_lapl(:,2) = state_density_lapl(:,2) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l + M_ONE))*(state%wfp(:,3)**2 + state%wf(:,3)*wfpp(:,3)) + &
+ (M_ONE - (2*state%qn%m)/(2*state%qn%l - M_ONE))*(state%wfp(:,4)**2 + state%wf(:,4)*wfpp(:,4)) + &
+ clm*(M_TWO*state%wfp(:,1)*state%wfp(:,3) + wfpp(:,1)*state%wf(:,3) + wfpp(:,3)*state%wf(:,1))
+ end if
+
+ deallocate(wfpp)
+ end if
+ end select
+
+ state_density_lapl = state_density_lapl/(M_FOUR*M_PI)*state%occ
+
+ call pop_sub()
+ end function state_density_lapl
+
+ function state_charge_density(state)
+ !-----------------------------------------------------------------------!
+ ! Computes the charge density associated with a state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8) :: state_charge_density(state%np)
+
+ call push_sub("state_charge_density")
+
+ state_charge_density(:) = sum(state%wf**2, dim=2)/(M_FOUR*M_PI)*state%occ
+
+ call pop_sub()
+ end function state_charge_density
+
+ function state_magnetization_density(state)
+ !-----------------------------------------------------------------------!
+ ! Computes the magnetization density associated with a state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8) :: state_magnetization_density(state%np)
+
+ real(R8), allocatable :: density(:,:)
+
+ call push_sub("state_magnetization_density")
+
+ allocate(density(state%np, 2))
+
+ density = state_density(2, state)
+ state_magnetization_density = density(:,2) - density(:,1)
+
+ deallocate(density)
+
+ call pop_sub()
+ end function state_magnetization_density
+
+ function state_tau(nspin, state, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the kinetic energy density associated with a state. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: nspin
+ type(state_t), intent(in) :: state
+ type(mesh_t), intent(in) :: m
+ real(R8) :: state_tau(m%np, nspin)
+
+ real(R8) :: l
+
+ call push_sub("state_tau")
+
+ l = state%qn%l
+ select case (nspin)
+ case (1)
+ if (state%qn%j == M_ZERO) then
+ state_tau(:,1) = state%wfp(:,1)**2 + l*(l + M_ONE)*state%wf(:,1)**2/m%r**2
+ else
+ state_tau(:,1) = state%wfp(:,1)**2 + state%wfp(:,2)**2 + &
+ M_TWO*(state%qn%k + M_ONE)/m%r*state%wf(:,1)*state%wfp(:,1) - &
+ M_TWO*(state%qn%k - M_ONE)/m%r*state%wf(:,2)*state%wfp(:,2) + &
+ ((state%qn%k + M_ONE)/m%r*state%wf(:,1))**2 + &
+ ((state%qn%k - M_ONE)/m%r*state%wf(:,2))**2
+ end if
+ case (2)
+ if (state%qn%m == M_ZERO) then
+ if (state%qn%s == -M_HALF) then
+ state_tau(:,1) = state%wfp(:,1)**2 + l*(l + M_ONE)*state%wf(:,1)**2/m%r**2
+ state_tau(:,2) = M_ZERO
+ elseif(state%qn%s == M_HALF) then
+ state_tau(:,1) = M_ZERO
+ state_tau(:,2) = state%wfp(:,1)**2 + l*(l + M_ONE)*state%wf(:,1)**2/m%r**2
+ else
+ message(1) = "Error in state_tau: invalid spin quantum number"
+ call write_fatal(1)
+ end if
+ else
+ !TODO
+ end if
+ end select
+
+ state_tau = state_tau/(M_FOUR*M_PI)*state%occ
+
+ call pop_sub()
+ end function state_tau
+
+ function state_density_moment(state, m, order)
+ !-----------------------------------------------------------------------!
+ ! Computes the density moment < R(r) | r**order | R(r)>. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: order
+ real(R8) :: state_density_moment
+
+ integer :: i
+
+ call push_sub("calculate_density_moment")
+
+ state_density_moment = state%occ*mesh_integrate(m, state%wf(:,1)**2*m%r**order)
+ if (state%wave_eq == DIRAC) then
+ do i = 2, state%wf_dim
+ state_density_moment = state_density_moment + &
+ state%occ*mesh_integrate(m, state%wf(:,i)**2*m%r**order)
+ end do
+ end if
+
+ call pop_sub()
+ end function state_density_moment
+
+ elemental function state_eigenvalue(state)
+ !-----------------------------------------------------------------------!
+ ! Returns the eigenvalue of a state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8) :: state_eigenvalue
+
+ state_eigenvalue = state%ev
+
+ end function state_eigenvalue
+
+ elemental function state_charge(state)
+ !-----------------------------------------------------------------------!
+ ! Returns the number of electrons in an state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8) :: state_charge
+
+ state_charge = state%occ
+
+ end function state_charge
+
+ function state_kinetic_energy(m, state, potential)
+ !-----------------------------------------------------------------------!
+ ! Returns the kinetic energy of a state. !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(state_t), intent(in) :: state
+ type(potential_t), intent(in) :: potential
+ real(R8) :: state_kinetic_energy
+
+ integer :: i
+ real(R8), allocatable :: rho(:), vext(:), wfpp(:)
+
+ call push_sub("state_kinetic_energy")
+
+ !Eigenvalue
+ state_kinetic_energy = state%ev*state%occ
+
+ !Minus external potential energy
+ allocate(rho(m%np), vext(m%np))
+ rho = state_charge_density(state)
+ if (state%qn%m /= M_ZERO) then
+ vext = state_magnetization_density(state)
+ else
+ vext = M_ZERO
+ end if
+
+ do i = 1, m%np
+ if (state%qn%m /= M_ZERO) vext(i) = vext(i)*bxc(potential, m%r(i))
+ vext(i) = vext(i) + v(potential, m%r(i), state%qn)*rho(i)
+ end do
+ state_kinetic_energy = state_kinetic_energy - M_FOUR*M_PI*mesh_integrate(m, vext)
+ deallocate(rho, vext)
+
+ !Minus MGGA term
+ allocate(vext(m%np))
+ select case (state%wave_eq)
+ case (SCHRODINGER)
+ allocate(wfpp(m%np))
+ wfpp = mesh_derivative(m, state%wfp(:,1))
+ do i = 1, m%np
+ vext(i) = -state%wf(i,1)*state%occ* &
+ (dvtaudr(potential, m%r(i), state%qn)*state%wfp(i,1) + &
+ vtau(potential, m%r(i), state%qn)*(M_TWO/m%r(i)*state%wfp(i,1) + wfpp(i)))
+ end do
+ deallocate(wfpp)
+ case (SCALAR_REL, DIRAC)
+ !TODO
+ vext = M_ZERO
+ end select
+ state_kinetic_energy = state_kinetic_energy - mesh_integrate(m, vext)
+ deallocate(vext)
+
+ call pop_sub()
+ end function state_kinetic_energy
+
+ function state_label(state, full)
+ !-----------------------------------------------------------------------!
+ ! Returns a label identifying the state. If "full" is true the label !
+ ! includes information about the spin or sigma !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ logical, intent(in), optional :: full
+ character(len=10) :: state_label
+
+ logical :: full_
+
+ state_label = state%label
+
+ full_ = .false.
+ if (present(full)) full_ = full
+
+ if (full_ .and. (state%qn%s /= M_ZERO .or. state%qn%sg /= M_ZERO) ) then
+ if (state%qn%s == M_HALF .or. state%qn%sg == M_HALF) then
+ state_label = trim(state%label)//"_up"
+ elseif (state%qn%s == -M_HALF .or. state%qn%sg == -M_HALF) then
+ state_label = trim(state%label)//"_dn"
+ end if
+ end if
+
+ end function state_label
+
+ elemental function state_qn(state)
+ !-----------------------------------------------------------------------!
+ ! Returns the quantum numbers of the state. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ type(qn_t) :: state_qn
+
+ state_qn = state%qn
+
+ end function state_qn
+
+ subroutine state_eigensolve(state, m, wave_eq, potential, integrator_dp, &
+ integrator_sp, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Gets the states eigenvalue and eigenfunctions for a given potential. !
+ ! !
+ ! state - state !
+ ! m - mesh !
+ ! wave_eq - wave-equation to solve !
+ ! potential - potential to use in the wave-equation !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ ! eigensolver - information about the eigensolver !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(inout) :: state
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: wave_eq
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator_dp
+ type(integrator_t), intent(inout) :: integrator_sp
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ integer :: n_bound
+ logical :: unbound, bracketed(1)
+ real(R8) :: ev, bracket(2,1)
+ type(qn_t) :: qn(1)
+
+ call push_sub("state_eigensolve")
+
+ !Check if state is bound
+ n_bound = wavefunctions_n_bound_states(state%qn, wave_eq, m, potential, integrator_sp)
+ if (n_bound >= state%qn%n - state%qn%l) then
+ unbound = .false.
+ !Bracket the eigenvalue
+ qn(1) = state%qn
+ call eigensolver_bracket(1, qn, wave_eq, &
+ eigensolver, potential, integrator_sp, bracket, bracketed)
+ else
+ unbound = .true.
+ end if
+
+ if (bracketed(1) .and. .not. unbound) then
+ !Locate the eigenvalue more accuratly
+ call eigensolver_find_ev(state%qn, wave_eq, eigensolver, &
+ potential, integrator_dp, bracket(:,1), ev)
+ else
+ if (state%occ == M_ZERO) then
+ ev = M_ZERO
+ else
+ if (unbound) then
+ write(message(1),'("State: ",A," is unbound")') &
+ trim(qn_label(state%qn, .true.))
+ call write_fatal(1)
+ else
+ message(1) = "Unable to bracket eigenvalues for state:"
+ write(message(2),'(2X,A)') trim(qn_label(state%qn, .true.))
+ call write_fatal(2)
+ end if
+
+ end if
+ end if
+
+ ! Updtate the wavefunctions
+ call state_update(state, m, wave_eq, potential, integrator_dp, ev)
+
+ call pop_sub()
+ end subroutine state_eigensolve
+
+ subroutine state_update(state, m, wave_eq, potential, integrator, ev)
+ !-----------------------------------------------------------------------!
+ ! Update the wavefunctions of a given state. !
+ ! !
+ ! state - state !
+ ! m - mesh !
+ ! wave_eq - wave-equation to solve !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! ev - new eigenvalues !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(inout) :: state
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: wave_eq
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(in) :: ev
+
+ integer :: k
+
+ call push_sub("state_update")
+
+ state%wave_eq = wave_eq
+ state%ev = ev
+
+ ! Compute new wavefunctions
+ call wavefunctions(state%qn, state%ev, state%wave_eq, m, &
+ potential, integrator, state%wf, state%wfp)
+
+ !Outermost peak
+ if (state%ev /= M_ZERO) then
+ state%peak = M_ZERO
+ do k = 1, m%np - 1
+ if (abs(state%wf(m%np-k+1,1)*m%r(m%np-k+1)) > abs(state%wf(m%np-k,1)*m%r(m%np-k)) &
+ .and. abs(state%wf(m%np-k+1,1)*m%r(m%np-k+1)) > 1.0E-5_r8) then
+ state%peak = m%r(m%np-k+1)
+ exit
+ end if
+ end do
+ else
+ state%peak = M_ZERO
+ end if
+
+ !Outermost node
+ if (state%ev /= M_ZERO) then
+ state%node = M_ZERO
+ do k = 1, m%np - 1
+ if (state%wf(m%np-k+1,1)*state%wf(m%np-k,1) < M_ZERO) then
+ state%node = m%r(m%np-k+1)
+ exit
+ end if
+ end do
+ else
+ state%node = M_ZERO
+ end if
+
+ call pop_sub()
+ end subroutine state_update
+
+ function state_ld(state, e, r, integrator, potential, m, dldde)
+ !-----------------------------------------------------------------------!
+ ! Returns the logarithmic derivative of the wave-functions at r. !
+ ! !
+ ! state - state !
+ ! e - energy !
+ ! r - radius where to compute the logarithmic derivative !
+ ! integrator - integrator object !
+ ! potential - potential to use in the wave-equation !
+ ! m - mesh !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8), intent(in) :: e, r
+ type(integrator_t), intent(inout) :: integrator
+ type(potential_t), intent(in) :: potential
+ type(mesh_t), intent(in) :: m
+ real(R8), optional, intent(out) :: dldde
+ real(R8) :: state_ld
+
+ integer :: nnodes, wf_dim
+ type(mesh_t) :: mr
+ real(R8), allocatable :: wf(:,:), wfp(:,:)
+
+ call push_sub("state_ld")
+
+ !New mesh
+ call mesh_null(mr)
+ mr = m
+ call mesh_truncate(mr, r)
+
+ if (present(dldde)) then
+ wf_dim = qn_wf_dim(state%qn)
+ allocate(wf(mr%np, wf_dim), wfp(mr%np, wf_dim))
+
+ call hamann_wavefunction(state%qn, e, state%wave_eq, mr, potential, integrator, wf, wfp)
+ state_ld = wfp(mr%np, 1)/wf(mr%np, 1)
+ dldde = -M_TWO/(r*wf(mr%np,1))**2*mesh_integrate(mr, sum(wf,dim=2)**2)
+
+ deallocate(wf, wfp)
+ else
+ !Log derivative a la Hamann
+ state_ld = hamann_ld(state%qn, e, state%wave_eq, mr, potential, integrator, nnodes)
+ end if
+
+ call mesh_end(mr)
+
+ call pop_sub()
+ end function state_ld
+
+ function state_dipole_matrix_element(m, state_i, state_f)
+ !-----------------------------------------------------------------------!
+ ! Computes the dipole matrix element between two states !
+ ! !
+ ! M_if = < R_i(r) | r | R_f(r) > !
+ ! !
+ ! Notice that the angular part is not taken into account. This is OK, !
+ ! because of the spatial averaging and spherical symmetry. !
+ ! !
+ ! m - mesh !
+ ! state_i - state i !
+ ! state_f - state f !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(state_t), intent(in) :: state_i, state_f
+ real(R8) :: state_dipole_matrix_element
+
+ integer :: i
+ real(R8), allocatable :: tmp(:)
+
+ call push_sub("state_dipole_matrix_element")
+
+ if (state_i%qn%s /= state_i%qn%s .or. &
+ (state_i%qn%n == state_f%qn%n .and. state_i%qn%l == state_f%qn%l .and. &
+ state_i%qn%j /= state_f%qn%j) ) then
+ state_dipole_matrix_element = M_ZERO
+ return
+ end if
+
+ allocate(tmp(m%np))
+
+ tmp = state_i%wf(:,1)*state_f%wf(:,1)*m%r
+ if (state_i%wave_eq == DIRAC .and. state_f%wave_eq == DIRAC) then
+ ASSERT(state_i%wf_dim == state_f%wf_dim)
+ do i = 2, state_i%wf_dim
+ tmp = tmp + state_i%wf(:,i)*state_f%wf(:,i)*m%r
+ end do
+ end if
+
+ state_dipole_matrix_element = mesh_integrate(m, tmp)
+
+ deallocate(tmp)
+
+ call pop_sub()
+ end function state_dipole_matrix_element
+
+ function state_outermost_peak(state)
+ !-----------------------------------------------------------------------!
+ ! Returns the positions of the wave-functions outermost peak. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8) :: state_outermost_peak
+
+ call push_sub("state_outermost_peak")
+
+ state_outermost_peak = state%peak
+
+ call pop_sub()
+ end function state_outermost_peak
+
+ function state_outermost_node(state)
+ !-----------------------------------------------------------------------!
+ ! Returns the positions of the wave-functions outermost node. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ real(R8) :: state_outermost_node
+
+ call push_sub("state_outermost_node")
+
+ state_outermost_node = state%node
+
+ call pop_sub()
+ end function state_outermost_node
+
+ elemental function state_default_rc(state, scheme)
+ !-----------------------------------------------------------------------!
+ ! Returns the default cut-off radius.
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ integer, intent(in) :: scheme
+ real(R8) :: state_default_rc
+
+ !Get default core radius
+ select case (scheme)
+ case (HAM)
+ if (state%qn%n > state%qn%l + 1) then
+ state_default_rc = 0.6_r8*state%peak
+ else
+ state_default_rc = 0.4_r8*state%peak
+ end if
+ case (TM)
+ state_default_rc = M_ZERO
+ case (RTM)
+ state_default_rc = M_ZERO
+ case (MRPP)
+ state_default_rc = M_ZERO
+ case (RMRPP)
+ state_default_rc = M_ZERO
+ case (MTM)
+ state_default_rc = M_ZERO
+ end select
+
+ end function state_default_rc
+
+ subroutine state_psp_generation(m, scheme, wave_eq, tol, ae_potential, &
+ integrator_sp, integrator_dp, ps_v, state1, &
+ rc, state2)
+ !-----------------------------------------------------------------------!
+ ! Generate the pseudo wave-functions and the pseudo-potential using !
+ ! one of the implemented schemes. !
+ ! !
+ ! m - mesh !
+ ! scheme - scheme used to generate the pseudo-potentials !
+ ! wave_eq - wave-equation to use !
+ ! tol - tolerance !
+ ! ae_potential - all-electron potential !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ ! ps_v - pseudo-potential on the mesh !
+ ! state1 - pseudo-state 1 (either valence or semi-core) !
+ ! rc - core radius !
+ ! state2 - valence state when state 1 is a semi-core state !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: scheme, wave_eq
+ real(R8), intent(in) :: tol
+ type(potential_t), intent(in) :: ae_potential
+ type(integrator_t), intent(inout) :: integrator_sp, integrator_dp
+ real(R8), intent(out) :: ps_v(m%np)
+ type(state_t), intent(inout) :: state1
+ real(R8), intent(in) :: rc
+ type(state_t), intent(inout), optional :: state2
+
+ character(len=10) :: label
+ character(40) :: scheme_name
+
+ call push_sub("state_psp_generation")
+
+ if (present(state2)) then
+ ASSERT(scheme == MRPP .or. scheme == RMRPP)
+ end if
+
+ !Write information
+ label = state_label(state1, full=.true.)
+ write(message(1),'(2x,"State: ",a)') trim(label)
+ if (present(state2)) then
+ label = state_label(state2, full=.true.)
+ write(message(1),'(a,2x,a)') trim(message(1)), trim(label)
+ end if
+ select case (scheme)
+ case (HAM)
+ scheme_name = "Hamann"
+ case (TM)
+ scheme_name = "Troullier-Martins"
+ case (RTM)
+ scheme_name = "Troullier-Martins Relativistic extension"
+ case (MRPP)
+ scheme_name = "Multireference Pseudopotentials (MRPP)"
+ case (RMRPP)
+ scheme_name = "MRPP Relativistic extension"
+ case (MTM)
+ scheme_name = "Modified Troullier-Martins"
+ end select
+ write(message(2),'(4x,"Scheme: ",a)') trim(scheme_name)
+ call write_info(2,20)
+ call write_info(2,unit=info_unit("pp"))
+
+
+ select case (scheme)
+ case (HAM) !Hamann scheme
+ call hamann_gen(state1%qn, state1%ev, wave_eq, tol, m, ae_potential, &
+ rc, integrator_sp, integrator_dp, ps_v, &
+ state1%wf, state1%wfp)
+
+ case (TM) !Troullier-Martins scheme
+ call tm_gen(state1%qn, state1%ev, wave_eq, .false., tol, m, &
+ ae_potential, rc, ps_v, state1%wf, state1%wfp)
+
+ case (RTM) !Relativistic extension of the Troullier-Martins scheme
+ call tm_gen(state1%qn, state1%ev, wave_eq, .true., tol, m, &
+ ae_potential, rc, ps_v, state1%wf, state1%wfp)
+
+ case (MRPP) !Multireference Pseudopotentials
+ call mrpp_gen(state1%qn, state2%qn, state1%ev, state2%ev, &
+ wave_eq, .false., tol, m, ae_potential, rc, &
+ integrator_dp, ps_v, state1%wf, state1%wfp, &
+ state2%wf, state2%wfp)
+
+ case (RMRPP) !Multireference Pseudopotentials
+ call mrpp_gen(state1%qn, state2%qn, state1%ev, state2%ev, &
+ wave_eq, .true., tol, m, ae_potential, rc, &
+ integrator_dp, ps_v, state1%wf, state1%wfp, &
+ state2%wf, state2%wfp)
+
+ end select
+
+ call pop_sub()
+ end subroutine state_psp_generation
+
+ subroutine state_test_consistency(m, wave_eq, eigensolver, integrator_sp, &
+ integrator_dp, ae_potential, ps_potential, ps_state, &
+ rmatch, ev, norm, slope)
+ !-----------------------------------------------------------------------!
+ ! Test the consistency of the pseudo-potential and pseudo !
+ ! wave-functions. The test consists in solving the wave-equations for !
+ ! the pseudo-potential and then comparing the resulting eigenvalue and !
+ ! wave-functions with the all-electron ones. !
+ ! !
+ ! m - mesh !
+ ! wave_eq - wave-equation to use !
+ ! eigensolver - information about the eigensolver !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ ! ae_potential - all-electron potential !
+ ! ps_potential - pseudo-potential !
+ ! ps_state - pseudo-state !
+ ! rmatch - matching radius !
+ ! ev - eigenvalue !
+ ! norm - norm of the wave-function up to rc !
+ ! slope - slope of the wave-functions at rc !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: wave_eq
+ type(eigensolver_t), intent(in) :: eigensolver
+ real(R8), intent(in) :: rmatch
+ type(integrator_t), intent(inout) :: integrator_sp, integrator_dp
+ type(potential_t), intent(in) :: ps_potential, ae_potential
+ type(state_t), intent(in) :: ps_state
+ real(R8), intent(out) :: ev, norm, slope
+
+ type(state_t) :: state
+
+ call push_sub("state_test_consistency")
+
+ call state_null(state)
+
+ state = ps_state
+ call state_eigensolve(state, m, wave_eq, ps_potential, integrator_dp, &
+ integrator_sp, eigensolver)
+ ev = state%ev
+ norm = mesh_integrate(m, sum(state%wf**2,dim=2), b=rmatch)
+ slope = mesh_extrapolate(m, state%wfp(:,1), rmatch)
+
+ call state_update(state, m, wave_eq, ae_potential, integrator_dp, ev)
+ norm = norm/mesh_integrate(m, sum(state%wf**2,dim=2), b=rmatch)
+ slope = abs(slope/mesh_extrapolate(m, state%wfp(:,1), rmatch))
+
+ call state_end(state)
+
+ call pop_sub()
+ end subroutine state_test_consistency
+
+ subroutine state_kb_projector(m, local_ps_potential, ps_potential, &
+ state, e, proj_f)
+ !-----------------------------------------------------------------------!
+ ! Computes the KB projector defined in the following way: !
+ ! !
+ ! KB projector = | proj_f > E < proj_f | !
+ ! !
+ ! <phi_l (v_l - v_local) | (v_l - v_local) phi_l> !
+ ! E = ----------------------------------------------- !
+ ! < phi_l | (v_l - v_local) | phi_l > !
+ ! !
+ ! | (v_l - v_local) phi_l> !
+ ! | proj_f > = ------------------------------------------------------- !
+ ! || < phi_l (v_l - v_local) | (v_l - v_local) phi_l > || !
+ ! !
+ ! !
+ ! m - mesh !
+ ! local_ps_potential - local component of the KB form !
+ ! ps_potential - pseudo-potential !
+ ! state - pseudo-state !
+ ! e - KB energy !
+ ! proj_f - KB projector function !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: local_ps_potential, ps_potential
+ type(state_t), intent(in) :: state
+ real(R8), intent(out) :: e
+ real(R8), intent(out) :: proj_f(m%np)
+
+ integer :: i
+ real(R8) :: int1, int2, cos
+ real(R8), parameter :: delta = 1.0e-20_r8
+ real(R8), allocatable :: vphi(:), phi(:)
+ character(len=10) :: label
+
+ call push_sub("state_kb_projector")
+
+ allocate(vphi(m%np), phi(m%np))
+
+ phi = state%wf(:,1)
+ do i = 1, m%np
+ vphi(i) = (v(ps_potential, m%r(i), state%qn, unscreened=.true.) &
+ - v(local_ps_potential, m%r(i), state%qn, unscreened=.true.))*phi(i)
+ end do
+ int1 = mesh_integrate(m, vphi**2)
+ int2 = mesh_integrate(m, vphi*phi)
+
+ if (int1 /= M_ZERO) then
+ e = int1/(int2 + delta)
+ proj_f = vphi/sqrt(int1)
+ cos = sqrt(int1)/e
+ else
+ e = M_ZERO
+ proj_f = M_ZERO
+ cos = M_ZERO
+ end if
+
+ if (abs(e) < 10e-12_r8) then
+ e = M_ZERO
+ proj_f = M_ZERO
+ cos = M_ZERO
+ end if
+
+ deallocate(vphi, phi)
+
+ !Output information
+ if (e /= M_ZERO) then
+ label = state_label(state)
+ select case (len_trim(label))
+ case (2)
+ write(message(1),'(6X,A,5X,F9.4,8X,F7.4)') trim(label), e/units_out%energy%factor, cos
+ case (5)
+ write(message(1),'(4X,A,4X,F9.4,8X,F7.4)') trim(label), e/units_out%energy%factor, cos
+ end select
+ call write_info(1)
+ call write_info(1,unit=info_unit("kb"))
+ end if
+
+ call pop_sub()
+ end subroutine state_kb_projector
+
+ subroutine state_test_ghost(m, wave_eq, integrator_sp, integrator_dp, &
+ eigensolver, kb_potential, state)
+ !-----------------------------------------------------------------------!
+ ! Tests the KB form of the pseudo-potential for ghost states. !
+ ! !
+ ! m - mesh !
+ ! wave_eq - wave-equation to use !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ ! eigensolver - information about the eigensolver !
+ ! kb_potential - the KB potential !
+ ! state - pseudo-state !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: wave_eq
+ type(integrator_t), intent(inout) :: integrator_sp, integrator_dp
+ type(eigensolver_t), intent(in) :: eigensolver
+ type(potential_t), intent(in) :: kb_potential
+ type(state_t), intent(in) :: state
+
+ real(R8) :: kb_e, eloc0, eloc1, u
+ character(len=10) :: label
+ type(state_t) :: state0, state1
+
+ call push_sub("state_test_ghost")
+
+ kb_e = potential_kb_energy(kb_potential, state%qn)
+
+ if (kb_e == M_ZERO) then
+ call pop_sub()
+ return
+ end if
+
+ call state_null(state0)
+ state0 = state
+ state0%occ = M_ZERO
+ call state_eigensolve(state0, m, wave_eq, kb_potential, integrator_sp, integrator_dp, eigensolver)
+ eloc0 = state0%ev
+ call state_end(state0)
+
+ call state_null(state1)
+ state1 = state
+ state1%qn%n = state%qn%n + 1
+ state1%occ = M_ZERO
+ call state_eigensolve(state1, m, wave_eq, kb_potential, integrator_sp, integrator_dp, eigensolver)
+ eloc1 = state1%ev
+ call state_end(state1)
+
+ label = state_label(state, full=.true.)
+ u = units_out%energy%factor
+ write(message(1),'(4x,"State: ",A)') trim(label)
+ write(message(3),'(6X,"Local potential eigenvalues: ",F9.4," (E0) ",F9.4," (E1)")') eloc0/u, eloc1/u
+ write(message(4),'(6X,"Reference energy: ",F9.4," (Eref)")') state%ev/u
+
+ if (kb_e > M_ZERO) then
+ if (state%ev > eloc0) then
+ if (state%ev < eloc1) then
+ write(message(2),'(6X,"KB energy > 0; E0 < Eref < E1 => No ghost states")')
+ else
+ if (eloc1 < M_ZERO) then
+ write(message(2),'(6X,"KB energy > 0; Eref > E1 => Ghost state found")')
+ else
+ write(message(2),'(6X,"KB energy > 0; Eref = E1 = 0 => Unable to determine")')
+ end if
+ end if
+ else
+ write(message(2),'(6X,"KB energy > 0; Eref < E0 => Illdefined")')
+ end if
+ elseif (kb_e < M_ZERO) then
+ if (state%ev < eloc0) then
+ write(message(2),'(6X,"KB energy < 0; Eref < E0 => No ghost states")')
+ else
+ if (eloc0 < M_ZERO) then
+ write(message(2),'(6X,"KB energy < 0; Eref > E0 => Ghost state found")')
+ else
+ write(message(2),'(6X,"KB energy < 0; Eref = E0 = 0 => Unable to determine")')
+ end if
+ end if
+ end if
+ call write_info(4)
+ call write_info(4, unit=info_unit("kb"))
+
+ call pop_sub()
+ end subroutine state_test_ghost
+
+ subroutine state_output_wf(state, m, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the wave-function to a file in a format suitable for plotting. !
+ !-----------------------------------------------------------------------!
+ type(state_t), intent(in) :: state
+ type(mesh_t), intent(in) :: m
+ character(len=*), intent(in) :: dir
+
+ integer :: i, j, unit
+ real(R8) :: u
+ character(len=10) :: label
+ character(len=80) :: fmt
+
+ call push_sub("state_output_wf")
+
+ label = state_label(state, full=.true.)
+ call io_open(unit, file=trim(dir)//"/wf-"//trim(label))
+ write(unit,'("# Radial wavefunctions and first derivative.")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ select case (int(2*state%qn%s))
+ case (0)
+ write(unit,'("# State: ",A)') trim(state%label)
+ case (-1)
+ write(unit,'("# State: ",A," down")') trim(state%label)
+ case (1)
+ write(unit,'("# State: ",A," up")') trim(state%label)
+ end select
+
+ u = units_out%length%factor
+
+ write(unit,'("# Nodes: ")',advance='no')
+ do i = 2, m%np
+ if (state%wf(i,1)*state%wf(i-1,1) < M_ZERO) &
+ write(unit,'(F12.6,2X)',advance='no') (m%r(i)+m%r(i-1))/(M_TWO*u)
+ end do
+ write(unit,*)
+ write(unit,'("# Peaks: ")',advance='no')
+ do i = 2, m%np-1
+ if ( ( abs(state%wf(i,1)*m%r(i)) > abs(state%wf(i-1,1)*m%r(i-1)) ) &
+ .and. ( abs(state%wf(i,1)*m%r(i)) > abs(state%wf(i+1,1)*m%r(i+1)) ) ) &
+ write(unit,'(F12.6,2X)',advance='no') m%r(i)/u
+ end do
+ write(unit,*)
+
+ write(fmt,'(A,I1,A)') "(3X,ES14.8E2,", 2*state%wf_dim, "(3X,ES15.8E2))"
+ do i = 1, m%np
+ write(unit,fmt) m%r(i)/u, (state%wf(i,j)*sqrt(u), j=1,state%wf_dim), (state%wfp(i,j)*sqrt(u), j=1,state%wf_dim)
+ end do
+
+ close(unit)
+
+ call pop_sub()
+ end subroutine state_output_wf
+
+end module states_m
diff --git a/src/states_batch.F90 b/src/states_batch.F90
new file mode 100644
index 0000000..5d22281
--- /dev/null
+++ b/src/states_batch.F90
@@ -0,0 +1,1425 @@
+!! Copyright (C) 2011-2012 M. Oliveira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: states_batch.F90 784 2013-08-02 15:21:03Z micael $
+
+#include "global.h"
+
+module states_batch_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use units_m
+ use io_m
+ use output_m
+ use quantum_numbers_m
+ use mesh_m
+ use ps_io_m
+ use potentials_m
+ use wave_equations_m
+ use eigensolver_m
+ use states_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure states_batch_copy
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type states_batch_t
+ private
+ integer :: n_states ! Number of states in the batch
+ type(state_ptr), pointer :: states(:) ! Pointers to the states
+ end type states_batch_t
+
+ type state_ptr
+ type(state_t), pointer :: ptr ! Pointer to the state
+ end type state_ptr
+
+
+ !---Global Variables---!
+
+ integer, parameter :: SORT_EV = 1, &
+ SORT_QN = 2
+
+ integer, parameter :: OCC_FIXED = 0, &
+ OCC_SEMICONDUCTING = 1, &
+ OCC_AVERILL_PAINTER = 2
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: states_batch_t, &
+ states_batch_null, &
+ states_batch_init, &
+ states_batch_end, &
+ states_batch_deallocate, &
+ assignment(=), &
+ states_batch_size, &
+ states_batch_add, &
+ states_batch_get, &
+ states_batch_number_of_folds, &
+ states_batch_eigenvalues, &
+ states_batch_split_folds, &
+ states_batch_density, &
+ states_batch_density_grad, &
+ states_batch_density_lapl, &
+ states_batch_charge_density, &
+ states_batch_magnetization_density, &
+ states_batch_tau, &
+ states_batch_density_moment, &
+ states_batch_charge, &
+ states_batch_max_charge, &
+ states_batch_ip, &
+ states_batch_eigensolve, &
+ states_batch_sort, &
+ states_batch_smearing, &
+ states_batch_psp_generation, &
+ states_batch_ld_test, &
+ states_batch_output_configuration, &
+ states_batch_output_eigenvalues, &
+ states_batch_output_density, &
+ states_batch_ps_io_set, &
+ OCC_FIXED, OCC_SEMICONDUCTING, OCC_AVERILL_PAINTER, &
+ SORT_EV, SORT_QN
+
+
+contains
+
+ subroutine states_batch_null(batch)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the batch. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(out) :: batch
+
+ call push_sub("states_batch_null")
+
+ batch%n_states = 0
+ nullify(batch%states)
+
+ call pop_sub()
+ end subroutine states_batch_null
+
+ subroutine states_batch_init(batch, n_states, states)
+ !-----------------------------------------------------------------------!
+ ! Initializes a batch from an array of states. !
+ ! !
+ ! batch - the batch to be initialized !
+ ! n_states - the number of states !
+ ! states - the array of states !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+ integer, intent(in) :: n_states
+ type(state_t), target, intent(in) :: states(:)
+
+ integer :: i
+
+ call push_sub("states_batch_init")
+
+ batch%n_states = n_states
+ allocate(batch%states(n_states))
+ do i = 1, n_states
+ batch%states(i)%ptr => states(i)
+ end do
+
+ call pop_sub()
+ end subroutine states_batch_init
+
+ subroutine states_batch_end(batch)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to a batch !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+
+ call push_sub("states_batch_end")
+
+ if (associated(batch%states)) deallocate(batch%states)
+ batch%n_states = 0
+
+ call pop_sub()
+ end subroutine states_batch_end
+
+ subroutine states_batch_deallocate(batch)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to the states that are pointed to by the !
+ ! batch and then frees the memory associated to the batch object itself.!
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+
+ integer :: i
+
+ call push_sub("states_batch_deallocate")
+
+ if (associated(batch%states)) then
+ do i = 1, batch%n_states
+ call state_end(batch%states(i)%ptr)
+ end do
+ deallocate(batch%states)
+ end if
+ batch%n_states = 0
+
+ call pop_sub()
+ end subroutine states_batch_deallocate
+
+ subroutine states_batch_copy(batch_a, batch_b)
+ !-----------------------------------------------------------------------!
+ ! Copy batch_b to batch_a !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch_a
+ type(states_batch_t), intent(in) :: batch_b
+
+ integer :: i
+
+ call push_sub("states_batch_copy")
+
+ call states_batch_end(batch_a)
+
+ batch_a%n_states = batch_b%n_states
+ allocate(batch_a%states(batch_a%n_states))
+ do i = 1, batch_a%n_states
+ batch_a%states(i)%ptr => batch_b%states(i)%ptr
+ end do
+
+ call pop_sub()
+ end subroutine states_batch_copy
+
+ function states_batch_size(batch)
+ !-----------------------------------------------------------------------!
+ ! Return the number of states in the batch. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer :: states_batch_size
+
+ call push_sub("states_batch_size")
+
+ states_batch_size = batch%n_states
+
+ call pop_sub()
+ end function states_batch_size
+
+ subroutine states_batch_add(batch, state)
+ !-----------------------------------------------------------------------!
+ ! Add a state to a bacth. !
+ ! !
+ ! batch - the batch !
+ ! state - the state to be added to the batch !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+ type(state_t), target, intent(in) :: state
+
+ type(state_ptr), allocatable :: tmp(:)
+
+ call push_sub("states_batch_add")
+
+ if (batch%n_states == 0) then
+ batch%n_states = 1
+ allocate(batch%states(batch%n_states))
+ else
+ allocate(tmp(batch%n_states))
+ tmp = batch%states
+ deallocate(batch%states)
+ allocate(batch%states(batch%n_states + 1))
+ batch%states(1:batch%n_states) = tmp(1:batch%n_states)
+ batch%n_states = batch%n_states + 1
+ end if
+ batch%states(batch%n_states)%ptr => state
+
+ call pop_sub()
+ end subroutine states_batch_add
+
+ function states_batch_get(batch, i)
+ !-----------------------------------------------------------------------!
+ ! Returns a pointer to the ith state of the batch. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: i
+ type(state_t), pointer :: states_batch_get
+
+ call push_sub("states_batch_get")
+
+ ASSERT(i > 0 .and. i <= batch%n_states)
+ states_batch_get => batch%states(i)%ptr
+
+ call pop_sub()
+ end function states_batch_get
+
+ function states_batch_eigenvalues(batch)
+ !-----------------------------------------------------------------------!
+ ! Returns a pointer to the ith state of the batch. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ real(R8) :: states_batch_eigenvalues(batch%n_states)
+
+ integer :: i
+
+ call push_sub("states_batch_eigenvalues")
+
+ do i = 1, batch%n_states
+ states_batch_eigenvalues(i) = state_eigenvalue(batch%states(i)%ptr)
+ end do
+
+ call pop_sub()
+ end function states_batch_eigenvalues
+
+ function states_batch_number_of_folds(batch, polarized)
+ !-----------------------------------------------------------------------!
+ ! Given a batch, return the number of quantum number folds that exist !
+ ! in the bacth (see quantum_numbers_m for the definition of a fold). !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ logical, intent(in) :: polarized
+ integer :: states_batch_number_of_folds
+
+ integer :: i
+ type(qn_t) :: qn
+ logical, allocatable :: checked(:)
+
+ call push_sub("states_batch_number_of_folds")
+
+ states_batch_number_of_folds = 0
+
+ if (batch%n_states == 0) return
+
+ allocate(checked(batch%n_states))
+ checked = .false.
+ do
+ if (all(checked)) exit
+
+ do i = 1, batch%n_states
+ if (.not. checked(i)) then
+ states_batch_number_of_folds = states_batch_number_of_folds + 1
+ qn = state_qn(batch%states(i)%ptr)
+ exit
+ end if
+ end do
+
+ do i = 1, batch%n_states
+ if (.not. checked(i) .and. qn_equal_fold(qn, state_qn(batch%states(i)%ptr), polarized)) then
+ checked(i) = .true.
+ end if
+ end do
+ end do
+
+ ASSERT(all(checked))
+ deallocate(checked)
+
+ call pop_sub()
+ end function states_batch_number_of_folds
+
+ function states_batch_density(batch, nspin, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the electronic density associated with a batch of states. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ type(mesh_t), intent(in) :: m
+ real(R8) :: states_batch_density(m%np, nspin)
+
+ integer :: i
+
+ call push_sub("states_batch_density")
+
+ states_batch_density = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_density = states_batch_density + &
+ state_density(nspin, batch%states(i)%ptr)
+ end do
+
+ call pop_sub()
+ end function states_batch_density
+
+ function states_batch_density_grad(batch, nspin, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the gradient of the electronic density associated with a !
+ ! batch of states. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ type(mesh_t), intent(in) :: m
+ real(R8) :: states_batch_density_grad(m%np, nspin)
+
+ integer :: i
+
+ call push_sub("states_batch_density_grad")
+
+ states_batch_density_grad = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_density_grad = states_batch_density_grad + &
+ state_density_grad(nspin, batch%states(i)%ptr, m)
+ end do
+
+ call pop_sub()
+ end function states_batch_density_grad
+
+ function states_batch_density_lapl(batch, nspin, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the laplacian of the electronic density associated with a !
+ ! batch of states. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ type(mesh_t), intent(in) :: m
+ real(R8) :: states_batch_density_lapl(m%np, nspin)
+
+ integer :: i
+
+ call push_sub("states_batch_density_lapl")
+
+ states_batch_density_lapl = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_density_lapl = states_batch_density_lapl + &
+ state_density_lapl(nspin, batch%states(i)%ptr, m)
+ end do
+
+ call pop_sub()
+ end function states_batch_density_lapl
+
+ function states_batch_charge_density(batch, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the charge density associated with a batch of states. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ type(mesh_t), intent(in) :: m
+ real(R8) :: states_batch_charge_density(m%np)
+
+ integer :: i
+
+ call push_sub("states_batch_charge_density")
+
+ states_batch_charge_density = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_charge_density = states_batch_charge_density + &
+ state_charge_density(batch%states(i)%ptr)
+ end do
+
+ call pop_sub()
+ end function states_batch_charge_density
+
+ function states_batch_magnetization_density(batch, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the magnetization density associated with a batch of states. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ type(mesh_t), intent(in) :: m
+ real(R8) :: states_batch_magnetization_density(m%np)
+
+ integer :: i
+
+ call push_sub("states_batch_magnetization_density")
+
+ states_batch_magnetization_density = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_magnetization_density = states_batch_magnetization_density + &
+ state_magnetization_density(batch%states(i)%ptr)
+ end do
+
+ call pop_sub()
+ end function states_batch_magnetization_density
+
+ function states_batch_tau(batch, nspin, m)
+ !-----------------------------------------------------------------------!
+ ! Computes the kinetic energy density associated with a batch of states.!
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ type(mesh_t), intent(in) :: m
+ real(R8) :: states_batch_tau(m%np, nspin)
+
+ integer :: i
+
+ call push_sub("states_batch_tau")
+
+ states_batch_tau = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_tau = states_batch_tau + &
+ state_tau(nspin, batch%states(i)%ptr, m)
+ end do
+
+ call pop_sub()
+ end function states_batch_tau
+
+ function states_batch_density_moment(batch, m, order)
+ !-----------------------------------------------------------------------!
+ ! Computes the density moment sum_i < R_i(r) | r**order | R_i(r)> of a !
+ ! given batch of states. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: order
+ real(R8) :: states_batch_density_moment
+
+ integer :: i
+
+ call push_sub("states_batch_density_moment")
+
+ states_batch_density_moment = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_density_moment = states_batch_density_moment + &
+ state_density_moment(batch%states(i)%ptr, m, order)
+ end do
+
+ end function states_batch_density_moment
+
+ subroutine states_batch_split_folds(batch, folds, polarized)
+ !-----------------------------------------------------------------------!
+ ! Given a batch, splits the states into folds (see quantum_numbers_m !
+ ! for the definition of a fold). !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ type(states_batch_t), intent(inout) :: folds(:)
+ logical, intent(in) :: polarized
+
+ integer :: i, n
+ type(qn_t) :: qn
+ logical, allocatable :: checked(:)
+
+ call push_sub("states_batch_split_folds")
+
+ ASSERT(batch%n_states > 0)
+
+ n = 0
+ allocate(checked(batch%n_states))
+ checked = .false.
+ do
+ if (all(checked)) exit
+ n = n + 1
+ call states_batch_end(folds(n))
+
+ do i = 1, batch%n_states
+ if (.not. checked(i)) then
+ qn = state_qn(batch%states(i)%ptr)
+ exit
+ end if
+ end do
+
+ do i = 1, batch%n_states
+ if (.not. checked(i) .and. qn_equal_fold(qn, state_qn(batch%states(i)%ptr), polarized)) then
+ checked(i) = .true.
+ call states_batch_add(folds(n), batch%states(i)%ptr)
+ end if
+ end do
+ end do
+
+ ASSERT(all(checked))
+ deallocate(checked)
+
+ call pop_sub()
+ end subroutine states_batch_split_folds
+
+ function states_batch_charge(batch)
+ !-----------------------------------------------------------------------!
+ ! Returns the number of electons in a batch. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ real(R8) :: states_batch_charge
+
+ integer :: i
+
+ call push_sub("states_batch_charge")
+
+ states_batch_charge = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_charge = states_batch_charge + state_charge(batch%states(i)%ptr)
+ end do
+
+ call pop_sub()
+ end function states_batch_charge
+
+ function states_batch_max_charge(batch)
+ !-----------------------------------------------------------------------!
+ ! Returns the maximum number of electons the batch can hold. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ real(R8) :: states_batch_max_charge
+
+ integer :: i
+
+ call push_sub("states_batch_max_charge")
+
+ states_batch_max_charge = M_ZERO
+ do i = 1, batch%n_states
+ states_batch_max_charge = states_batch_max_charge + qn_max_occ(state_qn(batch%states(i)%ptr))
+ end do
+
+ call pop_sub()
+
+ end function states_batch_max_charge
+
+ function states_batch_ip(batch, nspin)
+ !-----------------------------------------------------------------------!
+ ! Returns the ionization potential of a batch (defined as minus the !
+ ! eigenvalue of the highest occupied orbital) for each spin-channel. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ real(R8) :: states_batch_ip(nspin)
+
+ integer :: i, is
+ real(R8) :: ev, charge
+ type(qn_t) :: qn
+
+ call push_sub("states_batch_ip")
+
+ !Get ionization potential
+ states_batch_ip = M_ZERO
+ do i = 1, batch%n_states
+ qn = state_qn(batch%states(i)%ptr)
+ ev = state_eigenvalue(batch%states(i)%ptr)
+ charge = state_charge(batch%states(i)%ptr)
+
+ is = 1
+ if (qn%s == M_HALF) is = 2
+
+ if (charge /= M_ZERO) then
+ if (states_batch_ip(is) == M_ZERO) then
+ states_batch_ip(is) = - ev
+ elseif (-states_batch_ip(is) < ev) then
+ states_batch_ip(is) = - ev
+ end if
+ end if
+ end do
+
+ call pop_sub()
+ end function states_batch_ip
+
+ subroutine states_batch_eigensolve(batch, m, wave_eq, potential, integrator_dp, integrator_sp, eigensolver)
+ !-----------------------------------------------------------------------!
+ ! Get the eigenvalues and eigenfunctions of a batch of states for a !
+ ! given potential. !
+ ! !
+ ! batch - bacth of states !
+ ! m - mesh !
+ ! wave_eq - wave-equation to solve !
+ ! potential - potential to use in the wave-equation !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ ! eigensolver - information about the eigensolver !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: wave_eq
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator_dp
+ type(integrator_t), intent(inout) :: integrator_sp
+ type(eigensolver_t), intent(in) :: eigensolver
+
+ integer :: i, max_n_bound
+ real(R8) :: ev
+ type(qn_t) :: qn
+ type(states_batch_t) :: bound
+ logical, allocatable :: bracketed(:)
+ real(R8), allocatable :: brackets(:,:)
+ type(qn_t), allocatable :: qns(:)
+
+ call push_sub("states_batch_eigensolve")
+
+ !Batch should be ordered by increasing quantum numbers
+ call states_batch_sort(batch, SORT_QN)
+
+ !Check the maximum number of bound states we can have
+ qn = state_qn(batch%states(1)%ptr)
+ max_n_bound = wavefunctions_n_bound_states(qn, wave_eq, m, &
+ potential, integrator_sp)
+ !Remove states that we are sure are unbound from the list
+ call states_batch_null(bound)
+ do i = 1, batch%n_states
+ qn = state_qn(batch%states(i)%ptr)
+
+ if (qn%n - qn%l <= max_n_bound) then
+ call states_batch_add(bound, batch%states(i)%ptr)
+ else
+ if (state_charge(batch%states(i)%ptr) == M_ZERO) then
+ !Unbound state
+ call state_update(batch%states(i)%ptr, m, wave_eq, potential, integrator_dp, ev=M_ZERO)
+ else
+ !There is something wrong
+ write(message(1),'("State: ",A," is unbound")') &
+ trim(state_label(batch%states(i)%ptr, .true.))
+ call write_fatal(1)
+ end if
+ end if
+ end do
+
+ !Bracket the eigenvalues
+ allocate(brackets(2, bound%n_states), qns(bound%n_states), bracketed(bound%n_states))
+ do i = 1, bound%n_states
+ qns(i) = state_qn(bound%states(i)%ptr)
+ end do
+ call eigensolver_bracket(bound%n_states, qns, wave_eq, eigensolver, &
+ potential, integrator_sp, brackets, bracketed)
+
+ !Find eigenvalues
+ do i = 1, bound%n_states
+ if (bracketed(i)) then
+ call eigensolver_find_ev(qns(i), wave_eq, eigensolver, potential, &
+ integrator_dp, brackets(:,i), ev)
+ else if (.not. bracketed(i) .and. state_charge(bound%states(i)%ptr) == M_ZERO) then
+ !This is probably and unbound state after all
+ ev = M_ZERO
+ else if (.not. bracketed(i) .and. state_charge(bound%states(i)%ptr) /= M_ZERO) then
+ !There is something wrong
+ message(1) = "Unable to bracket eigenvalues for state:"
+ write(message(2),'(2X,A)') trim(qn_label(qns(i), .true.))
+ call write_fatal(2)
+ end if
+
+
+ !Update the state with the new eigenvalue
+ call state_update(bound%states(i)%ptr, m, wave_eq, potential, integrator_dp, ev)
+ end do
+
+ !Free memory
+ deallocate(brackets, bracketed, qns)
+ call states_batch_end(bound)
+
+ call pop_sub()
+ end subroutine states_batch_eigensolve
+
+ subroutine states_batch_sort(batch, criteria)
+ !-----------------------------------------------------------------------!
+ ! Sort the states in the bacth. !
+ ! !
+ ! batch - bacth of states !
+ ! criteria - criteria used to sort the states !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+ integer, intent(in) :: criteria
+
+ integer :: i, dum(1)
+ logical, allocatable :: mask(:), qn_mask(:)
+ integer, allocatable :: order(:)
+ real(R8), allocatable :: ev(:)
+ type(qn_t), allocatable :: qn(:)
+ type(state_ptr), allocatable :: tmp(:)
+
+ call push_sub("states_batch_sort")
+
+ allocate(mask(batch%n_states), order(batch%n_states), tmp(batch%n_states))
+
+ !sort states
+ mask = .true.
+ select case (criteria)
+ case (SORT_EV)
+ allocate(ev(batch%n_states))
+ do i = 1, batch%n_states
+ ev(i) = state_eigenvalue(batch%states(i)%ptr)
+ end do
+
+ do i = 1, batch%n_states
+ dum = maxloc(abs(ev), mask=mask)
+ order(i) = dum(1)
+ mask(order(i)) = .false.
+ end do
+ deallocate(ev)
+
+ case (SORT_QN)
+ !Quantum numbers by increasing n,l,j,m,s and decreasing sg
+ !(the algorithm is not very efficient, but we should never have to deal
+ ! with a very large number of states)
+ allocate(qn(batch%n_states))
+ do i = 1, batch%n_states
+ qn(i) = state_qn(batch%states(i)%ptr)
+ end do
+
+ allocate(qn_mask(batch%n_states))
+ do i = 1, batch%n_states
+ qn_mask = qn%n == minval(qn%n, mask)
+ qn_mask = qn_mask .and. qn%l == minval(qn%l, mask .and. qn_mask)
+ qn_mask = qn_mask .and. qn%j == minval(qn%j, mask .and. qn_mask)
+ qn_mask = qn_mask .and. qn%m == minval(qn%m, mask .and. qn_mask)
+ qn_mask = qn_mask .and. qn%s == minval(qn%s, mask .and. qn_mask)
+ dum = maxloc(qn%sg, mask = mask .and. qn_mask)
+ order(i) = dum(1)
+ mask(order(i)) = .false.
+ end do
+ deallocate(qn, qn_mask)
+
+ end select
+
+ tmp = batch%states
+ do i = 1, batch%n_states
+ batch%states(i) = tmp(order(i))
+ end do
+
+ deallocate(mask, order, tmp)
+
+ call pop_sub()
+ end subroutine states_batch_sort
+
+ subroutine states_batch_smearing(batch, smearing_function, tol, new_charge)
+ !-----------------------------------------------------------------------!
+ ! Distributes the electrons among the states. !
+ ! !
+ ! smearing function - how should the electrons be distributed !
+ ! batch - bacth of states !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+ integer, intent(in) :: smearing_function
+ real(R8), intent(in) :: tol
+ real(R8), optional, intent(in) :: new_charge
+
+ integer :: n_states, is, i, qi, qf, k
+ real(R8) :: total_charge, lambda, lambda_in, sum_evdiff
+ integer, allocatable :: order(:)
+ real(R8), allocatable :: ev(:), occ(:), new_occ(:), max_occ(:), gamma(:)
+
+ call push_sub("states_batch_smearing")
+
+ if (smearing_function == OCC_FIXED) then
+ ! Nothing to do
+ call pop_sub()
+ return
+ end if
+
+ n_states = batch%n_states
+
+ !Sort states by increasing eigenvalue
+ call states_batch_sort(batch, SORT_EV)
+
+ !Allocate working arrays
+ allocate(ev(batch%n_states), order(n_states))
+ allocate(occ(n_states), max_occ(n_states), new_occ(n_states))
+
+ !eigenvalues, occupancies, and maximum occupancies for all the states in a single vector
+ do i = 1, n_states
+ ev(i) = state_eigenvalue(batch%states(i)%ptr)
+ occ(i) = state_charge(batch%states(i)%ptr)
+ max_occ(i) = qn_max_occ(state_qn(batch%states(i)%ptr))
+ order(i) = i
+ end do
+
+ !Order all arrays by decreasing occupancy
+ if (n_states /= 1) then
+ i = 1
+ do
+ i = i + 1
+ if (ev(i-1) == ev(i) .and. occ(order(i-1)) < occ(order(i))) then
+ is = order(i)
+ order(i) = order(i-1)
+ order(i-1) = is
+ i = 1
+ end if
+ if (i == n_states) exit
+ end do
+ end if
+
+ do i = 1, n_states
+ new_occ(i) = occ(order(i))
+ end do
+ occ = new_occ
+ do i = 1, n_states
+ new_occ(i) = max_occ(order(i))
+ end do
+ max_occ = new_occ
+
+ !
+ select case (smearing_function)
+ case (OCC_SEMICONDUCTING)
+
+ if (present(new_charge)) then
+ total_charge = new_charge
+ else
+ total_charge = states_batch_charge(batch)
+ end if
+
+ do i = 1, n_states
+ if (total_charge == M_ZERO) then
+ occ(i) = M_ZERO
+ elseif (total_charge - max_occ(i) < M_ZERO) then
+ occ(i) = total_charge
+ else
+ occ(i) = max_occ(i)
+ end if
+ total_charge = total_charge - occ(i)
+ end do
+
+ case (OCC_AVERILL_PAINTER)
+
+ !Allocate memory and initialize some quantities
+ allocate(gamma(n_states))
+ lambda_in = M_HALF
+ gamma = M_ONE
+ total_charge = states_batch_charge(batch)
+
+ !Remove states that will not participate in the charge transfer
+ do i = 1, n_states
+ if (occ(i) /= max_occ(i)) then
+ qi = i
+ exit
+ end if
+ end do
+ qf = qi
+ do i = n_states, qi, -1
+ if (occ(i) /= M_ZERO) then
+ qf = i
+ exit
+ end if
+ end do
+
+ !Main loop
+ do
+ !Exit if we have less than two states to perform the charge transfer
+ if (count(gamma(qi:qf) /= M_ZERO) < 2) exit
+
+ !By default we dont change the occupancies
+ new_occ = occ
+
+ !Choose the reference state
+ if (occ(qi)/max_occ(qi) < M_HALF) then
+ k = qi
+ else
+ k = qf
+ end if
+
+ !Compute gamma
+ sum_evdiff = M_ZERO
+ do i = qi, qf
+ if (i == k) cycle
+ if (abs(ev(i) - ev(k)) < tol) then
+ gamma(i) = M_ZERO
+ else if (ev(i) - ev(k) > M_ZERO) then
+ gamma(i) = occ(i)/max_occ(i)/(ev(i) - ev(k))
+ elseif (ev(i) - ev(k) < M_ZERO) then
+ gamma(i) = (occ(i)/max_occ(i) - M_ONE)/(ev(i) - ev(k))
+ end if
+ if (gamma(i) /= M_ZERO) sum_evdiff = sum_evdiff + (ev(i) - ev(k))*max_occ(i)
+ end do
+
+ if (sum_evdiff > M_ZERO) then
+ gamma(k) = (M_ONE - occ(k)/max_occ(k))/sum_evdiff
+ elseif (sum_evdiff < M_ZERO) then
+ gamma(k) = -occ(k)/max_occ(k)/sum_evdiff
+ else
+ gamma(k) = M_ZERO
+ end if
+
+ !If gamma(k) is zero remove this state from the list and go back to the
+ !beginning of the cycle
+ if (abs(gamma(k)) == M_ZERO) then
+ if (k == qi) then
+ qi = qi + 1
+ else
+ qf = qf - 1
+ end if
+ cycle
+ end if
+
+ !Get lambda (ignore the states that have gamma = 0)
+ lambda = min(lambda_in, minval(gamma(qi:qf), mask=gamma(qi:qf) /= M_ZERO))
+
+ !Get the new occupancies (states with gamma = 0 are ignored)
+ sum_evdiff = M_ZERO
+ do i = qi, qf
+ if (i /= k .and. gamma(i) /= M_ZERO) then
+
+ new_occ(i) = occ(i) - lambda*(ev(i) - ev(k))*max_occ(i)
+
+ if (new_occ(i) < M_EPSILON) then
+ new_occ(i) = M_ZERO
+ sum_evdiff = sum_evdiff + occ(i)/lambda
+
+ else if ( abs(max_occ(i) - new_occ(i)) < M_EPSILON ) then
+ new_occ(i) = max_occ(i)
+ sum_evdiff = sum_evdiff + (occ(i) - max_occ(i))/lambda
+
+ else
+ sum_evdiff = sum_evdiff + (ev(i) - ev(k))*max_occ(i)
+
+ end if
+
+ end if
+ end do
+
+ new_occ(k) = occ(k) + lambda*sum_evdiff
+ if (new_occ(k) < M_EPSILON) then
+ new_occ(k) = M_ZERO
+ else if (max_occ(k) - new_occ(k) < M_EPSILON) then
+ new_occ(k) = max_occ(k)
+ end if
+
+ occ = new_occ
+
+ !Check if we have reached convergence
+ if (lambda == lambda_in) exit
+
+ lambda_in = lambda
+ end do
+
+ deallocate(gamma)
+ end select
+
+ !Get the final occupancies in the correct order
+ do i = 1, n_states
+ batch%states(order(i))%ptr%occ = occ(i)
+ end do
+
+ !Deallocate memory
+ deallocate(ev, order, occ, max_occ, new_occ)
+
+ call pop_sub()
+ end subroutine states_batch_smearing
+
+ subroutine states_batch_psp_generation(batch, m, scheme, wave_eq, tol, ae_potential, &
+ integrator_sp, integrator_dp, eigensolver, rc, ps_v)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(inout) :: batch
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: scheme, wave_eq
+ real(R8), intent(in) :: tol
+ type(potential_t), intent(in) :: ae_potential
+ type(integrator_t), intent(inout) :: integrator_sp, integrator_dp
+ type(eigensolver_t), intent(in) :: eigensolver
+ real(R8), intent(in) :: rc
+ real(R8), intent(out) :: ps_v(m%np)
+
+ integer :: n, i
+ type(state_t), pointer :: state, state2
+ type(potential_t) :: ps_potential
+ type(states_batch_t) :: other_states
+
+ call push_sub("states_batch_psp_generation")
+
+ state => states_batch_get(batch, 1)
+ if (scheme == MRPP .or. scheme == RMRPP) then
+ n = 2
+ state2 => states_batch_get(batch, 2)
+ call state_psp_generation(m, scheme, wave_eq, tol, ae_potential, &
+ integrator_sp, integrator_dp, ps_v, state, rc, state2)
+ else
+ n = 1
+ call state_psp_generation(m, scheme, wave_eq, tol, ae_potential, &
+ integrator_sp, integrator_dp, ps_v, state, rc)
+ end if
+
+
+ !We need to solve the wave-equation with the pseudopotential for the other states in the batch
+ if (n < states_batch_size(batch)) then
+ call states_batch_null(other_states)
+ call potential_null(ps_potential)
+ call potential_init(ps_potential, m, ps_v)
+
+ do i = n+1, states_batch_size(batch)
+ call states_batch_add(other_states, states_batch_get(batch, i))
+ end do
+
+ call states_batch_eigensolve(other_states, m, wave_eq, ps_potential, integrator_dp, integrator_sp, eigensolver)
+
+ call potential_end(ps_potential)
+ call states_batch_end(other_states)
+ end if
+
+ call pop_sub()
+ end subroutine states_batch_psp_generation
+
+ subroutine states_batch_ld_test(batch, m, ae_potential, ps_potential, integrator, r, de, emin, emax)
+ !-----------------------------------------------------------------------!
+ ! Computes the logarithmic derivatives for a given fold of states. !
+ ! !
+ ! batch - batch of states (they should belong to the same fold) !
+ ! m - mesh !
+ ! ae_potential - all-electron potential !
+ ! ps_potential - pseudotential !
+ ! integrator - integrator object !
+ ! r - diagnostic radius at which to do the test !
+ ! de - energy step !
+ ! emin - lower bound of the energy interval !
+ ! emax - upper bound of the energy intervel !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: ae_potential
+ type(potential_t), intent(in) :: ps_potential
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(in) :: r
+ real(R8), intent(in) :: de
+ real(R8), optional, intent(in) :: emin, emax
+
+ integer :: unit
+ real(R8) :: e, e1, e2, ae_ld, ps_ld, step, dldde
+ character(len=10) :: label
+
+ call push_sub("states_batch_ld_test")
+
+ ASSERT(batch%n_states > 0)
+
+ !Set energy interval
+ if (present(emin)) then
+ e1 = emin
+ else
+ e1 = minval(states_batch_eigenvalues(batch)) - M_ONE
+ end if
+ if (present(emax)) then
+ e2 = emax
+ else
+ e2 = maxval(states_batch_eigenvalues(batch)) + M_ONE
+ end if
+ if (e1 > e2) then
+ message(1) = "The minimum energy at which to calculate the logarithmic"
+ message(2) = "derivatives must be smaller than the maximum energy."
+ call write_fatal(2)
+ end if
+
+ !Open file
+ label = state_label(batch%states(1)%ptr)
+ call io_open(unit, 'tests/ld-'//trim(label(2:5)))
+
+ !Write some information
+ write(message(1), '(2X,"Computing logarithmic derivative for states:",1X,A)') &
+ trim(label(2:5))
+ write(message(2), '(4X,"Minimum energy: ",F6.3,1X,A)') &
+ e1/units_out%energy%factor, trim(units_out%energy%abbrev)
+ write(message(3), '(4X,"Maximum energy: ",F6.3,1X,A)') &
+ e2/units_out%energy%factor, trim(units_out%energy%abbrev)
+ call write_info(3)
+ call write_info(3,unit=info_unit("tests"))
+
+ !Write header
+ write(unit,'("# Logarithmic derivatives")')
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ write(unit,'("# ",53("-"))')
+ write(unit,'("# |",7X,"e",7X,"|",5X,"ld_ae(e)",4X,"|",5X,"ld_pp(e)",4X,"|")')
+ write(unit,'("# ",53("-"))')
+
+ !Compute the logarithmic derivatives
+ e = e1
+ do
+ ae_ld = state_ld(batch%states(1)%ptr, e, r, integrator, ae_potential, m)
+ if (de == M_ZERO) then
+ ps_ld = state_ld(batch%states(1)%ptr, e, r, integrator, ps_potential, m, dldde)
+ else
+ ps_ld = state_ld(batch%states(1)%ptr, e, r, integrator, ps_potential, m)
+ end if
+
+ write(unit,'(3X,ES14.7E2,3X,ES15.8E2,3X,ES15.8E2)') e/units_out%energy%factor, ae_ld, ps_ld
+
+ if (e == e2) exit
+ if (de /= M_ZERO) then
+ step = de
+ else
+ step = max(abs(0.1_r8/dldde), 0.01_r8)
+ end if
+ e = min(e + step, e2)
+ end do
+
+ close(unit)
+
+ call pop_sub()
+ end subroutine states_batch_ld_test
+
+ subroutine states_batch_output_configuration(batch, nspin, unit, verbose_limit)
+ !-----------------------------------------------------------------------!
+ ! Outputs the states label and occupancies in a nice readable format. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ integer, intent(in), optional :: unit, verbose_limit
+
+ integer :: i
+ character(len=4) :: nspin_label
+ type(qn_t) :: qn
+ type(state_t), pointer :: state
+
+ call push_sub("states_batch_output_configuration")
+
+ select case (nspin)
+ case (1)
+ write(message(1),'(2X,"Configuration : State Occupation")')
+ case (2)
+ qn = state_qn(batch%states(1)%ptr)
+ if (qn%m == M_ZERO) then
+ write(message(1),'(2X,"Configuration : State Spin Occupation")')
+ else
+ write(message(1),'(2X,"Configuration : State Sigma Occupation")')
+ end if
+ end select
+
+ do i =1, batch%n_states
+ state => batch%states(i)%ptr
+ qn = state_qn(state)
+ select case (nspin)
+ case (1)
+ if (qn%j == M_ZERO) then
+ write(message(i+1),'(23X,A,6X,F5.2)') trim(state_label(state)), state_charge(state)
+ else
+ write(message(i+1),'(21X,A,5X,F5.2)') trim(state_label(state)), state_charge(state)
+ end if
+ case (2)
+ if (qn%m == M_ZERO) then
+ if (qn%s == -M_HALF) then
+ nspin_label = "-1/2"
+ else
+ nspin_label = "+1/2"
+ end if
+ write(message(i+1),'(21X,A,4X,A,5X,F5.2)') trim(state_label(state)), &
+ nspin_label, state_charge(state)
+ else
+ if (qn%sg == M_HALF) then
+ nspin_label = 'up'
+ elseif (qn%sg == -M_HALF) then
+ nspin_label = 'dn'
+ else
+ nspin_label = '--'
+ end if
+ write(message(i+1),'(21X,A,5X,A,4X,F5.2)') trim(state_label(state)), &
+ nspin_label, state_charge(state)
+ end if
+ end select
+ end do
+
+ if (present(unit)) then
+ call write_info(batch%n_states+1, unit=unit)
+ else
+ if (present(verbose_limit)) then
+ call write_info(batch%n_states+1, verbose_limit)
+ else
+ call write_info(batch%n_states+1)
+ end if
+ end if
+
+ call pop_sub()
+ end subroutine states_batch_output_configuration
+
+ subroutine states_batch_output_eigenvalues(batch, nspin, unit, verbose_limit)
+ !-----------------------------------------------------------------------!
+ ! Writes the eigenvalues either to a file or to the screen in a nice !
+ ! readable format. !
+ ! !
+ ! batch - batch of states !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ integer, intent(in), optional :: unit, verbose_limit
+
+ integer :: i, j
+ real(R8) :: u
+ type(qn_t) :: qn
+ character(len=4) :: nspin_label
+ type(state_t), pointer :: state
+
+ call push_sub("states_batch_output_eigenvalues")
+
+ write(message(1),'(4X,"Eigenvalues [",A,"]")') trim(units_out%energy%abbrev)
+ select case (nspin)
+ case (1)
+ write(message(2),'(5X,"State Occupation Eigenvalue")')
+ case (2)
+ qn = state_qn(batch%states(1)%ptr)
+ if (qn%m == M_ZERO) then
+ write(message(2),'(5X,"State Spin Occupation Eigenvalue")')
+ else
+ write(message(2),'(5X," State Sigma Occupation Eigenvalue")')
+ end if
+ end select
+
+ u = units_out%energy%factor
+ j = 2
+ do i = 1, batch%n_states
+ j = j + 1
+ state => batch%states(i)%ptr
+
+ qn = state_qn(state)
+ select case (nspin)
+ case (1)
+ if (qn%j == M_ZERO) then
+ write(message(j),'(7X,A,6X,F5.2,4X,F12.5)') trim(state_label(state)), &
+ state_charge(state), state_eigenvalue(state)/u
+ else
+ write(message(j),'(5X,A,5X,F5.2,4X,F12.5)') trim(state_label(state)), &
+ state_charge(state), state_eigenvalue(state)/u
+ end if
+ case (2)
+ if (qn%m == M_ZERO) then
+ if (qn%s == -M_HALF) then
+ nspin_label = "-1/2"
+ else
+ nspin_label = "+1/2"
+ end if
+ write(message(j),'(7X,A,4X,A,5X,F5.2,4X,F12.5)') trim(state_label(state)), nspin_label, &
+ state_charge(state), state_eigenvalue(state)/u
+ else
+ if (qn%sg == M_HALF) then
+ nspin_label = 'up'
+ elseif (qn%sg == -M_HALF) then
+ nspin_label = 'dn'
+ else
+ nspin_label = '--'
+ end if
+ write(message(j),'(5X,A,4X,A,5X,F5.2,4X,F12.5)') trim(state_label(state)), nspin_label, &
+ state_charge(state), state_eigenvalue(state)/u
+ end if
+ end select
+ end do
+
+ if (present(unit)) then
+ call write_info(j,unit=unit)
+ else
+ if (present(verbose_limit)) then
+ call write_info(j,verbose_limit)
+ else
+ call write_info(j)
+ end if
+ end if
+
+ call pop_sub()
+ end subroutine states_batch_output_eigenvalues
+
+ subroutine states_batch_output_density(batch, nspin, m, dir)
+ !-----------------------------------------------------------------------!
+ ! Writes the electronic density to the "dir/density" file in a format !
+ ! suitable for plotting. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ integer, intent(in) :: nspin
+ type(mesh_t), intent(in) :: m
+ character(len=*), intent(in) :: dir
+
+ integer :: i, p, unit
+ real(R8) :: u
+ character(len=30) :: filename
+ real(R8), allocatable :: rho(:,:), rho_grad(:,:), rho_lapl(:,:), tau(:,:)
+
+ call push_sub("states_batch_output_density")
+
+ !Get the density and its derivatives
+ allocate(rho(m%np, nspin), rho_grad(m%np, nspin))
+ allocate(rho_lapl(m%np, nspin), tau(m%np, nspin))
+ rho = states_batch_density (batch, nspin, m)
+ rho_grad = states_batch_density_grad(batch, nspin, m)
+ rho_lapl = states_batch_density_lapl(batch, nspin, m)
+ tau = states_batch_tau (batch, nspin, m)
+
+ u = units_out%length%factor
+
+ !Density, gradient, and laplacian
+ do p = 1, nspin
+ if (nspin == 1) then
+ filename = trim(dir)//"/density"
+ else
+ if (p == 1) then
+ filename = trim(dir)//"/density_dn"
+ elseif (p == 2) then
+ filename = trim(dir)//"/density_up"
+ end if
+ end if
+ call io_open(unit, file=trim(filename))
+
+ write(unit,'("#")')
+ write(unit,'("# Radial density.")')
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+
+ write(unit,'("# ",71("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",6X,"n(r)",7X,"|",4X,"grad_n(r)",4X,"|",4X,"lapl_n(r)",4X,"|")')
+ write(unit,'("# ",71("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2,3X,ES15.8E2,3X,ES15.8E2)') &
+ m%r(i)/u, rho(i, p)*u, rho_grad(i, p)*u**2, rho_lapl(i, p)*u**3
+ end do
+
+ close(unit)
+ end do
+
+ !Print kinetic energy density
+ do p = 1, nspin
+ if (nspin == 1) then
+ filename = trim(dir)//"/tau"
+ else
+ if (p == 1) then
+ filename = trim(dir)//"/tau_dn"
+ elseif (p == 2) then
+ filename = trim(dir)//"/tau_up"
+ end if
+ end if
+ call io_open(unit, file=trim(filename))
+
+ write(unit,'("#")')
+ write(unit,'("# Radial kinetic energy density.")')
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("#")')
+
+ write(unit,'("# ",35("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",5X,"tau(r)",6X,"|")')
+ write(unit,'("# ",35("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2)') m%r(i)/u, &
+ tau(i, p)*u/units_out%energy%factor
+ end do
+
+ close(unit)
+ end do
+
+ !Free memory
+ deallocate(rho, rho_grad, rho_lapl, tau)
+
+ call pop_sub()
+ end subroutine states_batch_output_density
+
+ subroutine states_batch_ps_io_set(batch, m, rc)
+ !-----------------------------------------------------------------------!
+ ! Pass the information about the wavefunctions to the ps_io module. !
+ !-----------------------------------------------------------------------!
+ type(states_batch_t), intent(in) :: batch
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: rc(batch%n_states)
+
+ integer :: i
+ character(len=10) :: label
+ type(qn_t) :: qn
+ integer, allocatable :: n(:), l(:)
+ real(R8), allocatable :: j(:), occ(:), ev(:), wfs(:,:), rho_val(:,:)
+ type(state_t), pointer :: state
+
+ call push_sub("states_batch_ps_io_set")
+
+ allocate(n(batch%n_states), l(batch%n_states), j(batch%n_states))
+ allocate(occ(batch%n_states), ev(batch%n_states))
+ allocate(wfs(m%np, batch%n_states))
+ allocate(rho_val(m%np, 1))
+
+ rho_val = states_batch_density(batch, 1, m)
+ do i = 1, batch%n_states
+ state => batch%states(i)%ptr
+ qn = state_qn(state)
+ label = state_label(state)
+ read(label,'(I1)') n(i)
+ l(i) = qn%l
+ j(i) = qn%j
+ occ(i) = state_charge(state)
+ ev(i) = state_eigenvalue(state)
+ wfs(:, i) = state%wf(:,1)
+ end do
+
+ call ps_io_set_wfs(m%np, batch%n_states, n, l, j, occ, ev, rc, wfs, &
+ sum(rho_val, dim=2))
+
+ deallocate(n, l, j, occ, ev, wfs, rho_val)
+
+ call pop_sub()
+ end subroutine states_batch_ps_io_set
+
+end module states_batch_m
diff --git a/src/tm.F90 b/src/tm.F90
new file mode 100644
index 0000000..095681e
--- /dev/null
+++ b/src/tm.F90
@@ -0,0 +1,323 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: tm.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module troullier_martins_m
+ use global_m
+ use messages_m
+ use utilities_m
+ use output_m
+ use mesh_m
+ use multiroot_m
+ use quantum_numbers_m
+ use potentials_m
+ use wave_equations_m
+ use troullier_martins_equations_m
+ implicit none
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: tm_gen, &
+ tm_equations_rhs, &
+ tm_solve_system
+
+
+contains
+
+ subroutine tm_gen(qn, ev, wave_eq, rel, tol, m, ae_potential, rc, ps_v, ps_wf, ps_wfp)
+ !-----------------------------------------------------------------------!
+ ! Generates the pseudo wave-functions and the corresponding !
+ !pseudo-potential using the Troullier-Martins scheme. !
+ ! !
+ ! qn - quantum numbers of valence state !
+ ! occ - occupation of valence state !
+ ! ev - eigenvalue of valence state !
+ ! wave_eq - wave equation to use !
+ ! rel - if true, use the relativistic extension to the scheme !
+ ! tol - tolerance !
+ ! m - mesh !
+ ! ae_potential - all-electron potential !
+ ! rc - cutoff radius !
+ ! integrator - integrator object !
+ ! ps_v - pseudo-potential on the mesh !
+ ! ps_wf - all-electron/pseudo wavefunction !
+ ! ps_wfp - all-electron/pseudo wavefunction derivative !
+ ! !
+ ! On input qn, ps_wf and ps_wfp contain the all-electron !
+ ! quantum-numbers and wavefunctions and on exit the pseudo !
+ ! wavefunctions and quantum numbers. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(inout) :: qn
+ real(R8), intent(in) :: ev
+ integer, intent(in) :: wave_eq
+ logical, intent(in) :: rel
+ real(R8), intent(in) :: tol
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: ae_potential
+ real(R8), intent(in) :: rc
+ real(R8), intent(out) :: ps_v(m%np)
+ real(R8), intent(inout) :: ps_wf(:,:) ! ps_wf(m%np, wf_dim)
+ real(R8), intent(inout) :: ps_wfp(:,:) ! ps_wfp(m%np, wf_dim)
+
+ integer :: wf_dim, i
+ real(R8) :: rhs(7), c(7)
+ real(R8) :: wf_rc, wfp_rc, norm
+ real(R8), allocatable :: ae_wf(:,:), ae_wfp(:,:)
+ type(mesh_t) :: mr
+
+ call push_sub("tm_gen")
+
+ !
+ call mesh_null(mr)
+
+ !Write core radius
+ write(message(1),'(4x,"Core radius:",1x,f7.3,5x)') rc
+ call write_info(1,20)
+ call write_info(1,unit=info_unit("pp"))
+
+ !Copy all-electron wavefunctions
+ wf_dim = qn_wf_dim(qn)
+ allocate(ae_wf(m%np, wf_dim), ae_wfp(m%np, wf_dim))
+ ae_wf = ps_wf
+ ae_wfp = ps_wfp
+
+ !Wavefunctions and norm at rc
+ wf_rc = rc*mesh_extrapolate(m, ae_wf(:,1), rc)
+ wfp_rc = rc*mesh_extrapolate(m, ae_wfp(:,1), rc) + wf_rc/rc
+ if (wf_rc < M_ZERO) then
+ ae_wf = -ae_wf
+ ae_wfp = -ae_wfp
+ wf_rc = -wf_rc
+ wfp_rc = -wfp_rc
+ end if
+ if (rel) then
+ norm = mesh_integrate(m, sum(ae_wf**2, dim=2), b=rc)
+ else
+ select case (wave_eq)
+ case (SCHRODINGER, SCALAR_REL)
+ norm = mesh_integrate(m, ae_wf(:,1)**2, b=rc)
+ case (DIRAC)
+ norm = mesh_integrate(m, ae_wf(:,1)**2, b=rc) + mesh_integrate(m, ae_wf(:,2)**2)
+ end select
+ end if
+
+ !Get right hand side of equations to solve
+ call tm_equations_rhs(m, rc, rel, qn, ev, wf_rc, wfp_rc, norm, ae_potential, rhs)
+
+ !New mesh
+ mr = m
+ call mesh_truncate(mr, rc)
+
+ !Solve system of equations
+ call tm_solve_system(mr, rc, rel, qn, ev, rhs, tol, c, ps_wf(1:mr%np,:), ps_wfp(1:mr%np,:), ps_v(1:mr%np), .false.)
+
+ !Get the pseudo-wavefunctions and set the quantum numbers to their correct value
+ qn%n = qn%l + 1
+ ps_wf(mr%np:m%np,1:wf_dim) = ae_wf(mr%np:m%np,1:wf_dim)
+ ps_wfp(mr%np:m%np,1:wf_dim) = ae_wfp(mr%np:m%np,1:wf_dim)
+ if (wave_eq == DIRAC .and. .not. rel) then
+ ps_wf(mr%np:m%np,2) = M_ZERO
+ ps_wfp(mr%np:m%np,2) = M_ZERO
+ end if
+ do i = mr%np, m%np
+ ps_v(i) = v(ae_potential, m%r(i), qn)
+ end do
+
+ !
+ deallocate(ae_wf, ae_wfp)
+ call mesh_end(mr)
+
+ call pop_sub()
+ end subroutine tm_gen
+
+ subroutine tm_equations_rhs(m, rc, rel, qn, ev, grc, gprc, norm, ae_potential, rhs)
+ !-----------------------------------------------------------------------!
+ ! Returns the right-hand side of the TM set of non-linear equations. !
+ ! !
+ ! m - mesh !
+ ! rc - cutoff radius !
+ ! rel - if true, use the relativistic extension to the scheme !
+ ! qn - quantum numbers of valence state !
+ ! ev - eigenvalue of valence state !
+ ! grc - wave-function at rc !
+ ! gprc - first derivative of the wave-function at rc !
+ ! norm - norm of the wave-functions up to rc !
+ ! ae_potential - all-electron potential !
+ ! rhs - right-hand side of equations !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: rc, ev, grc, gprc, norm
+ logical, intent(in) :: rel
+ type(qn_t), intent(in) :: qn
+ type(potential_t), intent(in) :: ae_potential
+ real(R8), intent(out) :: rhs(7)
+
+ integer :: i
+ real(R8) :: vrc, vprc, vpprc, vppprc, delta, deltap, deltapp, deltappp, k, alpha, alphap, alphapp
+ real(R8), allocatable :: tmp(:)
+
+ call push_sub("tm_equations_rhs")
+
+ !Potential at rc
+ vrc = v(ae_potential, rc, qn)
+ vprc = dvdr(ae_potential, rc, qn)
+ vpprc = d2vdr2(ae_potential, rc, qn)
+
+ !Get right hand side of equations to solve
+ if (rel) then
+ allocate(tmp(m%np))
+ do i = 1, m%np
+ tmp(i) = dvdr(ae_potential, m%r(i), qn)
+ end do
+ vppprc = mesh_extrapolate(m, mesh_derivative(m, tmp), rc)
+ deallocate(tmp)
+ delta = (vrc - ev)/M_TWO/M_C2
+ deltap = vprc/M_TWO/M_C2
+ deltapp = vpprc/M_TWO/M_C2
+ deltappp = vppprc/M_TWO/M_C2
+
+ rhs(1) = log(grc/rc**(qn%l+1))
+ rhs(2) = gprc/grc - (real(qn%l,r8) + M_ONE)/rc
+ k = -M_TWO*(qn%j - real(qn%l,R8))*(qn%j + M_HALF)
+ alpha = rhs(2) + (real(qn%l,R8) + M_ONE + k)/rc
+ rhs(3) = M_TWO*(M_ONE - delta)*(vrc - ev) - rhs(2)**2 &
+ - M_TWO*(real(qn%l,r8) + M_ONE)/rc*rhs(2) &
+ - deltap*alpha/(M_ONE - delta)
+ alphap = rhs(3) - (real(qn%l,R8) + M_ONE + k)/rc**2
+ rhs(4) = M_TWO*(M_ONE - delta)*vprc &
+ - M_TWO*deltap*(vrc - ev) &
+ - M_TWO*rhs(2)*rhs(3) &
+ + M_TWO*(real(qn%l,r8) + M_ONE)/rc**2*rhs(2) &
+ - M_TWO*(real(qn%l,r8) + M_ONE)/rc*rhs(3) &
+ - deltapp*alpha/(M_ONE - delta) &
+ - deltap**2*alpha/(M_ONE - delta)**2 &
+ - deltap*alphap/(M_ONE - delta)
+ alphapp = rhs(4) + M_TWO*(real(qn%l,R8) + M_ONE + k)/rc**3
+ rhs(5) = M_TWO*(M_ONE - delta)*vpprc &
+ - M_FOUR*deltap*vprc &
+ - M_TWO*deltapp*(vrc - ev) &
+ - M_TWO*rhs(2)*rhs(4) &
+ - M_TWO*rhs(3)**2 &
+ - M_FOUR*(real(qn%l,r8) + M_ONE)/rc**3*rhs(2) &
+ + M_FOUR*(real(qn%l,r8) + M_ONE)/rc**2*rhs(3) &
+ - M_TWO*(real(qn%l,r8) + M_ONE)/rc*rhs(4) &
+ - deltappp*alpha/(M_ONE - delta) &
+ - M_THREE*deltap*deltapp*alpha/(M_ONE - delta)**2 &
+ - M_TWO*deltap**3*alpha/(M_ONE - delta)**3 &
+ - M_TWO*deltapp*alphap/(M_ONE - delta) &
+ - M_TWO*deltapp**2*alphap/(M_ONE - delta)**2 &
+ - deltap*alphapp/(M_ONE - delta)
+
+ else
+ rhs(1) = log(grc/rc**(qn%l+1))
+ rhs(2) = gprc/grc &
+ - (real(qn%l,r8) + M_ONE)/rc
+ rhs(3) = M_TWO*(vrc - ev) &
+ - M_TWO*(real(qn%l,r8) + M_ONE)/rc*rhs(2) &
+ - rhs(2)**2
+ rhs(4) = M_TWO*vprc &
+ + M_TWO*(real(qn%l,r8) + M_ONE)/rc**2*rhs(2) &
+ - M_TWO*(real(qn%l,r8) + M_ONE)/rc*rhs(3) &
+ - M_TWO*rhs(2)*rhs(3)
+ rhs(5) = M_TWO*vpprc &
+ - M_FOUR*(real(qn%l,r8) + M_ONE)/rc**3*rhs(2) &
+ + M_FOUR*(real(qn%l,r8) + M_ONE)/rc**2*rhs(3) &
+ - M_TWO*(real(qn%l,r8) + M_ONE)/rc*rhs(4) &
+ - M_TWO*rhs(3)**2 &
+ - M_TWO*rhs(2)*rhs(4)
+ end if
+
+ rhs(6) = M_ZERO
+ rhs(7) = norm
+
+ call pop_sub()
+ end subroutine tm_equations_rhs
+
+ subroutine tm_solve_system(m, rc, rel, qn, ev, rhs, tol, c, ps_wf, ps_wfp, ps_v, silent)
+ !-----------------------------------------------------------------------!
+ ! Solve the TM set of non-linear equations. !
+ ! !
+ ! m - mesh !
+ ! rc - cutoff radius !
+ ! rel - if true, use the relativistic extension to the scheme !
+ ! qn - quantum numbers of valence state !
+ ! ev - eigenvalue of valence state !
+ ! rhs - right-hand side of equations !
+ ! tol - tolerance !
+ ! c - coeficients of the polynomial !
+ ! ps_wf - pseudo wavefunction !
+ ! ps_wfp - pseudo wavefunction derivative !
+ ! ps_v - pseudo-potential !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: rc, ev, rhs(7), tol
+ logical, intent(in) :: rel, silent
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(out) :: c(7)
+ real(R8), intent(out) :: ps_wf(:,:) ! ps_wf(m%np, wf_dim)
+ real(R8), intent(out) :: ps_wfp(:,:) ! ps_wfp(m%np, wf_dim)
+ real(R8), intent(out) :: ps_v(m%np)
+
+ real(R8) :: cc(2), f(2)
+ type(multiroot_solver_t) :: mr_solver
+
+ call push_sub("tm_solve_system")
+
+ !Guess
+ cc = M_ZERO
+
+ !Allocate memory
+ call tm_equations_init(m, rc, rel, qn, ev, rhs, silent)
+
+ !Solve non-linear system
+ call multiroot_solver_init(2, M_ZERO, tol, M_ZERO, 300, BROYDEN, mr_solver)
+ call multiroot_solve_system(mr_solver, cc, tm_equations, tm_equations_write_info)
+ c(1) = cc(1)
+ c(7) = cc(2)
+ call tm_solve_linear_system(c)
+
+ !Compute the final pseudo-wavefunction and the pseudopotential
+ call tm_ps_wavefunctions(c, ps_wf, ps_wfp, ps_v)
+
+ !Write final results
+ if (.not. silent) then
+ call tm_equations(2, cc, f)
+ write(message(1),'(4x,"Coefficients:")')
+ write(message(2),'(6x,"c0 =",1x,es16.9e2,3x,"c2 =",1x,es16.9e2)') c(1), c(2)
+ write(message(3),'(6x,"c4 =",1x,es16.9e2,3x,"c6 =",1x,es16.9e2)') c(3), c(4)
+ write(message(4),'(6x,"c8 =",1x,es16.9e2,3x,"c10 =",1x,es16.9e2)') c(5), c(6)
+ write(message(5),'(6x,"c12 =",1x,es16.9e2)') c(7)
+ write(message(6),'(4x,"Residues:")')
+ write(message(7),'(6X,"c2**2 + c4(2l+5) =",1x,ES16.9e2)') f(1)
+ write(message(8),'(6X,"norm[AE] - norm[PP] =",1x,ES16.9e2)') f(2)
+ message(9) = ""
+ call write_info(9,20)
+ call write_info(9,unit=info_unit("pp"))
+ end if
+
+ !Free memory
+ call tm_equations_end()
+
+ call pop_sub()
+ end subroutine tm_solve_system
+
+end module troullier_martins_m
diff --git a/src/tm_equations.F90 b/src/tm_equations.F90
new file mode 100644
index 0000000..77ba7e9
--- /dev/null
+++ b/src/tm_equations.F90
@@ -0,0 +1,276 @@
+!! Copyright (C) 2004-2011 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: tm_equations.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module troullier_martins_equations_m
+ use global_m
+ use messages_m
+ use mesh_m
+ use linalg_m
+ use quantum_numbers_m
+ use potentials_m
+ implicit none
+
+
+ !---Global Variables---!
+
+ !
+ logical :: rel, silent
+ integer :: wf_dim
+ real(R8) :: rc, ev, rhs(7)
+ type(mesh_t) :: m
+ type(qn_t) :: qn
+
+ !Stuff to compute the polynomial
+ real(R8) :: p0_rc(6), p1_rc(6), p2_rc(6), p3_rc(6), p4_rc(6)
+ real(R8), allocatable :: p0_r(:,:), p1_r(:,:), p2_r(:,:)
+
+ !Work arrays
+ real(R8), allocatable :: ps_wf(:,:), ps_wfp(:,:), ps_v(:)
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: tm_equations_init, &
+ tm_equations, &
+ tm_equations_end, &
+ tm_solve_linear_system, &
+ tm_ps_wavefunctions, &
+ tm_equations_write_info
+
+
+contains
+
+ subroutine tm_equations_init(mp, rcp, relp, qnp, evp, rhsp, silentp)
+ !-----------------------------------------------------------------------!
+ ! Initializes global data needed to solve the TM set of non-linear !
+ ! equations. !
+ ! !
+ ! mp - mesh !
+ ! rcp - cutoff radius !
+ ! relp - if true, use the relativistic extension to the scheme !
+ ! qnp - set of quantum numbers !
+ ! rhsp - right-hand side of equations !
+ !-----------------------------------------------------------------------!
+ type(mesh_t), intent(in) :: mp
+ real(R8), intent(in) :: rcp, evp, rhsp(7)
+ logical, intent(in) :: relp, silentp
+ type(qn_t), intent(in) :: qnp
+
+ integer :: i
+ real(R8), parameter :: FACTORS(6) = (/M_TWO, M_FOUR, M_SIX, M_EIGHT, M_TEN, M_TWELVE/)
+
+ call push_sub("tm_equations_init")
+
+ !
+ call mesh_null(m)
+ m = mp; rc = rcp; rel = relp; qn = qnp; ev = evp; rhs = rhsp; silent = silentp
+
+ !
+ allocate(p0_r(m%np, 6), p1_r(m%np, 6), p2_r(m%np, 6))
+
+ p0_r(:, 1) = m%r**2; p1_r(:, 1) = m%r; p2_r(:, 1) = M_ONE;
+ p0_r(:, 2) = m%r**4; p1_r(:, 2) = m%r**3; p2_r(:, 2) = m%r**2;
+ p0_r(:, 3) = m%r**6; p1_r(:, 3) = m%r**5; p2_r(:, 3) = m%r**4;
+ p0_r(:, 4) = m%r**8; p1_r(:, 4) = m%r**7; p2_r(:, 4) = m%r**6;
+ p0_r(:, 5) = m%r**10; p1_r(:, 5) = m%r**9; p2_r(:, 5) = m%r**8;
+ p0_r(:, 6) = m%r**12; p1_r(:, 6) = m%r**11; p2_r(:, 6) = m%r**10;
+
+ do i = 1, 6
+ p1_r(:, i) = p1_r(:, i)*FACTORS(i)
+ p2_r(:, i) = p2_r(:, i)*(FACTORS(i) - M_ONE)*FACTORS(i)
+ end do
+
+ p0_rc(1) = rc**2; p1_rc(1) = rc; p2_rc(1) = M_ONE; p3_rc(1) = M_ZERO; p4_rc(1) = M_ZERO
+ p0_rc(2) = rc**4; p1_rc(2) = rc**3; p2_rc(2) = rc**2; p3_rc(2) = rc; p4_rc(2) = M_ONE
+ p0_rc(3) = rc**6; p1_rc(3) = rc**5; p2_rc(3) = rc**4; p3_rc(3) = rc**3; p4_rc(3) = rc**2
+ p0_rc(4) = rc**8; p1_rc(4) = rc**7; p2_rc(4) = rc**6; p3_rc(4) = rc**5; p4_rc(4) = rc**4
+ p0_rc(5) = rc**10; p1_rc(5) = rc**9; p2_rc(5) = rc**8; p3_rc(5) = rc**7; p4_rc(5) = rc**6
+ p0_rc(6) = rc**12; p1_rc(6) = rc**11; p2_rc(6) = rc**10; p3_rc(6) = rc**9; p4_rc(6) = rc**8
+
+ p1_rc = p1_rc*FACTORS
+ p2_rc = p2_rc*(FACTORS - M_ONE)*FACTORS
+ p3_rc = p3_rc*(FACTORS - M_TWO)*(FACTORS - M_ONE)*FACTORS
+ p4_rc = p4_rc*(FACTORS - M_THREE)*(FACTORS - M_TWO)*(FACTORS - M_ONE)*FACTORS
+
+ wf_dim = qn_wf_dim(qn)
+ allocate(ps_wf(m%np, wf_dim), ps_wfp(m%np, wf_dim), ps_v(m%np))
+
+ call pop_sub()
+ end subroutine tm_equations_init
+
+ subroutine tm_equations(n, x, f_x)
+ !-----------------------------------------------------------------------!
+ ! For a given set of coefficients x, returns the difference f_x between !
+ ! the left-hand side and the right-hand side of the equations. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: n
+ real(R8), intent(in) :: x(n)
+ real(R8), intent(out) :: f_x(n)
+
+ real(R8) :: xx(7)
+
+ xx(1) = x(1)
+ xx(2:6) = M_ZERO
+ xx(7) = x(2)
+
+ !Solve linear system
+ call tm_solve_linear_system(xx)
+
+ !Compute the polynomial and the wavefunctions
+ call tm_ps_wavefunctions(xx, ps_wf, ps_wfp, ps_v)
+
+ !Return the values we want to be zero
+ if (rel) then
+ f_x(1) = mesh_integrate(m, sum(ps_wf**2, dim=2)) - rhs(7)
+ else
+ f_x(1) = mesh_integrate(m, ps_wf(:,1)**2) - rhs(7)
+ end if
+ f_x(2) = xx(2)**2 + xx(3)*(M_TWO*qn%l + M_FIVE) - rhs(6)
+
+ end subroutine tm_equations
+
+ subroutine tm_solve_linear_system(c)
+ !-----------------------------------------------------------------------!
+ ! Solve the linear part of the system of equations. !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(inout) :: c(7)
+
+ real(R8) :: lsrhs(5), r(5,5)
+
+ lsrhs(1) = rhs(1) - p0_rc(6)*c(7) - c(1)
+ lsrhs(2) = rhs(2) - p1_rc(6)*c(7)
+ lsrhs(3) = rhs(3) - p2_rc(6)*c(7)
+ lsrhs(4) = rhs(4) - p3_rc(6)*c(7)
+ lsrhs(5) = rhs(5) - p4_rc(6)*c(7)
+ r(1,:) = p0_rc(1:5)
+ r(2,:) = p1_rc(1:5)
+ r(3,:) = p2_rc(1:5)
+ r(4,:) = p3_rc(1:5)
+ r(5,:) = p4_rc(1:5)
+ call solve_linear_system(5, r, lsrhs, c(2:6))
+
+ end subroutine tm_solve_linear_system
+
+ subroutine tm_ps_wavefunctions(c, wf, wfp, pot)
+ !-----------------------------------------------------------------------!
+ ! For a given set of coefficients c, returns the corresponding pseudo !
+ ! wave-functions and pseudo-potential. !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(in) :: c(7)
+ real(R8), intent(out) :: wf(m%np, wf_dim), wfp(m%np, wf_dim), pot(m%np)
+
+ integer :: i
+ real(R8) :: k
+ real(R8), allocatable :: p(:), pp(:), ppp(:)
+ type(potential_t) :: ps_potential
+
+ !
+ call potential_null(ps_potential)
+
+ !Compute polynonial
+ allocate(p(m%np), pp(m%np), ppp(m%np))
+ p = c(1)
+ pp = M_ZERO
+ ppp = M_ZERO
+ do i = 1, 6
+ p = p + c(1+i)*p0_r(:,i)
+ pp = pp + c(1+i)*p1_r(:,i)
+ ppp = ppp + c(1+i)*p2_r(:,i)
+ end do
+
+ !Non-relativistic pseudopotential
+ pot = ev + (real(qn%l,r8) + M_ONE)/m%r*pp + (ppp + pp**2)/M_TWO
+ wf(:,1) = m%r**qn%l*exp(p)
+ if (qn%l == 0) then
+ wfp(:,1) = pp*exp(p)
+ else
+ wfp(:,1) = real(qn%l,R8)*m%r**(qn%l-1)*exp(p) + m%r**qn%l*pp*exp(p)
+ end if
+
+ if (rel) then
+ !Relativistic correction to the pseudopotential
+ k = -M_TWO*(qn%j - real(qn%l,R8))*(qn%j + M_HALF)
+ call potential_init(ps_potential, m, pot)
+ do i = 1, m%np
+ pot(i) = pot(i) + (pot(i) - ev)**2/M_TWO/M_C2 + &
+ dvdr(ps_potential, m%r(i), qn)/M_FOUR/M_C2*(wfp(i,1)/wf(i,1) + (k+M_ONE)/m%r(i))
+ end do
+ call potential_end(ps_potential)
+
+ !Minor component
+ wf(:,2) = M_C*((real(qn%l,R8) + M_ONE + k)/m%r + pp)*wf(:,1)/(M_TWO*M_C2 - pot + ev)
+ wfp(:,2) = mesh_derivative(m, wf(:,2))
+ else
+ wf(:,2:wf_dim) = M_ZERO
+ wfp(:,2:wf_dim) = M_ZERO
+ end if
+ deallocate(p, pp, ppp)
+
+ end subroutine tm_ps_wavefunctions
+
+ subroutine tm_equations_write_info(iter, n, c, f)
+ !-----------------------------------------------------------------------!
+ ! Writes to the screen some information about the multiroot solving. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: iter, n
+ real(R8), intent(in) :: c(n), f(n)
+
+ real(R8) :: cc(7)
+
+ ASSERT(n == 2)
+
+ if (silent) return
+
+ cc(1) = c(1)
+ cc(2:6) = M_ZERO
+ cc(7) = c(2)
+ call tm_solve_linear_system(cc)
+
+ write(message(1),'(6x,"Iteration number: ",I3)') iter
+ write(message(2),'(6x,"Coefficients:")')
+ write(message(3),'(8x,"c0 =",1x,es16.9e2,3x,"c2 =",1x,es16.9e2)') cc(1), cc(2)
+ write(message(4),'(8x,"c4 =",1x,es16.9e2,3x,"c6 =",1x,es16.9e2)') cc(3), cc(4)
+ write(message(5),'(8x,"c8 =",1x,es16.9e2,3x,"c10 =",1x,es16.9e2)') cc(5), cc(6)
+ write(message(6),'(8x,"c12 =",1x,es16.9e2)') cc(7)
+ write(message(7),'(6x,"Residues:")')
+ write(message(8),'(8X,"c2**2 + c4(2l+5) =",1x,ES16.9e2)') f(1)
+ write(message(9),'(8X,"norm[AE] - norm[PP] =",1x,ES16.9e2)') f(2)
+ message(10) = ""
+ call write_info(10, 30)
+
+ end subroutine tm_equations_write_info
+
+ subroutine tm_equations_end()
+ !-----------------------------------------------------------------------!
+ ! Frees all the memory associated to the global data needed to solve !
+ ! the TM set of non-linear equations. !
+ !-----------------------------------------------------------------------!
+ call push_sub("tm_equations_end")
+
+ call mesh_end(m)
+ deallocate(p0_r, p1_r, p2_r)
+ deallocate(ps_wf, ps_wfp, ps_v)
+
+ call pop_sub()
+ end subroutine tm_equations_end
+
+end module troullier_martins_equations_m
diff --git a/src/units.F90 b/src/units.F90
new file mode 100644
index 0000000..26dc2f2
--- /dev/null
+++ b/src/units.F90
@@ -0,0 +1,141 @@
+!! Copyright (C) 2004-2010 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: units.F90 778 2013-07-11 15:49:39Z micael $
+
+module units_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type unit_type
+ ! [a.u.] = <input> * unit%factor
+ ! <output> = [a.u.] / unit%factor
+ real(R8) :: factor
+ character(15) :: name
+ character(2) :: abbrev
+ end type unit_type
+
+ type unit_system_type
+ character(30) :: name
+ type(unit_type) :: length
+ type(unit_type) :: energy
+ end type unit_system_type
+
+
+ !---Global Variables---!
+
+ type(unit_system_type) :: units_out, units_in
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: unit_type, unit_system_type, units_init, units_out, units_in
+
+contains
+
+ subroutine units_init()
+ !-----------------------------------------------------------------------!
+ ! This subroutine reads the input options concerning the input and !
+ ! output unit systems to be used and call the subroutine to initialize !
+ ! them. !
+ !-----------------------------------------------------------------------!
+ integer :: iunits_in, iunits_out
+
+ message(1) = ""
+ message(2) = "Setting units"
+ call write_info(2)
+
+ !Read input options
+ if (oct_parse_isdef("Units") /= 0) then
+ call oct_parse_int("Units", 1, iunits_in)
+ iunits_out = iunits_in
+ else
+ call oct_parse_int('UnitsInput', 1, iunits_in)
+ call oct_parse_int('UnitsOutput', 1, iunits_out)
+ end if
+
+ !Initialize the input units
+ call set_units(iunits_in, units_in)
+ write(message(1),'(2X,"Input units system: ",A)') units_in%name
+ call write_info(1,20)
+
+ !Initialize the output units
+ call set_units(iunits_out, units_out)
+ write(message(1),'(2X,"Output units system: ",A)') units_out%name
+ call write_info(1,20)
+
+ end subroutine units_init
+
+ subroutine set_units(iunit, unit_system)
+ !-----------------------------------------------------------------------!
+ ! Initialize a unit system by setting the conversion factors and the !
+ ! units name. !
+ ! !
+ ! iunit - integer specifying the unit system to use !
+ ! unit_system - unit system to be initialized !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: iunit
+ type(unit_system_type), intent(out) :: unit_system
+
+ select case (iunit)
+ case (1) !Atomic units
+ unit_system%name="Atomic Units"
+
+ unit_system%length%factor = M_ONE
+ unit_system%length%name = "bohr"
+ unit_system%length%abbrev = "b "
+
+ unit_system%energy%factor = M_ONE
+ unit_system%energy%name = "hartree"
+ unit_system%energy%abbrev = "H "
+
+ case (2) !Rydberg atomic units
+ unit_system%name="Atomic Rydberg Units"
+
+ unit_system%length%factor = M_ONE
+ unit_system%length%name = "bohr"
+ unit_system%length%abbrev = "b "
+
+ unit_system%energy%factor = M_HALF
+ unit_system%energy%name = "rydberg"
+ unit_system%energy%abbrev = "Ry"
+
+ case (3) !eV and Angstrom
+ unit_system%name="Angstroms and electron volts"
+
+ unit_system%length%factor = M_ONE/0.529177248_r8
+ unit_system%length%name = "Angstrom"
+ unit_system%length%abbrev = "A "
+
+ unit_system%energy%factor = M_ONE/27.2113834_r8
+ unit_system%energy%name = "electron volt"
+ unit_system%energy%abbrev = "eV"
+
+ case default
+ message(1) = "Invalid unit specification."
+ call write_fatal(1)
+ end select
+
+ end subroutine set_units
+
+end module units_m
diff --git a/src/utilities_c.c b/src/utilities_c.c
new file mode 100644
index 0000000..a46910c
--- /dev/null
+++ b/src/utilities_c.c
@@ -0,0 +1,126 @@
+/*
+ Copyright (C) 2004-2007 M. Oliveira, F. Nogueira
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ $Id: utilities_c.c 778 2013-07-11 15:49:39Z micael $
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "string_f.h"
+
+/* These interface routines were taken from the octopus code
+ (htpp://www.tddft.org/programs/octopus).
+ Only the names were changed. */
+
+void FC_FUNC_(sys_mkdir, SYS_MKDIR)
+ (STR_F_TYPE name STR_ARG1)
+{
+ struct stat buf;
+ char *name_c;
+
+ name_c = TO_C_STR1(name);
+ if(!*name_c || stat(name_c, &buf) == 0) return;
+ mkdir(name_c, 0775);
+ free(name_c);
+}
+
+void FC_FUNC_(sys_rm, SYS_RM)
+ (STR_F_TYPE name STR_ARG1)
+{
+ char *name_c;
+
+ name_c = TO_C_STR1(name);
+ unlink(name_c);
+ free(name_c);
+}
+
+void FC_FUNC_(sys_getcwd, SYS_GETCWD)
+ (STR_F_TYPE name STR_ARG1)
+{
+ char s[256];
+
+ getcwd(s, 256);
+ TO_F_STR1(s, name);
+}
+
+double FC_FUNC_(sys_clock, SYS_CLOCK)
+ ()
+{
+ return (double) clock();
+}
+
+
+void FC_FUNC_(sys_gettimeofday, SYS_GETTIMEOFDAY)
+ (int *sec, int *usec)
+{
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval tv;
+ struct timezone tz;
+
+ gettimeofday(&tv, &tz);
+
+ /* The typecast below should use long. However, this causes
+ incompatibilities with Fortran integers. Using int will cause
+ wrong results when tv.tv_sec exceeds INT_MAX=2147483647 */
+ *sec = (int) tv.tv_sec;
+ *usec = (int) tv.tv_usec;
+/*
+ char str[sizeof("HH:MM:SS")];
+ time_t local;
+ local = tv.tv_sec;
+ strftime(str, sizeof(str), "%T", localtime(&local));
+ printf("%s.%06ld \n", str, (long) tv.tv_usec);
+ printf("%ld.%06ld \n", (long) tv.tv_sec, (long) tv.tv_usec);
+*/
+#else
+ *sec = 0;
+ *usec = 0;
+#endif
+}
+
+
+int FC_FUNC_(sys_getmem, SYS_GETMEM)
+ ()
+{
+#ifdef linux
+ static size_t pagesize = 0;
+ FILE *f;
+ int pid;
+ long mem;
+ char s[256];
+
+ if(pagesize == 0)
+ pagesize = sysconf(_SC_PAGESIZE);
+
+ pid = getpid();
+ sprintf(s, "%s%d%s", "/proc/", pid, "/statm");
+ if((f = fopen(s, "r")) == NULL) return -1;
+ fscanf(f, "%lu", &mem);
+ fclose(f);
+
+ return (mem*pagesize) >> 10;
+#else
+ return -1;
+#endif
+}
diff --git a/src/utilities_f.F90 b/src/utilities_f.F90
new file mode 100644
index 0000000..7b4c7ee
--- /dev/null
+++ b/src/utilities_f.F90
@@ -0,0 +1,181 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: utilities_f.F90 778 2013-07-11 15:49:39Z micael $
+
+module utilities_m
+ use global_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface
+ subroutine sys_getcwd(name)
+ character(len=*), intent(out) :: name
+ end subroutine sys_getcwd
+
+ subroutine sys_mkdir(name)
+ character(len=*), intent(in) :: name
+ end subroutine sys_mkdir
+
+ subroutine sys_rm(name)
+ character(len=*), intent(in) :: name
+ end subroutine sys_rm
+
+ function sys_clock()
+ real(8) :: sys_clock
+ end function sys_clock
+
+ subroutine sys_gettimeofday(sec, usec)
+ integer, intent(out) :: sec, usec
+ end subroutine sys_gettimeofday
+
+ integer function sys_getmem()
+ end function sys_getmem
+ end interface
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: locate, &
+ str_center, &
+ sys_getcwd, &
+ sys_mkdir, &
+ sys_rm, &
+ sys_clock, &
+ sys_gettimeofday, &
+ sys_getmem
+
+contains
+
+ function locate(xx, x, guess)
+ !-----------------------------------------------------------------------!
+ ! Given an array xx and a value x, returns locate so x is between !
+ ! xx(locate) and xx(locate+1). It may use a guess value for locate. !
+ ! If guess <= 0 or > size xx then the guess is ignored. !
+ ! !
+ ! xx - array of values where x is to be located. Must be monotonic !
+ ! x - value we want to locate !
+ ! guess - guess value for locate !
+ !-----------------------------------------------------------------------!
+ real(R8), intent(in) :: x
+ real(R8), intent(in) :: xx(:)
+ integer, intent(in) :: guess
+ integer :: locate
+
+ real(R8) :: s
+ integer :: n, nr, nm, i, nl
+
+ n = size(xx)
+ s = sign(M_ONE, xx(n)-xx(1))
+
+ !Check if x is out of bounds
+ if(s*(xx(n) - x) < M_ZERO) then
+ locate = n
+ return
+ elseif(s*(xx(1) - x) > M_ZERO) then
+ locate = 0
+ return
+ end if
+
+ if ( guess <= 0 .or. guess > n) then !Dont hunt. Just do bissection
+ nl = 0
+ nr = n + 1
+ else !Start hunting
+ i = 1
+ if (s*(xx(guess)-x) <= M_ZERO) then
+ nl=guess
+ do
+ if (nl == n) nl = n - 1
+ nr = nl + i
+ if(nr > n) nr = n
+ if (s*(xx(nr) - x) >= M_ZERO) then
+ exit
+ else
+ nl = nr
+ end if
+ i = 2*i
+ end do
+ elseif (s*(xx(guess) - x) > M_ZERO) then
+ nr = guess
+ do
+ nl = nr - i
+ if(nl < 1) nl = 1
+ if (s*(xx(nl) - x) <= M_ZERO) then
+ exit
+ else
+ nr = nl
+ end if
+ i = 2*i
+ end do
+ end if
+ end if
+
+ !Bissection
+ do
+ if(nr - nl == 1) then
+ locate = nl
+ exit
+ end if
+ nm = (nl + nr)/2
+ if (s*(xx(nm) - x) < M_ZERO) then
+ nl = nm
+ elseif (s*(xx(nm) - x) > M_ZERO) then
+ nr = nm
+ else
+ locate = nm
+ exit
+ end if
+ end do
+
+ end function locate
+
+ function str_center(s_in, l)
+ !-----------------------------------------------------------------------!
+ ! Center a string. !
+ ! !
+ ! s_in - string to center !
+ ! l - length of the centered string !
+ !-----------------------------------------------------------------------!
+ character(len=*), intent(in) :: s_in
+ integer, intent(in) :: l
+ character(len=80) :: str_center
+
+ integer :: pad, i, li
+
+ li = len(s_in)
+ if(l < li) then
+ str_center(1:l) = s_in(1:l)
+
+ else
+ pad = (l - li)/2
+
+ str_center = ""
+ do i = 1, pad
+ str_center(i:i) = " ";
+ end do
+ str_center(pad + 1:pad + li + 1) = s_in(1:li)
+ do i = pad + li + 1, l
+ str_center(i:i) = " ";
+ end do
+ end if
+
+ end function str_center
+
+end module utilities_m
diff --git a/src/wave_equations.F90 b/src/wave_equations.F90
new file mode 100644
index 0000000..8121c3c
--- /dev/null
+++ b/src/wave_equations.F90
@@ -0,0 +1,686 @@
+!! Copyright (C) 2004-2012 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: wave_equations.F90 778 2013-07-11 15:49:39Z micael $
+
+module wave_equations_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use splines_m
+ use mesh_m
+ use utilities_m
+ use quantum_numbers_m
+ use potentials_m
+ use ode_integrator_m
+ implicit none
+
+
+ !---Derived Data Types---!
+
+ type integrator_t
+ integer :: nstepmax
+ integer :: stepping_function
+ real(R8) :: tol
+ end type integrator_t
+
+
+ !---Global Variables---!
+
+ integer, parameter :: SCHRODINGER = 1, &
+ SCALAR_REL = 2, &
+ DIRAC = 3
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: integrator_t, &
+ integrator_null, &
+ integrator_init, &
+ integrator_end, &
+ assignment(=), &
+ hydrogen_eigenvalue, &
+ wave_equation_ld_diff, &
+ wavefunctions, &
+ wavefunctions_norm, &
+ wavefunctions_n_bound_states, &
+ hamann_ld, &
+ hamann_wavefunction, &
+ wave_equation_emin, &
+ wave_equation_emax, &
+ wave_function_cutoff, &
+ SCHRODINGER, &
+ DIRAC, &
+ SCALAR_REL
+
+
+contains
+
+ subroutine integrator_null(integrator)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of the integrator. !
+ !-----------------------------------------------------------------------!
+ type(integrator_t), intent(out) :: integrator
+
+ call push_sub("integrator_null")
+
+ integrator%nstepmax = 0
+ integrator%stepping_function = 0
+ integrator%tol = M_ZERO
+
+ call pop_sub()
+ end subroutine integrator_null
+
+ subroutine integrator_init(integrator_sp, integrator_dp)
+ !-----------------------------------------------------------------------!
+ ! Initializes integrator objects by reading some parameters from the !
+ ! input file and by initializing GSL ODE solver objects. !
+ ! Two objects are initialized: one for single precision integrations !
+ ! and a second one for double precision integrations. !
+ ! !
+ ! integrator_sp - single-precision integrator object !
+ ! integrator_dp - double-precision integrator object !
+ !-----------------------------------------------------------------------!
+ type(integrator_t), intent(out) :: integrator_sp, integrator_dp
+
+ real(R8) :: tol
+
+ call push_sub("integrator_init")
+
+ message(1) = ""
+ message(2) = "Initializing ODE Integrator"
+ call write_info(2)
+
+ !Which stepping function will we use
+ call oct_parse_int('ODESteppingFunction', ODE_RKPD8, integrator_sp%stepping_function)
+ select case (integrator_sp%stepping_function)
+ case (ODE_RK2)
+ message(1) = " ODE Stepping function: Embedded 2nd order Runge-Kutta"
+ message(2) = " with 3rd order error estimate"
+ call write_info(2,20)
+ case (ODE_RK4)
+ message(1) = " ODE Stepping function: 4th order (classical) Runge-Kutta method"
+ call write_info(1,20)
+ case (ODE_RKF4)
+ message(1) = " ODE Stepping function: Embedded 4th order Runge-Kutta-Fehlberg "
+ message(2) = " method with 5th order error estimate"
+ call write_info(2,20)
+ case (ODE_RKCK4)
+ message(1) = " ODE Stepping function: Embedded 4th order Runge-Kutta Cash-Karp"
+ message(2) = " method with 5th order error estimate"
+ call write_info(2,20)
+ case (ODE_RKPD8)
+ message(1) = " ODE Stepping function: Embedded 8th order Runge-Kutta Prince-Dormand"
+ message(2) = " method with 9th order error estimate"
+ call write_info(2,20)
+! case (6)
+! message(1) = " Stepping function: Implicit 4th order Runge-Kutta at Gaussian points"
+! call write_info(1,20)
+! case (7)
+! message(1) = " Stepping function: M=2 implicit Gear method"
+! call write_info(1,20)
+ case default
+ message(1) = "ODESteppingFunction must be between 1 and 5."
+ call write_fatal(1)
+ end select
+
+ !Read the ODE integrator tolerance
+ call oct_parse_float('ODEIntTolerance', 1.0E-12_r8, tol)
+ if (tol <= M_ZERO) then
+ message(1) = "ODEIntTolerance must be greater than zero."
+ call write_fatal(1)
+ end if
+ write(message(1),'(2X,"ODE Integrator tolerance: ",ES10.3E2)') tol
+ call write_info(1,20)
+
+ !Read the maximum number of steps the ODE integrator is allowed to take
+ call oct_parse_int('ODEMaxSteps', 500000, integrator_sp%nstepmax)
+ if (integrator_sp%nstepmax <= M_ZERO) then
+ message(1) = "ODEMaxSteps must be greater than zero."
+ call write_fatal(1)
+ end if
+ write(message(1),'(2X,"ODE Integrator maximum number of steps: ",I6)') integrator_sp%nstepmax
+ call write_info(1,20)
+
+ integrator_sp%tol = sqrt(tol)
+
+ integrator_dp%nstepmax = integrator_sp%nstepmax
+ integrator_dp%stepping_function = integrator_sp%stepping_function
+ integrator_dp%tol = tol
+
+ call pop_sub()
+ end subroutine integrator_init
+
+ subroutine integrator_copy(integrator_a, integrator_b)
+ !-----------------------------------------------------------------------!
+ ! Copies integrator_b to integrator_a. !
+ !-----------------------------------------------------------------------!
+ type(integrator_t), intent(inout) :: integrator_a
+ type(integrator_t), intent(in) :: integrator_b
+
+ call push_sub("integrator_copy")
+
+ call integrator_end(integrator_a)
+
+ !Copy data
+ integrator_a%nstepmax = integrator_b%nstepmax
+ integrator_a%stepping_function = integrator_b%stepping_function
+ integrator_a%tol = integrator_b%tol
+
+ call pop_sub()
+ end subroutine integrator_copy
+
+ subroutine integrator_end(integrator)
+ !-----------------------------------------------------------------------!
+ !-----------------------------------------------------------------------!
+ type(integrator_t), intent(inout) :: integrator
+
+ call push_sub("integrator_end")
+
+ integrator%nstepmax = 0
+ integrator%stepping_function = 0
+ integrator%tol = M_ZERO
+
+ call pop_sub()
+ end subroutine integrator_end
+
+ function hydrogen_eigenvalue(qn, wave_eq, z)
+ !-----------------------------------------------------------------------!
+ ! Returns the eigenvalues of the hidrogen-like atoms. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! wave_eq - wave-equation !
+ ! z - nuclear charge !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ integer, intent(in) :: wave_eq
+ real(R8), intent(in) :: z
+ real(R8) :: hydrogen_eigenvalue
+
+ real(R8) :: e_nr
+
+ select case (wave_eq)
+ case (SCHRODINGER)
+ hydrogen_eigenvalue = -z**2/(M_TWO*real(qn%n,R8)**2)
+ case (DIRAC)
+ hydrogen_eigenvalue = M_C2*(M_ONE + z**2/M_C2/(real(qn%n,R8) - M_HALF &
+ - qn%j + sqrt((qn%j + M_HALF)**2 - z**2/M_C2))**2)**(-M_HALF) - M_C2
+ case (SCALAR_REL)
+ if (qn%l == 0) then
+ hydrogen_eigenvalue = M_C2*(M_ONE + z**2/M_C2/(real(qn%n,R8) - M_ONE &
+ + sqrt(M_ONE - z**2/M_C2))**2)**(-M_HALF) - M_C2
+ else
+ e_nr = -z**2/(M_TWO*real(qn%n,R8)**2)
+ hydrogen_eigenvalue = e_nr - e_nr**2/M_TWO/M_C2*(M_FOUR*real(qn%n,R8)/(real(qn%l,R8) + M_HALF) - M_THREE)
+ end if
+ end select
+
+ end function hydrogen_eigenvalue
+
+ function wave_equation_ld_diff(qn, e, wave_eq, potential, integrator, nnodes)
+ !-----------------------------------------------------------------------!
+ ! Returns the difference of the logaritmic derivative computed by !
+ ! integrating the wave-equation inward and outward. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! e - energy !
+ ! wave_eq - wave-equation to integrate !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! nnodes - number of nodes of the wave-function !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: e
+ integer, intent(in) :: wave_eq
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ integer, intent(out) :: nnodes
+ real(R8) :: wave_equation_ld_diff
+
+ integer :: i, nstep_out, nstep_in, ode, nnodes1, nnodes2
+ real(R8) :: r0, ri, rinf
+ type(ode_integrator_t) :: odeint
+ real(R8), pointer :: r_out(:), f_out(:,:)
+ real(R8), pointer :: r_in(:), f_in(:,:)
+
+ call push_sub("wave_equation_ld_diff")
+
+ !Set the parameters needed to compute the derivatives of the functions
+ ode = wave_equation_to_ode(wave_eq, qn, potential)
+ call ode_integrator_null(odeint)
+ call ode_integrator_init(odeint, ode, integrator%stepping_function, &
+ integrator%nstepmax, integrator%tol, qn, e, potential)
+
+ !Set initial, final, and intermidiate points
+ r0 = potential_rmin(potential)
+ ri = classical_turning_point(potential, e, qn)
+ rinf = ode_practical_infinity(odeint, ri, integrator%tol)
+
+ !Outward and inward integrations
+ call ode_integration(odeint, r0, ri, nstep_out, r_out, f_out)
+ call ode_integration(odeint, rinf, ri, nstep_in, r_in, f_in)
+
+ !Match inward and outward functions at the classical turning point
+ call ode_match_functions(odeint, nstep_out, nstep_in, f_out, f_in)
+
+ !Calculate functions mismatch
+ wave_equation_ld_diff = &
+ ode_function_mismatch(odeint, ri, f_out(nstep_out,:), f_in(nstep_in,:))
+
+ !Unset the derivatives parameters
+ call ode_integrator_end(odeint)
+
+ !Calculate the number of nodes
+ if (ode == ODE_DIRAC_POL2) then
+ nnodes1 = 0
+ nnodes2 = 0
+ do i = 1, nstep_out - 1
+ if ( (f_out(i,1)+f_out(i,5))*(f_out(i + 1,1)+f_out(i+1,5)) < M_ZERO) nnodes1 = nnodes1 + 1
+ if ( (f_out(i,3)+f_out(i,7))*(f_out(i + 1,3)+f_out(i+1,7)) < M_ZERO) nnodes2 = nnodes2 + 1
+ end do
+ nnodes = min(nnodes1, nnodes2)
+ else
+ nnodes = 0
+ do i = 1, nstep_out - 1
+ if (f_out(i,1)*f_out(i + 1,1) < M_ZERO) nnodes = nnodes + 1
+ end do
+ end if
+
+ !Deallocate pointers
+ deallocate(r_out, r_in, f_out, f_in)
+
+ call pop_sub()
+ end function wave_equation_ld_diff
+
+ subroutine wavefunctions(qn, e, wave_eq, m, potential, integrator, wf, wfp)
+ !-----------------------------------------------------------------------!
+ ! For a given energy, computes the wave-functions. The energy does not !
+ ! need to be an eigenvalue. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! e - energy !
+ ! wave_eq - wave-equation to use !
+ ! m - mesh !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! wf - wavefunction !
+ ! wfp - wavefunction derivative !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: e
+ integer, intent(in) :: wave_eq
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(inout) :: wf(:, :) ! wf(m%np, qn_wf_dim(qn))
+ real(R8), intent(inout) :: wfp(:, :) ! wfp(m%np, qn_wf_dim(qn))
+
+ integer :: ode, wf_dim, i, nstep_out, nstep_in, nstep_tot, r_tot_max
+ real(R8) :: r0, ri, rinf, factor
+ type(ode_integrator_t) :: odeint
+ real(R8), pointer :: r_out(:), f_out(:,:)
+ real(R8), pointer :: r_in(:), f_in(:,:)
+ real(R8), allocatable :: r_tot(:), wf_tot(:,:), wfp_tot(:,:)
+
+ call push_sub("wavefunctions")
+
+ !Set the parameters needed to compute the derivatives of the functions
+ ode = wave_equation_to_ode(wave_eq, qn, potential)
+ call ode_integrator_null(odeint)
+ call ode_integrator_init(odeint, ode, integrator%stepping_function, &
+ integrator%nstepmax, integrator%tol, qn, e, potential)
+
+ !Set initial, final, and intermidiate points
+ r0 = potential_rmin(potential)
+ ri = classical_turning_point(potential, e, qn)
+ rinf = ode_practical_infinity(odeint, ri, integrator%tol)
+
+ !Outward and inward integrations
+ call ode_integration(odeint, r0, ri, nstep_out, r_out, f_out)
+ call ode_integration(odeint, rinf, ri, nstep_in, r_in, f_in)
+
+ !Match inward and outward functions at the classical turning point
+ call ode_match_functions(odeint, nstep_out, nstep_in, f_out, f_in)
+
+ !Get the inward and outward wavefunctions on a single array
+ wf_dim = qn_wf_dim(qn)
+ nstep_tot = nstep_in + nstep_out - 1
+ allocate(r_tot(nstep_tot), wf_tot(nstep_tot, wf_dim), wfp_tot(nstep_tot, wf_dim))
+ do i = 1, nstep_out
+ r_tot(i) = r_out(i)
+ call ode_function_to_wavefunction(odeint, &
+ r_tot(i), f_out(i,:), wf_tot(i,:), wfp_tot(i,:))
+ end do
+ do i = 1,nstep_in-1
+ r_tot(nstep_out+i) = r_in(nstep_in-i)
+ call ode_function_to_wavefunction(odeint, &
+ r_tot(nstep_out+i), f_in(nstep_in-i,:), &
+ wf_tot(nstep_out+i,:), wfp_tot(nstep_out+i,:))
+ end do
+
+ !Unset the derivatives parameters
+ call ode_integrator_end(odeint)
+
+ !Get the wavefunctions in the correct mesh
+ r_tot_max = locate(m%r, r_tot(nstep_tot), 0)
+ do i = 1, wf_dim
+ call spline_mesh_transfer(nstep_tot, r_tot, wf_tot(:,i), r_tot_max, m%r(1:r_tot_max), wf(1:r_tot_max,i), 3)
+ call spline_mesh_transfer(nstep_tot, r_tot, wfp_tot(:,i), r_tot_max, m%r(1:r_tot_max), wfp(1:r_tot_max,i), 3)
+ end do
+ wf(r_tot_max + 1:m%np,:) = M_ZERO
+ wfp(r_tot_max + 1:m%np,:) = M_ZERO
+
+ !Deallocate pointers
+ deallocate(r_tot, r_out, r_in, wf_tot, wfp_tot, f_out, f_in)
+
+ !Normalize the wavefunction
+ factor = wavefunctions_norm(wave_eq, m, wf)
+ wf = wf/sqrt(factor)
+ wfp = wfp/sqrt(factor)
+ where (abs(wf) < wave_function_cutoff(integrator)) wf = M_ZERO
+ factor = wavefunctions_norm(wave_eq, m, wf)
+ wf = wf/sqrt(factor)
+ wfp = wfp/sqrt(factor)
+ where (abs(wfp) < wave_function_cutoff(integrator)) wfp = M_ZERO
+
+ call pop_sub()
+ end subroutine wavefunctions
+
+ function wavefunctions_norm(wave_eq, m, wf)
+ !-----------------------------------------------------------------------!
+ ! Returns the norm of the wave-function. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: wave_eq
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(in) :: wf(:,:) ! wf(m%np, wf_dim)
+ real(R8) :: wavefunctions_norm
+
+ select case (wave_eq)
+ case (SCHRODINGER, SCALAR_REL)
+ wavefunctions_norm = mesh_integrate(m, wf(:,1)**2)
+ case (DIRAC)
+ wavefunctions_norm = mesh_integrate(m, sum(wf**2,dim=2))
+ end select
+
+ end function wavefunctions_norm
+
+ function wavefunctions_n_bound_states(qn, wave_eq, m, potential, integrator)
+ !-----------------------------------------------------------------------!
+ ! Integrates the wave-equation outward up to a certain radius and then !
+ ! computes the logarithmic derivative. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! wave_eq - wave-equation to use !
+ ! m - mesh !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ integer, intent(in) :: wave_eq
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ integer :: wavefunctions_n_bound_states
+
+ integer :: ode, i, nstep, nnodes
+ real(R8) :: e
+ type(ode_integrator_t) :: odeint
+ real(R8), pointer :: r(:), f(:,:)
+
+ call push_sub("wavefunctions_n_bound_states")
+
+ e = wave_equation_emax(qn, potential)
+
+ !Set the parameters needed to compute the derivatives of the functions
+ ode = wave_equation_to_ode(wave_eq, qn, potential)
+ call ode_integrator_null(odeint)
+ call ode_integrator_init(odeint, ode, integrator%stepping_function, &
+ integrator%nstepmax, integrator%tol, qn, e, potential)
+
+ !Outward integration
+ call ode_integration(odeint, m%r(1), m%r(m%np), nstep, r, f)
+
+ !Unset the derivatives parameters
+ call ode_integrator_end(odeint)
+
+ !Calculate the number of nodes
+ nnodes = 0
+ do i = 1, nstep-1
+ if (f(i,1)*f(i+1,1) < M_ZERO) nnodes = nnodes + 1
+ end do
+
+ !Deallocate pointers
+ deallocate(r, f)
+
+ wavefunctions_n_bound_states = nnodes
+
+ call pop_sub()
+ end function wavefunctions_n_bound_states
+
+ function hamann_ld(qn, e, wave_eq, m, potential, integrator, nnodes)
+ !-----------------------------------------------------------------------!
+ ! Integrates the wave-equation outward up to a certain radius and then !
+ ! computes the logarithmic derivative. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! e - energy !
+ ! wave_eq - wave-equation to use !
+ ! m - mesh !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! nnodes - number of nodes of the wave-function !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: e
+ integer, intent(in) :: wave_eq
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ integer, intent(out) :: nnodes
+ real(R8) :: hamann_ld
+
+ integer :: ode, i, nstep, wf_dim
+ real(R8) :: rc
+ type(ode_integrator_t) :: odeint
+ real(R8), allocatable :: wf_rc(:), wfp_rc(:)
+ real(R8), pointer :: r(:), f(:,:)
+
+ call push_sub("hamann_ld")
+
+ !Set the parameters needed to compute the derivatives of the functions
+ ode = wave_equation_to_ode(wave_eq, qn, potential)
+ call ode_integrator_null(odeint)
+ call ode_integrator_init(odeint, ode, integrator%stepping_function, &
+ integrator%nstepmax, integrator%tol, qn, e, potential)
+
+ rc = m%r(m%np)
+ call ode_integration(odeint, potential_rmin(potential), rc, nstep, r, f)
+
+ !Calculate the logaritmic derivative at rc
+ wf_dim = qn_wf_dim(qn)
+ allocate(wf_rc(wf_dim), wfp_rc(wf_dim))
+ call ode_function_to_wavefunction(odeint, rc, f(nstep,:), wf_rc, wfp_rc)
+ hamann_ld = wfp_rc(1)/wf_rc(1)
+ deallocate(wf_rc, wfp_rc)
+
+ !Unset the derivatives parameters
+ call ode_integrator_end(odeint)
+
+ !Calculate the number of nodes
+ nnodes = 0
+ do i = 1, nstep-1
+ if (f(i,1)*f(i+1,1) < M_ZERO) nnodes = nnodes + 1
+ end do
+
+ !Deallocate pointers
+ deallocate(r, f)
+
+ call pop_sub()
+ end function hamann_ld
+
+ subroutine hamann_wavefunction(qn, e, wave_eq, m, potential, integrator, wf, wfp)
+ !-----------------------------------------------------------------------!
+ ! For a given energy, computes the wave-functions "a la Hamann": !
+ ! integrate the wave-equation outward up to a certain radius and the !
+ ! normalize it to one. !
+ ! !
+ ! qn - set of quantum numbers !
+ ! e - energy !
+ ! wave_eq - wave-equation to use !
+ ! m - mesh !
+ ! potential - potential to use in the wave-equation !
+ ! integrator - integrator object !
+ ! wf - wavefunction !
+ ! wfp - wavefunction derivative !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ real(R8), intent(in) :: e
+ integer, intent(in) :: wave_eq
+ type(mesh_t), intent(in) :: m
+ type(potential_t), intent(in) :: potential
+ type(integrator_t), intent(inout) :: integrator
+ real(R8), intent(out) :: wf(:, :), wfp(:, :)
+
+ integer :: ode, i, nstep_out, wf_dim
+ real(R8) :: factor
+ type(ode_integrator_t) :: odeint
+ real(R8), allocatable :: wf_out(:,:), wfp_out(:,:)
+ real(R8), pointer :: r_out(:), f_out(:,:)
+
+ call push_sub("hamann_wavefunction")
+
+ !Set the parameters needed to compute the derivatives of the functions
+ ode = wave_equation_to_ode(wave_eq, qn, potential)
+ call ode_integrator_null(odeint)
+ call ode_integrator_init(odeint, ode, integrator%stepping_function, &
+ integrator%nstepmax, integrator%tol, qn, e, potential)
+
+ !Outward integration
+ call ode_integration(odeint, potential_rmin(potential), m%r(m%np), nstep_out, r_out, f_out)
+
+ wf_dim = qn_wf_dim(qn)
+ allocate(wf_out(nstep_out, wf_dim), wfp_out(nstep_out, wf_dim))
+ do i = 1, nstep_out
+ call ode_function_to_wavefunction(odeint, r_out(i), &
+ f_out(i,:), wf_out(i,:), wfp_out(i,:))
+ end do
+
+ !Unset the derivatives parameters
+ call ode_integrator_end(odeint)
+
+ !
+ do i = 1, wf_dim
+ call spline_mesh_transfer(nstep_out, r_out, wf_out(:,i), m%np, m%r, wf(:,i), 3)
+ call spline_mesh_transfer(nstep_out, r_out, wfp_out(:,i), m%np, m%r, wfp(:,i), 3)
+ end do
+
+ !Normalize the wavefunction
+ factor = wavefunctions_norm(SCHRODINGER, m, wf)
+ wf = wf/sqrt(factor)
+ wfp = wfp/sqrt(factor)
+
+ !Deallocate pointers
+ deallocate(r_out, f_out, wf_out, wfp_out)
+
+ call pop_sub()
+ end subroutine hamann_wavefunction
+
+ function wave_equation_emin(qn, wave_eq, potential)
+ !-----------------------------------------------------------------------!
+ ! Returns the lower bound of the interval where to find the eigenvalue. !
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ integer, intent(in) :: wave_eq
+ type(potential_t), intent(in) :: potential
+ real(R8) :: wave_equation_emin
+
+ real(R8) :: z
+
+ call push_sub("wave_equation_emin")
+
+ z = potential_nuclear_charge(potential)
+ if (z == M_ZERO) then !We probably have a pseudopotential
+ wave_equation_emin = potential_min(potential, qn)
+ else !All-electron potential
+ wave_equation_emin = 1.1_r8*hydrogen_eigenvalue(qn, wave_eq, z)
+ end if
+
+ call pop_sub()
+ end function wave_equation_emin
+
+ function wave_equation_emax(qn, potential)
+ !-----------------------------------------------------------------------!
+ ! Returns the uppper bound of the interval where to find the eigenvalue.!
+ !-----------------------------------------------------------------------!
+ type(qn_t), intent(in) :: qn
+ type(potential_t), intent(in) :: potential
+ real(R8) :: wave_equation_emax
+
+ call push_sub("wave_equation_emax")
+
+ wave_equation_emax = min(potential_max(potential, qn), -1e-6_r8)
+
+ call pop_sub()
+ end function wave_equation_emax
+
+ function wave_function_cutoff(integrator) result(cutoff)
+ !-----------------------------------------------------------------------!
+ ! We consider the wave-function to be zero if it is smaller than cutoff !
+ !-----------------------------------------------------------------------!
+ type(integrator_t), intent(in) :: integrator
+ real(R8) :: cutoff
+
+ cutoff = integrator%tol*1e-2_r8
+
+ end function wave_function_cutoff
+
+ function wave_equation_to_ode(wave_eq, qn, potential)
+ !-----------------------------------------------------------------------!
+ ! Returns what is the set of ODE's that should be solve for a given !
+ ! wave-equation. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: wave_eq
+ type(qn_t), intent(in) :: qn
+ type(potential_t), intent(in) :: potential
+ integer :: wave_equation_to_ode
+
+ call push_sub("wave_equation_to_ode")
+
+ select case (wave_eq)
+ case (SCHRODINGER)
+ wave_equation_to_ode = ODE_SCHRODINGER
+ case (SCALAR_REl)
+ wave_equation_to_ode = ODE_SCALAR_REL
+ case (DIRAC)
+ if (qn%m == M_ZERO) then
+ wave_equation_to_ode = ODE_DIRAC
+ elseif (abs(qn%m) == qn%l + M_HALF) then
+ wave_equation_to_ode = ODE_DIRAC_POL1
+ else
+ if(potential_is_polarized(potential)) then
+ wave_equation_to_ode = ODE_DIRAC_POL2
+ else
+ wave_equation_to_ode = ODE_DIRAC
+ end if
+ end if
+ end select
+
+ call pop_sub()
+ end function wave_equation_to_ode
+
+end module wave_equations_m
diff --git a/src/xc.F90 b/src/xc.F90
new file mode 100644
index 0000000..d70f467
--- /dev/null
+++ b/src/xc.F90
@@ -0,0 +1,947 @@
+!! Copyright (C) 2004-2013 M. Oliveira, F. Nogueira
+!!
+!! This program is free software; you can redistribute it and/or modify
+!! it under the terms of the GNU General Public License as published by
+!! the Free Software Foundation; either version 2, or (at your option)
+!! any later version.
+!!
+!! This program is distributed in the hope that it will be useful,
+!! but WITHOUT ANY WARRANTY; without even the implied warranty of
+!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+!! GNU General Public License for more details.
+!!
+!! You should have received a copy of the GNU General Public License
+!! along with this program; if not, write to the Free Software
+!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+!! 02110-1301, USA.
+!!
+!! $Id: xc.F90 778 2013-07-11 15:49:39Z micael $
+
+#include "global.h"
+
+module xc_m
+ use global_m
+ use oct_parser_m
+ use messages_m
+ use units_m
+ use io_m
+ use output_m
+ use mesh_m
+ use xc_f90_lib_m
+ use functionals_m
+ use ps_io_m
+ use states_batch_m
+ implicit none
+
+
+ !---Interfaces---!
+
+ interface assignment (=)
+ module procedure xc_copy
+ end interface
+
+
+ !---Derived Data Types---!
+
+ type xc_t
+ private
+ integer :: nspin
+ type(functional_t) :: functls(3)
+ integer :: id_val
+ integer :: corrections
+
+ ! Approximation for the kinetic energy density
+ integer :: ked_approximation
+ type(functional_t) :: ked_functl
+
+ !Non-linear core-corrections
+ !This is not initialized in xc_init but in xc_nlcc_init
+ logical :: nlcc
+ real(R8) :: rc
+ integer :: np
+ real(R8), pointer :: rho_core(:)
+ real(R8), pointer :: grad_core(:)
+ real(R8), pointer :: lapl_core(:)
+ real(R8), pointer :: tau_core(:)
+ end type xc_t
+
+
+ !---Global Variables---!
+
+ !Core-correcton scheme
+ integer, parameter :: CC_NONE = 0, &
+ CC_TM = 1, &
+ CC_FHI = 2
+
+ !Corrections to the xc functionals
+ integer, parameter :: XC_CORRECTION_NONE = 0, &
+ XC_CORRECTION_REL_C = 1, &
+ XC_CORRECTION_REL_X = 2, &
+ XC_CORRECTION_SIC = 4, &
+ XC_CORRECTION_ADSIC = 8, &
+ XC_CORRECTION_RHOXC = 16
+
+ !Exact kinetic energy density
+ integer, parameter :: XC_KED_EXACT = 0
+
+
+ !---Public/Private Statements---!
+
+ private
+ public :: xc_t, &
+ xc_null, &
+ xc_init, &
+ xc_nlcc_init, &
+ assignment(=), &
+ xc_end, &
+ xc_model_output_info, &
+ xc_model_save, &
+ xc_model_load, &
+ xc_potential, &
+ xc_evaluate_ked_approximation, &
+ xc_output, &
+ xc_ps_io_set, &
+ CC_NONE, &
+ CC_TM, &
+ CC_FHI, &
+ XC_CORRECTION_NONE, &
+ XC_CORRECTION_REL_C, &
+ XC_CORRECTION_REL_X, &
+ XC_CORRECTION_SIC, &
+ XC_CORRECTION_ADSIC, &
+ XC_CORRECTION_RHOXC
+
+contains
+
+ subroutine xc_null(xc_model)
+ !-----------------------------------------------------------------------!
+ ! Nullifies and sets to zero all the components of xc_model. !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(out) :: xc_model
+
+ integer :: i
+
+ call push_sub("xc_null")
+
+ xc_model%nspin = 0
+ do i = 1, 3
+ call functional_null(xc_model%functls(i))
+ end do
+ xc_model%id_val = 0
+ xc_model%corrections = 0
+ xc_model%ked_approximation = 0
+ call functional_null(xc_model%ked_functl)
+
+ xc_model%nlcc = .false.
+ xc_model%rc = M_ZERO
+ xc_model%np = 0
+ nullify(xc_model%rho_core)
+ nullify(xc_model%grad_core)
+ nullify(xc_model%lapl_core)
+ nullify(xc_model%tau_core)
+
+ call pop_sub()
+ end subroutine xc_null
+
+ subroutine xc_init(nspin, xc_model)
+ !-----------------------------------------------------------------------!
+ ! Initializes exchange-correlation model data. The exchange-correlation !
+ ! models are read from the input file. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: nspin
+ type(xc_t), intent(inout) :: xc_model
+
+ integer :: id(2), irel
+
+ call push_sub("xc_init")
+
+ xc_model%nspin = nspin
+
+ !Read exchange-correlation model control parameter
+ !The correlation only functionals in the input file are multiplied by 1000
+ call oct_parse_int('XCFunctional', XC_LDA_X + XC_LDA_C_PW*1000, xc_model%id_val)
+ id(1) = xc_model%id_val/1000
+ id(2) = xc_model%id_val - id(1)*1000
+
+ !Read exchange-correlation corrections
+ call oct_parse_int('XCCorrections', XC_CORRECTION_NONE, xc_model%corrections)
+
+ !Initialize correlation
+ irel = XC_NON_RELATIVISTIC
+ if (iand(xc_model%corrections, XC_CORRECTION_REL_C) /= 0) irel = XC_RELATIVISTIC
+ call functional_init(nspin, id(1), irel, xc_model%functls(1))
+
+ !Initialize exchange
+ irel = XC_NON_RELATIVISTIC
+ if (iand(xc_model%corrections, XC_CORRECTION_REL_X) /= 0) irel = XC_RELATIVISTIC
+ call functional_init(nspin, id(2), irel, xc_model%functls(2))
+
+ !Are we doing SIC?
+ if (iand(xc_model%corrections, XC_CORRECTION_SIC) /= 0) then
+ call functional_init(nspin, XC_OEP_XC_SIC, irel, xc_model%functls(3))
+ end if
+
+ !rhoxc correction should be applied only when we have an exchange functional
+ if (iand(xc_model%corrections, XC_CORRECTION_RHOXC) /= 0 .and. &
+ (id(2) == 0 .and. functional_kind(xc_model%functls(1)) /= XC_EXCHANGE_CORRELATION) ) then
+ message(1) = "rhoxc correction should be applied to an exchange functional"
+ call write_fatal(1)
+ end if
+
+ !Approximations for kinetic energy density
+ call oct_parse_int('KEDFunctional', XC_KED_EXACT, xc_model%ked_approximation)
+ select case (xc_model%ked_approximation)
+ case (XC_KED_EXACT)
+ case default
+ call functional_init(nspin, xc_model%ked_approximation, irel, xc_model%ked_functl)
+ end select
+
+ call pop_sub()
+ end subroutine xc_init
+
+ subroutine xc_nlcc_init(xc_model, m, rc, cc_scheme, core_density)
+ !-----------------------------------------------------------------------!
+ ! Initializes the non-local core-corrections part of the xc model. !
+ ! !
+ ! xc_model - exchange-correlation model !
+ ! m - mesh !
+ ! rc - core cut-off radius !
+ ! cc_scheme - core-correction scheme to used. Valid options are !
+ ! CC_TM (4th order even polynomial used in atom code !
+ ! by Jose Luis Martins) and CC_FHI (6th order !
+ ! polynomial used in fhi98PP by Martin Fuchs). !
+ ! core-density - the all electron core density !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(inout) :: xc_model
+ type(mesh_t), intent(in) :: m
+ real(R8), intent(inout) :: rc
+ integer, intent(in) :: cc_scheme
+ real(R8), intent(in) :: core_density(m%np, xc_model%nspin)
+
+ integer :: i, i_rc
+ logical :: monotonous
+ real(R8) :: cd_rc, cdp_rc, cdpp_rc, cdppp_rc, a, b, c, d, e, f, g, dummy, dummy1
+ real(R8), allocatable :: cd(:)
+
+ xc_model%nlcc = .true.
+ xc_model%rc = rc
+ xc_model%np = m%np
+ allocate(xc_model%rho_core(m%np), xc_model%grad_core(m%np), &
+ xc_model%lapl_core(m%np), xc_model%tau_core(m%np))
+
+ !Get first, second, and third derivatives of the core density
+ allocate(cd(m%np))
+ cd = sum(core_density,2)
+ cd_rc = mesh_extrapolate(m, cd, rc)
+ cdp_rc = mesh_extrapolate(m, mesh_derivative(m, cd), rc)
+ cdpp_rc = mesh_extrapolate(m, mesh_derivative2(m, cd), rc)
+ cdppp_rc = mesh_extrapolate(m, mesh_derivative3(m, cd), rc)
+
+ select case (cc_scheme)
+ case (CC_TM)
+ !Get parameters
+ c = (rc*(cdpp_rc/cd_rc - (cdp_rc/cd_rc)**2) - cdp_rc/cd_rc)/(M_EIGHT*rc**3)
+ b = (cdp_rc/cd_rc - M_FOUR*c*rc**3)/(M_TWO*rc)
+ a = log(cd_rc) - b*rc**2 - c*rc**4
+
+ !Compute partial core-density
+ do i = 1, m%np
+ if (m%r(i) < rc) then
+ xc_model%rho_core(i) = exp(a + b*m%r(i)**2 + c*m%r(i)**4)
+ else
+ xc_model%rho_core(i) = cd(i)
+ end if
+ if ( abs(xc_model%rho_core(i)) < M_EPSILON ) xc_model%rho_core(i)=M_ZERO
+ end do
+
+ case (CC_FHI)
+ ! Insert a 4*Pi factor in the charge density and its derivatives
+ cd_rc = cd_rc*M_FOUR*M_PI
+ cdp_rc = cdp_rc*M_FOUR*M_PI
+ cdpp_rc = cdpp_rc*M_FOUR*M_PI
+ cdppp_rc = cdppp_rc*M_FOUR*M_PI
+
+ ! Find i_rc
+ do i = 1, m%np
+ if (m%r(i) > rc) exit
+ end do
+ i_rc = i
+
+ ! Find the 5 non-zero coefficients of the polynomial
+ ! Start with a = cd_rc
+ a = cd_rc
+ do
+ ! Solve linear part
+ d = M_TWENTY*(cd_rc - a)/rc**3 - M_TEN*cdp_rc/rc**2 + &
+ M_TWO*cdpp_rc/rc - cdppp_rc/M_SIX
+ e = (90.0_R8*(a - cd_rc) + M_FIFTY*rc*cdp_rc - M_ELEVEN*rc**2*cdpp_rc + &
+ rc**3*cdppp_rc)/(M_TWO*rc**4)
+ f = (72.0_R8*(cd_rc - a) - 42.0_R8*rc*cdp_rc + M_TEN*rc**2*cdpp_rc - &
+ rc**3*cdppp_rc)/(M_TWO*rc**5)
+ g = (M_SIXTY*(a - cd_rc) + 36.0_R8*rc*cdp_rc - M_NINE*rc**2*cdpp_rc + &
+ rc**3*cdppp_rc)/(M_SIX*rc**6)
+
+ ! Test monotonous decay
+ dummy1 = a + d*m%r(i_rc)**3 + e*m%r(i_rc)**4 + &
+ f*m%r(i_rc)**5 + g*m%r(i_rc)**6
+ monotonous = .true.
+ do i = i_rc, 2, -1
+ dummy = dummy1
+ dummy1 = a + d*m%r(i-1)**3 + e*m%r(i-1)**4 + &
+ f*m%r(i-1)**5 + g*m%r(i-1)**6
+ if (dummy1 < dummy) then
+ monotonous = .false.
+ exit
+ end if
+ end do
+ if (monotonous) exit
+ a = a*1.25_R8
+ end do
+
+ !Compute partial core-density
+ do i = 1, m%np
+ if (m%r(i) < rc) then
+ xc_model%rho_core(i) = (a + d*m%r(i)**3 + e*m%r(i)**4 + &
+ f*m%r(i)**5 + g*m%r(i)**6)/M_FOUR/M_PI
+ else
+ xc_model%rho_core(i) = cd(i)
+ end if
+ if ( abs(xc_model%rho_core(i)) < M_EPSILON ) xc_model%rho_core(i) = M_ZERO
+ end do
+
+ end select
+
+ !Higher order derivatives of the core density
+ xc_model%grad_core = mesh_gradient(m, xc_model%rho_core)
+ xc_model%lapl_core = mesh_laplacian(m, xc_model%rho_core)
+ xc_model%tau_core = xc_model%grad_core**2/xc_model%rho_core/M_FOUR
+ where(xc_model%rho_core <= 1e-30)
+ xc_model%rho_core = M_ZERO
+ xc_model%grad_core = M_ZERO
+ xc_model%lapl_core = M_ZERO
+ xc_model%tau_core = M_ZERO
+ end where
+
+ !Output info
+ write(info_unit("pp"),*)
+ message(1) = ""
+ message(2) = "Core Corrections:"
+ select case (cc_scheme)
+ case (CC_TM)
+ message(3) = " Scheme: Troullier-Martins scheme"
+ write(message(4),'(2x,a,f12.6)') "rc :", rc
+ write(message(5),'(2x,a)') "Polynomial coefficients:"
+ write(message(6),'(4x,a,f16.10)') "a =", a + log(M_FOUR*M_PI)
+ write(message(7),'(4x,a,f16.10)') "b =", b
+ write(message(8),'(4x,a,f16.10)') "c =", c
+ write(message(9),'(2x,a)') "Matching at rc:"
+ write(message(10),'(4x,a,f15.9,a,f15.9)') "cd(rc) | f0(rc) =", &
+ cd_rc, " | ", exp(a + b*rc**2 + c*rc**4)
+ write(message(11),'(4x,a,f15.9,a,f15.9)') "cd'(rc) | f1(rc) =", &
+ cdp_rc, " | ", (M_TWO*b*rc + M_FOUR*c*rc**3)*exp(a + b*rc**2 + c*rc**4)
+ write(message(12),'(4x,a,f15.9,a,f15.9)') "cd''(rc) | f2(rc) =", &
+ cdpp_rc, " | ", M_TWO*exp(a + b*rc**2 + c*rc**4)*(b + M_TWO*(b**2 + 3*c)*rc**2 + &
+ M_EIGHT*b*c*rc**4 + M_EIGHT*c**2*rc**6)
+ write(message(13),'(2x,a,f16.9)') "Integrated core charge: ", &
+ M_FOUR*M_PI*mesh_integrate(m, xc_model%rho_core)
+ call write_info(13,20)
+ call write_info(13,unit=info_unit("pp"))
+
+ case (CC_FHI)
+ message(3) = " Scheme: FHI scheme"
+ write(message(4),'(2x,a,f12.6)') "rc :", rc
+ write(message(5),'(2x,a)') "Polynomial coefficients:"
+ write(message(6),'(4x,a,f16.10)') "a =", a
+ write(message(7),'(4x,a,f16.10)') "b =", M_ZERO
+ write(message(8),'(4x,a,f16.10)') "c =", M_ZERO
+ write(message(9),'(4x,a,f16.10)') "d =", d
+ write(message(10),'(4x,a,f16.10)') "e =", e
+ write(message(11),'(4x,a,f16.10)') "f =", f
+ write(message(12),'(4x,a,f16.10)') "g =", g
+ write(message(13),'(2x,a)') "Matching at rc:"
+ write(message(14),'(4x,a,f15.9,a,f15.9)') "cd(rc) | f0(rc) =", &
+ cd_rc, " | ", a + d*rc**3 + e*rc**4 + f*rc**5 + g*rc**6
+ write(message(15),'(4x,a,f15.9,a,f15.9)') "cd'(rc) | f1(rc) =", &
+ cdp_rc, " | ", M_THREE*d*rc**2 + M_FOUR*e*rc**3 + M_FIVE*f*rc**4 + M_SIX*g*rc**5
+ write(message(16),'(4x,a,f15.9,a,f15.9)') "cd''(rc) | f2(rc) =", &
+ cdpp_rc, " | ", M_SIX*d*rc + M_TWELVE*e*rc**2 + M_TWENTY*f*rc**3 + M_THIRTY*g*rc**4
+ write(message(17),'(4x,a,f15.9,a,f15.9)') "cd'''(rc) | f3(rc) =", &
+ cdppp_rc, " | ", M_SIX*d + 24.0_r8*e*rc + M_SIXTY*f*rc**2 + 120.0_r8*g*rc**3
+ write(message(18),'(2x,a,f15.9)') "Integrated core charge: ", &
+ M_FOUR*M_PI*mesh_integrate(m, xc_model%rho_core)
+ call write_info(18,20)
+ call write_info(18,unit=info_unit("pp"))
+ end select
+
+ end subroutine xc_nlcc_init
+
+ subroutine xc_copy(xc_out, xc_in)
+ !-----------------------------------------------------------------------!
+ ! Copies xc model xc_in to xc model xc_out. !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(inout) :: xc_out
+ type(xc_t), intent(in) :: xc_in
+
+ integer :: i
+
+ call push_sub("xc_copy")
+
+ call xc_end(xc_out)
+
+ xc_out%nspin = xc_in%nspin
+ do i = 1, 3
+ xc_out%functls(i) = xc_in%functls(i)
+ end do
+ xc_out%id_val = xc_in%id_val
+ xc_out%corrections = xc_in%corrections
+ xc_out%ked_approximation = xc_in%ked_approximation
+ xc_out%ked_functl = xc_in%ked_functl
+
+ xc_out%nlcc = xc_in%nlcc
+ xc_out%rc = xc_in%rc
+ xc_out%np = xc_in%np
+ if (associated(xc_in%rho_core)) then
+ allocate(xc_out%rho_core(xc_out%np))
+ xc_out%rho_core = xc_in%rho_core
+ end if
+ if (associated(xc_in%grad_core)) then
+ allocate(xc_out%grad_core(xc_out%np))
+ xc_out%grad_core = xc_in%grad_core
+ end if
+ if (associated(xc_in%lapl_core)) then
+ allocate(xc_out%lapl_core(xc_out%np))
+ xc_out%lapl_core = xc_in%lapl_core
+ end if
+ if (associated(xc_in%tau_core)) then
+ allocate(xc_out%tau_core(xc_out%np))
+ xc_out%tau_core = xc_in%tau_core
+ end if
+
+ call pop_sub()
+ end subroutine xc_copy
+
+ subroutine xc_end(xc_model)
+ !-----------------------------------------------------------------------!
+ ! Frees all memory associated to the xc_model. !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(inout) :: xc_model
+
+ integer :: i
+
+ call push_sub("xc_end")
+
+ xc_model%nspin = 0
+ do i = 1, 3
+ call functional_end(xc_model%functls(i))
+ end do
+ xc_model%id_val = 0
+ xc_model%corrections = 0
+
+ xc_model%ked_approximation = 0
+ call functional_end(xc_model%ked_functl)
+
+ xc_model%nlcc = .false.
+ xc_model%rc = M_ZERO
+ xc_model%np = 0
+ if (associated(xc_model%rho_core)) deallocate(xc_model%rho_core)
+ if (associated(xc_model%grad_core)) deallocate(xc_model%grad_core)
+ if (associated(xc_model%lapl_core)) deallocate(xc_model%lapl_core)
+ if (associated(xc_model%tau_core)) deallocate(xc_model%tau_core)
+
+ call pop_sub()
+ end subroutine xc_end
+
+ subroutine xc_model_save(unit, xc_model)
+ !-----------------------------------------------------------------------!
+ ! Writes the exchange-correlation model data to a file. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(xc_t), intent(in) :: xc_model
+
+ integer :: i
+
+ call push_sub("xc_model_save")
+
+ write(unit) xc_model%nspin
+ do i = 1, 3
+ call functional_save(unit, xc_model%functls(i))
+ end do
+ write(unit) xc_model%id_val, xc_model%corrections, xc_model%ked_approximation
+ call functional_save(unit, xc_model%ked_functl)
+
+ write(unit) xc_model%nlcc
+ if (xc_model%nlcc) then
+ write(unit) xc_model%rc, xc_model%np
+ write(unit) (xc_model%rho_core(i), i=1,xc_model%np)
+ write(unit) (xc_model%grad_core(i), i=1,xc_model%np)
+ write(unit) (xc_model%lapl_core(i), i=1,xc_model%np)
+ write(unit) (xc_model%tau_core(i), i=1,xc_model%np)
+ end if
+
+ call pop_sub()
+ end subroutine xc_model_save
+
+ subroutine xc_model_load(unit, xc_model)
+ !-----------------------------------------------------------------------!
+ ! Reads the exchange-correlation model data from a file. !
+ !-----------------------------------------------------------------------!
+ integer, intent(in) :: unit
+ type(xc_t), intent(inout) :: xc_model
+
+ integer :: i
+
+ call push_sub("xc_model_load")
+
+ read(unit) xc_model%nspin
+ do i = 1, 3
+ call functional_load(unit, xc_model%functls(i))
+ end do
+ read(unit) xc_model%id_val, xc_model%corrections, xc_model%ked_approximation
+ call functional_load(unit, xc_model%ked_functl)
+
+ read(unit) xc_model%nlcc
+ if (xc_model%nlcc) then
+ read(unit) xc_model%rc, xc_model%np
+ allocate(xc_model%rho_core(xc_model%np), xc_model%grad_core(xc_model%np), &
+ xc_model%lapl_core(xc_model%np), xc_model%tau_core(xc_model%np))
+ read(unit) (xc_model%rho_core(i), i=1,xc_model%np)
+ read(unit) (xc_model%grad_core(i), i=1,xc_model%np)
+ read(unit) (xc_model%lapl_core(i), i=1,xc_model%np)
+ read(unit) (xc_model%tau_core(i), i=1,xc_model%np)
+ end if
+
+ call pop_sub()
+ end subroutine xc_model_load
+
+ subroutine xc_potential(xc_model, m, states, nspin, vxc, exc, vxctau)
+ !-----------------------------------------------------------------------!
+ ! Given a set of states, computes the corresponding !
+ ! exchange-correlation potentials and energies. !
+ ! !
+ ! xc_model - exchange-correlation model !
+ ! m - mesh !
+ ! nspin - number of spin channels !
+ ! states - the states !
+ ! vxc - exchange-correlation potential !
+ ! exc - exchange-correlation energy !
+ ! vxctau - extra term arising from MGGA functionals !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(inout) :: xc_model
+ type(mesh_t), intent(in) :: m
+ integer, intent(in) :: nspin
+ type(states_batch_t), intent(in) :: states
+ real(R8), optional, intent(out) :: vxc(m%np, nspin)
+ real(R8), optional, intent(out) :: exc
+ real(R8), optional, intent(out) :: vxctau(m%np, nspin)
+
+ integer :: i
+ real(R8) :: eaux, ip(nspin)
+ real(R8), allocatable :: e(:), v(:,:), vaux(:,:), vtau(:,:)
+ real(R8), allocatable :: rho(:,:), rho_grad(:,:), rho_lapl(:,:), tau(:,:)
+ real(R8), allocatable :: dv(:,:)
+
+ call push_sub("xc_potential")
+
+ !Allocate potential and energy work arrays
+ allocate(v(m%np, xc_model%nspin), vaux(m%np, nspin), e(m%np))
+ allocate(vtau(m%np, xc_model%nspin))
+ e = M_ZERO; eaux = M_ZERO; v = M_ZERO; vaux = M_ZERO; vtau = M_ZERO
+ if (present(exc)) exc = M_ZERO
+ if (present(vxc)) vxc = M_ZERO
+ if (present(vxctau)) vxctau = M_ZERO
+
+ !Get total electronic density and kinetic energy density
+ allocate(rho(m%np, nspin), rho_grad(m%np, nspin), rho_lapl(m%np, nspin), tau(m%np, nspin))
+ rho = states_batch_density(states, nspin, m)
+ rho_grad = states_batch_density_grad(states, nspin, m)
+ rho_lapl = states_batch_density_lapl(states, nspin, m)
+ if (xc_model%ked_approximation == XC_KED_EXACT) then
+ tau = states_batch_tau(states, nspin, m)
+ else
+ call functional_get_tau(xc_model%ked_functl, m, rho, rho_grad, rho_lapl, tau)
+ end if
+ if (xc_model%nlcc) then
+ do i = 1, nspin
+ rho(:, i) = rho(:, i) + xc_model%rho_core/real(nspin,R8)
+ rho_grad(:, i) = rho_grad(:, i) + xc_model%grad_core/real(nspin,R8)
+ rho_lapl(:, i) = rho_lapl(:, i) + xc_model%lapl_core/real(nspin,R8)
+ tau(:, i) = tau(:, i) + xc_model%tau_core/real(nspin,R8)
+ end do
+ end if
+
+ !Get ionization potential
+ ip = states_batch_ip(states, nspin)
+
+ !Get energy and potential
+ do i = 1, 2
+ call functional_get_vxc(xc_model%functls(i), m, rho, rho_grad, rho_lapl, &
+ tau, ip, v, e, vtau)
+ if (present(exc)) then
+ exc = exc + M_FOUR*M_PI*mesh_integrate(m, e)
+ end if
+ if (present(vxc)) then
+ vxc = vxc + v
+ end if
+ if (present(vxctau)) then
+ vxctau = vxctau + vtau
+ end if
+
+ if (iand(xc_model%corrections, XC_CORRECTION_RHOXC) /= 0 .and. present(vxc)) then
+ if ( functional_kind(xc_model%functls(i)) == XC_EXCHANGE .or. &
+ functional_kind(xc_model%functls(i)) == XC_EXCHANGE_CORRELATION) then
+ allocate(dv(m%np, nspin))
+ call functional_rhoxc(xc_model%functls(i), m, nspin, rho, rho_grad, rho_lapl, tau, ip, dv)
+ vxc = vxc + dv
+ deallocate(dv)
+ end if
+ end if
+ end do
+
+ if (iand(xc_model%corrections, XC_CORRECTION_ADSIC) /= 0) then
+ call functional_adsic(xc_model%functls(1:2), m, nspin, rho, rho_grad, &
+ rho_lapl, tau, ip, vaux, eaux)
+ if (present(vxc)) then
+ vxc = vxc - vaux
+ end if
+ if (present(exc)) then
+ exc = exc - eaux
+ end if
+
+ end if
+
+ !Deallocate arrays
+ deallocate(rho, rho_grad, rho_lapl, tau, e, v, vaux)
+
+ call pop_sub()
+ end subroutine xc_potential
+
+ subroutine xc_model_output_info(xc_model, unit, verbose_limit)
+ !-----------------------------------------------------------------------!
+ ! Returns the name of the exchange-correlation functionals. !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(in) :: xc_model
+ integer, intent(in), optional :: unit, verbose_limit
+
+ integer :: i, n_message
+ character(len=10) :: family
+ character(len=80) :: name
+
+ n_message = 2
+ message(1) = ""
+ message(2) = "Exchange-Correlation model:"
+
+ do i = 1, 2
+ select case (functional_family(xc_model%functls(i)))
+ case (XC_FAMILY_LDA); write(family,'(A)') "LDA"
+ case (XC_FAMILY_GGA); write(family,'(A)') "GGA"
+ case (XC_FAMILY_MGGA); write(family,'(A)') "MGGA"
+ end select
+
+ select case (functional_kind(xc_model%functls(i)))
+ case (XC_CORRELATION)
+ n_message = n_message + 1
+ write(message(n_message),'(2X,"Correlation: ",A," (",A,")")') &
+ trim(functional_name(xc_model%functls(i))), trim(family)
+ case (XC_EXCHANGE)
+ n_message = n_message + 1
+ write(message(n_message),'(2X,"Exchange: ",A," (",A,")")') &
+ trim(functional_name(xc_model%functls(i))), trim(family)
+ case (XC_EXCHANGE_CORRELATION)
+ n_message = n_message + 1
+ write(message(n_message),'(2X,"Exchange-Correlation: ",A," (",A,")")') &
+ trim(functional_name(xc_model%functls(i))), trim(family)
+ end select
+ end do
+
+ if (iand(xc_model%corrections, XC_CORRECTION_REL_X) /= 0) then
+ n_message = n_message + 1
+ write(message(n_message),'(2X,"Relativistic corrections for Exchange")')
+ end if
+ if (iand(xc_model%corrections, XC_CORRECTION_ADSIC) /= 0) then
+ n_message = n_message + 1
+ write(message(n_message),'(2X,"Self-interaction correction: Averaged-Density SIC")')
+ end if
+ if (iand(xc_model%corrections, XC_CORRECTION_RHOXC) /= 0) then
+ n_message = n_message + 1
+ write(message(n_message),'(2X,"Exchange-correlation density correction")')
+ end if
+
+ if (xc_model%ked_approximation /= XC_KED_EXACT) then
+ n_message = n_message + 1
+ name = trim(functional_name(xc_model%ked_functl))
+ write(message(n_message),'(2X,"KED approximation: ",A)') name(1:59)
+ end if
+
+ if (present(unit)) then
+ call write_info(n_message, unit=unit)
+ else
+ if (present(verbose_limit)) then
+ call write_info(n_message, verbose_limit)
+ else
+ call write_info(n_message)
+ end if
+ end if
+
+ end subroutine xc_model_output_info
+
+ subroutine xc_evaluate_ked_approximation(xc_model, m, states, nspin, unit)
+ !-----------------------------------------------------------------------!
+ ! !
+ ! xc_model - exchange-correlation model !
+ ! m - mesh !
+ ! states - the states !
+ ! nspin - number of spin channels !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(in) :: xc_model
+ type(mesh_t), intent(in) :: m
+ type(states_batch_t), intent(in) :: states
+ integer, intent(in) :: nspin
+ integer, intent(in) :: unit
+
+ real(R8) :: ek_ks, ek_app
+ real(R8), allocatable :: rho(:,:), rho_grad(:,:), rho_lapl(:,:), tau_app(:,:), tau_ks(:,:)
+
+ call push_sub("xc_evaluate_ked_approximation")
+
+ if (xc_model%ked_approximation == XC_KED_EXACT) then
+ !Nothing do be done!
+ call pop_sub()
+ return
+ end if
+
+ !Compute Kohn-Sham densities
+ allocate(rho(m%np, nspin), rho_grad(m%np, nspin), rho_lapl(m%np, nspin))
+ allocate(tau_ks(m%np, nspin), tau_app(m%np, nspin))
+ rho = states_batch_density(states, nspin, m)
+ rho_grad = states_batch_density_grad(states, nspin, m)
+ rho_lapl = states_batch_density_lapl(states, nspin, m)
+ tau_ks = states_batch_tau(states, nspin, m)
+
+ !Compute approximate KED
+ call functional_get_tau(xc_model%ked_functl, m, rho, rho_grad, rho_lapl, tau_app)
+
+ !Get kinetic energy
+ ek_ks = M_TWO*M_PI*mesh_integrate(m, sum(tau_ks, dim=2))
+ ek_app = M_TWO*M_PI*mesh_integrate(m, sum(tau_app, dim=2))
+
+ !Output
+ write(message(1),'(2X,"KED Quality Factor: ",F10.3)') M_TWO*M_PI*mesh_integrate(m, sum(abs(tau_ks - tau_app),dim=2))/ek_ks
+ if (any(tau_app < M_ZERO)) then
+ message(2) = " KED Negative Values: Yes"
+ else
+ message(2) = " KED Negative Values: No"
+ end if
+ write(message(3),'(2X,"Kinetic Energy [",A,"]:",3X,"Kohn-Sham",5X,"Approximate",3X,"Error (%)")') trim(units_out%energy%abbrev)
+ write(message(4),'(2X,17X,F14.6,2X,F14.6,3X,F6.2)') ek_ks, ek_app, (ek_app - ek_ks)/ek_ks*100
+ call write_info(4,20)
+ call write_info(4,unit=unit)
+
+ deallocate(rho, rho_grad, rho_lapl, tau_app, tau_ks)
+
+ call pop_sub()
+ end subroutine xc_evaluate_ked_approximation
+
+ subroutine xc_output(xc_model, m, states, nspin, dir)
+ !-----------------------------------------------------------------------!
+ ! Given a set of states, outputs the the corresponding !
+ ! exchange-correlation potentials and energies. !
+ ! !
+ ! xc_model - exchange-correlation model !
+ ! m - mesh !
+ ! states - the states !
+ ! nspin - number of spin channels !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(in) :: xc_model
+ type(mesh_t), intent(in) :: m
+ type(states_batch_t), intent(in) :: states
+ integer, intent(in) :: nspin
+ character(len=*), intent(in) :: dir
+
+ integer :: if, p, i, unit
+ character(20) :: filename
+ character(3) :: spin
+ character(2) :: type
+ type(xc_t) :: xc_tmp
+ real(R8), allocatable :: e(:), v(:,:), tau(:,:), vtau(:,:)
+
+ call push_sub("xc_output")
+
+ !Create a temporary xc model
+ call xc_null(xc_tmp)
+ xc_tmp = xc_model
+ do if = 1, 3
+ call functional_end(xc_tmp%functls(if))
+ call functional_init(nspin, 0, 0, xc_tmp%functls(if))
+ end do
+
+ !Allocate memory
+ allocate(v(m%np, nspin), e(m%np), vtau(m%np, nspin))
+
+ !Loop over the functionals
+ do if = 1, 2
+ if (functional_kind(xc_model%functls(if)) < 0) cycle
+
+ !Get the potential
+ xc_tmp%functls(1) = xc_model%functls(if)
+ call xc_potential(xc_tmp, m, states, nspin, vxc=v, vxctau=vtau)
+
+ do p = 1, nspin
+ !Get the filename
+ select case (functional_kind(xc_model%functls(if)))
+ case (XC_EXCHANGE)
+ type = "x "
+ case (XC_CORRELATION)
+ type = "c "
+ case (XC_EXCHANGE_CORRELATION)
+ type = "xc"
+ end select
+ if (nspin == 2) then
+ if (p == 1) then
+ spin = "_dn"
+ elseif (p == 2) then
+ spin = "_up"
+ end if
+ else
+ spin = ""
+ end if
+ filename = "v_"//trim(type)//trim(spin)
+
+ !Open file
+ call io_open(unit, file=trim(dir)//"/"//trim(filename))
+
+ !Write header
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ write(unit,'("# ",36("-"))')
+ write(unit,'("# |",8X,"r",7X,"|",7X,"v(r)",6X,"|")')
+ write(unit,'("# ",36("-"))')
+
+ !Ouput
+ do i = 1, m%np
+ write(unit,'(4(3X,ES15.8E2))') m%r(i)/units_out%length%factor, &
+ v(i, p)/units_out%energy%factor
+ end do
+
+ close(unit)
+
+ !MGGA term
+ if (functional_family(xc_model%functls(if)) == XC_FAMILY_MGGA) then
+ filename = "vtau_"//trim(type)//trim(spin)
+
+ !Open file
+ call io_open(unit, file=trim(dir)//"/"//trim(filename))
+
+ !Write header
+ write(unit,'("# ")')
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+ write(unit,'("# ",36("-"))')
+ write(unit,'("# |",8X,"r",7X,"|",7X,"v(r)",6X,"|")')
+ write(unit,'("# ",36("-"))')
+
+ !Ouput
+ do i = 1, m%np
+ write(unit,'(4(3X,ES15.8E2))') m%r(i)/units_out%length%factor, &
+ vtau(i, p)/units_out%energy%factor
+ end do
+
+ close(unit)
+ end if
+
+ end do
+ end do
+
+ !Deallocate memory
+ deallocate(v, e, vtau)
+ call xc_end(xc_tmp)
+
+ !NLCC
+ if (xc_model%nlcc) then
+ call io_open(unit, file=trim(dir)//"/core_correction")
+
+ write(unit,'("#")')
+ write(unit,'("# Radial core correction density and derivatives.")')
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("#")')
+
+ write(unit,'("# ",88("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",6X,"n(r)",7X,"|",4X,"grad_n(r)",4X,"|",4X,"lapl_n(r)",4X,"|",5X,"tau(r)",6X,"|")')
+ write(unit,'("# ",88("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2,3X,ES15.8E2,3X,ES15.8E2,3X,ES15.8E2)') &
+ m%r(i)/units_out%length%factor, &
+ xc_model%rho_core(i)*units_out%length%factor, &
+ xc_model%grad_core(i)*units_out%length%factor**2, &
+ xc_model%lapl_core(i)*units_out%length%factor**3, &
+ xc_model%tau_core(i)*units_out%length%factor/units_out%energy%factor
+ end do
+
+ close(unit)
+
+ end if
+
+ if (xc_model%ked_approximation /= XC_KED_EXACT) then
+
+ allocate(tau(m%np, nspin))
+ call functional_get_tau(xc_model%ked_functl, m, &
+ states_batch_density(states, nspin, m), &
+ states_batch_density_grad(states, nspin, m), &
+ states_batch_density_lapl(states, nspin, m), tau)
+
+ do p = 1, nspin
+ if (nspin == 1) then
+ filename = trim(dir)//"/app_tau"
+ else
+ if (p == 1) then
+ filename = trim(dir)//"/app_tau_dn"
+ elseif (p == 2) then
+ filename = trim(dir)//"/app_tau_up"
+ end if
+ end if
+ call io_open(unit, file=trim(filename))
+
+ write(unit,'("#")')
+ write(unit,'("# Radial approximated kinetic energy density.")')
+ write(unit,'("# Length units: ",A)') trim(units_out%length%name)
+ write(unit,'("# Energy units: ",A)') trim(units_out%energy%name)
+ write(unit,'("#")')
+
+ write(unit,'("# ",35("-"))')
+ write(unit,'("# |",7X,"r",7X,"|",5X,"tau(r)",6X,"|")')
+ write(unit,'("# ",35("-"))')
+ do i = 1, m%np
+ write(unit,'(3X,ES14.8E2,3X,ES15.8E2)') m%r(i)/units_out%length%factor, &
+ tau(i, p)*units_out%length%factor/units_out%energy%factor
+ end do
+
+ close(unit)
+ end do
+
+ deallocate(tau)
+ end if
+
+ call pop_sub()
+ end subroutine xc_output
+
+ subroutine xc_ps_io_set(xc_model)
+ !-----------------------------------------------------------------------!
+ ! Pass the information about the exchange-correlation model to the !
+ ! ps_io module. !
+ !-----------------------------------------------------------------------!
+ type(xc_t), intent(in) :: xc_model
+
+ call push_sub("xc_ps_io_set")
+
+ call ps_io_set_xc(xc_model%id_val)
+
+ if (xc_model%nlcc) then
+ call ps_io_set_nlcc(xc_model%rc, xc_model%np, xc_model%rho_core, xc_model%tau_core)
+ end if
+
+ call pop_sub()
+ end subroutine xc_ps_io_set
+
+end module xc_m
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
new file mode 100644
index 0000000..c11ba3c
--- /dev/null
+++ b/testsuite/Makefile.am
@@ -0,0 +1,106 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+# This testsuite is based on the one of the Octopus code (www.tddft.org/programs/octopus)
+
+SUBDIRS = basic all_electron pseudopotentials libxc
+
+bin_SCRIPTS = ape-run_regression_test.pl ape-run_testsuite
+
+EXTRA_DIST = ape-run_regression_test.pl ape-run_testsuite.in
+
+
+# If the testsuite should be skipped, e. g. in make distcheck,
+# set the environment variable SKIP_CHECK to some value.
+check:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g all; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-basic:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g basic; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-ae:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g ae; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-ps:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g ps; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-libxc:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g libxc; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-update-ref:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -u -g all; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-update-tol:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -t -g all; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+clean-local:
+ -rm -rf /tmp/ape.*
+
+.PHONY: check check-basic check-ae check-ps check-libxc clean clean-local
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
new file mode 100644
index 0000000..580bd05
--- /dev/null
+++ b/testsuite/Makefile.in
@@ -0,0 +1,715 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# This testsuite is based on the one of the Octopus code (www.tddft.org/programs/octopus)
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = testsuite
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/ape-run_testsuite.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES = ape-run_testsuite
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(bindir)"
+SCRIPTS = $(bin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = basic all_electron pseudopotentials libxc
+bin_SCRIPTS = ape-run_regression_test.pl ape-run_testsuite
+EXTRA_DIST = ape-run_regression_test.pl ape-run_testsuite.in
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu testsuite/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+ape-run_testsuite: $(top_builddir)/config.status $(srcdir)/ape-run_testsuite.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-local mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-local \
+ cscopelist cscopelist-recursive ctags ctags-recursive \
+ distclean distclean-generic distclean-tags distdir dvi dvi-am \
+ html html-am info info-am install install-am \
+ install-binSCRIPTS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am uninstall-binSCRIPTS
+
+
+# If the testsuite should be skipped, e. g. in make distcheck,
+# set the environment variable SKIP_CHECK to some value.
+check:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g all; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-basic:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g basic; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-ae:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g ae; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-ps:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g ps; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-libxc:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -g libxc; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-update-ref:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -u -g all; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+check-update-tol:
+ @if test "x$(SKIP_CHECK)" == "x"; then \
+ base=`basename "$(top_builddir)/share"` && \
+ dir=`dirname "$(top_builddir)/share"` && \
+ sharedir="`(cd \"$$dir\" 2> /dev/null && pwd || echo \"$$dir\")`/$$base" && \
+ APE_SHARE=$$sharedir ./ape-run_testsuite -c -d $(srcdir) -l -t -g all; \
+ else \
+ echo "Skipping checks"; \
+ fi
+
+clean-local:
+ -rm -rf /tmp/ape.*
+
+.PHONY: check check-basic check-ae check-ps check-libxc clean clean-local
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/testsuite/all_electron/01-non_rel.01-no_spin.inp b/testsuite/all_electron/01-non_rel.01-no_spin.inp
new file mode 100644
index 0000000..f98c86e
--- /dev/null
+++ b/testsuite/all_electron/01-non_rel.01-no_spin.inp
@@ -0,0 +1,14 @@
+# $Id: 01-non_rel.01-no_spin.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 5
+
+%Orbitals
+"He"
+ 2 | 0 | 2
+ 2 | 1 | 1
+%
+
+XCFunctional = lda_x + lda_c_vwn
diff --git a/testsuite/all_electron/01-non_rel.02-spin.inp b/testsuite/all_electron/01-non_rel.02-spin.inp
new file mode 100644
index 0000000..c7c9af4
--- /dev/null
+++ b/testsuite/all_electron/01-non_rel.02-spin.inp
@@ -0,0 +1,15 @@
+# $Id: 01-non_rel.02-spin.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 5
+SpinMode = polarized
+
+%Orbitals
+"He"
+ 2 | 0 | 1 | 1
+ 2 | 1 | 1 | 0
+%
+
+XCFunctional = lda_x + lda_c_vwn
diff --git a/testsuite/all_electron/01-non_rel.test b/testsuite/all_electron/01-non_rel.test
new file mode 100644
index 0000000..9442c27
--- /dev/null
+++ b/testsuite/all_electron/01-non_rel.test
@@ -0,0 +1,91 @@
+# $Id: 01-non_rel.test 758 2012-10-31 13:35:05Z micael $
+
+Test : All-electron: non-relativistic B
+TestGroups : all; ae
+Enabled : Yes
+
+### The energies and eigenvalues are from the NIST database ###
+
+
+Input: 01-non_rel.01-no_spin.inp
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -24.344198; 8e-5
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 24.161047; 8e-5
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 11.503002; 3e-6
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -56.484587; 7e-6
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -3.523660; 1e-6
+
+#Eigenvalues
+match ; 1s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 2) ; -6.564347; 2e-5
+match ; 2s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 3) ; -0.344701; 2e-5
+match ; 2p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 4) ; -0.136603; 2e-5
+
+#Wavefunctions
+match ; 1s Wavefunction ; LINE(ae/wf-1s, 176, 20) ; 1.94304896E+01; 2e-7
+match ; 1s Wavefunction Derivative ; LINE(ae/wf-1s, 176, 39) ; -9.69497419E+01; 8e-7
+match ; 2s Wavefunction ; LINE(ae/wf-2s, 176, 20) ; -4.27631705E+00; 3e-7
+match ; 2s Wavefunction Derivative ; LINE(ae/wf-2s, 176, 39) ; 2.15550156E+01; 2e-6
+match ; 2p Wavefunction ; LINE(ae/wf-2p, 176, 20) ; 4.04531101E-02; 6e-9
+match ; 2p Wavefunction Derivative ; LINE(ae/wf-2p, 176, 39) ; 3.29014721E+00; 5e-7
+
+#Potentials
+match ; v_hxc ; LINE(ae/v_hxc, 176, 20) ; 7.24058136E+00; 2e-7
+match ; v_c ; LINE(ae/v_c, 176, 20) ; -1.18065430E-01; 1e-9
+match ; v_x ; LINE(ae/v_x, 176, 20) ; -3.91832694E+00; 3e-8
+
+#Densities
+match ; density ; LINE(ae/density, 176, 20) ; 6.29985608E+01; 2e-6
+match ; grad. density ; LINE(ae/density, 176, 38) ; -6.28945475E+02; 2e-5
+match ; lapl. density ; LINE(ae/density, 176, 56) ; -9.90491703E+04; 3e-3
+match ; tau ; LINE(ae/tau, 176, 20) ; 1.57966832E+03; 3e-5
+
+
+Input: 01-non_rel.02-spin.inp
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -24.353614; 5e-5
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 24.172451; 6e-5
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 11.528234; 2e-5
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -56.516740; 3e-6
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -3.537559; 3e-6
+
+#Eigenvalues
+match ; 1s_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 2) ; -6.563384; 1e-5
+match ; 1s_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 3) ; -6.550876; 1e-5
+match ; 2s_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 4) ; -0.360441; 2e-5
+match ; 2s_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 5) ; -0.318624; 1e-5
+match ; 2p_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 6) ; -0.150853; 2e-5
+match ; 2p_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 7) ; -0.113184; 1e-5
+
+#Wavefunctions
+match ; 1s_up Wavefunction ; LINE(ae/wf-1s_up, 176, 20) ; 1.94436039E+01; 6e-07
+match ; 1s_up Wavefunction Derivative ; LINE(ae/wf-1s_up, 176, 39) ; -9.70162547E+01; 4e-06
+match ; 1s_dn Wavefunction ; LINE(ae/wf-1s_dn, 176, 20) ; 1.94179629E+01; 3e-07
+match ; 1s_dn Wavefunction Derivative ; LINE(ae/wf-1s_dn, 176, 39) ; -9.68862938E+01; 10e-07
+match ; 2s_up Wavefunction ; LINE(ae/wf-2s_up, 176, 20) ; -4.20693839E+00; 2e-6
+match ; 2s_up Wavefunction Derivative ; LINE(ae/wf-2s_up, 176, 39) ; 2.12059768E+01; 8e-6
+match ; 2s_dn Wavefunction ; LINE(ae/wf-2s_dn, 176, 20) ; -4.31647214E+00; 3e-7
+match ; 2s_dn Wavefunction Derivative ; LINE(ae/wf-2s_dn, 176, 39) ; 2.17566183E+01; 2e-6
+match ; 2p_up Wavefunction ; LINE(ae/wf-2p_up, 176, 20) ; 3.90863488E-02; 3e-8
+match ; 2p_up Wavefunction Derivative ; LINE(ae/wf-2p_up, 176, 39) ; 3.17898213E+00; 2e-6
+match ; 2p_dn Wavefunction ; LINE(ae/wf-2p_dn, 176, 20) ; 4.11377506E-02; 4e-09
+match ; 2p_dn Wavefunction Derivative ; LINE(ae/wf-2p_dn, 176, 39) ; 3.34583484E+00; 4e-07
+
+#Potentials
+match ; v_hxc_up ; LINE(ae/v_hxc_up, 176, 20) ; 7.24728783E+00; 8e-8
+match ; v_hxc_dn ; LINE(ae/v_hxc_dn, 176, 20) ; 7.24747908E+00; 8e-08
+match ; v_c_up ; LINE(ae/v_c_up, 176, 20) ; -1.18057464E-01; 1e-9
+match ; v_c_dn ; LINE(ae/v_c_dn, 176, 20) ; -1.18068048E-01; 1e-9
+match ; v_x_up ; LINE(ae/v_x_up, 176, 20) ; -3.91806437E+00; 6e-08
+match ; v_x_dn ; LINE(ae/v_x_dn, 176, 20) ; -3.91786254E+00; 3e-08
+
+#Densities
+match ; density_up ; LINE(ae/density_up, 176, 20) ; 3.14929486E+01; 2e-06
+match ; density_dn ; LINE(ae/density_dn, 176, 20) ; 3.14880819E+01; 6e-07
+match ; grad. density_up ; LINE(ae/density_up, 176, 38) ; -3.14419800E+02; 10e-06
+match ; grad. density_dn ; LINE(ae/density_dn, 176, 38) ; -3.14348306E+02; 6e-06
+match ; lapl. density_up ; LINE(ae/density_up, 176, 56) ; -4.95170904E+04; 2e-03
+match ; lapl. density_dn ; LINE(ae/density_dn, 176, 56) ; -4.95039635E+04; 9e-04
+match ; tau_up ; LINE(ae/tau_up, 176, 20) ; 7.88323189E+02; 3e-05
+match ; tau_dn ; LINE(ae/tau_dn, 176, 20) ; 7.90990629E+02; 2e-05
diff --git a/testsuite/all_electron/02-scalar_rel.01-no_spin.inp b/testsuite/all_electron/02-scalar_rel.01-no_spin.inp
new file mode 100644
index 0000000..9976dea
--- /dev/null
+++ b/testsuite/all_electron/02-scalar_rel.01-no_spin.inp
@@ -0,0 +1,21 @@
+# $Id: 02-scalar_rel.01-no_spin.inp 690 2012-03-08 19:03:02Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+WaveEquation = scalar_rel
+NuclearCharge = 24
+
+%Orbitals
+"Ar"
+ 4 | 0 | 1 | 0
+ 3 | 2 | 5 | 0
+%
+
+XCFunctional = lda_x + lda_c_vwn
+XCCorrections = rel_x
+
+ConvAbsDens = 1e-07
+
+EigenSolverTolerance = 1e-7
+ODEIntTolerance = 1e-14
diff --git a/testsuite/all_electron/02-scalar_rel.02-spin.inp b/testsuite/all_electron/02-scalar_rel.02-spin.inp
new file mode 100644
index 0000000..3de03c9
--- /dev/null
+++ b/testsuite/all_electron/02-scalar_rel.02-spin.inp
@@ -0,0 +1,22 @@
+# $Id: 02-scalar_rel.02-spin.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+WaveEquation = scalar_rel
+SpinMode = polarized
+NuclearCharge = 24
+
+%Orbitals
+"Ar"
+ 4 | 0 | 1 | 0
+ 3 | 2 | 5 | 0
+%
+
+XCFunctional = lda_x + lda_c_vwn
+XCCorrections = rel_x
+
+ConvAbsDens = 1e-07
+
+EigenSolverTolerance = 1e-8
+ODEIntTolerance = 1e-14
diff --git a/testsuite/all_electron/02-scalar_rel.test b/testsuite/all_electron/02-scalar_rel.test
new file mode 100644
index 0000000..67f46b6
--- /dev/null
+++ b/testsuite/all_electron/02-scalar_rel.test
@@ -0,0 +1,129 @@
+# $Id: 02-scalar_rel.test 768 2013-01-11 16:53:11Z micael $
+
+Test : All-electron: scalar-relativistic Cr
+Programs : ape
+TestGroups : all; ae
+Enabled : Yes
+
+
+Input: 02-scalar_rel.01-no_spin.inp
+
+### The energies and eigenvalues are from the NIST database ###
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -1047.723197; 3e-4
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 1056.270005; 9e-4
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 443.512785; 3e-5
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -2501.774322; 1e-3
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -45.731664; 5e-6
+
+#Eigenvalues
+match ; 1s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 2) ; -215.070201; 9e-5
+match ; 2s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 3) ; -24.411958; 1e-5
+match ; 2p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 4) ; -20.570871; 1e-5
+match ; 3s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 5) ; -2.697883; 1e-5
+match ; 3p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 6) ; -1.664941; 1e-5
+match ; 4s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 7) ; -0.153632; 1e-5
+match ; 3d Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 8) ; -0.115300; 1e-5
+
+#Wavefunctions
+match ; 1s Wavefunction ; LINE(ae/wf-1s, 467, 20) ; 5.86275363E-01; 9e-08
+match ; 1s Wavefunction Derivative ; LINE(ae/wf-1s, 467, 39) ; -1.32166263E+01; 2e-6
+match ; 2s Wavefunction ; LINE(ae/wf-2s, 467, 20) ; 7.48944157E+00; 1e-8
+match ; 2s Wavefunction Derivative ; LINE(ae/wf-2s, 467, 39) ; -3.38077420E+01; 3e-07
+match ; 2p Wavefunction ; LINE(ae/wf-2p, 467, 20) ; 6.91986978E+00; 1e-8
+match ; 2p Wavefunction Derivative ; LINE(ae/wf-2p, 467, 39) ; -4.07215904E+01; 2e-07
+match ; 3s Wavefunction ; LINE(ae/wf-3s, 467, 20) ; -1.98183032E+00; 1e-8
+match ; 3s Wavefunction Derivative ; LINE(ae/wf-3s, 467, 39) ; 2.14417092E+01; 2e-07
+match ; 3p Wavefunction ; LINE(ae/wf-3p, 467, 20) ; -1.25191593E+00; 1e-8
+match ; 3p Wavefunction Derivative ; LINE(ae/wf-3p, 467, 39) ; 2.05890416E+01; 2e-07
+match ; 4s Wavefunction ; LINE(ae/wf-4s, 467, 20) ; 4.65203929E-01; 3e-08
+match ; 4s Wavefunction Derivative ; LINE(ae/wf-4s, 467, 39) ; -5.49499817E+00; 3e-07
+match ; 3d Wavefunction ; LINE(ae/wf-3d, 467, 20) ; 1.15542665E+00; 1e-8
+match ; 3d Wavefunction Derivative ; LINE(ae/wf-3d, 467, 39) ; 2.60249979E+00; 1e-8
+
+#Vhxc
+match ; v_hxc ; LINE(ae/v_hxc, 467, 20) ; 4.70287804E+01; 1e-7
+match ; v_c ; LINE(ae/v_c, 467, 20) ; -1.12103447E-01; 1e-9
+match ; v_x ; LINE(ae/v_x, 467, 20) ; -3.16601325E+00; 1e-8
+
+#Density
+match ; density ; LINE(ae/density, 467, 20) ; 3.37670311E+01; 1e-7
+match ; grad. density ; LINE(ae/density, 467, 38) ; -3.88304871E+02; 1e-6
+match ; lapl. density ; LINE(ae/density, 467, 56) ; 6.65279413E+02; 9e-04
+match ; tau ; LINE(ae/tau, 467, 20) ; 2.15689496E+03; 2e-5
+
+
+Input: 02-scalar_rel.02-spin.inp
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -1047.910725; 3e-06
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 1056.485881; 4e-6
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 444.530867; 1e-6
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -2502.954324; 4e-6
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -45.973148; 1e-6
+
+#Eigenvalues
+match ; 1s_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 2) ; -215.02112; 1e-5
+match ; 1s_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 3) ; -215.02010; 1e-5
+match ; 2s_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 4) ; -24.39143; 1e-5
+match ; 2s_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 5) ; -24.32809; 1e-5
+match ; 2p_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 6) ; -20.54367; 1e-5
+match ; 2p_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 7) ; -20.49446; 1e-5
+match ; 3s_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 8) ; -2.72684; 1e-5
+match ; 3s_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 9) ; -2.57191; 1e-5
+match ; 3p_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 10) ; -1.69381; 1e-5
+match ; 3p_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 11) ; -1.54106; 1e-5
+match ; 4s_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 12) ; -0.17004; 1e-5
+match ; 3d_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 13) ; -0.14325; 1e-5
+match ; 4s_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 14) ; -0.09606; 1e-5
+match ; 3d_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 15) ; -0.00886; 1e-5
+
+#Wavefunctions
+match ; 1s_up Wavefunction ; LINE(ae/wf-1s_up, 467, 20) ; 5.86218305E-01; 3e-08
+match ; 1s_up Wavefunction Derivative ; LINE(ae/wf-1s_up, 467, 39) ; -1.32160886E+01; 6e-07
+match ; 1s_dn Wavefunction ; LINE(ae/wf-1s_dn, 467, 20) ; 5.86312693E-01; 3e-07
+match ; 1s_dn Wavefunction Derivative ; LINE(ae/wf-1s_dn, 467, 39) ; -1.32168694E+01; 6e-06
+match ; 2s_up Wavefunction ; LINE(ae/wf-2s_up, 467, 20) ; 7.49315618E+00; 1e-8
+match ; 2s_up Wavefunction Derivative ; LINE(ae/wf-2s_up, 467, 39) ; -3.38673901E+01; 3e-07
+match ; 2s_dn Wavefunction ; LINE(ae/wf-2s_dn, 467, 20) ; 7.48603131E+00; 3e-08
+match ; 2s_dn Wavefunction Derivative ; LINE(ae/wf-2s_dn, 467, 39) ; -3.37533220E+01; 4e-07
+match ; 2p_up Wavefunction ; LINE(ae/wf-2p_up, 467, 20) ; 6.92200706E+00; 1e-8
+match ; 2p_up Wavefunction Derivative ; LINE(ae/wf-2p_up, 467, 39) ; -4.07819914E+01; 3e-07
+match ; 2p_dn Wavefunction ; LINE(ae/wf-2p_dn, 467, 20) ; 6.91787680E+00; 2e-08
+match ; 2p_dn Wavefunction Derivative ; LINE(ae/wf-2p_dn, 467, 39) ; -4.06664718E+01; 3e-07
+match ; 3s_up Wavefunction ; LINE(ae/wf-3s_up, 467, 20) ; -1.97286736E+00; 4e-08
+match ; 3s_up Wavefunction Derivative ; LINE(ae/wf-3s_up, 467, 39) ; 2.13955157E+01; 5e-07
+match ; 3s_dn Wavefunction ; LINE(ae/wf-3s_dn, 467, 20) ; -1.98582837E+00; 4e-08
+match ; 3s_dn Wavefunction Derivative ; LINE(ae/wf-3s_dn, 467, 39) ; 2.14303031E+01; 5e-07
+match ; 3p_up Wavefunction ; LINE(ae/wf-3p_up, 467, 20) ; -1.24216840E+00; 3e-08
+match ; 3p_up Wavefunction Derivative ; LINE(ae/wf-3p_up, 467, 39) ; 2.05065989E+01; 3e-07
+match ; 3p_dn Wavefunction ; LINE(ae/wf-3p_dn, 467, 20) ; -1.25696180E+00; 4e-08
+match ; 3p_dn Wavefunction Derivative ; LINE(ae/wf-3p_dn, 467, 39) ; 2.05863438E+01; 8e-07
+match ; 4s_up Wavefunction ; LINE(ae/wf-4s_up, 467, 20) ; 4.03975685E-01; 5e-08
+match ; 4s_up Wavefunction Derivative ; LINE(ae/wf-4s_up, 467, 39) ; -4.77178755E+00; 6e-07
+match ; 4s_dn Wavefunction ; LINE(ae/wf-4s_dn, 467, 20) ; 4.83203115E-01; 2e-08
+match ; 4s_dn Wavefunction Derivative ; LINE(ae/wf-4s_dn, 467, 39) ; -5.69570754E+00; 3e-07
+match ; 3d_up Wavefunction ; LINE(ae/wf-3d_up, 467, 20) ; 1.04863409E+00; 6e-07
+match ; 3d_up Wavefunction Derivative ; LINE(ae/wf-3d_up, 467, 39) ; 2.35655933E+00; 2e-06
+match ; 3d_dn Wavefunction ; LINE(ae/wf-3d_dn, 467, 20) ; 1.16303858E+00; 2e-08
+match ; 3d_dn Wavefunction Derivative ; LINE(ae/wf-3d_dn, 467, 39) ; 2.62884477E+00; 4e-08
+
+#Potentials
+match ; v_hxc_up ; LINE(ae/v_hxc_up, 467, 20) ; 4.70966754E+01; 2e-7
+match ; v_hxc_dn ; LINE(ae/v_hxc_dn, 467, 20) ; 4.70645022E+01; 2e-07
+match ; v_c_up ; LINE(ae/v_c_up, 467, 20) ; -1.13168892E-01; 1e-9
+match ; v_c_dn ; LINE(ae/v_c_dn, 467, 20) ; -1.11056470E-01; 1e-9
+match ; v_x_up ; LINE(ae/v_x_up, 467, 20) ; -3.14892840E+00; 1e-8
+match ; v_x_dn ; LINE(ae/v_x_dn, 467, 20) ; -3.18321404E+00; 1e-8
+
+#Densities
+match ; density_up ; LINE(ae/density_up, 467, 20) ; 1.66121743E+01; 1e-7
+match ; density_dn ; LINE(ae/density_dn, 467, 38) ; -1.92904570E+02; 2e-06
+match ; grad. density_up ; LINE(ae/density_up, 467, 56) ; 3.30779091E+02; 4e-04
+match ; grad. density_dn ; LINE(ae/density_dn, 467, 20) ; 1.71597388E+01; 2e-07
+match ; lapl. density_up ; LINE(ae/density_up, 467, 38) ; -1.95287782E+02; 2e-06
+match ; lapl. density_dn ; LINE(ae/density_dn, 467, 56) ; 3.33590526E+02; 3e-4
+match ; tau_up ; LINE(ae/tau_up, 467, 20) ; 1.05202180E+03; 1e-5
+match ; tau_dn ; LINE(ae/tau_dn, 467, 20) ; 1.10473948E+03; 1e-5
+
diff --git a/testsuite/all_electron/03-rel.01-no_spin.inp b/testsuite/all_electron/03-rel.01-no_spin.inp
new file mode 100644
index 0000000..0ed9d5f
--- /dev/null
+++ b/testsuite/all_electron/03-rel.01-no_spin.inp
@@ -0,0 +1,19 @@
+# $Id: 03-rel.01-no_spin.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+WaveEquation = dirac
+NuclearCharge = 18
+
+%Orbitals
+"Ar"
+%
+
+XCFunctional = lda_x + lda_c_vwn
+XCCorrections = rel_x
+
+ConvAbsDens = 1e-07
+
+EigenSolverTolerance = 1e-7
+ODEIntTolerance = 1e-14
diff --git a/testsuite/all_electron/03-rel.02-spin.inp b/testsuite/all_electron/03-rel.02-spin.inp
new file mode 100644
index 0000000..8415d8b
--- /dev/null
+++ b/testsuite/all_electron/03-rel.02-spin.inp
@@ -0,0 +1,25 @@
+# $Id: 03-rel.02-spin.inp 690 2012-03-08 19:03:02Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+WaveEquation = dirac
+SpinMode = polarized
+NuclearCharge = 6
+
+%Orbitals
+"He"
+ 2 | 0 | 2
+ 2 | 1 | -3/2 | 2/3
+ 2 | 1 | -1/2 | 2/3 | 0.0
+ 2 | 1 | 1/2 | 2/3 | 0.0
+ 2 | 1 | 3/2 | 0.0
+%
+
+XCFunctional = lda_x + lda_c_vwn
+XCCorrections = rel_x
+
+ConvAbsDens = 1e-07
+
+EigenSolverTolerance = 1e-7
+ODEIntTolerance = 1e-14
diff --git a/testsuite/all_electron/03-rel.test b/testsuite/all_electron/03-rel.test
new file mode 100644
index 0000000..305d39f
--- /dev/null
+++ b/testsuite/all_electron/03-rel.test
@@ -0,0 +1,128 @@
+# $Id: 03-rel.test 768 2013-01-11 16:53:11Z micael $
+
+Test : All-electron: fully-relativistic Ar and C
+Programs : ape
+TestGroups : all; ae
+Enabled : Yes
+
+
+Input: 03-rel.01-no_spin.inp
+
+### The energies and eigenvalues are from the NIST database. ###
+### Note that there is a quite large differences in the kinetic and ###
+### electron-nucleous interactions, although they seem to cancel ###
+### exactly. This should be further investigated. ###
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -527.519049; 3e-06
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 529.722274; 2e-5
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 232.084684; 1e-6
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -1260.276935; 3e-05
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -29.049073; 2e-6
+
+#Eigenvalues
+match ; 1s0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 2) ; -114.07708; 1e-5
+match ; 2s0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 3) ; -10.86093; 1e-5
+match ; 2p0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 4) ; -8.49619; 1e-5
+match ; 2p1.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 5) ; -8.41450; 1e-5
+match ; 3s0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 6) ; -0.89060; 1e-5
+match ; 3p0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 7) ; -0.38612; 1e-5
+match ; 3p1.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 27, 8) ; -0.37954; 1e-5
+
+#Wavefunctions
+match ; 1s0.5 Wavefunction Large ; LINE(ae/wf-1s0.5, 498, 20) ; 1.63872322E-01; 2e-08
+match ; 1s0.5 Wavefunction Small ; LINE(ae/wf-1s0.5, 498, 39) ; -9.89511005E-03; 9e-10
+match ; 2s0.5 Wavefunction Large ; LINE(ae/wf-2s0.5, 498, 20) ; 3.92655658E+00; 1e-8
+match ; 2s0.5 Wavefunction Small ; LINE(ae/wf-2s0.5, 498, 39) ; -5.26300661E-02; 3e-10
+match ; 2p0.5 Wavefunction Large ; LINE(ae/wf-2p0.5, 498, 20) ; 3.53232238E+00; 1e-8
+match ; 2p0.5 Wavefunction Small ; LINE(ae/wf-2p0.5, 498, 39) ; 1.06066345E-02; 2e-10
+match ; 2p1.5 Wavefunction Large ; LINE(ae/wf-2p1.5, 498, 20) ; 3.53826241E+00; 1e-8
+match ; 2p1.5 Wavefunction Small ; LINE(ae/wf-2p1.5, 498, 39) ; -8.62770554E-02; 4e-10
+match ; 3s0.5 Wavefunction Large ; LINE(ae/wf-3s0.5, 498, 20) ; -7.92703102E-01; 2e-8
+match ; 3s0.5 Wavefunction Small ; LINE(ae/wf-3s0.5, 498, 39) ; 2.79345168E-02; 9e-10
+match ; 3p0.5 Wavefunction Large ; LINE(ae/wf-3p0.5, 498, 20) ; -4.57314561E-01; 2e-08
+match ; 3p0.5 Wavefunction Small ; LINE(ae/wf-3p0.5, 498, 39) ; 1.36953871E-02; 4e-10
+match ; 3p1.5 Wavefunction Large ; LINE(ae/wf-3p1.5, 498, 20) ; -4.67152811E-01; 2e-08
+match ; 3p1.5 Wavefunction Small ; LINE(ae/wf-3p1.5, 498, 39) ; 2.62059290E-02; 9e-10
+
+#Potentials
+match ; v_hxc ; LINE(ae/v_hxc, 467, 20) ; 3.58050669E+01; 2e-07
+match ; v_c ; LINE(ae/v_c, 467, 20) ; -1.11053597E-01; 1e-9
+match ; v_x ; LINE(ae/v_x, 467, 20) ; -3.05264934E+00; 1e-8
+
+#Densities
+match ; density ; LINE(ae/density, 467, 20) ; 3.02339024E+01; 1e-7
+match ; grad. density ; LINE(ae/density, 467, 38) ; -1.75251847E+02; 2e-6
+match ; lapl. density ; LINE(ae/density, 467, 56) ; -6.29594047E+02; 5e-04
+match ; tau ; LINE(ae/tau, 467, 20) ; 1.70168586E+03; 4e-05
+
+
+
+Input: 03-rel.02-spin.inp
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -37.478439; 1e-6
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 37.267909; 1e-6
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 17.727092; 1e-6
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -87.690830; 1e-6
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -4.782610; 1e-6
+
+#Eigenvalues
+match ; 1s-0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 2) ; -9.93880; 1e-5
+match ; 1s+0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 3) ; -9.90408; 1e-5
+match ; 2s-0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 4) ; -0.53148; 1e-5
+match ; 2s+0.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 5) ; -0.43528; 1e-5
+match ; 2p+0.5_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 6) ; -0.22758; 1e-5
+match ; 2p-0.5_up Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 7) ; -0.22746; 1e-5
+match ; 2p-1.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 8) ; -0.22735; 1e-5
+match ; 2p-0.5_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 9) ; -0.13931; 1e-5
+match ; 2p+0.5_dn Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 10) ; -0.13922; 1e-5
+match ; 2p+1.5 Eigenvalue ; GREP(ae/info, 'Eigenvalues', 35, 11) ; -0.13912; 1e-5
+
+#Wavefunctions
+match ; 1s-0.5 Wavefunction Large ; LINE(ae/wf-1s-0.5, 293, 20) ; 1.02141756E-01; 1e-9
+match ; 1s-0.5 Wavefunction Small ; LINE(ae/wf-1s-0.5, 293, 39) ; -1.88778219E-03; 3e-11
+match ; 1s+0.5 Wavefunction Large ; LINE(ae/wf-1s+0.5, 293, 20) ; 1.00171018E-01; 4e-09
+match ; 1s+0.5 Wavefunction Small ; LINE(ae/wf-1s+0.5, 293, 39) ; -1.85943432E-03; 9e-11
+match ; 2s-0.5 Wavefunction Large ; LINE(ae/wf-2s-0.5, 293, 20) ; 7.69165227E-01; 2e-08
+match ; 2s-0.5 Wavefunction Small ; LINE(ae/wf-2s-0.5, 293, 39) ; -1.65499618E-03; 5e-11
+match ; 2s+0.5 Wavefunction Large ; LINE(ae/wf-2s+0.5, 293, 20) ; 7.44609140E-01; 3e-08
+match ; 2s+0.5 Wavefunction Small ; LINE(ae/wf-2s+0.5, 293, 39) ; -1.52311605E-03; 3e-10
+match ; 2p+0.5_up Wavefunction Large + ; LINE(ae/wf-2p+0.5_up, 293, 20) ; 3.96075154E-01; 8e-09
+match ; 2p+0.5_up Wavefunction Small + ; LINE(ae/wf-2p+0.5_up, 293, 38) ; -2.55261738E-03; 7e-11
+match ; 2p+0.5_up Wavefunction Large - ; LINE(ae/wf-2p+0.5_up, 293, 56) ; 5.62263102E-01; 10e-09
+match ; 2p+0.5_up Wavefunction Large - ; LINE(ae/wf-2p+0.5_up, 293, 74) ; 2.31214537E-03; 7e-11
+match ; 2p-0.5_up Wavefunction Large + ; LINE(ae/wf-2p-0.5_up, 293, 20) ; 5.60766162E-01; 2e-08
+match ; 2p-0.5_up Wavefunction Small + ; LINE(ae/wf-2p-0.5_up, 293, 38) ; -3.61386572E-03; 2e-10
+match ; 2p-0.5_up Wavefunction Large - ; LINE(ae/wf-2p-0.5_up, 293, 56) ; 3.98013980E-01; 8e-09
+match ; 2p-0.5_up Wavefunction Large - ; LINE(ae/wf-2p-0.5_up, 293, 74) ; 1.63683263E-03; 6e-11
+match ; 2p-1.5 Wavefunction Large ; LINE(ae/wf-2p-1.5, 293, 20) ; 6.87557111E-01; 2e-08
+match ; 2p-1.5 Wavefunction Small ; LINE(ae/wf-2p-1.5, 293, 39) ; -4.43079211E-03; 2e-10
+match ; 2p-0.5_dn Wavefunction Large + ; LINE(ae/wf-2p-0.5_dn, 293, 20) ; -3.67940416E-01; 4e-08
+match ; 2p-0.5_dn Wavefunction Small + ; LINE(ae/wf-2p-0.5_dn, 293, 38) ; 2.30458461E-03; 4e-10
+match ; 2p-0.5_dn Wavefunction Large - ; LINE(ae/wf-2p-0.5_dn, 293, 56) ; 5.18653857E-01; 5e-08
+match ; 2p-0.5_dn Wavefunction Large - ; LINE(ae/wf-2p-0.5_dn, 293, 74) ; 2.22661325E-03; 2e-10
+match ; 2p+0.5_up Wavefunction Large + ; LINE(ae/wf-2p+0.5_dn, 293, 20) ; -5.19680126E-01; 5e-08
+match ; 2p+0.5_up Wavefunction Small + ; LINE(ae/wf-2p+0.5_dn, 293, 38) ; 3.25492350E-03; 5e-10
+match ; 2p+0.5_up Wavefunction Large - ; LINE(ae/wf-2p+0.5_dn, 293, 56) ; 3.66262933E-01; 4e-08
+match ; 2p+0.5_up Wavefunction Large - ; LINE(ae/wf-2p+0.5_dn, 293, 74) ; 1.57243544E-03; 9e-11
+match ; 2p+1.5 Wavefunction Large ; LINE(ae/wf-2p+1.5, 293, 20) ; 6.35646951E-01; 6e-08
+match ; 2p+1.5 Wavefunction Small ; LINE(ae/wf-2p+1.5, 293, 39) ; -3.98116259E-03; 6e-10
+
+#Potentials
+match ; v_hxc_up ; LINE(ae/v_hxc_up, 293, 20) ; 4.09121694E+00; 2e-08
+match ; v_hxc_dn ; LINE(ae/v_hxc_dn, 293, 20) ; 3.95308805E+00; 1e-8
+match ; v_c_up ; LINE(ae/v_c_up, 293, 20) ; -8.80992281E-02; 4e-09
+match ; v_c_dn ; LINE(ae/v_c_dn, 293, 20) ; -4.99811708E-02; 2e-09
+match ; v_x_up ; LINE(ae/v_x_up, 293, 20) ; -4.40970962E-01; 10e-09
+match ; v_x_dn ; LINE(ae/v_x_dn, 293, 20) ; -6.17217917E-01; 8e-09
+
+#Densities
+match ; density_up ; LINE(ae/density_up, 293, 20) ; 4.49211202E-02; 4e-09
+match ; density_dn ; LINE(ae/density_dn, 293, 20) ; 1.23171800E-01; 4e-09
+match ; grad. density_up ; LINE(ae/density_up, 293, 38) ; -5.75996277E-02; 10e-09
+match ; grad. density_dn ; LINE(ae/density_dn, 293, 38) ; -1.84636585E-01; 8e-09
+match ; lapl. density_up ; LINE(ae/density_up, 293, 56) ; -1.27429188E-01; 2e-08
+match ; lapl. density_dn ; LINE(ae/density_dn, 293, 56) ; -2.50360863E-01; 4e-08
+match ; tau_up ; LINE(ae/tau_up, 293, 20) ; ; 1e-8
+match ; tau_dn ; LINE(ae/tau_dn, 293, 20) ; ; 1e-8
diff --git a/testsuite/all_electron/04-unbound.01-Li.inp b/testsuite/all_electron/04-unbound.01-Li.inp
new file mode 100644
index 0000000..d1cd3ac
--- /dev/null
+++ b/testsuite/all_electron/04-unbound.01-Li.inp
@@ -0,0 +1,20 @@
+# $Id: 04-unbound.01-Li.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 3
+
+%Orbitals
+"He"
+ 2 | 0 | 1
+ 2 | 1 | 0
+ 3 | 0 | 0
+ 3 | 1 | 0
+ 3 | 2 | 0
+ 4 | 0 | 0
+ 4 | 1 | 0
+ 4 | 2 | 0
+%
+
+XCFunctional = lda_x + lda_c_vwn
diff --git a/testsuite/all_electron/04-unbound.test b/testsuite/all_electron/04-unbound.test
new file mode 100644
index 0000000..2804255
--- /dev/null
+++ b/testsuite/all_electron/04-unbound.test
@@ -0,0 +1,15 @@
+# $Id: 04-unbound.test 626 2011-11-04 10:09:54Z tiago $
+
+Test : All-electron: unbound states
+TestGroups : all; ae
+Enabled : Yes
+
+
+Input: 04-unbound.01-Li.inp
+
+#Eigenvalues
+match ; 3p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 6) ; 0.00000 ; 1e-8
+match ; 3d Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 7) ; 0.00000 ; 1e-8
+match ; 4s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 8) ; 0.00000 ; 1e-8
+match ; 4p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 9) ; 0.00000 ; 1e-8
+match ; 4d Eigenvalue ; GREP(ae/info, 'Eigenvalues', 32, 10) ; 0.00000 ; 1e-8
diff --git a/testsuite/all_electron/05-charged.01-C+.inp b/testsuite/all_electron/05-charged.01-C+.inp
new file mode 100644
index 0000000..13e2f01
--- /dev/null
+++ b/testsuite/all_electron/05-charged.01-C+.inp
@@ -0,0 +1,14 @@
+# $Id: 05-charged.01-C+.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 6
+
+%Orbitals
+"He"
+ 2 | 0 | 2
+ 2 | 1 | 1
+%
+
+XCFunctional = lda_x + lda_c_vwn
diff --git a/testsuite/all_electron/05-charged.02-C-.inp b/testsuite/all_electron/05-charged.02-C-.inp
new file mode 100644
index 0000000..e2ff442
--- /dev/null
+++ b/testsuite/all_electron/05-charged.02-C-.inp
@@ -0,0 +1,14 @@
+# $Id: 05-charged.02-C-.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 6
+
+%Orbitals
+"He"
+ 2 | 0 | 2
+ 2 | 1 | 3
+%
+
+XCFunctional = gga_x_lb + lda_c_pw
diff --git a/testsuite/all_electron/05-charged.test b/testsuite/all_electron/05-charged.test
new file mode 100644
index 0000000..8786d92
--- /dev/null
+++ b/testsuite/all_electron/05-charged.test
@@ -0,0 +1,37 @@
+# $Id: 05-charged.test 758 2012-10-31 13:35:05Z micael $
+
+Test : All-electron: charged systems
+TestGroups : all; ae
+Enabled : Yes
+
+
+Input: 05-charged.01-C+.inp
+
+### The energies and eigenvalues are from the NIST database ###
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -37.021849; 2e-5
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 36.812438; 3e-05
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 14.910519; 8e-6
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -84.338374; 6e-6
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -4.406410; 2e-6
+
+#Eigenvalues
+match ; 1s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 28, 2) ; -10.499920; 1e-5
+match ; 2s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 28, 3) ; -0.940530; 2e-5
+match ; 2p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 28, 4) ; -0.629402; 1e-5
+
+
+Input: 05-charged.02-C-.inp
+
+#Energies
+match ; Etot ; GREP(ae/info, 'Energies', 40, 1) ; -38.377738; 3e-06
+match ; Ekin ; GREP(ae/info, 'Energies', 40, 2) ; 38.119913; 5e-06
+match ; Ecoul ; GREP(ae/info, 'Energies', 40, 3) ; 20.277437; 1e-6
+match ; Eenuc ; GREP(ae/info, 'Energies', 40, 4) ; -90.818566; 1e-6
+match ; Exc ; GREP(ae/info, 'Energies', 40, 5) ; -5.956523; 1e-6
+
+#Eigenvalues
+match ; 1s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 28, 2) ; -10.37837; 1e-5
+match ; 2s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 28, 3) ; -0.30970; 2e-05
+match ; 2p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 28, 4) ; -0.03324; 1e-5
diff --git a/testsuite/all_electron/06-smearing.01-semiconducting.inp b/testsuite/all_electron/06-smearing.01-semiconducting.inp
new file mode 100644
index 0000000..474c1c5
--- /dev/null
+++ b/testsuite/all_electron/06-smearing.01-semiconducting.inp
@@ -0,0 +1,16 @@
+# $Id: 06-smearing.01-semiconducting.inp 632 2012-01-05 09:57:10Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 5
+
+%Orbitals
+"He"
+ 2 | 0 | 0 | 0
+ 2 | 1 | 1 | 0
+ 3 | 0 | 1 | 0
+%
+
+SmearingFunction = semiconducting
+MaximumIter = 1
diff --git a/testsuite/all_electron/06-smearing.02-averill_painter.inp b/testsuite/all_electron/06-smearing.02-averill_painter.inp
new file mode 100644
index 0000000..c0b9f5d
--- /dev/null
+++ b/testsuite/all_electron/06-smearing.02-averill_painter.inp
@@ -0,0 +1,17 @@
+# $Id: 06-smearing.02-averill_painter.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 26
+
+%Orbitals
+"Ar"
+ 3 | 2 | 5 | 1
+ 4 | 0 | 1 | 1
+%
+
+SmearingFunction = averill_painter
+
+MixingScheme = linear
+Mixing = 0.2
diff --git a/testsuite/all_electron/06-smearing.test b/testsuite/all_electron/06-smearing.test
new file mode 100644
index 0000000..fbbe7eb
--- /dev/null
+++ b/testsuite/all_electron/06-smearing.test
@@ -0,0 +1,18 @@
+# $Id: 06-smearing.test 783 2013-08-02 15:05:52Z micael $
+
+Test : All-electron: smearing
+TestGroups : all; ae
+Enabled : Yes
+
+
+Input: 06-smearing.01-semiconducting.inp
+
+match ; 1s occupation ; GREP(ae/info, 'Eigenvalues', 17, 2) ; 2.00 ; 0.01
+match ; 2s occupation ; GREP(ae/info, 'Eigenvalues', 17, 3) ; 2.00 ; 0.01
+match ; 2p occupation ; GREP(ae/info, 'Eigenvalues', 17, 4) ; 0.00 ; 0.01
+match ; 3s occupation ; GREP(ae/info, 'Eigenvalues', 17, 5) ; 0.00 ; 0.01
+
+Input: 06-smearing.02-averill_painter.inp
+
+match ; 4s occupation ; GREP(ae/info, 'Eigenvalues', 17, 7) ; 1.07 ; 0.01
+match ; 3d occupation ; GREP(ae/info, 'Eigenvalues', 17, 8) ; 6.93 ; 0.01
diff --git a/testsuite/all_electron/Makefile.am b/testsuite/all_electron/Makefile.am
new file mode 100644
index 0000000..8206eca
--- /dev/null
+++ b/testsuite/all_electron/Makefile.am
@@ -0,0 +1,43 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+sharedir = $(pkgdatadir)/testsuite/all_electron
+
+dist_share_DATA = \
+ 01-non_rel.test \
+ 01-non_rel.01-no_spin.inp \
+ 01-non_rel.02-spin.inp \
+ 02-scalar_rel.test \
+ 02-scalar_rel.01-no_spin.inp \
+ 02-scalar_rel.02-spin.inp \
+ 03-rel.test \
+ 03-rel.01-no_spin.inp \
+ 03-rel.02-spin.inp \
+ 04-unbound.test \
+ 04-unbound.01-Li.inp \
+ 05-charged.test \
+ 05-charged.01-C+.inp \
+ 05-charged.02-C-.inp \
+ 06-smearing.test \
+ 06-smearing.01-semiconducting.inp \
+ 06-smearing.02-averill_painter.inp
+
+CLEANFILES = *~ *.bak
diff --git a/testsuite/all_electron/Makefile.in b/testsuite/all_electron/Makefile.in
new file mode 100644
index 0000000..d8547ee
--- /dev/null
+++ b/testsuite/all_electron/Makefile.in
@@ -0,0 +1,451 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = testsuite/all_electron
+DIST_COMMON = $(dist_share_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(dist_share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sharedir = $(pkgdatadir)/testsuite/all_electron
+dist_share_DATA = \
+ 01-non_rel.test \
+ 01-non_rel.01-no_spin.inp \
+ 01-non_rel.02-spin.inp \
+ 02-scalar_rel.test \
+ 02-scalar_rel.01-no_spin.inp \
+ 02-scalar_rel.02-spin.inp \
+ 03-rel.test \
+ 03-rel.01-no_spin.inp \
+ 03-rel.02-spin.inp \
+ 04-unbound.test \
+ 04-unbound.01-Li.inp \
+ 05-charged.test \
+ 05-charged.01-C+.inp \
+ 05-charged.02-C-.inp \
+ 06-smearing.test \
+ 06-smearing.01-semiconducting.inp \
+ 06-smearing.02-averill_painter.inp
+
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/all_electron/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu testsuite/all_electron/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-dist_shareDATA: $(dist_share_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sharedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sharedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+ done
+
+uninstall-dist_shareDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(sharedir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(sharedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_shareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_shareDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_shareDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/testsuite/ape-run_regression_test.pl b/testsuite/ape-run_regression_test.pl
new file mode 100755
index 0000000..3bc19be
--- /dev/null
+++ b/testsuite/ape-run_regression_test.pl
@@ -0,0 +1,349 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2005-2008 Heiko Appel, M. Oliveira, F. Nogueira
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# $Id: ape-run_regression_test.pl 778 2013-07-11 15:49:39Z micael $
+
+use Getopt::Std;
+use File::Basename;
+use Fcntl ':mode';
+use POSIX qw(ceil);
+
+
+sub usage {
+
+ print <<EndOfUsage;
+
+ Copyright (C) 2005-2008 by Heiko Appel, M. Oliveira, and F. Nogueira
+
+Usage: ape-run_regression_test.pl [options]
+
+ -f filename of testsuite
+ -d working directory for the tests
+ -D name of the directory where to look for the executables
+ -p preserve working directories
+ -n dry-run
+ -u update reference values
+ -t update tolerances
+ -h this usage
+ -i print inputfile
+ -l copy output log to current directory
+ -m run matches only (assumes there are work directories)
+ -v verbose
+
+Exit codes:
+ 0 all tests passed
+ 255 test skipped
+ 1..254 number of test failures
+
+Report bugs to <micael\@teor.fis.uc.pt>.
+EndOfUsage
+
+ exit 0;
+}
+
+
+# Check, if STDOUT is a terminal. If not, not ANSI sequences are
+# emitted.
+if(-t STDOUT) {
+ $color_start{blue}="\033[34m";
+ $color_end{blue}="\033[0m";
+ $color_start{red}="\033[31m";
+ $color_end{red}="\033[0m";
+ $color_start{green}="\033[32m";
+ $color_end{green}="\033[0m";
+}
+
+if (not @ARGV) { usage; }
+
+# Options
+getopts("nlvhD:f:d:ipmut");
+
+# Default values
+use File::Temp qw/tempdir/;
+
+# Handle options
+$opt_h && usage;
+
+if ($opt_d){
+ $workdir = $opt_d;
+} else {
+ $workdir = tempdir('/tmp/ape.XXXXXX');
+}
+
+# -t and -u are mutually exclusive
+die "-u and -t mutually exclusive" if ( $opt_t && $opt_u );
+
+my $exec_directory;
+if($opt_D) {
+ $exec_directory = $opt_D;
+ if($exec_directory !~ /^\//){
+ $exec_directory = $ENV{PWD}."/$exec_directory";
+ }
+} else {
+ $exec_directory = "/usr/bin";
+}
+
+# Find out if the executable is available.
+opendir(EXEC_DIRECTORY, $exec_directory) ||
+ die "Could not open the directory $exec_directory to look for the executable";
+$available_exec = grep { /^ape$/ } readdir(EXEC_DIRECTORY);
+if (!$available_exec){
+ die "$color_start{red}No valid executable$color_end{red} found\n";
+}
+closedir(EXEC_DIRECTORY);
+
+
+# This variable counts the number of failed testcases.
+$failures = 0;
+
+chomp($workdir);
+
+if (!$opt_m) {
+ system ("rm -rf $workdir");
+ mkdir $workdir;
+}
+
+# create script for cleanups in the current workdir
+$mscript = "$workdir/clean.sh";
+open(SCRIPT, ">$mscript") or die "could not create script file\n";
+print SCRIPT "#\!/bin/bash\n\n";
+print SCRIPT "rm -rf ae pp tests out.ape out *.UPF \n";
+close(SCRIPT);
+chmod 0755, $mscript;
+
+
+# testsuite
+open(TESTSUITE, "<".$opt_f ) or die "cannot open testsuite file\n";
+
+# new updated file
+if ($opt_t || $opt_u){
+ open(NEW_TESTSUITE, ">".$opt_f.".new") or die "could not create new testsuite file\n";
+}
+
+
+while ($_ = <TESTSUITE>) {
+
+ # preserve all lines that are not going to be updated
+ if ( !($_ =~ /^match/) && ( $opt_t || $opt_u) ) {
+ print NEW_TESTSUITE $_;
+ }
+
+ # skip comments
+ next if /^#/;
+
+ if ( $_ =~ /^Test\s*:\s*(.*)\s*$/) {
+ $test{"name"} = $1;
+ if(!$opt_i) {
+ print "$color_start{blue} ***** $test{\"name\"} ***** $color_end{blue} \n\n";
+ print "Using workdir : $workdir \n";
+ print "Using test file : $opt_f \n";
+ }
+ }
+
+ if ( $_ =~ /^Enabled\s*:\s*(.*)\s*$/) {
+ %test = ();
+ $enabled = $1;
+ $enabled =~ s/^\s*//;
+ $enabled =~ s/\s*$//;
+ $test{"enabled"} = $enabled;
+ }
+
+ # Running this regression test if it is enabled
+ if ( $enabled eq "Yes" ) {
+
+ if ( $_ =~ /^Input\s*:\s*(.*)\s*$/) {
+ $input_base = $1;
+ $input_file = dirname($opt_f) . "/" . $input_base;
+ $input_prefix = $opt_f;
+ $input_prefix =~ s/test//;
+ $input_base =~ s/$input_prefix//;
+
+ if( -f $input_file ) {
+ print "\n\nUsing input file : $input_file \n";
+ system("cp $input_file $workdir/inp.ape");
+ # Ensure, that the input file is writable so that it can
+ # be overwritten by the next test.
+ $mode = (stat "$workdir/inp.ape")[2];
+ chmod $mode|S_IWUSR, "$workdir/inp.ape";
+ } else {
+ die "could not find input file: $input_file\n";
+ }
+
+ if ( !$opt_m ) {
+ if ( !$opt_n ) {
+ print "\nStarting test run ...\n";
+ print "Executing: cd $workdir; $exec_directory/ape > out \n";
+ system("cd $workdir; $exec_directory/ape > out ");
+ system("sed -n '/Running ape/{N;N;N;N;N;N;p;}' $workdir/out > $workdir/build-stamp");
+ print "Finished test run.\n\n"; }
+ else {
+ if(!$opt_i) { print "cd $workdir; $exec_directory/ape > out \n"; }
+ }
+ $test{"run"} = 1;
+ }
+
+ # copy all files of this run to archive directory with the name of the
+ # current input file
+ mkdir "$workdir/$input_base";
+ @wfiles = `ls -d $workdir/* | grep -v inp`;
+ $workfiles = join("", at wfiles);
+ $workfiles =~ s/\n/ /g;
+ system("cp -r $workfiles $workdir/inp.ape $workdir/$input_base");
+
+ # file for shell script with matches
+ $mscript = "$workdir/$input_base/matches.sh";
+ open(SCRIPT, ">$mscript") or die "could not create script file\n";
+ # write skeleton for script
+ print SCRIPT "#\!/bin/bash\n\n";
+ close(SCRIPT);
+ chmod 0755, $mscript;
+
+ }
+
+ if ( $_ =~ /^match/ && !$opt_n) {
+ if(run_match_new($_)){
+ $test_succeeded = 1;
+ } else {
+ $test_succeeded = 0;
+ $failures++;
+ }
+ }
+
+ } else {
+ if ( $_ =~ /^RUN/) { print " skipping test\n"; }
+ }
+}
+
+if ($opt_l) { system ("cat $workdir/out >> out.log"); }
+if (!$opt_p && !$opt_m && $test_succeeded) { system ("rm -rf $workdir"); }
+
+print "\n";
+close(TESTSUITE);
+
+if ($opt_t || $opt_u){
+ close(NEW_TESTSUITE);
+ `rm -f $opt_f.new` if (!$failures);
+}
+
+exit $failures;
+
+
+
+sub run_match_new(){
+ die "Have to run before matching" if !$test{"run"} && !opt_m;
+
+ # parse match line
+ my $line, $match, $name, $pre_command, $ref_value, $precision;
+ $line = @_[0];
+ $line =~ s/\\;/_COLUMN_/g;
+ ($match, $name, $pre_command, $ref_value, $precision) = split(/;/, $line);
+ $pre_command =~ s/_COLUMN_/;/g;
+ $ref_value =~ s/^\s*//;
+ $ref_value =~ s/\s*$//;
+ $precision =~ s/^\s*//;
+ $precision =~ s/\s*$//;
+ $pre_command_raw = $pre_command;
+
+ # parse command
+ $pre_command =~ /\s*(\w+)\s*\((.*)\)/;
+
+ my $func = $1;
+ my $params = $2;
+
+ # parse parameters
+ $params =~ s/\\,/_COMMA_/g;
+ my @par = split(/,/, $params);
+ for($params=0; $params <= $#par; $params++){
+ $par[$params] =~ s/_COMMA_/,/g;
+ $par[$params] =~ s/^\s*//;
+ $par[$params] =~ s/\s*$//;
+ }
+
+ if ($func eq "SHELL"){ # function SHELL(shell code)
+ $pre_command = $par[0];
+
+ }elsif($func eq "LINE") { # function LINE(filename, line, column)
+ $pre_command = "cat $par[0]";
+ if($par[1] > 0){
+ $pre_command .= " | tail -n +$par[1] | head -n 1";
+ } else {
+ $pre_command .= " | tail -n $par[1] | head -n 1";
+ }
+ $pre_command .= " | cut -b $par[2]- | perl -ne '/\\s*([0-9\\-+.eEdD]*)/; print \$1'";
+
+ }elsif($func eq "GREP") { # function GREP(filename, 're', column <, offset>)
+ my $off = 1*$par[3];
+ $pre_command = "n=\$(cat -n $par[0] | grep $par[1] | head -n 1 | awk '{print \$1;}');";
+ $pre_command .= " cat $par[0] | tail -n +\$((n+$off)) | head -n 1";
+ $pre_command .= " | cut -b $par[2]- | perl -ne '/\\s*([0-9\\-+.eEdD]*)/; print \$1'";
+
+ }else{ # error
+ printf stderr "Unknown command '$func'\n";
+ return 0;
+ }
+
+ printf("%s\n", $pre_command) if ($opt_v);
+
+ my $value = `cd $workdir; $pre_command`;
+
+ # append the command and the regexp also to the shell script matches.sh in the
+ # current archive directory
+ open(SCRIPT, ">>$mscript");
+ print SCRIPT "
+echo '", "="x4, " [ $name - pre command ]'
+$pre_command
+echo
+echo '", "-"x4, " [ $name - ref value ]'
+echo $ref_value
+export LINE=`$pre_command`
+perl -e 'print \"Match: \".(abs(\$ENV{LINE}-($ref_value)) <= $precnum ? \"OK\" : \"FAILED\");'
+echo
+echo";
+ close(SCRIPT);
+
+ $success = (abs(($value)-($ref_value)) <= $precision);
+
+ # Update values if necessary
+ print NEW_TESTSUITE "$match;$name;$pre_command_raw; $value; $precision\n" if $opt_u;
+ if ( $opt_t ) {
+ if($success) {
+ print NEW_TESTSUITE "$match;$name;$pre_command_raw; $ref_value; $precision\n";
+ } else {
+ my $diff = sprintf("%20.16e", abs($ref_value - $value));
+ my ($n,$e) = split(/e/, $diff);
+ $n = ceil($n);
+ print NEW_TESTSUITE "$match;$name;$pre_command_raw; $ref_value; $n"."e"."$e\n";
+ }
+ }
+
+ # Print information about success
+ if(!$success) {
+ printf "%-50s%s", "$name", ":\t [ $color_start{red} FAIL $color_end{red} ] \n";
+ print "\n Match Failed\n";
+ print " Calculated value : ".$value."\n";
+ print " Reference value : ".$ref_value."\n";
+ print " Difference : ".abs($ref_value - $value)."\n";
+ print " Tolerance : ".$precision."\n\n";
+ } else {
+ printf "%-50s%s", "$name", "\t [ $color_start{green} OK $color_end{green} ] \n";
+ }
+
+ return $success;
+
+}
diff --git a/testsuite/ape-run_testsuite.in b/testsuite/ape-run_testsuite.in
new file mode 100644
index 0000000..719bee3
--- /dev/null
+++ b/testsuite/ape-run_testsuite.in
@@ -0,0 +1,288 @@
+#!/bin/bash
+#
+# Copyright (C) 2005-2006 Heiko Appel
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# $Id: ape-run_testsuite.in 778 2013-07-11 15:49:39Z micael $
+
+
+# Paths.
+prefix=@prefix@
+pkgdatadir=@datadir@/@PACKAGE@
+testsuite="$pkgdatadir/testsuite"
+
+# Architecture.
+arch=`echo "$MACHTYPE" | awk -F- '{print $1}'`
+
+# Failure reporting.
+failed_tests=0
+skipped_tests=0
+passed_tests=0
+total_tests=0
+failure_report=""
+
+
+# Usage.
+function usage() {
+ cat <<EOF
+
+ Copyright (C) 2005-2007 by Heiko Appel, M. Oliveira, and F. Nogueira
+
+Usage: ape-run_testsuite [options]
+
+ -h this message
+ -n dry run mode (show what would be executed)
+ -g LIST comma separated list of test groups to run
+ -q query testfiles for the given groups (no tests are run)
+ -d DIR directory where to look for the testsuite
+ -l local run
+ -e SUFFIX exec suffix for ape executable
+ -p PREFIX installation prefix
+ -c delete all .log files and work directories after the run
+ -m ADDRESS mail report to address
+ -u update reference values
+ -t update tolerance values
+
+Report bugs to <micael at teor.fis.uc.pt>.
+EOF
+ exit 0;
+}
+
+
+# Dry run...
+function CMD {
+ [ "$dry_run" -o "$verbose" ] && echo -e "$@";
+ [ ! "$dry_run" ] && eval "$@";
+}
+
+
+# Find tests to run. Takes as argument the string passed to the
+# -g command line option.
+function find_tests() {
+ groups="$1"
+ if [ -n "$groups" ]; then
+ groups_pat=`echo "$groups" | sed 's/ *, */|/'`
+ groups_pat="^TestGroups *:.*($groups_pat)"
+ else # No groups given defaults to all tests.
+ groups_pat="."
+ fi
+ testfiles=`find $testsuite -name "*.test" | \
+ xargs @EGREP@ "$groups_pat" | \
+ awk -F: '{print $1}' | sort -u`
+ echo "$testfiles"
+}
+
+
+# Run all tests. Takes as first argument a list of testfile names.
+function run_testsuite() {
+
+tests="$1"
+
+# Check for preserve working directories flag.
+if [ "$cleanup" == "yes" ]; then
+ preserve_opt=""
+else
+ preserve_opt="-p"
+fi
+
+for y in $tests; do
+ total_tests=$((total_tests + 1))
+ ybase=`basename $y`
+ xybase=${ybase%.test}
+ if [ "${local_run}" == "yes" ]; then
+ bin_directory=`pwd`/../src
+ runtest_directory=$testsuite
+ else
+ bin_directory=$prefix/bin
+ runtest_directory=$bin_directory
+ fi
+ if [ -n "${exec_suffix}" ]; then
+ suffix_opt="-s ${exec_suffix}"
+ else
+ suffix_opt=""
+ fi
+ if [ -d "${bin_directory}" ]; then
+ CMD $runtest_directory/ape-run_regression_test.pl -l \
+ $preserve_opt $suffix_opt -D $bin_directory -f $y $ref_update $tol_update | \
+ tee ${xybase}.log
+ # Look for failed/passed/skipped testcases and add
+ # to failure summary.
+ failures=${PIPESTATUS[0]}
+ if [ "${failures}" -eq 0 ]; then
+ passed_tests=$((passed_tests + 1))
+ elif [ ${failures} -eq 255 ]; then
+ skipped_tests=$((skipped_tests + 1))
+ else
+ failed_tests=$((failed_tests + 1))
+ test_name=`echo $y | sed "s|$testsuite/||"`
+ name_length=`echo -n $test_name | wc -m`
+ space_length=$((50 - name_length))
+ spaces=`for((i = 1; i <= space_length; i++)); do echo -n ' '; done`
+ failure_report="$failure_report $test_name$spaces$failures\n"
+ fi
+ fi
+ [ -e out.log ] && mv out.log ${xybase}.out.log
+done
+}
+
+
+# Send report via mail.
+# Arguments:
+# $1 : list of testfile names that have been run,
+# $2 : e-mail address to send report to.
+function mail_report() {
+
+tests="$1"
+datestamp=$(date +"%Y-%m-%d")
+
+for y in $tests; do
+ ybase=`basename $y`
+ xybase=${ybase%.test}
+ failed_tests=$(grep FAIL ${xybase}.log | wc -l)
+ echo "Checking for failed tests: ${xybase}.log"
+ if [ $failed_tests -gt 0 ]; then
+ echo "Found: $failed_tests"
+ echo "Mailing report to: $mailaddr"
+ cat ape-header ${xybase}.log ${xybase}.out.log | \
+ mutt -s "[ape-run_testsuite on $arch] daily report - $datestamp" $mailaddr
+ fi
+done
+}
+
+
+# Show usage info if no args at all.
+[ "$#" -eq 0 ] && usage;
+
+
+# Parse command line.
+
+# Some defaults settings.
+query="no"
+send_mail="no"
+cleanup="no"
+test_groups=""
+ref_update=""
+tol_update=""
+
+while getopts "hnlput:e:m:d:cg:q" opt ; do
+ case "$opt" in
+ h) usage;;
+ n) echo="echo"; dry_run="yes";;
+ p) prefix="$OPTARG"; testsuite=$prefix/share/ape/testsuite;;
+ e) exec_suffix="$OPTARG";;
+ l) local_run="yes";;
+ g) test_groups="$OPTARG";;
+ q) query="yes";;
+ m) mailaddr="$OPTARG"; send_mail="yes";;
+ d) directory="$OPTARG";;
+ c) cleanup="yes";;
+ u) ref_update="-u";;
+ t) tol_update="-t";;
+ ?) echo "Error parsing arguments"; exit 1;;
+ esac
+done
+shift $[ OPTIND - 1 ]
+
+
+# Find testfiles.
+if [ -n "$directory" ]; then
+ testsuite="$directory"
+else
+ [ "$local_run" == "yes" ] && testsuite=$(pwd)
+fi
+
+testfiles=`find_tests "$test_groups"`
+
+
+# Query mode? If so, list files and exit.
+if [ "$query" == "yes" ]; then
+ echo "Testfiles for groups $test_groups:"
+ echo ""
+ for f in $testfiles; do
+ echo ${f##$testsuite/}
+ done
+ exit 0
+fi
+
+
+# No testfiles found, abort.
+if [ -z "$testfiles" ]; then
+ echo "No testfiles for group(s) $test_groups found."
+ # This is also mailed, if -m is present (this is to prevent
+ # errorneous cron-jobs and the like).
+ if [ "$send_mail" == "yes" ]; then
+ datestamp=`date +"%Y-%m-%d"`
+ echo "No testfiles for group(s) $test_groups found." | \
+ mutt -s "[ape-run_testsuite on $arch] daily report - $datestamp" $mailaddr
+ fi
+
+# Otherwise, start the whole machinery.
+else
+ # Get epoch seconds at testsuite start.
+ testsuite_start=$(date +%s)
+
+ # Run testsuite.
+ run_testsuite "$testfiles"
+
+ # Failure reporting to STDOUT.
+ echo -e " Passed: $passed_tests / $total_tests"
+ echo -e " Skipped: $skipped_tests / $total_tests"
+ if [ $failed_tests -gt 0 ]; then
+ echo " Failed: $failed_tests / $total_tests"
+ echo
+ echo " testfile # failed testcases"
+ echo " --------------------------------------------------------------------"
+ echo -e "$failure_report"
+ else
+ echo -e "\nEverything seems to be OK"
+ fi
+ echo
+
+
+ # Get epoch seconds after we are done and compute time difference.
+ testsuite_end=$(date +%s)
+ timediff_sec=$[ testsuite_end - testsuite_start ]
+
+ rm -rf ape-header
+ RUNTIME="Total run-time of the testsuite: \
+ $(printf '%02d:%02d:%02d' $[timediff_sec / 3600] \
+ $[(timediff_sec % 3600) / 60 ] $[timediff_sec % 60])"
+
+ # Save runtime for mail header.
+ echo $RUNTIME > ape-header
+ echo "" >> ape-header
+
+ # And print also to the screen.
+ echo $RUNTIME
+ echo ""
+
+
+ # Should we send a mail report?
+ [ "${send_mail}" == "yes" ] && mail_report "$testfiles" "$mailaddr"
+
+
+ # Clean up.
+ [ "$cleanup" == "yes" ] && rm -f *.log ape-header stamp build-stamp
+fi
+
+exit $failed_tests
+
+
+# Local Variables:
+# mode: shell-script
+# coding: utf-8
+# End:
diff --git a/testsuite/basic/01-mesh.01-linear.inp b/testsuite/basic/01-mesh.01-linear.inp
new file mode 100644
index 0000000..87d377c
--- /dev/null
+++ b/testsuite/basic/01-mesh.01-linear.inp
@@ -0,0 +1,14 @@
+# $Id: 01-mesh.01-linear.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = linear
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+
+
+NumericalTests = derivatives
+%TestFunctions
+ "gaussian" | gaussian | 0.0 | 0.0 | 1.0
+%
diff --git a/testsuite/basic/01-mesh.02-log1.inp b/testsuite/basic/01-mesh.02-log1.inp
new file mode 100644
index 0000000..b39b3c5
--- /dev/null
+++ b/testsuite/basic/01-mesh.02-log1.inp
@@ -0,0 +1,14 @@
+# $Id: 01-mesh.02-log1.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = log1
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+
+
+NumericalTests = derivatives
+%TestFunctions
+ "gaussian" | gaussian | 0.0 | 0.0 | 1.0
+%
diff --git a/testsuite/basic/01-mesh.03-log2.inp b/testsuite/basic/01-mesh.03-log2.inp
new file mode 100644
index 0000000..2011a39
--- /dev/null
+++ b/testsuite/basic/01-mesh.03-log2.inp
@@ -0,0 +1,14 @@
+# $Id: 01-mesh.03-log2.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = log2
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+
+
+NumericalTests = derivatives
+%TestFunctions
+ "gaussian" | gaussian | 0.0 | 0.0 | 1.0
+%
diff --git a/testsuite/basic/01-mesh.test b/testsuite/basic/01-mesh.test
new file mode 100644
index 0000000..ba51190
--- /dev/null
+++ b/testsuite/basic/01-mesh.test
@@ -0,0 +1,32 @@
+# $Id: 01-mesh.test 616 2011-08-19 17:06:49Z micael $
+
+Test : Basic: mesh
+TestGroups : all; basic
+Enabled : Yes
+
+
+Input: 01-mesh.01-linear.inp
+
+match ; Linear - Starting point ; LINE(nt/gaussian/derivs, 1, 1) ; 1.00000E-005 ; 1e-10
+match ; Linear - Oupmost point ; LINE(nt/gaussian/derivs, 1400, 1) ; 1.00000E+002 ; 1e-3
+match ; Linear - Parameter a ; GREP(nt/info, "Mesh parameters", 26, 0); 7.14796E-02 ; 1e-7
+match ; Linear - Parameter b ; GREP(nt/info, "Mesh parameters", 40, 0); 0.0 ; 1e-8
+
+
+Input: 01-mesh.02-log1.inp
+
+match ; Log. 1 - Starting point ; LINE(nt/gaussian/derivs, 1, 1) ; 1.00000E-005 ; 1e-10
+match ; Log. 1 - Oupmost point ; LINE(nt/gaussian/derivs, 1400, 1) ; 1.00000E+002 ; 1e-3
+match ; Log. 1 - Parameter a ; GREP(nt/info, "Mesh parameters", 26, 0); 1.15212E-02 ; 1e-7
+match ; Log. 1 - Parameter b ; GREP(nt/info, "Mesh parameters", 40, 0); 9.88545E-06 ; 1e-11
+
+
+Input: 01-mesh.03-log2.inp
+
+match ; Log. 2 - Starting point ; LINE(nt/gaussian/derivs, 1, 1) ; 1.00000E-005 ; 1e-10
+match ; Log. 2 - Oupmost point ; LINE(nt/gaussian/derivs, 1400, 1) ; 1.00000E+002 ; 1e-3
+match ; Log. 2 - Parameter a ; GREP(nt/info, "Mesh parameters", 26, 0); 8.07356E-03 ; 1e-8
+match ; Log. 2 - Parameter b ; GREP(nt/info, "Mesh parameters", 40, 0); 1.23362E-03 ; 1e-8
+
+
+
diff --git a/testsuite/basic/02-derivatives.01-splines.inp b/testsuite/basic/02-derivatives.01-splines.inp
new file mode 100644
index 0000000..c432f56
--- /dev/null
+++ b/testsuite/basic/02-derivatives.01-splines.inp
@@ -0,0 +1,16 @@
+# $Id: 02-derivatives.01-splines.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = log1
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+MeshDerivMethod = cubic_spline
+
+NumericalTests = derivatives
+%TestFunctions
+ "gaussian" | gaussian | 1.0 | 3.0 | 1.0
+ "coulomb_potential" | inverse | -1.0 | 0.0 | 1.0
+ "h_density" | exponential | 4.0 | -2.0 | 0.0
+%
diff --git a/testsuite/basic/02-derivatives.02-finite_diff.inp b/testsuite/basic/02-derivatives.02-finite_diff.inp
new file mode 100644
index 0000000..a3e8383
--- /dev/null
+++ b/testsuite/basic/02-derivatives.02-finite_diff.inp
@@ -0,0 +1,16 @@
+# $Id: 02-derivatives.02-finite_diff.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = log1
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+MeshDerivMethod = finite_diff
+
+NumericalTests = derivatives
+%TestFunctions
+ "gaussian" | gaussian | 1.0 | 3.0 | 1.0
+ "coulomb_potential" | inverse | -1.0 | 0.0 | 1.0
+ "h_density" | exponential | 4.0 | -2.0 | 0.0
+%
diff --git a/testsuite/basic/02-derivatives.test b/testsuite/basic/02-derivatives.test
new file mode 100644
index 0000000..cac58a8
--- /dev/null
+++ b/testsuite/basic/02-derivatives.test
@@ -0,0 +1,54 @@
+# $Id: 02-derivatives.test 616 2011-08-19 17:06:49Z micael $
+
+Test : Basic: derivatives
+TestGroups : all; basic
+Enabled : Yes
+
+
+Input: 02-derivatives.01-splines.inp
+
+match ; Gaussian: fp(r1) ; LINE(nt/gaussian/derivs, 1, 56) ; 3.33278812E-002 ; 1e-10
+match ; Gaussian: fp(r700) ; LINE(nt/gaussian/derivs, 700, 56) ; 3.62217952E-002 ; 1e-10
+match ; Gaussian: fp(rmax) ; LINE(nt/gaussian/derivs, 1400, 56) ; -6.23530072E-136 ; 1e-16
+match ; Gaussian: fpp(r1) ; LINE(nt/gaussian/derivs, 1, 92) ; 0.00000000E+000 ; 1e-16
+match ; Gaussian: fpp(r700) ; LINE(nt/gaussian/derivs, 700, 92) ; 9.53247158E-002 ; 1e-10
+match ; Gaussian: fpp(rmax) ; LINE(nt/gaussian/derivs, 1400, 92) ; 0.00000000E+000 ; 1e-16
+
+match ; Coulomb potential: fp(r1) ; LINE(nt/coulomb_potential/derivs, 1, 56) ; 9.93304711E+009 ; 1e1
+match ; Coulomb potential: fp(r700) ; LINE(nt/coulomb_potential/derivs, 700, 56) ; 1.01158777E+003 ; 1e-5
+match ; Coulomb potential: fp(rmax) ; LINE(nt/coulomb_potential/derivs, 1400, 56) ; 1.00660680E-004 ; 1e-12
+match ; Coulomb potential: fpp(r1) ; LINE(nt/coulomb_potential/derivs, 1, 92) ; 0.00000000E+000 ; 1e-16
+match ; Coulomb potential: fpp(r700) ; LINE(nt/coulomb_potential/derivs, 700, 92) ; -6.43395043E+004 ; 1e-4
+match ; Coulomb potential: fpp(rmax) ; LINE(nt/coulomb_potential/derivs, 1400, 92) ; 0.00000000E+000 ; 1e-16
+
+match ; H density: fp(r1) ; LINE(nt/h_density/derivs, 1, 56) ; -7.99983946E+000 ; 1e-8
+match ; H density: fp(r700) ; LINE(nt/h_density/derivs, 700, 56) ; -7.51243218E+000 ; 1e-8
+match ; H density: fp(rmax) ; LINE(nt/h_density/derivs, 1400, 56) ; -1.48617394E-086 ; 1e-16
+match ; H density: fpp(r1) ; LINE(nt/h_density/derivs, 1, 92) ; 0.00000000E+000 ; 1e-16
+match ; H density: fpp(r700) ; LINE(nt/h_density/derivs, 700, 92) ; 1.50248637E+001 ; 1e-7
+match ; H density: fpp(rmax) ; LINE(nt/h_density/derivs, 1400, 92) ; 0.00000000E+000 ; 1e-16
+
+
+
+Input: 02-derivatives.02-finite_diff.inp
+
+match ; Gaussian: fp(r1) ; LINE(nt/gaussian/derivs, 1, 56) ; 3.33278770E-002 ; 1e-10
+match ; Gaussian: fp(r700) ; LINE(nt/gaussian/derivs, 700, 56) ; 3.62217952E-002 ; 1e-10
+match ; Gaussian: fp(rmax) ; LINE(nt/gaussian/derivs, 1400, 56) ; 0.00000000E+000 ; 1e-16
+match ; Gaussian: fpp(r1) ; LINE(nt/gaussian/derivs, 1, 92) ; 1.24267578E-001 ; 1e-9
+match ; Gaussian: fpp(r700) ; LINE(nt/gaussian/derivs, 700, 92) ; 9.53247197E-002 ; 1e-10
+match ; Gaussian: fpp(rmax) ; LINE(nt/gaussian/derivs, 1400, 92) ; 0.00000000E+000 ; 1e-16
+
+match ; Coulomb potential: fp(r1) ; LINE(nt/coulomb_potential/derivs, 1, 56) ; 1.00000000E+010 ; 1e+2
+match ; Coulomb potential: fp(r700) ; LINE(nt/coulomb_potential/derivs, 700, 56) ; 1.01158778E+003 ; 1e-5
+match ; Coulomb potential: fp(rmax) ; LINE(nt/coulomb_potential/derivs, 1400, 56) ; 1.00000000E-004 ; 1e-12
+match ; Coulomb potential: fpp(r1) ; LINE(nt/coulomb_potential/derivs, 1, 92) ; -2.00000000E+015 ; 1e+9
+match ; Coulomb potential: fpp(r700) ; LINE(nt/coulomb_potential/derivs, 700, 92) ; -6.43480450E+004 ; 1e-4
+match ; Coulomb potential: fpp(rmax) ; LINE(nt/coulomb_potential/derivs, 1400, 92) ; -2.00000001E-006 ; 1e-14
+
+match ; H density: fp(r1) ; LINE(nt/h_density/derivs, 1, 56) ; -7.99984000E+000 ; 1e-8
+match ; H density: fp(r700) ; LINE(nt/h_density/derivs, 700, 56) ; -7.51243218E+000 ; 1e-8
+match ; H density: fp(rmax) ; LINE(nt/h_density/derivs, 1400, 56) ; 1.23947066E-080 ; 1e-16
+match ; H density: fpp(r1) ; LINE(nt/h_density/derivs, 1, 92) ; 1.60781250E+001 ; 1e-7
+match ; H density: fpp(r700) ; LINE(nt/h_density/derivs, 700, 92) ; 1.50248644E+001 ; 1e-7
+match ; H density: fpp(rmax) ; LINE(nt/h_density/derivs, 1400, 92) ; 5.70635791E-080 ; 1e-16
diff --git a/testsuite/basic/03-integration.01-splines.inp b/testsuite/basic/03-integration.01-splines.inp
new file mode 100644
index 0000000..a4e3850
--- /dev/null
+++ b/testsuite/basic/03-integration.01-splines.inp
@@ -0,0 +1,14 @@
+# $Id: 03-integration.01-splines.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = log1
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+
+NumericalTests = integration
+%TestFunctions
+ "coulomb_potential" | inverse | -1.0 | 0.0 | 1.0
+ "h_density" | exponential | 4.0 | -2.0 | 0.0
+%
diff --git a/testsuite/basic/03-integration.test b/testsuite/basic/03-integration.test
new file mode 100644
index 0000000..bbd8b1c
--- /dev/null
+++ b/testsuite/basic/03-integration.test
@@ -0,0 +1,12 @@
+# $Id: 03-integration.test 616 2011-08-19 17:06:49Z micael $
+
+Test : Basic: integration
+TestGroups : all; basic
+Enabled : Yes
+
+
+Input: 03-integration.01-splines.inp
+
+match ; Coulomb potential ; GREP(nt/info, "coulomb_potential", 40, 3); -5.000E+003 ; 1e0
+match ; H Density ; GREP(nt/info, "h_density", 40, 3); 1.000E+000 ; 1e-3
+
diff --git a/testsuite/basic/04-ODE_solver.01-rkpd8.inp b/testsuite/basic/04-ODE_solver.01-rkpd8.inp
new file mode 100644
index 0000000..63276e4
--- /dev/null
+++ b/testsuite/basic/04-ODE_solver.01-rkpd8.inp
@@ -0,0 +1,15 @@
+# $Id: 04-ODE_solver.01-rkpd8.inp 740 2012-06-04 13:11:08Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1
+ 2 | 0 | 0
+ 2 | 1 | 0
+%
+
+ODESteppingFunction = rkpd8
diff --git a/testsuite/basic/04-ODE_solver.02-rk4.inp b/testsuite/basic/04-ODE_solver.02-rk4.inp
new file mode 100644
index 0000000..8e45b48
--- /dev/null
+++ b/testsuite/basic/04-ODE_solver.02-rk4.inp
@@ -0,0 +1,15 @@
+# $Id: 04-ODE_solver.02-rk4.inp 740 2012-06-04 13:11:08Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1
+ 2 | 0 | 0
+ 2 | 1 | 0
+%
+
+ODESteppingFunction = rk4
diff --git a/testsuite/basic/04-ODE_solver.test b/testsuite/basic/04-ODE_solver.test
new file mode 100644
index 0000000..1c69874
--- /dev/null
+++ b/testsuite/basic/04-ODE_solver.test
@@ -0,0 +1,41 @@
+# $Id: 04-ODE_solver.test 647 2012-01-11 11:26:37Z micael $
+
+Test : Basic: ODE solver
+TestGroups : all; basic
+Enabled : Yes
+
+### The following values are *theoretical values* and should never be changed ###
+
+
+Input: 04-ODE_solver.01-rkpd8.inp
+
+#Eigenvalues
+match ; 1s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 24, 2) ; -0.5 ; 1e-8
+match ; 2s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 24, 3) ; -0.125 ; 1e-8
+
+
+#Wavefunctions
+match ; 1s Wavefunction ; LINE(ae/wf-1s, 162, 20) ; 7.14677119E-01 ; 1e-6
+match ; 1s Wavefunction Derivative ; LINE(ae/wf-1s, 162, 39) ; -7.14677119E-01 ; 1e-6
+match ; 2s Wavefunction ; LINE(ae/wf-2s, 162, 20) ; -2.05202266E-01 ; 1e-6
+match ; 2s Wavefunction Derivative ; LINE(ae/wf-2s, 162, 39) ; 3.13947578E-01 ; 1e-6
+match ; 2p Wavefunction ; LINE(ae/wf-2p, 162, 20) ; 1.25568271E-01 ; 1e-6
+match ; 2p Wavefunction Derivative ; LINE(ae/wf-2p, 162, 39) ; 0.59236792E-01 ; 1e-6
+
+
+
+Input: 04-ODE_solver.02-rk4.inp
+
+#Eigenvalues
+match ; 1s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 24, 2) ; -0.5 ; 1e-8
+match ; 2s Eigenvalue ; GREP(ae/info, 'Eigenvalues', 24, 3) ; -0.125 ; 1e-8
+match ; 2p Eigenvalue ; GREP(ae/info, 'Eigenvalues', 24, 4) ; -0.125 ; 1e-8
+
+
+#Wavefunctions
+match ; 1s Wavefunction ; LINE(ae/wf-1s, 162, 20) ; 7.14677119E-01 ; 1e-6
+match ; 1s Wavefunction Derivative ; LINE(ae/wf-1s, 162, 39) ; -7.14677119E-01 ; 1e-6
+match ; 2s Wavefunction ; LINE(ae/wf-2s, 162, 20) ; -2.05202266E-01 ; 1e-6
+match ; 2s Wavefunction Derivative ; LINE(ae/wf-2s, 162, 39) ; 3.13947578E-01 ; 1e-6
+match ; 2p Wavefunction ; LINE(ae/wf-2p, 162, 20) ; 1.25568271E-01 ; 1e-6
+match ; 2p Wavefunction Derivative ; LINE(ae/wf-2p, 162, 39) ; 0.59236792E-01 ; 1e-6
diff --git a/testsuite/basic/05-hartree.01-splines.inp b/testsuite/basic/05-hartree.01-splines.inp
new file mode 100644
index 0000000..10afa3c
--- /dev/null
+++ b/testsuite/basic/05-hartree.01-splines.inp
@@ -0,0 +1,13 @@
+# $Id: 05-hartree.01-splines.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = nt
+Verbose = 40
+
+MeshType = log1
+MeshStartingPoint = 1e-5
+MeshOutmostPoint = 100
+
+NumericalTests = hartree
+%TestFunctions
+ "h_density" | exponential | 4.0 | -2.0 | 0.0
+%
diff --git a/testsuite/basic/05-hartree.test b/testsuite/basic/05-hartree.test
new file mode 100644
index 0000000..5c44b53
--- /dev/null
+++ b/testsuite/basic/05-hartree.test
@@ -0,0 +1,12 @@
+# $Id: 05-hartree.test 616 2011-08-19 17:06:49Z micael $
+
+Test : Basic: Hartree potential
+TestGroups : all; basic
+Enabled : Yes
+
+
+Input: 05-hartree.01-splines.inp
+
+match ; vh(r1) ; LINE(nt/h_density/vh, 1, 56) ; 1.25663706E+001 ; 1e-7
+match ; vh(r700) ; LINE(nt/h_density/vh, 700, 56) ; 1.25583445E+001 ; 1e-7
+match ; vh(rmax) ; LINE(nt/h_density/vh, 1400, 56) ; 1.25663706E-001 ; 1e-9
diff --git a/testsuite/basic/06-mixing.01-linear.inp b/testsuite/basic/06-mixing.01-linear.inp
new file mode 100644
index 0000000..33d90b5
--- /dev/null
+++ b/testsuite/basic/06-mixing.01-linear.inp
@@ -0,0 +1,15 @@
+# $Id: 06-mixing.01-linear.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1
+%
+
+MixingScheme = linear
+Mixing = 0.2
+
+ODEIntTolerance = 1e-14
diff --git a/testsuite/basic/06-mixing.02-broyden.inp b/testsuite/basic/06-mixing.02-broyden.inp
new file mode 100644
index 0000000..26f4619
--- /dev/null
+++ b/testsuite/basic/06-mixing.02-broyden.inp
@@ -0,0 +1,15 @@
+# $Id: 06-mixing.02-broyden.inp 749 2012-06-29 14:46:59Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1
+%
+
+MixingScheme = broyden
+
+# The following line is for portability reasons
+ConvRelDens = 1e-7
diff --git a/testsuite/basic/06-mixing.03-broyden2.inp b/testsuite/basic/06-mixing.03-broyden2.inp
new file mode 100644
index 0000000..0482fbc
--- /dev/null
+++ b/testsuite/basic/06-mixing.03-broyden2.inp
@@ -0,0 +1,15 @@
+# $Id: 06-mixing.03-broyden2.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1
+%
+
+MixingScheme = broyden
+MixingSteps = 2
+
+ODEIntTolerance = 1e-14
diff --git a/testsuite/basic/06-mixing.test b/testsuite/basic/06-mixing.test
new file mode 100644
index 0000000..f0969aa
--- /dev/null
+++ b/testsuite/basic/06-mixing.test
@@ -0,0 +1,24 @@
+# $Id: 06-mixing.test 749 2012-06-29 14:46:59Z micael $
+
+Test : Basic: mixing
+TestGroups : all; basic
+Enabled : Yes
+
+
+Input: 06-mixing.01-linear.inp
+
+#Number of iterations
+match ; Number of iterations ; GREP(ae/info, 'Number of iterations', 24, 0) ; 53 ; 1e-1
+
+
+Input: 06-mixing.02-broyden.inp
+
+#Number of iterations
+match ; Number of iterations ; GREP(ae/info, 'Number of iterations', 24, 0) ; 9 ; 1e-1
+
+
+Input: 06-mixing.03-broyden2.inp
+
+#Number of iterations
+match ; Number of iterations ; GREP(ae/info, 'Number of iterations', 24, 0) ; 35 ; 1e-1
+
diff --git a/testsuite/basic/Makefile.am b/testsuite/basic/Makefile.am
new file mode 100644
index 0000000..106486b
--- /dev/null
+++ b/testsuite/basic/Makefile.am
@@ -0,0 +1,44 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+sharedir = $(pkgdatadir)/testsuite/basic
+
+dist_share_DATA = \
+ 01-mesh.test \
+ 01-mesh.01-linear.inp \
+ 01-mesh.02-log1.inp \
+ 01-mesh.03-log2.inp \
+ 02-derivatives.test \
+ 02-derivatives.01-splines.inp \
+ 02-derivatives.02-finite_diff.inp \
+ 03-integration.test \
+ 03-integration.01-splines.inp \
+ 04-ODE_solver.test \
+ 04-ODE_solver.01-rkpd8.inp \
+ 04-ODE_solver.02-rk4.inp \
+ 05-hartree.test \
+ 05-hartree.01-splines.inp \
+ 06-mixing.test \
+ 06-mixing.01-linear.inp \
+ 06-mixing.02-broyden.inp \
+ 06-mixing.03-broyden2.inp
+
+CLEANFILES = *~ *.bak
diff --git a/testsuite/basic/Makefile.in b/testsuite/basic/Makefile.in
new file mode 100644
index 0000000..7506618
--- /dev/null
+++ b/testsuite/basic/Makefile.in
@@ -0,0 +1,452 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = testsuite/basic
+DIST_COMMON = $(dist_share_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(dist_share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sharedir = $(pkgdatadir)/testsuite/basic
+dist_share_DATA = \
+ 01-mesh.test \
+ 01-mesh.01-linear.inp \
+ 01-mesh.02-log1.inp \
+ 01-mesh.03-log2.inp \
+ 02-derivatives.test \
+ 02-derivatives.01-splines.inp \
+ 02-derivatives.02-finite_diff.inp \
+ 03-integration.test \
+ 03-integration.01-splines.inp \
+ 04-ODE_solver.test \
+ 04-ODE_solver.01-rkpd8.inp \
+ 04-ODE_solver.02-rk4.inp \
+ 05-hartree.test \
+ 05-hartree.01-splines.inp \
+ 06-mixing.test \
+ 06-mixing.01-linear.inp \
+ 06-mixing.02-broyden.inp \
+ 06-mixing.03-broyden2.inp
+
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/basic/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu testsuite/basic/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-dist_shareDATA: $(dist_share_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sharedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sharedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+ done
+
+uninstall-dist_shareDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(sharedir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(sharedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_shareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_shareDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_shareDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/testsuite/libxc/01-H.inp b/testsuite/libxc/01-H.inp
new file mode 100644
index 0000000..68612a5
--- /dev/null
+++ b/testsuite/libxc/01-H.inp
@@ -0,0 +1,11 @@
+# $Id: 01-H.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1
+%
diff --git a/testsuite/libxc/01-H.test b/testsuite/libxc/01-H.test
new file mode 100644
index 0000000..44baacb
--- /dev/null
+++ b/testsuite/libxc/01-H.test
@@ -0,0 +1,1595 @@
+# $Id: 01-H.test 772 2013-01-21 15:19:51Z micael $
+
+Test : Libxc: H atom
+TestGroups : libxc
+Enabled : Yes
+
+
+Input: 01-H.inp
+
+
+Input: 000-none.inp
+
+Input: 001-lda_x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.212742; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -6.72364803E-01; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.38579183E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.37014285E-09; 1e-64
+
+
+Input: 002-lda_c_wigner.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042122; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -5.22820630E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.86817957E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.31581953E-09; 1e-64
+
+
+Input: 003-lda_c_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.033261; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.48943049E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.94852548E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.68861392E+07; 1e-64
+
+
+Input: 004-lda_c_hl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.044783; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.16122488E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.70778546E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 005-lda_c_gl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050042; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -8.67859377E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -6.62798500E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 006-lda_c_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.106371; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -3.36182402E-01; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.69289591E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -6.85071423E-10; 1e-64
+
+
+Input: 007-lda_c_vwn.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041411; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.01946164E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.38942685E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.23889052E-09; 1e-64
+
+
+Input: 008-lda_c_vwn_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.058399; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.03524368E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -7.26746041E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -4.46730746E-09; 1e-64
+
+
+Input: 009-lda_c_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041619; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -6.90969203E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.40094163E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.27617400E-09; 1e-64
+
+
+Input: 010-lda_c_pz_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041619; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -6.91232558E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.40094163E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.27617400E-09; 1e-64
+
+
+Input: 011-lda_c_ob_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040843; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -6.74554002E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.20517001E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.13403082E-09; 1e-64
+
+
+Input: 012-lda_c_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041392; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -6.98075861E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.37465024E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 013-lda_c_pw_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041391; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -6.98073429E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.37463631E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 014-lda_c_ob_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040274; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -6.80387527E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.20051202E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 017-lda_c_vbh.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.057898; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -8.88784417E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -7.23100478E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 020-lda_xc_teter93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.253972; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -7.41881690E-01; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.91897258E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.49480944E-09; 1e-64
+
+
+Input: 022-lda_c_ml1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.020459; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -3.57450634E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.77930220E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.78231061E-10; 1e-64
+
+
+Input: 023-lda_c_ml2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.010394; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.69702595E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.37457894E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.61406572E-10; 1e-64
+
+
+Input: 024-lda_c_gombas.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.044398; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.03439144E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.54510896E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.31634612E-09; 1e-64
+
+
+Input: 025-lda_c_pw_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.057772; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -8.98695421E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -7.20465262E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.61699684E-07; 1e-64
+
+
+Input: 027-lda_c_rc04.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.033617; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -5.97956776E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.61964751E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 028-lda_c_vwn_1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041411; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.01946164E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.38942685E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.23889052E-09; 1e-64
+
+
+Input: 029-lda_c_vwn_2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041411; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.01946164E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.38942685E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.23889052E-09; 1e-64
+
+
+Input: 030-lda_c_vwn_3.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041411; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.01946164E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.38942685E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.23889052E-09; 1e-64
+
+
+Input: 031-lda_c_vwn_4.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.041411; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.01946164E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.38942685E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.23889052E-09; 1e-64
+
+
+Input: 050-lda_k_tf.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.289128; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.52127279E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 2.75918536E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.99439337E-44; 1e-64
+
+
+Input: 051-lda_k_lp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.298934; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.81029293E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 2.85276999E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 3.09595566E-44; 1e-64
+
+
+Input: 084-gga_c_op_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.021660; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -3.95034260E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.01431768E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 085-gga_c_op_g96.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.016948; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 7.78014476E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.90161331E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -4.17410875E-21; 1e-64
+
+
+Input: 086-gga_c_op_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017100; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 8.27162668E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.00240695E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.33470630E-18; 1e-64
+
+
+Input: 087-gga_c_op_b88.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.016854; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 8.60919200E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.96415346E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.33671075E-16; 1e-64
+
+
+Input: 088-gga_c_ft97.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.015282; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.14518760E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 3.92695026E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 5.58734089E-24; 1e-64
+
+
+Input: 089-gga_c_spbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.018810; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.29118304E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.65043009E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -4.46971883E-17; 1e-64
+
+
+Input: 090-gga_x_ssb_sw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.253423; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.62303662E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.73114780E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47168192E-09; 1e-64
+
+
+Input: 091-gga_x_ssb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.250353; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.01943168E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.64504937E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173947E-09; 1e-64
+
+
+Input: 092-gga_x_ssb_d.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.257737; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.15347315E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.69118001E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173735E-09; 1e-64
+
+
+Input: 093-gga_xc_hcth_407p.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.280852; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -8.31877836E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.28052752E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.20489340E-19; 1e-64
+
+
+Input: 094-gga_xc_hcth_p76.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.658888; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.26987358E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -7.65254538E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 4.84292061E-18; 1e-64
+
+
+Input: 095-gga_xc_hcth_p14.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.294734; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -9.28147569E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.38140632E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 6.30819408E-20; 1e-64
+
+
+Input: 096-gga_xc_b97_gga1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.281383; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -8.96544141E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.27486420E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 5.67791995E-20; 1e-64
+
+
+Input: 097-gga_xc_hcth_a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.140039; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 1.05229139E+04; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.95885630E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.57410203E-19; 1e-64
+
+
+Input: 098-gga_x_bpccac.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.259095; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.66805711E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.82303158E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -6.50079257E-19; 1e-64
+
+
+Input: 099-gga_c_revtca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013466; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.99064653E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.44763626E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -3.52749983E-22; 1e-64
+
+
+Input: 100-gga_c_tca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013466; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.99064653E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.44763626E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -3.52749983E-22; 1e-64
+
+
+Input: 101-gga_x_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.253996; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.40683708E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.73117030E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 102-gga_x_pbe_r.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.260156; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.59250309E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.80070114E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.07597069E-09; 1e-64
+
+
+Input: 103-gga_x_b86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.258707; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.78009710E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.77611494E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.69533839E-09; 1e-64
+
+
+Input: 104-gga_x_herman.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.287475; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.42932849E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.94725256E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 9.90189685E+06; 1e-64
+
+
+Input: 105-gga_x_b86_mgc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.257143; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.78913228E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.74755673E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -8.00366955E-07; 1e-64
+
+
+Input: 106-gga_x_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.258823; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.61192087E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.76893678E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.20225564E-03; 1e-64
+
+
+Input: 107-gga_x_g96.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.261203; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.20741136E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.79718768E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 2.73842965E+02; 1e-64
+
+
+Input: 108-gga_x_pw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.259881; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -6.01044026E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.67576395E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.47905322E-06; 1e-64
+
+
+Input: 109-gga_x_pw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.254387; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.57745342E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.74824206E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -4.99353640E-19; 1e-64
+
+
+Input: 110-gga_x_optx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.260733; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.63816887E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.97562727E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.54879581E-09; 1e-64
+
+
+Input: 111-gga_x_dk87_r1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.257038; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.11417759E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.71726691E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -4.54970791E-03; 1e-64
+
+
+Input: 112-gga_x_dk87_r2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.256907; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.11845809E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.71502164E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.88659179E-03; 1e-64
+
+
+Input: 113-gga_x_lg93.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.258750; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.18318958E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.60652521E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.58629890E-10; 1e-64
+
+
+Input: 114-gga_x_ft97_a.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.263882; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.26212509E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.84104443E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.23303257E-03; 1e-64
+
+
+Input: 115-gga_x_ft97_b.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.263684; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.23903410E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.83936398E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.23303257E-03; 1e-64
+
+
+Input: 116-gga_x_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.240465; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.60868852E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.63049807E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 117-gga_x_rpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.260787; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.66805697E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.82304341E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 118-gga_x_wc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.247059; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.78040725E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.66870174E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 119-gga_x_mpw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.256952; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.63784258E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.76168799E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.08346472E-18; 1e-64
+
+
+Input: 120-gga_x_am05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.226093; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.76762874E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.51517388E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -5.91081483E-04; 1e-64
+
+
+Input: 121-gga_x_pbea.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.249411; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.17355553E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.67924650E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173768E-09; 1e-64
+
+
+Input: 122-gga_x_mpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.255864; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.49388123E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.75531232E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.45201985E-09; 1e-64
+
+
+Input: 123-gga_x_xpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.257556; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.70101425E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.76465545E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.63004400E-09; 1e-64
+
+
+Input: 125-gga_x_bayesian.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.255666; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.12836810E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.74227521E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -4.23319322E-09; 1e-64
+
+
+Input: 126-gga_x_pbe_jsjr.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.244808; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.15009297E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.66499722E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 130-gga_c_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014906; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.66665156E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.50004077E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -9.99462357E-24; 1e-64
+
+
+Input: 131-gga_c_lyp.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013607; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 5.62683728E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.29620757E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.61423054E-10; 1e-64
+
+
+Input: 132-gga_c_p86.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.016835; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.35636639E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.29566666E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.27617400E-09; 1e-64
+
+
+Input: 133-gga_c_pbe_sol.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.018853; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.16791706E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.68343036E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.39861821E-23; 1e-64
+
+
+Input: 134-gga_c_pw91.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.015898; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.43400710E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.49127795E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -7.65455407E-24; 1e-64
+
+
+Input: 135-gga_c_am05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.035565; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 5.58869111E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.93541124E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.23503744E-09; 1e-64
+
+
+Input: 136-gga_c_xpbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014071; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.49872637E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.32007816E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.08097781E-24; 1e-64
+
+
+Input: 137-gga_c_lm.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.123670; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -3.22897388E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.22428391E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -3.38660944E-06; 1e-64
+
+
+Input: 138-gga_c_pbe_jrgx.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.021015; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.90265287E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.79475677E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -3.92281235E-23; 1e-64
+
+
+Input: 139-gga_x_optb88_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.250882; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.76666585E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.70335513E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.03326280E-03; 1e-64
+
+
+Input: 140-gga_x_pbek1_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.257104; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.50814978E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.76668895E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.74028569E-09; 1e-64
+
+
+Input: 141-gga_x_optpbe_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.251505; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.69366120E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.72716548E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.80610736E-09; 1e-64
+
+
+Input: 142-gga_x_rge2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.245900; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.78182693E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.70423736E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 143-gga_c_rge2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017340; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.35774172E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.61220734E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.71251621E-23; 1e-64
+
+
+Input: 144-gga_x_rpw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.263322; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -6.71474423E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.71344723E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.45901910E-06; 1e-64
+
+
+Input: 145-gga_x_kt1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.216828; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.10232688E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.38641840E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.37014285E-09; 1e-64
+
+
+Input: 146-gga_xc_kt2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.255972; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.10241559E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.94010405E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.18292481E-09; 1e-64
+
+
+Input: 147-gga_c_wl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014291; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 4.63558581E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.08152193E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 2.06793448E-02; 1e-64
+
+
+Input: 148-gga_c_wi.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.002173; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 9.64802083E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.64258361E-03; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.26601876E-20; 1e-64
+
+
+Input: 149-gga_x_mb88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.231890; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.49489777E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.54642784E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.20225558E-03; 1e-64
+
+
+Input: 150-gga_x_sogga.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.239442; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.59304305E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.62328300E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.12646170E-09; 1e-64
+
+
+Input: 151-gga_x_sogga11.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.220827; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.11621128E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.29658674E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.05514713E-08; 1e-64
+
+
+Input: 152-gga_c_sogga11.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050963; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 4.82690363E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.33991048E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.63922930E-08; 1e-64
+
+
+Input: 153-gga_c_wi0.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.012445; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.39270799E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.61357015E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.29065139E-19; 1e-64
+
+
+Input: 154-gga_xc_th1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.643258; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -5.18151703E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; 5.08377464E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.95508633E+02; 1e-64
+
+
+Input: 155-gga_xc_th2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.306092; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -5.32673464E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.40344519E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.20636609E-01; 1e-64
+
+
+Input: 156-gga_xc_th3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.313894; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -5.69641374E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.42651760E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 9.19590111E-02; 1e-64
+
+
+Input: 157-gga_xc_th4.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.304772; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.62356496E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.37700189E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.25362176E-01; 1e-64
+
+
+Input: 158-gga_x_c09x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.248093; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.71000930E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.70225020E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.07597077E-09; 1e-64
+
+
+Input: 159-gga_c_sogga11_x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.047260; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 6.69732703E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.41011021E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -3.32044791E-19; 1e-64
+
+
+Input: 160-gga_x_lb.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.223634; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -8.36094509E-01; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -5.23389218E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.15829335E-02; 1e-64
+
+
+Input: 161-gga_xc_hcth_93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.280557; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -9.92107986E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.22275892E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.27869004E-19; 1e-64
+
+
+Input: 162-gga_xc_hcth_120.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.278990; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.59439339E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.20162202E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -5.67669434E-20; 1e-64
+
+
+Input: 163-gga_xc_hcth_147.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.280855; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.54581768E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.23450734E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.19859843E-20; 1e-64
+
+
+Input: 164-gga_xc_hcth_407.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.282217; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.07958881E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.29979382E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.19211688E-19; 1e-64
+
+
+Input: 165-gga_xc_edf1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.276642; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.12552468E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.11292083E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.34892998E-03; 1e-64
+
+
+Input: 166-gga_xc_xlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.274071; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.35545308E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.01781347E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -8.68028738E-04; 1e-64
+
+
+Input: 167-gga_xc_b97.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.223630; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.39258949E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.37458002E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 2.66041299E-21; 1e-64
+
+
+Input: 168-gga_xc_b97_1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.217333; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.40690882E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.28712042E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -9.56145237E-21; 1e-64
+
+
+Input: 169-gga_xc_b97_2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.219644; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.12777468E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.33270304E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.44136868E-20; 1e-64
+
+
+Input: 170-gga_xc_b97_d.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.278517; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.40152866E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.15460158E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.88974562E-20; 1e-64
+
+
+Input: 171-gga_xc_b97_k.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.161224; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.74477564E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.42776301E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.52044852E-21; 1e-64
+
+
+Input: 172-gga_xc_b97_3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.205582; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -6.40358731E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.09478418E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 2.19853431E-19; 1e-64
+
+
+Input: 173-gga_xc_pbe1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.275793; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.43353318E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.13029842E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.79384923E-09; 1e-64
+
+
+Input: 174-gga_xc_mpwlyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.273896; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.14268932E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.02842738E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.78719154E-10; 1e-64
+
+
+Input: 175-gga_xc_pbelyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.274832; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -3.99046938E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.04121476E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.98730229E-09; 1e-64
+
+
+Input: 176-gga_xc_sb98_1a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.207185; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.39396039E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.13414763E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 4.15974211E-21; 1e-64
+
+
+Input: 177-gga_xc_sb98_1b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.223514; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.32163771E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.34078082E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 2.41933278E-20; 1e-64
+
+
+Input: 178-gga_xc_sb98_1c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.224500; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.44702887E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.38212894E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 9.64969348E-22; 1e-64
+
+
+Input: 179-gga_xc_sb98_2a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.235009; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.98100822E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.46361749E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 7.63058881E-21; 1e-64
+
+
+Input: 180-gga_xc_sb98_2b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.211351; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.43011736E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.18477026E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 5.68813100E-21; 1e-64
+
+
+Input: 181-gga_xc_sb98_2c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.217048; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.40767972E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.27875656E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.67667293E-21; 1e-64
+
+
+Input: 182-gga_x_lbm.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.40767972E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.27875656E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.67667293E-21; 1e-64
+
+
+Input: 183-gga_x_ol2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.260060; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.56927731E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.77877928E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 4.07998597E+06; 1e-64
+
+
+Input: 184-gga_x_apbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.258713; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.11020641E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.76174015E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 185-gga_k_apbe.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.335737; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.94902651E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.22059558E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.40188563E-44; 1e-64
+
+
+Input: 186-gga_c_apbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013168; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.88565474E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.41050437E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -6.77544415E-24; 1e-64
+
+
+Input: 187-gga_k_tw1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.335228; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.94049250E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.21422489E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.45249088E-44; 1e-64
+
+
+Input: 188-gga_k_tw2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.333266; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.94115503E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.20078900E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.02279543E-44; 1e-64
+
+
+Input: 189-gga_k_tw3.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.335333; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.93846512E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.21419705E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.52106249E-44; 1e-64
+
+
+Input: 190-gga_k_tw4.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.335400; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.93719260E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.21417494E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.56627783E-44; 1e-64
+
+
+Input: 191-gga_x_htbs.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.252626; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.78040725E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.77071520E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 192-gga_x_airy.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.229577; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.24930352E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.46741016E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -9.09452914E-04; 1e-64
+
+
+Input: 193-gga_x_lag.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014378; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -7.50965557E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.33339788E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -9.09452817E-04; 1e-64
+
+
+Input: 194-gga_xc_mohlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.273671; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.19706030E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.14497302E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -4.02269146E-09; 1e-64
+
+
+Input: 195-gga_xc_mohlyp2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.278351; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.83498064E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.21174792E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -4.29508481E-09; 1e-64
+
+
+Input: 196-gga_xc_th_fl.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.426435; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -9.19073973E-01; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -5.70015487E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -4.11495763E-05; 1e-64
+
+
+Input: 197-gga_xc_th_fc.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.498354; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -3.77946039E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -6.26777243E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.74724024E+02; 1e-64
+
+
+Input: 198-gga_xc_th_fcfo.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.506440; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.04772718E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -6.36664328E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -8.30965343E+02; 1e-64
+
+
+Input: 199-gga_xc_th_fco.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.493764; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -3.69233653E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -6.24204583E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -4.80959184E+02; 1e-64
+
+
+Input: 200-gga_c_optc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013737; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.32760061E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.57426983E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 6.23674739E-24; 1e-64
+
+
+Input: 201-mgga_x_lta.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.447988; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 5.59856164E-17; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 202-mgga_x_tpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.253426; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.11012947E+04; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.93752545E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 203-mgga_x_m06_l.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.254221; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.62263977E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -4.13014848E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -4.62943086E-17; 1e-64
+
+
+Input: 204-mgga_x_gvt4.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.259077; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.03817175E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -4.44498727E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -6.69734867E-17; 1e-64
+
+
+Input: 205-mgga_x_tau_hcth.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.254163; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 1.48594089E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.94992183E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.92182457E-16; 1e-64
+
+
+Input: 206-mgga_x_br89.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.251677; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -6.99574113E-01; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.07070818E+00; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 2.49863420E-08; 1e-64
+
+
+Input: 207-mgga_x_bj06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -7.93699841E-01; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -5.73574508E-01 ; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 208-mgga_x_tb09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.73382058E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.25296143E+00 ; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 209-mgga_x_rpp09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -7.93699839E-01; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -5.73574508E-01 ; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 212-mgga_x_revtpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.251311; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.60865547E+04; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.93012197E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 213-mgga_x_pkzb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.257169; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.85078746E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -4.11168697E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173770E-09; 1e-64
+
+
+Input: 214-mgga_x_m05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.266830; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.95878101E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.48565847E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.01594926E-10; 1e-64
+
+
+Input: 215-mgga_x_m05_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.282811; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.63725181E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -4.14569232E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -9.30317577E-09; 1e-64
+
+
+Input: 216-mgga_x_m06_hf.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.023504; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 3.94908706E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; 2.70541550E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.66486222E-16; 1e-64
+
+
+Input: 217-mgga_x_m06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.195601; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.13557617E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.67823748E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 2.89894850E-16; 1e-64
+
+
+Input: 218-mgga_x_m06_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.127658; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.61132454E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.84813128E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 5.78339899E-17; 1e-64
+
+
+Input: 219-mgga_x_m08_hx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.142295; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 1.50350827E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.27519089E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.07226141E-09; 1e-64
+
+
+Input: 220-mgga_x_m08_so.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.137549; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.31183086E+04; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.28578182E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.62476854E-09; 1e-64
+
+
+Input: 231-mgga_c_tpss.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.015796; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 3.83896715E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.71747260E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.37162670E-17; 1e-64
+
+
+Input: 232-mgga_c_vsxc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.011422; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 4.56207574E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 4.10967730E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -5.08718061E-16; 1e-64
+
+
+Input: 233-mgga_c_m06_l.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.009883; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -2.28825720E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 7.51186407E-03; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 9.87496670E-10; 1e-64
+
+
+Input: 234-mgga_c_m06_hf.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.008057; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.10960368E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -6.80865349E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.79767022E-09; 1e-64
+
+
+Input: 235-mgga_c_m06.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.010241; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -4.05516045E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 5.25510919E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -7.33366902E-10; 1e-64
+
+
+Input: 236-mgga_c_m06_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.010598; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 7.79428456E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.38741525E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -5.49806868E-10; 1e-64
+
+
+Input: 237-mgga_c_m05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.010121; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.61391942E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -8.74987376E-03; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -8.89920686E-10; 1e-64
+
+
+Input: 238-mgga_c_m05_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.009667; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 4.64044023E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -7.64047101E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.10162374E-08; 1e-64
+
+
+Input: 239-mgga_c_pkzb.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.016966; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.79867739E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.82767031E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.08526707E-18; 1e-64
+
+
+Input: 240-mgga_c_bc95.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014166; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.43302997E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.17432996E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -6.07561514E-21; 1e-64
+
+
+Input: 500-gga_k_vw.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.500000; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 3.18305051E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 4.06452103E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 501-gga_k_ge2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.344683; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.87494507E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.21079881E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 3.19568916E-28; 1e-64
+
+
+Input: 502-gga_k_golden.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.433572; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.44082072E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.93338032E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 8.30879181E-28; 1e-64
+
+
+Input: 503-gga_k_yt65.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.389128; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.15788290E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.57208957E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.75224049E-28; 1e-64
+
+
+Input: 504-gga_k_baltin.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.566906; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 1.02896342E+00; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.01725260E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 1.59784458E-27; 1e-64
+
+
+Input: 505-gga_k_lieb.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.382082; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.11303114E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.51481718E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.34697188E-28; 1e-64
+
+
+Input: 506-gga_k_absr1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.380879; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; -3.27713876E-02; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 2.92773666E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 507-gga_k_absr2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.404010; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 3.53987947E-02; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.14847149E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 508-gga_k_gr.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.460968; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 2.03267869E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.69203101E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 509-gga_k_ludena.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.500000; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 3.18305051E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 4.06452103E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 510-gga_k_gp85.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.500000; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 3.18305051E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 4.06452103E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 511-gga_k_pearson.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.310586; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.87100767E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.02633935E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.99439337E-44; 1e-64
+
+
+Input: 512-gga_k_ol1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.326583; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.78114784E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.06752409E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.01315802E-28; 1e-64
+
+
+Input: 513-gga_k_ol2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.344817; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.87876490E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.21208591E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 3.19568916E-28; 1e-64
+
+
+Input: 514-gga_k_fr_b88.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.335138; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.96340454E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.19953752E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 4.21193112E-37; 1e-64
+
+
+Input: 515-gga_k_fr_pw86.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.335123; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.91310665E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.22397196E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 6.05118930E-41; 1e-64
+
+
+Input: 516-gga_k_dk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.346115; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.91865426E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.18999809E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 517-gga_k_perdew.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.248552; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.18106705E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 2.37042871E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.80012616E-60; 1e-64
+
+
+Input: 518-gga_k_vsk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.396935; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.87179183E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.22352087E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 519-gga_k_vjks.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.283686; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.90632736E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.01915441E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; -1.72567215E-27; 1e-64
+
+
+Input: 520-gga_k_ernzerhof.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.373290; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88896711E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.28039360E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 521-gga_k_lc94.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.337461; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.94817520E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.21018717E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 2.39360001E-57; 1e-64
+
+
+Input: 522-gga_k_llp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.334988; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.95285469E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.19614655E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 4.44008741E-37; 1e-64
+
+
+Input: 523-gga_k_thakkar.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.339960; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88040104E-01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.24306711E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 5.52649597E-37; 1e-64
+
+
+Input: 524-gga_x_wpbeh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.254471; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.77972623E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.63940570E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173769E-09; 1e-64
+
+
+Input: 525-gga_x_hjs_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.253996; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.40857482E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.73064199E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47173647E-09; 1e-64
+
+
+Input: 526-gga_x_hjs_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.240465; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.60834426E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.62985705E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.47174701E-09; 1e-64
+
+
+Input: 527-gga_x_hjs_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.245849; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.14659947E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.66629463E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.99355065E-13; 1e-64
+
+
+Input: 528-gga_x_hjs_b97x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.242971; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.22860133E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.66755729E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.49527597E-09; 1e-64
+
+
+Input: 529-gga_x_ityh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.140675; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.19761447E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.51465245E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 4.85339912E+02; 1e-64
+
diff --git a/testsuite/libxc/02-H_spin.inp b/testsuite/libxc/02-H_spin.inp
new file mode 100644
index 0000000..5d2b945
--- /dev/null
+++ b/testsuite/libxc/02-H_spin.inp
@@ -0,0 +1,13 @@
+# $Id: 02-H_spin.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 1
+
+%Orbitals
+ 1 | 0 | 1 | 0
+%
+
+SpinMode = polarized
diff --git a/testsuite/libxc/02-H_spin.test b/testsuite/libxc/02-H_spin.test
new file mode 100644
index 0000000..b9bfd73
--- /dev/null
+++ b/testsuite/libxc/02-H_spin.test
@@ -0,0 +1,2178 @@
+# $Id: 02-H_spin.test 772 2013-01-21 15:19:51Z micael $
+
+Test : Libxc: H atom with spin-polarization
+TestGroups : libxc
+Enabled : Yes
+
+
+Input: 02-H_spin.inp
+
+
+Input: 000-none.inp
+
+Input: 001-lda_x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.268038; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -8.47126569E-01; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -5.55111512E-17; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.26583040E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.72627181E-09; 1e-64
+
+
+Input: 002-lda_c_wigner.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042122; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.22820630E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.22820630E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.86817957E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.86817957E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.31581953E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.31581953E-09; 1e-64
+
+
+Input: 003-lda_c_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.033261; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -7.48943049E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.48943049E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.94852548E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.94852548E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 4.68861392E+07; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.68861392E+07; 1e-64
+
+
+Input: 004-lda_c_hl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.044783; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -7.16122488E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.16122488E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.70778546E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.70778546E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 005-lda_c_gl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.035760; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.13416815E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.92308839E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.54253573E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.63581264E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 006-lda_c_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.134019; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.23563284E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.77555756E-17; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.13291520E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -8.63135907E-10; 1e-64
+
+
+Input: 007-lda_c_vwn.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022142; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.72680037E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.66527382E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.99377036E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.84459546E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.81855618E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.45912797E-10; 1e-64
+
+
+Input: 008-lda_c_vwn_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040036; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.83516074E-01 ; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.79172003E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.10274536E-01 ; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.82697004E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00 ; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00 ; 1e-64
+
+
+Input: 009-lda_c_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022327; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.23405311E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.67344695E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.70977025E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.87038835E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.47236046E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.65251479E-10; 1e-64
+
+
+Input: 010-lda_c_pz_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022327; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.23599245E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.67325463E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.70977025E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.87038835E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.47236046E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.65251479E-10; 1e-64
+
+
+Input: 011-lda_c_ob_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.020724; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.21539697E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.52758693E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.74101881E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.61786120E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.46140031E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.04891148E-09; 1e-64
+
+
+Input: 012-lda_c_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022184; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.65173215E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.67212298E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.93307587E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.85090276E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 013-lda_c_pw_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022184; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.65167600E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.67215407E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.93304567E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.85092098E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 014-lda_c_ob_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.021422; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.53068951E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.57638780E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.84200205E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.74942611E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 017-lda_c_vbh.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.039846; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.42306061E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.62028147E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.83626667E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.76390473E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 020-lda_xc_teter93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.290250; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.66473649E-01; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -8.83707470E-01; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.92051106E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.55036241E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.48525678E-09; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.49787629E-09; 1e-64
+
+
+Input: 022-lda_c_ml1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.41567949E+37; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.91542379E+36; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.58284938E+11; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 023-lda_c_ml2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.41567949E+37; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.91542379E+36; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.58284938E+11; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 024-lda_c_gombas.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.044398; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -7.03439144E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.03439144E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.54510896E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.54510896E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.31634612E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.31634612E-09; 1e-64
+
+
+Input: 025-lda_c_pw_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.039936; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.76390579E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.79007822E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.02084730E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.82066792E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.30954276E-08; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.72682420E-07; 1e-64
+
+
+Input: 027-lda_c_rc04.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.016809; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.34265176E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.98978388E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.61269120E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.30982375E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 028-lda_c_vwn_1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022142; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.28042191E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.66527382E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.70529296E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.84459546E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.36603021E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.45912797E-10; 1e-64
+
+
+Input: 029-lda_c_vwn_2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022142; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.69221071E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.66527382E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.96758847E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.84459546E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 5.39089062E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.45912797E-10; 1e-64
+
+
+Input: 030-lda_c_vwn_3.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022142; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.70777272E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.66527382E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.97977460E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.84459546E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.76691586E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.45912797E-10; 1e-64
+
+
+Input: 031-lda_c_vwn_4.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.022142; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.77847847E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.66527382E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.04566940E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.84459546E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.04618300E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.45912797E-10; 1e-64
+
+
+Input: 050-lda_k_tf.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.458962; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.35266774E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.37993374E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 4.75330318E-44; 1e-64
+
+
+Input: 051-lda_k_lp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.474529; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39854683E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.52849008E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 4.91452327E-44; 1e-64
+
+
+Input: 084-gga_c_op_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 085-gga_c_op_g96.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 086-gga_c_op_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 087-gga_c_op_b88.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 088-gga_c_ft97.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.000004; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -4.10334161E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 4.73081436E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.80408768E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 1.87983099E-12; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.43261079E-37; 1e-64
+
+
+Input: 089-gga_c_spbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.008259; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.37132872E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.37154483E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.40627733E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.75507188E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -3.10760203E-17; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.10760203E-17; 1e-64
+
+
+Input: 090-gga_x_ssb_sw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.305890; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.48053416E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.75550960E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11412408E-09; 1e-64
+
+
+Input: 091-gga_x_ssb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.304034; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.86389642E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 5.55111512E-17; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.66823948E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419659E-09; 1e-64
+
+
+Input: 092-gga_x_ssb_d.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310948; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.27130820E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 5.55111512E-17; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.77169371E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419392E-09; 1e-64
+
+
+Input: 093-gga_xc_hcth_407p.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.321913; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.13726073E-01; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.70189059E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.82375804E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.90863879E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.62214073E-19; 1e-64
+
+
+Input: 094-gga_xc_hcth_p76.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.226343; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.20821041E-02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.88402161E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -4.06000038E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.85308612E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.96312278E-19; 1e-64
+
+
+Input: 095-gga_xc_hcth_p14.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.341746; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.99667748E-02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 9.43440021E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -7.69359963E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -5.28022005E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 7.20957601E-20; 1e-64
+
+
+Input: 096-gga_xc_b97_gga1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.318680; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.46580801E-01; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.17129912E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.30947950E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.94528520E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.80244704E-19; 1e-64
+
+
+Input: 097-gga_xc_hcth_a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.197837; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.32890008E-01; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 8.98849443E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.87165145E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.79967810E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.21587562E-19; 1e-64
+
+
+Input: 098-gga_x_bpccac.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310142; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.79019356E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.66245810E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.61674998E-18; 1e-64
+
+
+Input: 099-gga_c_revtca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.69809869E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.73695892E-07; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.00224951E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 2.92217409E-12; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.12143088E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 2.83405585E-30; 1e-64
+
+
+Input: 100-gga_c_tca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.006733; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 9.95365718E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 9.95323266E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 2.67442511E-04; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.72381813E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.76374981E-22; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.76374992E-22; 1e-64
+
+
+Input: 101-gga_x_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.305941; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.65218428E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.59808373E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 102-gga_x_pbe_r.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310515; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.75012622E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.64498896E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.87548022E-09; 1e-64
+
+
+Input: 103-gga_x_b86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.309973; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.94359721E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.63603638E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.39591358E-09; 1e-64
+
+
+Input: 104-gga_x_herman.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.327354; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.51587382E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.71146207E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 7.85914074E+06; 1e-64
+
+
+Input: 105-gga_x_b86_mgc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308902; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.00424212E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.61450262E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.19532596E-07; 1e-64
+
+
+Input: 106-gga_x_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.309756; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.95761864E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.61468100E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.22262369E-03; 1e-64
+
+
+Input: 107-gga_x_g96.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311212; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.74862551E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.63234243E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.43966346E+02; 1e-64
+
+
+Input: 108-gga_x_pw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311355; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.41367028E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.53071748E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.69898600E-06; 1e-64
+
+
+Input: 109-gga_x_pw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.306871; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.93977712E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.60355041E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.54461424E-19; 1e-64
+
+
+Input: 110-gga_x_optx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310592; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -8.92312101E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.81273782E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.47120254E-09; 1e-64
+
+
+Input: 111-gga_x_dk87_r1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308716; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.28714500E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.56734423E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.54970791E-03; 1e-64
+
+
+Input: 112-gga_x_dk87_r2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308637; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.28260624E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.56662731E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.89533023E-03; 1e-64
+
+
+Input: 113-gga_x_lg93.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.309778; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.36410013E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.45637909E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.28261669E-11; 1e-64
+
+
+Input: 114-gga_x_ft97_a.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.312159; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.40915114E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.65847751E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.25431768E-03; 1e-64
+
+
+Input: 115-gga_x_ft97_b.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311973; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.39039703E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.65671468E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.25431768E-03; 1e-64
+
+
+Input: 116-gga_x_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.292694; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.12275621E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.48621856E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 117-gga_x_rpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311188; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.79019348E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.66245908E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 118-gga_x_wc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.299857; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.29601458E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.51621235E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 119-gga_x_mpw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308661; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.99030425E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.61174461E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -7.22098236E-19; 1e-64
+
+
+Input: 120-gga_x_am05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.278062; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.27855804E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.36928515E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.03591214E-04; 1e-64
+
+
+Input: 121-gga_x_pbea.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.302306; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.52393191E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.55486537E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419433E-09; 1e-64
+
+
+Input: 122-gga_x_mpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.307416; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.69892109E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.61683619E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.08935142E-09; 1e-64
+
+
+Input: 123-gga_x_xpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.309015; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.88387857E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.62682217E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.31364780E-09; 1e-64
+
+
+Input: 125-gga_x_bayesian.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.306231; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.27707419E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.59608460E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.33348920E-09; 1e-64
+
+
+Input: 126-gga_x_pbe_jsjr.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.296867; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.57714518E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.52282842E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 130-gga_c_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.005976; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.63601013E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.63624392E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.50029044E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.71716443E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.11595662E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.11595662E-23; 1e-64
+
+
+Input: 131-gga_c_lyp.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.39113301E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -6.93889390E-18; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.09438041E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.84269166E-10; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 132-gga_c_p86.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.002656; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.87009086E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.87026735E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.38556767E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.19943050E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.47236045E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.65251473E-10; 1e-64
+
+
+Input: 133-gga_c_pbe_sol.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.007952; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.40388712E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.40412175E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.69889152E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.83716287E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.41692865E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.41692865E-23; 1e-64
+
+
+Input: 134-gga_c_pw91.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.006594; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.47421644E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.47445368E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.63926665E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.71769408E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.03550511E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.03550511E-23; 1e-64
+
+
+Input: 135-gga_c_am05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.019416; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.46403614E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.52942184E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.69037491E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.66712105E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.33019741E-09; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -7.39300536E-10; 1e-64
+
+
+Input: 136-gga_c_xpbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.005843; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.44006617E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.44030649E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.62644265E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.61657147E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -5.01615543E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -5.01615543E-24; 1e-64
+
+
+Input: 137-gga_c_lm.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.092049; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.23354792E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.56282393E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.41716748E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -8.74180030E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.72848269E-17; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.68795369E-06; 1e-64
+
+
+Input: 138-gga_c_pbe_jrgx.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.009094; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.26487024E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.26510453E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.77203438E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.89301226E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -3.70625642E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.70625642E-23; 1e-64
+
+
+Input: 139-gga_x_optb88_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.302429; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.21806238E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.55386359E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.05076790E-03; 1e-64
+
+
+Input: 140-gga_x_pbek1_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308269; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.70589781E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.62270848E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.45254363E-09; 1e-64
+
+
+Input: 141-gga_x_optpbe_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.302624; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.00984318E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.57503867E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.53547373E-09; 1e-64
+
+
+Input: 142-gga_x_rge2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.296807; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.21272752E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.53421883E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 143-gga_c_rge2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.007178; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.49711242E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.49734702E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.63353110E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.79616979E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.79864198E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.79864198E-23; 1e-64
+
+
+Input: 144-gga_x_rpw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.315237; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -5.18869862E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.55875577E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.67597284E-06; 1e-64
+
+
+Input: 145-gga_x_kt1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.274940; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.81553174E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.27498732E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.72627181E-09; 1e-64
+
+
+Input: 146-gga_xc_kt2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.306936; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.57261940E-01; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -4.81561364E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.14986120E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.74503083E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.04881045E-09; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.39563074E-09; 1e-64
+
+
+Input: 147-gga_c_wl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 148-gga_c_wi.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.002173; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 9.64802083E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 9.64802083E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.64258361E-03; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.64258361E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.26601876E-20; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.26601876E-20; 1e-64
+
+
+Input: 149-gga_x_mb88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.284268; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.21453624E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.40113859E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.22262361E-03; 1e-64
+
+
+Input: 150-gga_x_sogga.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.291992; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.11457275E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.48186727E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.67917386E-09; 1e-64
+
+
+Input: 151-gga_x_sogga11.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.279658; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.63018768E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.16492846E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.58932313E-08; 1e-64
+
+
+Input: 152-gga_c_sogga11.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.035041; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.54509092E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.54535597E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 4.40620727E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.53592868E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -9.72915790E-08; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.81252111E-09; 1e-64
+
+
+Input: 153-gga_c_wi0.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.012445; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.39270799E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.39270799E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.61357015E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.61357015E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.29065139E-19; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.29065139E-19; 1e-64
+
+
+Input: 154-gga_xc_th1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.259487; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -3.58224424E+03 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -9.53496926E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 2.59576346E+01 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; 4.90757090E-02; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.87922262E-06 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -5.83701794E-06 ; 1e-64
+
+
+Input: 155-gga_xc_th2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.357325; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.51062420E+03 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -8.79773045E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.35156336E+01 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -5.05567190E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 4.17264466E-07 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 7.23630049E-07 ; 1e-64
+
+
+Input: 156-gga_xc_th3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.383791; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -3.44559602E+03 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -9.16269516E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -7.22967887E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -5.35965621E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 3.18949775E-07 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.98461133E-07 ; 1e-64
+
+
+Input: 157-gga_xc_th4.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.379287; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 9.20360499E+02 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -6.49232467E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -7.68561515E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -5.38666905E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.09279949E-07 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 7.69278038E-07 ; 1e-64
+
+
+Input: 158-gga_x_c09x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.297990; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.16428464E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.52632995E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.87547987E-09; 1e-64
+
+
+Input: 159-gga_c_sogga11_x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.030474; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -4.92375007E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.92207098E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.67681029E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.23658573E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.90004065E-19; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.90004065E-19; 1e-64
+
+
+Input: 160-gga_x_lb.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.278930; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.01085627E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -5.55111512E-17; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -6.11393075E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.15829338E-02; 1e-64
+
+
+Input: 161-gga_xc_hcth_93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017575 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 7.57894741E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.94536132E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 7.82390114E-16 ; 1e-64
+
+
+Input: 162-gga_xc_hcth_120.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017675 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.10518009E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.98194806E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.75838661E-16 ; 1e-64
+
+
+Input: 163-gga_xc_hcth_147.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017718 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.02560344E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.98936728E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 4.79162425E-16 ; 1e-64
+
+
+Input: 164-gga_xc_hcth_407.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017812 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.21025637E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.93799368E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 7.39500945E-16 ; 1e-64
+
+
+Input: 165-gga_xc_edf1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311950; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.55483932E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.06953566E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.24873297E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.70842098E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -8.73326645E-10; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.38872384E-03; 1e-64
+
+
+Input: 166-gga_xc_xlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311633; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 3.39113301E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -4.22444487E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.09438041E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.63488938E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -7.84269166E-10; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -8.82734187E-04; 1e-64
+
+
+Input: 167-gga_xc_b97.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014145 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.06242094E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.92509192E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.90488573E-16 ; 1e-64
+
+
+Input: 168-gga_xc_b97_1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013854 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.13113581E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.85064406E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.79680958E-16 ; 1e-64
+
+
+Input: 169-gga_xc_b97_2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013806 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.78603807E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.85267413E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.44429490E-16 ; 1e-64
+
+
+Input: 170-gga_xc_b97_d.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.017334 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.16351345E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.85209138E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.79840864E-16 ; 1e-64
+
+
+Input: 171-gga_xc_b97_k.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.009989 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.44885579E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.67758097E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.54099114E-16 ; 1e-64
+
+
+Input: 172-gga_xc_b97_3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.012874 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.37830956E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.56390654E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.71972848E-15 ; 1e-64
+
+
+Input: 173-gga_xc_pbe1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.316120; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.21057660E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.44137331E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.62859522E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.79911338E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -4.72824608E-10; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.36013168E-09; 1e-64
+
+
+Input: 174-gga_xc_mpwlyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311318; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 2.98416433E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.99030865E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.20230720E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.64587976E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -9.08383608E-10; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.13509536E-10; 1e-64
+
+
+Input: 175-gga_xc_pbelyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.311698; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 2.50936753E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.65219381E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.32822179E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.67204322E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.05318379E-09; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.36013168E-09; 1e-64
+
+
+Input: 176-gga_xc_sb98_1a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013363 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.18998616E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.62143249E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.67833428E-16 ; 1e-64
+
+
+Input: 177-gga_xc_sb98_1b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013847 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -5.56585534E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.79402576E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.78826033E-16 ; 1e-64
+
+
+Input: 178-gga_xc_sb98_1c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014188 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.03430773E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.93586571E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.94238698E-16 ; 1e-64
+
+
+Input: 179-gga_xc_sb98_2a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.014502 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.99552223E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.95414485E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.57726177E-16 ; 1e-64
+
+
+Input: 180-gga_xc_sb98_2b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013299 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.22495629E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.65299031E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.01178813E-16 ; 1e-64
+
+
+Input: 181-gga_xc_sb98_2c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.013729 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.16527285E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.80666894E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.96785217E-16 ; 1e-64
+
+
+Input: 182-gga_x_lbm.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.05867961E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -6.60582700E-17; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -5.89017696E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.15829342E-02; 1e-64
+
+
+Input: 183-gga_x_ol2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310498; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -7.15641192E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.57952463E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.23828701E+06; 1e-64
+
+
+Input: 184-gga_x_apbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310728; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.26698923E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.63502507E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 185-gga_k_apbe.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.511104; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39645475E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.87981800E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 8.57495894E-44; 1e-64
+
+
+Input: 186-gga_c_apbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.005151; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.72270150E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.72293379E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.38195184E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.64237231E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.87369886E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -7.87369886E-24; 1e-64
+
+
+Input: 187-gga_k_tw1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.510397; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39554048E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.87151794E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 8.65528976E-44; 1e-64
+
+
+Input: 188-gga_k_tw2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.508857; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39581742E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.86384520E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 7.97319076E-44; 1e-64
+
+
+Input: 189-gga_k_tw3.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.510407; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39530236E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.87041648E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 8.76414040E-44; 1e-64
+
+
+Input: 190-gga_k_tw4.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.510415; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39515313E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.86971955E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 8.83591528E-44; 1e-64
+
+
+Input: 191-gga_x_htbs.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.303658; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.29601458E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.53514857E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 192-gga_x_airy.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.280236; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 1.96707174E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.37833405E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.31037885E-04; 1e-64
+
+
+Input: 193-gga_x_lag.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.011252; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -5.19648127E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -9.93477706E-03; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.31037757E-04; 1e-64
+
+
+Input: 194-gga_xc_mohlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.305051; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.69543017E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -8.05310807E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.54407538E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.70331225E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.30141267E-09; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -4.59609172E-09; 1e-64
+
+
+Input: 195-gga_xc_mohlyp2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.318986; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.69556651E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.15261518E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -5.47190203E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.90827573E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -3.92134583E-10; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -5.24678156E-09; 1e-64
+
+
+Input: 196-gga_xc_th_fl.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.487875; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.10831509E+00; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -6.61320178E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -6.77626358E-21; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -4.61886560E-05; 1e-64
+
+
+Input: 197-gga_xc_th_fc.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.573242; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.67460721E+02 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -6.56742795E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -5.35792509E+01 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -7.36548773E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -8.93321001E-06 ; 1e-64
+
+
+Input: 198-gga_xc_th_fcfo.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.558306; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.46512704E+02 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -6.58127454E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -4.38653762E+01 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -7.53923508E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -8.95060037E-06 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.78834005E-05 ; 1e-64
+
+
+Input: 199-gga_xc_th_fco.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.543020; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -7.81514513E+01 ; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -6.20523637E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -3.61101229E+01 ; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -7.37511241E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -5.00090108E-06 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.01889288E-05 ; 1e-64
+
+
+Input: 200-gga_c_optc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.004626; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.62385914E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.09750626E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.76567653E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.22932960E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.94293083E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.91806135E-24; 1e-64
+
+
+Input: 201-mgga_x_lta.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.389996; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 3.52687283E-17; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; 7.10403469E-17; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 202-mgga_x_tpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.312500; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.64931973E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.79605582E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 203-mgga_x_m06_l.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.316052; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.92108289E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -5.87607232E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.25885556E-17; 1e-64
+
+
+Input: 204-mgga_x_gvt4.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.314766; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.27282213E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -5.18084002E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.33945857E-16; 1e-64
+
+
+Input: 205-mgga_x_tau_hcth.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.304247; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 2.46113034E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.92021768E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.84365585E-16; 1e-64
+
+
+Input: 206-mgga_x_br89.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.313068; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.00754238E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -8.12185177E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.55688705E-08; 1e-64
+
+
+Input: 207-mgga_x_bj06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.00000160E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -7.15330065E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 208-mgga_x_tb09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.18448243E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.56262346E+00; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 209-mgga_x_rpp09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.00000160E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -7.15330064E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 212-mgga_x_revtpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.312495; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.20228378E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.88681501E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 213-mgga_x_pkzb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308140; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.78158809E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.88835646E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 214-mgga_x_m05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.308399; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.69614247E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.70660625E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.53993691E-10; 1e-64
+
+
+Input: 215-mgga_x_m05_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.310814; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.83892521E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.73182073E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.17212670E-08; 1e-64
+
+
+Input: 216-mgga_x_m06_hf.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.004757; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 3.95127900E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; 2.69762549E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.32972866E-16; 1e-64
+
+
+Input: 217-mgga_x_m06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.227710; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.80647674E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.73177976E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 5.79790515E-16; 1e-64
+
+
+Input: 218-mgga_x_m06_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.141654; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.29206051E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.47443704E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.15668155E-16; 1e-64
+
+
+Input: 219-mgga_x_m08_hx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.153656; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.32501965E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.27696855E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.35096472E-09; 1e-64
+
+
+Input: 220-mgga_x_m08_so.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.140772; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.64514851E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -6.61528848E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.04708008E-09; 1e-64
+
+
+Input: 232-mgga_c_vsxc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -3.76643769E-06; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 9.64108744E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.74569336E-06; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 3.16562887E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.18162326E-15; 1e-64
+
+
+Input: 233-mgga_c_m06_l.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.45221341E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.66362533E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.78763941E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 6.81131690E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.23611909E-09; 1e-64
+
+
+Input: 234-mgga_c_m06_hf.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -3.43864088E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -3.56938060E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.50673531E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.72845752E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.25026917E-09; 1e-64
+
+
+Input: 235-mgga_c_m06.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.63635885E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.39174959E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.92187962E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 3.59971954E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -9.18007378E-10; 1e-64
+
+
+Input: 236-mgga_c_m06_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.25121503E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.21271185E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 9.12123425E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 1.89169092E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -6.88230555E-10; 1e-64
+
+
+Input: 237-mgga_c_m05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.94892888E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.33179809E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.14974009E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.95635612E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.00665751E-08; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.57249185E-10; 1e-64
+
+
+Input: 238-mgga_c_m05_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.50841390E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 4.84969868E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.82860901E+00; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.14517108E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 8.56281650E-08; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 6.24949515E-09; 1e-64
+
+
+Input: 239-mgga_c_pkzb.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.50309550E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 8.09367624E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.29544437E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.14076355E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -3.93204024E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 7.48146204E-19; 1e-64
+
+
+Input: 240-mgga_c_bc95.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -3.97031926E-20; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 8.76058422E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.89432361E-20; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 2.19582893E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.35393668E-27; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.47816327E-21; 1e-64
+
+
+Input: 500-gga_k_vw.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.500000; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 3.18305051E-01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.06452103E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 501-gga_k_ge2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.514517; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38803497E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.83154719E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 3.19568916E-28; 1e-64
+
+
+Input: 502-gga_k_golden.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.603406; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.44462253E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 5.55412871E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 8.30879181E-28; 1e-64
+
+
+Input: 503-gga_k_yt65.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.558962; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.41632875E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 5.19283795E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 5.75224049E-28; 1e-64
+
+
+Input: 504-gga_k_baltin.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.736739; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.52950388E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 6.63800098E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 1.59784458E-27; 1e-64
+
+
+Input: 505-gga_k_lieb.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.551916; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.41184357E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 5.13556556E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 5.34697188E-28; 1e-64
+
+
+Input: 506-gga_k_absr1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.310908; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; -2.38994057E-01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.25998833E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 507-gga_k_absr2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.347625; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; -1.30780638E-01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.61038303E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 508-gga_k_gr.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.438040; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.35694907E-01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.47322998E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 509-gga_k_ludena.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.500000; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 3.18305051E-01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.06452103E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 510-gga_k_gp85.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.500000; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 3.18305051E-01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.06452103E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 511-gga_k_pearson.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.489001; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38793570E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.76506726E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 4.75330318E-44; 1e-64
+
+
+Input: 512-gga_k_ol1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.497055; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.37961891E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.69446901E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.01315802E-28; 1e-64
+
+
+Input: 513-gga_k_ol2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.514728; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38862918E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.83356869E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 3.19568916E-28; 1e-64
+
+
+Input: 514-gga_k_fr_b88.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.510597; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39921715E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.86745373E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 5.36291316E-37; 1e-64
+
+
+Input: 515-gga_k_fr_pw86.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.510087; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38955133E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.88486522E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 8.75770012E-41; 1e-64
+
+
+Input: 516-gga_k_dk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.515616; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39125217E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.88340457E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 517-gga_k_perdew.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.414752; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.31813873E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.96979892E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 7.05587579E-60; 1e-64
+
+
+Input: 518-gga_k_vsk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.547599; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38779136E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.83064536E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 519-gga_k_vjks.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.472307; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39397484E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.74495568E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; -1.72567215E-27; 1e-64
+
+
+Input: 520-gga_k_ernzerhof.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.534440; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38891992E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.87570391E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 2.87612024E-27; 1e-64
+
+
+Input: 521-gga_k_lc94.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.511913; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39712964E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.86709174E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 6.03187004E-57; 1e-64
+
+
+Input: 522-gga_k_llp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.510138; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.39792939E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.86067732E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 5.65341704E-37; 1e-64
+
+
+Input: 523-gga_k_thakkar.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 0.512858; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.38130593E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.88407822E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 7.03670525E-37; 1e-64
+
+
+Input: 524-gga_x_wpbeh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.306389; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.70586161E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.53022282E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419435E-09; 1e-64
+
+
+Input: 525-gga_x_hjs_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.305942; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.65359578E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.59922497E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11419281E-09; 1e-64
+
+
+Input: 526-gga_x_hjs_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.292694; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.12175146E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.48587270E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.11420609E-09; 1e-64
+
+
+Input: 527-gga_x_hjs_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.297547; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.66255261E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.51596418E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.70314675E-13; 1e-64
+
+
+Input: 528-gga_x_hjs_b97x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.293470; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.75313573E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.49258432E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.40377177E-09; 1e-64
+
+
+Input: 529-gga_x_ityh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.192829; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.97772004E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.39147604E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -7.25272232E+03; 1e-64
+
diff --git a/testsuite/libxc/03-He.inp b/testsuite/libxc/03-He.inp
new file mode 100644
index 0000000..ac0c30a
--- /dev/null
+++ b/testsuite/libxc/03-He.inp
@@ -0,0 +1,11 @@
+# $Id: 03-He.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 2
+
+%Orbitals
+ 1 | 0 | 1 | 1
+%
diff --git a/testsuite/libxc/03-He.test b/testsuite/libxc/03-He.test
new file mode 100644
index 0000000..4a94bb6
--- /dev/null
+++ b/testsuite/libxc/03-He.test
@@ -0,0 +1,1596 @@
+# $Id: 03-He.test 772 2013-01-21 15:19:51Z micael $
+
+Test : Libxc: He atom
+TestGroups : libxc
+Enabled : Yes
+
+
+Input: 03-He.inp
+
+
+Input: 000-none.inp
+
+Input: 001-lda_x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.072151; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.69423262E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.43365862E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 002-lda_c_wigner.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.098736; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -5.47119177E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.61397480E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 003-lda_c_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.128112; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.74659275E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.18615565E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 004-lda_c_hl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.126491; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.18364439E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.03344453E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 005-lda_c_gl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.150478; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.16044685E-01; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.70187000E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 006-lda_c_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.536076; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -8.47116312E-01; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.21682931E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 007-lda_c_vwn.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 008-lda_c_vwn_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.160747; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.16028827E-01; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -6.47103963E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 009-lda_c_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121380; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.36101244E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.70501424E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 010-lda_c_pz_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121412; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.36248305E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.70501424E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 011-lda_c_ob_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.117675; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.26166851E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.61070108E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 012-lda_c_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121804; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.39162213E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.66776381E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 013-lda_c_pw_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121804; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.39157983E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.66775381E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 014-lda_c_ob_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.118598; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.25472418E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.51240608E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 017-lda_c_vbh.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.158505; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.11717088E-01; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -6.45424026E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 020-lda_xc_teter93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.193576; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.78970427E+00; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.89802978E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 022-lda_c_ml1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.061719; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -4.33264891E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.36750098E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 023-lda_c_ml2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.029792; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.97962562E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.19620796E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 024-lda_c_gombas.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.124507; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.40161141E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.91663864E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 025-lda_c_pw_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.159664; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.15762199E-01; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -6.40369927E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 027-lda_c_rc04.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.102828; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -7.24968711E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.90970155E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 028-lda_c_vwn_1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 029-lda_c_vwn_2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 030-lda_c_vwn_3.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 031-lda_c_vwn_4.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 050-lda_k_tf.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.671695; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.65654947E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.29392646E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 051-lda_k_lp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.796230; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.95015785E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.47348313E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 084-gga_c_op_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.067539; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -4.82458942E-02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.52876224E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 085-gga_c_op_g96.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.056994; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.87904729E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.29680750E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 9.10915583E-29; 1e-64
+
+
+Input: 086-gga_c_op_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.057306; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.85261866E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.97006143E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 7.91302595E-26; 1e-64
+
+
+Input: 087-gga_c_op_b88.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.056752; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 3.08501339E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.11501871E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.74007078E-24; 1e-64
+
+
+Input: 088-gga_c_ft97.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.049314; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.78277158E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 2.41820850E-05; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -4.41569940E-30; 1e-64
+
+
+Input: 089-gga_c_spbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.054790; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.08735032E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.05347772E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.49957934E-24; 1e-64
+
+
+Input: 090-gga_x_ssb_sw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.223560; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.59419857E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.70318714E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.41310068E-27; 1e-64
+
+
+Input: 091-gga_x_ssb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.260617; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.08783824E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.58268572E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.91070515E-27; 1e-64
+
+
+Input: 092-gga_x_ssb_d.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.281689; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -9.56941909E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.74490590E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.32281475E-27; 1e-64
+
+
+Input: 093-gga_xc_hcth_407p.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.301798; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 7.07354725E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.53657393E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 2.14897246E-26; 1e-64
+
+
+Input: 094-gga_xc_hcth_p76.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.958469; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 1.23047849E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; 1.21366455E+00; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.35043915E-25; 1e-64
+
+
+Input: 095-gga_xc_hcth_p14.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.321560; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 9.32204093E+01; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.17304201E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -4.67681046E-27; 1e-64
+
+
+Input: 096-gga_xc_b97_gga1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.308848; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 5.41166480E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -1.90820967E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -5.60360294E-27; 1e-64
+
+
+Input: 097-gga_xc_hcth_a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.822667; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 6.47434805E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.79360246E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.14883890E-26; 1e-64
+
+
+Input: 098-gga_x_bpccac.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.240565; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.68117978E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -4.38735359E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -5.57269331E-27; 1e-64
+
+
+Input: 099-gga_c_revtca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050174; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 6.31492688E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.19161301E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 3.16708081E-29; 1e-64
+
+
+Input: 100-gga_c_tca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050174; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 6.31492688E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.19161301E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 3.16708081E-29; 1e-64
+
+
+Input: 101-gga_x_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.223763; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.58358926E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.69182073E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.38600112E-27; 1e-64
+
+
+Input: 102-gga_x_pbe_r.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.242061; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.65284696E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.53003821E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.32606493E-27; 1e-64
+
+
+Input: 103-gga_x_b86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.239890; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.78965075E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.67085710E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.87318464E-27; 1e-64
+
+
+Input: 104-gga_x_herman.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.309415; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.48720839E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.48373134E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 8.78422394E+00; 1e-64
+
+
+Input: 105-gga_x_b86_mgc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.235607; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.83253135E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.71929647E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.81278354E-14; 1e-64
+
+
+Input: 106-gga_x_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.239023; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.79955926E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.59572982E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.48070066E-09; 1e-64
+
+
+Input: 107-gga_x_g96.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.244849; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.65177632E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.56376873E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 2.02180837E-04; 1e-64
+
+
+Input: 108-gga_x_pw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.245419; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.12207227E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.83830694E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 3.35571218E-14; 1e-64
+
+
+Input: 109-gga_x_pw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.227484; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.78694297E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.50502867E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 4.95956871E-26; 1e-64
+
+
+Input: 110-gga_x_optx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.242366; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -6.32131299E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.14560596E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -3.97389699E-27; 1e-64
+
+
+Input: 111-gga_x_dk87_r1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.234865; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.03257390E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.70612162E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 5.03810983E-10; 1e-64
+
+
+Input: 112-gga_x_dk87_r2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.234548; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.02936488E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.71174342E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 3.66906169E-09; 1e-64
+
+
+Input: 113-gga_x_lg93.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.239112; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.37991183E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.85425314E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 6.51752308E-18; 1e-64
+
+
+Input: 114-gga_x_ft97_a.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.248638; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.41174272E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.36640275E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.50184699E-09; 1e-64
+
+
+Input: 115-gga_x_ft97_b.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.247891; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.39850705E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.36291671E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.50184699E-09; 1e-64
+
+
+Input: 116-gga_x_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.170777; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.50211763E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.45391050E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.46663041E-27; 1e-64
+
+
+Input: 117-gga_x_rpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.244753; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.68117972E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.47846339E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -5.25630518E-27; 1e-64
+
+
+Input: 118-gga_x_wc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.199428; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.33173200E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.35442553E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.27430384E-27; 1e-64
+
+
+Input: 119-gga_x_mpw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.234646; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.82267113E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.56319144E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 3.36042394E-25; 1e-64
+
+
+Input: 120-gga_x_am05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.112250; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.62220475E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.30010886E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 6.25117310E-10; 1e-64
+
+
+Input: 121-gga_x_pbea.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.209225; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.49289835E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.72247525E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.65595744E-26; 1e-64
+
+
+Input: 122-gga_x_mpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.229664; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.61663823E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.67146941E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -5.42195755E-28; 1e-64
+
+
+Input: 123-gga_x_xpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.236061; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.74742292E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.68112434E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.71466362E-27; 1e-64
+
+
+Input: 125-gga_x_bayesian.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.224925; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.31835239E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.55077545E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.85985413E-25; 1e-64
+
+
+Input: 126-gga_x_pbe_jsjr.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.187469; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.82342016E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.51914559E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.01184619E-27; 1e-64
+
+
+Input: 130-gga_c_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045646; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.20814172E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.17409997E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.94727954E-30; 1e-64
+
+
+Input: 131-gga_c_lyp.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045301; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.28799814E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.74117187E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -5.22291343E-24; 1e-64
+
+
+Input: 132-gga_c_p86.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046605; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.11494497E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.44669261E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -3.85390475E-25; 1e-64
+
+
+Input: 133-gga_c_pbe_sol.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.056615; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.01605378E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.90792255E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.25314072E-30; 1e-64
+
+
+Input: 134-gga_c_pw91.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050054; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.06762197E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.41498130E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.84190516E-30; 1e-64
+
+
+Input: 135-gga_c_am05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.106479; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.32462972E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.95012369E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 2.00231370E-29; 1e-64
+
+
+Input: 136-gga_c_xpbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046753; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.03902068E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.17019180E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 8.83147995E-31; 1e-64
+
+
+Input: 137-gga_c_lm.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.396879; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -2.21395605E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.28063224E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -2.88747845E-12; 1e-64
+
+
+Input: 138-gga_c_pbe_jrgx.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.062614; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 9.09153645E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.38873679E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 6.55611907E-30; 1e-64
+
+
+Input: 139-gga_x_optb88_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.209714; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.27661361E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.55610900E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.27256848E-09; 1e-64
+
+
+Input: 140-gga_x_pbek1_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.233077; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.62157170E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.61869025E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.14508129E-27; 1e-64
+
+
+Input: 141-gga_x_optpbe_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.210497; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.12938565E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.47654470E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.06972379E-27; 1e-64
+
+
+Input: 142-gga_x_rge2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.187230; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.56573913E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.25017651E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 8.45788136E-30; 1e-64
+
+
+Input: 143-gga_c_rge2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.052417; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.09040280E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.60277814E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 3.15435765E-30; 1e-64
+
+
+Input: 144-gga_x_rpw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.260947; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.67009493E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.88060108E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 3.31025826E-14; 1e-64
+
+
+Input: 145-gga_x_kt1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.205372; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -4.83375391E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.34131121E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.27371890E-28; 1e-64
+
+
+Input: 146-gga_xc_kt2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.352820; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.83392991E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.78528615E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.27371890E-28; 1e-64
+
+
+Input: 147-gga_c_wl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045774; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.86569037E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.73471349E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -8.64244925E-11; 1e-64
+
+
+Input: 148-gga_c_wi.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.007771; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 4.68041255E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 4.32961136E-03; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.95026418E-27; 1e-64
+
+
+Input: 149-gga_x_mb88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.137071; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -8.59906121E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.41233857E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.48070066E-09; 1e-64
+
+
+Input: 150-gga_x_sogga.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.167968; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.49633086E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.45438389E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.93397160E-27; 1e-64
+
+
+Input: 151-gga_x_sogga11.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.118631; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.86092703E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; 8.10779669E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -6.02025789E-25; 1e-64
+
+
+Input: 152-gga_c_sogga11.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.158209; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.69528791E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.10614606E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.03298792E-25; 1e-64
+
+
+Input: 153-gga_c_wi0.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.047557; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.12304719E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.08661243E-03; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.16817094E-26; 1e-64
+
+
+Input: 154-gga_xc_th1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.464476; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.13473331E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; 7.22011555E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.04800943E-04; 1e-64
+
+
+Input: 155-gga_xc_th2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.418512; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.87928180E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.55766873E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 5.19574311E-08; 1e-64
+
+
+Input: 156-gga_xc_th3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.441341; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.71517357E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.43420788E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 4.10191741E-08; 1e-64
+
+
+Input: 157-gga_xc_th4.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.411161; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 1.20896436E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.41174171E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 5.60059811E-08; 1e-64
+
+
+Input: 158-gga_x_c09x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.191961; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.53148429E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.18416393E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.30452823E-23; 1e-64
+
+
+Input: 159-gga_c_sogga11_x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.144156; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.20266856E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 1.59801129E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.87037179E-26; 1e-64
+
+
+Input: 160-gga_x_lb.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.083047; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.99401710E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -5.86115865E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 161-gga_xc_hcth_93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.301621; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 4.27147185E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.60797769E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.05863185E-26; 1e-64
+
+
+Input: 162-gga_xc_hcth_120.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.298641; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 2.69647235E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.65431412E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 3.54923429E-27; 1e-64
+
+
+Input: 163-gga_xc_hcth_147.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.302239; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 2.88036864E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.63925860E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 4.61440645E-28; 1e-64
+
+
+Input: 164-gga_xc_hcth_407.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.302665; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 4.50277392E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.63254312E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.35339636E-26; 1e-64
+
+
+Input: 165-gga_xc_edf1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.294424; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.29220534E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.62219761E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 2.89294853E-09; 1e-64
+
+
+Input: 166-gga_xc_xlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.291834; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.85943428E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.84955662E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 1.06906588E-09; 1e-64
+
+
+Input: 167-gga_xc_b97.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.050603; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.10854591E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.24439064E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -6.23856634E-28; 1e-64
+
+
+Input: 168-gga_xc_b97_1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.028311; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.19704472E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.25430724E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 2.48953160E-28; 1e-64
+
+
+Input: 169-gga_xc_b97_2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.033395; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.42313711E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -1.95030659E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.77636137E-27; 1e-64
+
+
+Input: 170-gga_xc_b97_d.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.300043; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -4.25997655E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.31103119E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.60975366E-27; 1e-64
+
+
+Input: 171-gga_xc_b97_k.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.764305; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.19010801E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -1.99660685E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 5.06999114E-28; 1e-64
+
+
+Input: 172-gga_xc_b97_3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.960297; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -8.24220491E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.74211821E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.90311377E-26; 1e-64
+
+
+Input: 173-gga_xc_pbe1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.289343; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.68958894E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.90015889E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -1.38456014E-27; 1e-64
+
+
+Input: 174-gga_xc_mpwlyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.289189; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.70933863E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.86047060E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -4.26012143E-24; 1e-64
+
+
+Input: 175-gga_xc_pbelyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.289088; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.48830195E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -3.01612221E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.86634194E-24; 1e-64
+
+
+Input: 176-gga_xc_sb98_1a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.001846; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.28011003E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.11885736E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -6.62925935E-28; 1e-64
+
+
+Input: 177-gga_xc_sb98_1b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.019655; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -3.31667941E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.04236246E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.30233384E-27; 1e-64
+
+
+Input: 178-gga_xc_sb98_1c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.053533; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.10306799E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.26049750E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -5.13878250E-28; 1e-64
+
+
+Input: 179-gga_xc_sb98_2a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.049272; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.32821171E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.40293138E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -8.88801563E-28; 1e-64
+
+
+Input: 180-gga_xc_sb98_2b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.982298; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -8.66763848E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.09597787E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -8.49980844E-28; 1e-64
+
+
+Input: 181-gga_xc_sb98_2c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.018860; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -1.09352903E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.19121898E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.35273416E-28; 1e-64
+
+
+Input: 182-gga_x_lbm.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.09990209E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -5.30380211E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 183-gga_x_ol2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.241990; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.06124060E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.66313407E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 3.61945907E+00; 1e-64
+
+
+Input: 184-gga_x_apbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.242914; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.01832247E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.79051710E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.16975247E-27; 1e-64
+
+
+Input: 185-gga_k_apbe.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.088836; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.93677590E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.14700622E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 186-gga_c_apbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040784; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.28971125E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -9.16149381E-03; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.36943966E-30; 1e-64
+
+
+Input: 187-gga_k_tw1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.083181; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.93092479E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.16477582E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 188-gga_k_tw2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.070857; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.93269708E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 7.82377924E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 189-gga_k_tw3.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.083261; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.92940085E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.21023110E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 190-gga_k_tw4.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.083318; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.92844584E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.23961170E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 191-gga_x_htbs.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.214633; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.33173200E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.18944789E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.05337888E-26; 1e-64
+
+
+Input: 192-gga_x_airy.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.120945; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 1.37973412E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.32617306E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 5.61267446E-10; 1e-64
+
+
+Input: 193-gga_x_lag.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045008; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.67451901E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; 1.86636445E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 5.61267447E-10; 1e-64
+
+
+Input: 194-gga_xc_mohlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.259728; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -5.06188118E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.43121010E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.61504288E-24; 1e-64
+
+
+Input: 195-gga_xc_mohlyp2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.298595; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -7.51799220E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -2.16194498E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.61659103E-24; 1e-64
+
+
+Input: 196-gga_xc_th_fl.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.554995; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; -2.08986873E+00; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.69322736E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 197-gga_xc_th_fc.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.744406; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 1.20468559E+03; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.53655059E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -2.58696387E-04; 1e-64
+
+
+Input: 198-gga_xc_th_fcfo.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.769519; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 7.33549805E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.43568037E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -5.73722749E-04; 1e-64
+
+
+Input: 199-gga_xc_th_fco.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.745394; 1e-64
+match ; vxc(r1) ; LINE(xc/v_xc, 8, 20) ; 4.59718338E+02; 1e-64
+match ; vxc(ri) ; LINE(xc/v_xc, 162, 20) ; -4.46878090E-01; 1e-64
+match ; vxc(rmax) ; LINE(xc/v_xc, 207, 20) ; -3.32067249E-04; 1e-64
+
+
+
+Input: 200-gga_c_optc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042190; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 6.06465617E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.36700317E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.60204306E-30; 1e-64
+
+
+Input: 201-mgga_x_lta.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.559983; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 7.05366026E-17; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.24228460E-16; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 202-mgga_x_tpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.250002; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.16632488E+04; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.36804488E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.38479403E-27; 1e-64
+
+
+Input: 203-mgga_x_m06_l.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.264208; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -3.48119124E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.97797377E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.56911175E-24; 1e-64
+
+
+Input: 204-mgga_x_gvt4.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.259064; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -9.01247858E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.86666858E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 2.26992472E-24; 1e-64
+
+
+Input: 205-mgga_x_tau_hcth.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.216989; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 1.73903018E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -9.31109453E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -6.51396091E-24; 1e-64
+
+
+Input: 206-mgga_x_br89.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.252835; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.01511143E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.99449177E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.59328569E-15; 1e-64
+
+
+Input: 207-mgga_x_bj06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.00000337E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -6.79166898E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 208-mgga_x_tb09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -5.51916758E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.87421480E+00; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 209-mgga_x_rpp09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.00000337E+00; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -6.79166898E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 212-mgga_x_revtpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.249982; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.55732504E+04; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.29806270E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.17461010E-27; 1e-64
+
+
+Input: 213-mgga_x_pkzb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.232561; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.67511872E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.05712078E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 1.08652229E-29; 1e-64
+
+
+Input: 214-mgga_x_m05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.233595; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.61507322E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.00022253E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.13455897E-28; 1e-64
+
+
+Input: 215-mgga_x_m05_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.243256; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.00831018E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.74054327E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -5.22649231E-27; 1e-64
+
+
+Input: 216-mgga_x_m06_hf.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.019029; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; 2.79455701E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.13577749E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -5.64297803E-24; 1e-64
+
+
+Input: 217-mgga_x_m06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.910839; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.27831341E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -3.10876004E-02; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -9.82585733E-24; 1e-64
+
+
+Input: 218-mgga_x_m06_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.566615; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -9.14076942E+02; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.15262245E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.96025824E-24; 1e-64
+
+
+Input: 219-mgga_x_m08_hx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.614624; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -9.36861662E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.54742877E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; 6.84938249E-28; 1e-64
+
+
+Input: 220-mgga_x_m08_so.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.563087; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.16334586E+04; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.58099554E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -8.04804800E-28; 1e-64
+
+
+Input: 232-mgga_c_vsxc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042437; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 3.13610259E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -7.75927350E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.71024508E-23; 1e-64
+
+
+Input: 231-mgga_c_tpss.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045860; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.13577602E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.28224201E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.05361625E-26; 1e-64
+
+
+Input: 233-mgga_c_m06_l.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040540; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.44654427E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.28548947E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -7.42510121E-17; 1e-64
+
+
+Input: 234-mgga_c_m06_hf.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050002; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -1.33008803E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 1.26004349E-01; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 1.35168956E-16; 1e-64
+
+
+Input: 235-mgga_c_m06.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046167; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -2.39026560E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -6.22435011E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 5.51426957E-17; 1e-64
+
+
+Input: 236-mgga_c_m06_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.044858; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; -8.96433016E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; 1.10092788E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.13406283E-17; 1e-64
+
+
+Input: 237-mgga_c_m05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045325; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 7.01777952E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -3.00930921E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 6.61791836E-18; 1e-64
+
+
+Input: 238-mgga_c_m05_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042231; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 2.06319159E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -5.41190880E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; -1.60772711E-16; 1e-64
+
+
+Input: 239-mgga_c_pkzb.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050763; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 1.02816841E+03; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -1.28545801E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 6.49582916E-26; 1e-64
+
+
+Input: 240-mgga_c_bc95.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046006; 1e-64
+match ; vc(r1) ; LINE(xc/v_c, 8, 20) ; 5.40170140E+02; 1e-64
+match ; vc(ri) ; LINE(xc/v_c, 162, 20) ; -2.02937783E-02; 1e-64
+match ; vc(rmax) ; LINE(xc/v_c, 207, 20) ; 4.18461727E-28; 1e-64
+
+
+Input: 500-gga_k_vw.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.000000; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 2.03707833E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 6.03764514E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 501-gga_k_ge2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.116139; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88289150E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 1.20024211E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 502-gga_k_golden.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.827251; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.24503876E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 2.27360124E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 503-gga_k_yt65.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.471695; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.06396513E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 1.73692167E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 504-gga_k_baltin.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 5.893917; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.78825965E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.88363995E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 505-gga_k_lieb.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.415332; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 9.03526105E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 1.65184637E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 506-gga_k_absr1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 2.487262; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; -1.52942005E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.81953537E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 507-gga_k_absr2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 2.780997; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; -8.36896088E+00; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.86188678E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 508-gga_k_gr.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.504321; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.68444156E+00; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.96617713E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 509-gga_k_ludena.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.000000; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 2.03707833E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 6.03764514E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 510-gga_k_gp85.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.000000; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 2.03707833E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 6.03764514E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 511-gga_k_pearson.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.912013; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88225619E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 5.31479774E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 512-gga_k_ol1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.976442; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.82903035E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 9.64728600E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 513-gga_k_ol2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.117822; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88669425E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 1.20049575E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 514-gga_k_fr_b88.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.084777; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.95445418E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.55981688E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 515-gga_k_fr_pw86.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.080698; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.89259671E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.02645410E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 516-gga_k_dk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.124933; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.90348124E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 1.24222331E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 517-gga_k_perdew.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.318019; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.43557195E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 2.33237365E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 518-gga_k_vsk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.380795; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88133243E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 3.18341158E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 519-gga_k_vjks.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.778458; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.92090452E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; -4.73879677E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 520-gga_k_ernzerhof.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.275519; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.88855515E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 1.90862262E-02; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 521-gga_k_lc94.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.095302; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.94109473E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 9.18412520E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 522-gga_k_llp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.081106; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.94621287E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 8.63278853E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 523-gga_k_thakkar.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.102867; 1e-64
+match ; tau(r1) ; LINE(xc/app_tau, 9, 20) ; 8.83983051E+01; 1e-64
+match ; tau(ri) ; LINE(xc/app_tau, 163, 20) ; 9.33151485E-03; 1e-64
+match ; tau(rmax) ; LINE(xc/app_tau, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 524-gga_x_wpbeh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.225554; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.62155629E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.70197032E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.00865034E-24; 1e-64
+
+
+Input: 525-gga_x_hjs_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.223767; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.58458738E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.68761863E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -1.37751591E-27; 1e-64
+
+
+Input: 526-gga_x_hjs_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.170777; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.50140718E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.45769370E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -2.44876285E-27; 1e-64
+
+
+Input: 527-gga_x_hjs_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.190245; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.88380906E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.50948325E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -9.87705482E-18; 1e-64
+
+
+Input: 528-gga_x_hjs_b97x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.173879; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -1.24075747E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -2.18014078E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -7.55395149E-27; 1e-64
+
+
+Input: 529-gga_x_ityh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.969019; 1e-64
+match ; vx(r1) ; LINE(xc/v_x, 8, 20) ; -2.43677655E+03; 1e-64
+match ; vx(ri) ; LINE(xc/v_x, 162, 20) ; -1.52213301E-01; 1e-64
+match ; vx(rmax) ; LINE(xc/v_x, 207, 20) ; -7.32206453E-02; 1e-64
+
diff --git a/testsuite/libxc/04-He_spin.inp b/testsuite/libxc/04-He_spin.inp
new file mode 100644
index 0000000..9ac0949
--- /dev/null
+++ b/testsuite/libxc/04-He_spin.inp
@@ -0,0 +1,13 @@
+# $Id: 04-He_spin.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 2
+
+%Orbitals
+ 1 | 0 | 1 | 1
+%
+
+SpinMode = polarized
diff --git a/testsuite/libxc/04-He_spin.test b/testsuite/libxc/04-He_spin.test
new file mode 100644
index 0000000..b132bf3
--- /dev/null
+++ b/testsuite/libxc/04-He_spin.test
@@ -0,0 +1,2189 @@
+# $Id: 04-He_spin.test 772 2013-01-21 15:19:51Z micael $
+
+Test : Libxc: He atom with spin-polarization
+TestGroups : libxc
+Enabled : Yes
+
+
+Input: 04-He_spin.inp
+
+
+Input: 000-none.inp
+
+Input: 001-lda_x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.072151; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.69423262E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.69423262E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.43365862E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.43365862E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 002-lda_c_wigner.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.098736; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.47119177E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.47119177E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.61397480E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.61397480E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 003-lda_c_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.128112; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.74659275E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.74659275E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.18615565E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.18615565E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 004-lda_c_hl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.126491; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.18364439E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.18364439E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.03344453E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.03344453E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 005-lda_c_gl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.150478; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.16044685E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.16044685E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.70187000E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.70187000E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 006-lda_c_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.536076; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -8.47116312E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -8.47116312E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.21682931E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.21682931E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 007-lda_c_vwn.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 008-lda_c_vwn_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.160747; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.16028827E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.16028827E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.47103963E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -6.47103963E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 009-lda_c_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121380; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.36101244E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.36101244E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.70501424E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.70501424E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 010-lda_c_pz_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121412; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.36248305E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.36248305E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.70501424E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.70501424E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 011-lda_c_ob_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.117675; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.26166851E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.26166851E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.61070108E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.61070108E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 012-lda_c_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121804; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.39162213E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.39162213E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.66776381E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.66776381E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 013-lda_c_pw_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.121804; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.39157983E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.39157983E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.66775381E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.66775381E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 014-lda_c_ob_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.118598; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.25472418E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.25472418E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.51240608E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.51240608E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 017-lda_c_vbh.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.158505; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.11717088E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.11717088E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.45424026E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -6.45424026E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 020-lda_xc_teter93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.193576; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.78970427E+00; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.78970427E+00; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.89802978E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.89802978E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 022-lda_c_ml1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.061719; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -4.33264891E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.33264891E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.36750098E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.36750098E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 023-lda_c_ml2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.029792; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.97962562E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.97962562E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.19620796E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.19620796E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 024-lda_c_gombas.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.124507; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.40161141E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.40161141E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.91663864E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.91663864E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 025-lda_c_pw_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.159664; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.15762199E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.15762199E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.40369927E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -6.40369927E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 027-lda_c_rc04.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.102828; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -7.24968711E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.24968711E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.90970155E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.90970155E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 028-lda_c_vwn_1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 029-lda_c_vwn_2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 030-lda_c_vwn_3.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 031-lda_c_vwn_4.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.122315; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -9.44579185E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.67133687E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 050-lda_k_tf.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.671695; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.32827473E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.32827473E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.64696323E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.64696323E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 051-lda_k_lp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.796230; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.47507893E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.47507893E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.73674157E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.73674157E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 084-gga_c_op_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.067539; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -4.82458942E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.82458942E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.52876224E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.52876224E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 085-gga_c_op_g96.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.056994; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.87904729E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.87904729E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.29680750E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.29680750E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 9.10915583E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 9.10915583E-29; 1e-64
+
+
+Input: 086-gga_c_op_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.057306; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.85261866E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.85261866E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.97006143E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.97006143E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 7.91302595E-26; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 7.91302595E-26; 1e-64
+
+
+Input: 087-gga_c_op_b88.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.056752; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.08501339E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 3.08501339E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.11501871E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.11501871E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 4.74007078E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.74007078E-24; 1e-64
+
+
+Input: 088-gga_c_ft97.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.049314; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.78277158E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.78277158E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 2.41820850E-05; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 2.41820850E-05; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.41569940E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -4.41569940E-30; 1e-64
+
+
+Input: 089-gga_c_spbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.054790; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.08735032E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.08735032E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.05347772E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.05347772E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.49957934E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.49957934E-24; 1e-64
+
+
+Input: 090-gga_x_ssb_sw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.223560; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -4.59419857E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.59419857E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.70318714E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.70318714E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.41310068E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.41310068E-27; 1e-64
+
+
+Input: 091-gga_x_ssb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.260617; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.08783824E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.08783824E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.58268572E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.58268572E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.91070515E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.91070515E-27; 1e-64
+
+
+Input: 092-gga_x_ssb_d.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.281689; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.56941909E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.56941909E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.74490590E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.74490590E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.32281475E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.32281475E-27; 1e-64
+
+
+Input: 093-gga_xc_hcth_407p.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.301798; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 7.07354725E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 7.07354725E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.53657393E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.53657393E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.14897246E-26; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.14897246E-26; 1e-64
+
+
+Input: 094-gga_xc_hcth_p76.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.958469; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.23047849E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.23047849E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 1.21366455E+00; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; 1.21366455E+00; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -3.35043915E-25; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.35043915E-25; 1e-64
+
+
+Input: 095-gga_xc_hcth_p14.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.321560; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 9.32204093E+01; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 9.32204093E+01; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -3.17304201E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.17304201E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -4.67681046E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -4.67681046E-27; 1e-64
+
+
+Input: 096-gga_xc_b97_gga1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.308848; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 5.41166480E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 5.41166480E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.90820967E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -1.90820967E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -5.60360294E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -5.60360294E-27; 1e-64
+
+
+Input: 097-gga_xc_hcth_a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.822667; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 6.47434805E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 6.47434805E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.79360246E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.79360246E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.14883890E-26; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.14883890E-26; 1e-64
+
+
+Input: 098-gga_x_bpccac.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.240565; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.68117978E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.68117978E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -4.38735359E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.38735359E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.57269331E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.57269331E-27; 1e-64
+
+
+Input: 099-gga_c_revtca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050174; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.31492688E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.31492688E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.19161301E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.19161301E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 3.16708081E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 3.16708081E-29; 1e-64
+
+
+Input: 100-gga_c_tca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050174; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.31492688E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.31492688E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.19161301E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.19161301E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 3.16708081E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 3.16708081E-29; 1e-64
+
+
+Input: 101-gga_x_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.223763; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.58358926E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.58358926E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.69182073E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.69182073E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.38600112E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.38600112E-27; 1e-64
+
+
+Input: 102-gga_x_pbe_r.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.242061; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.65284696E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.65284696E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.53003821E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.53003821E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.32606493E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.32606493E-27; 1e-64
+
+
+Input: 103-gga_x_b86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.239890; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.78965075E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.78965075E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.67085710E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.67085710E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.87318464E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.87318464E-27; 1e-64
+
+
+Input: 104-gga_x_herman.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.309415; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.48720839E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.48720839E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.48373134E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.48373134E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 8.78422394E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 8.78422394E+00; 1e-64
+
+
+Input: 105-gga_x_b86_mgc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.235607; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.83253135E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.83253135E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.71929647E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.71929647E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.81278354E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.81278354E-14; 1e-64
+
+
+Input: 106-gga_x_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.239023; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.79955926E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.79955926E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.59572982E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.59572982E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.48070066E-09; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.48070066E-09; 1e-64
+
+
+Input: 107-gga_x_g96.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.244849; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.65177632E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.65177632E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.56376873E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.56376873E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.02180837E-04; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.02180837E-04; 1e-64
+
+
+Input: 108-gga_x_pw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.245419; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.12207227E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.12207227E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.83830694E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.83830694E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 3.35571218E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.35571218E-14; 1e-64
+
+
+Input: 109-gga_x_pw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.227484; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.78694297E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.78694297E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.50502867E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.50502867E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 4.95956871E-26; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 4.95956871E-26; 1e-64
+
+
+Input: 110-gga_x_optx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.242366; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -6.32131299E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.32131299E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.14560596E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.14560596E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.97389699E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.97389699E-27; 1e-64
+
+
+Input: 111-gga_x_dk87_r1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.234865; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.03257390E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.03257390E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.70612162E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.70612162E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 5.03810983E-10; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 5.03810983E-10; 1e-64
+
+
+Input: 112-gga_x_dk87_r2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.234548; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.02936488E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.02936488E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.71174342E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.71174342E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 3.66906169E-09; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.66906169E-09; 1e-64
+
+
+Input: 113-gga_x_lg93.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.239112; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.37991183E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.37991183E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.85425314E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.85425314E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.51752308E-18; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 6.51752308E-18; 1e-64
+
+
+Input: 114-gga_x_ft97_a.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.248638; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.41174272E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.41174272E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.36640275E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.36640275E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.50184699E-09; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.50184699E-09; 1e-64
+
+
+Input: 115-gga_x_ft97_b.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.247891; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.39850705E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.39850705E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.36291671E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.36291671E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.50184699E-09; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.50184699E-09; 1e-64
+
+
+Input: 116-gga_x_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.170777; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.50211763E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.50211763E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.45391050E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.45391050E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.46663041E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.46663041E-27; 1e-64
+
+
+Input: 117-gga_x_rpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.244753; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.68117972E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.68117972E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.47846339E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.47846339E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.25630518E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.25630518E-27; 1e-64
+
+
+Input: 118-gga_x_wc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.199428; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.33173200E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.33173200E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.35442553E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.35442553E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.27430384E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.27430384E-27; 1e-64
+
+
+Input: 119-gga_x_mpw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.234646; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.82267113E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.82267113E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.56319144E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.56319144E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 3.36042394E-25; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.36042394E-25; 1e-64
+
+
+Input: 120-gga_x_am05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.112250; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.62220475E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.62220475E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.30010886E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.30010886E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.25117310E-10; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 6.25117310E-10; 1e-64
+
+
+Input: 121-gga_x_pbea.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.209225; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.49289835E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.49289835E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.72247525E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.72247525E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.65595744E-26; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.65595744E-26; 1e-64
+
+
+Input: 122-gga_x_mpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.229664; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.61663823E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.61663823E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.67146941E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.67146941E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.42195755E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.42195755E-28; 1e-64
+
+
+Input: 123-gga_x_xpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.236061; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.74742292E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.74742292E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.68112434E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.68112434E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.71466362E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.71466362E-27; 1e-64
+
+
+Input: 125-gga_x_bayesian.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.224925; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.31835239E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.31835239E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.55077545E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.55077545E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.85985413E-25; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.85985413E-25; 1e-64
+
+
+Input: 126-gga_x_pbe_jsjr.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.187469; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.82342016E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.82342016E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.51914559E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.51914559E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.01184619E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.01184619E-27; 1e-64
+
+
+Input: 130-gga_c_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045646; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.20814172E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.20814172E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.17409997E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.17409997E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.94727954E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.94727954E-30; 1e-64
+
+
+Input: 131-gga_c_lyp.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045301; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.28799814E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.28799814E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.74117187E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.74117187E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -5.22291343E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -5.22291343E-24; 1e-64
+
+
+Input: 132-gga_c_p86.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046605; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.11494497E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.11494497E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.44669261E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.44669261E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -3.85390475E-25; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.85390475E-25; 1e-64
+
+
+Input: 133-gga_c_pbe_sol.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.056615; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.01605378E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.01605378E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.90792255E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.90792255E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 4.25314072E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.25314072E-30; 1e-64
+
+
+Input: 134-gga_c_pw91.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050054; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.06762197E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.06762197E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.41498130E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.41498130E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.84190516E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.84190516E-30; 1e-64
+
+
+Input: 135-gga_c_am05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.106479; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.32462972E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.32462972E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.95012369E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.95012369E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 2.00231370E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 2.00231370E-29; 1e-64
+
+
+Input: 136-gga_c_xpbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046753; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.03902068E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.03902068E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.17019180E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.17019180E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 8.83147995E-31; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 8.83147995E-31; 1e-64
+
+
+Input: 137-gga_c_lm.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.396877; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.21395605E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.21395605E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.28063210E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.28063210E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.40030716E-12; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.40030716E-12; 1e-64
+
+
+Input: 138-gga_c_pbe_jrgx.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.062614; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 9.09153645E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 9.09153645E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.38873679E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.38873679E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 6.55611907E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 6.55611907E-30; 1e-64
+
+
+Input: 139-gga_x_optb88_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.209714; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.27661361E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.27661361E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.55610900E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.55610900E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.27256848E-09; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.27256848E-09; 1e-64
+
+
+Input: 140-gga_x_pbek1_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.233077; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.62157170E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.62157170E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.61869025E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.61869025E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.14508129E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.14508129E-27; 1e-64
+
+
+Input: 141-gga_x_optpbe_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.210497; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.12938565E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.12938565E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.47654470E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.47654470E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.06972379E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.06972379E-27; 1e-64
+
+
+Input: 142-gga_x_rge2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.187230; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.56573913E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.56573913E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.25017651E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.25017651E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 8.45788136E-30; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 8.45788136E-30; 1e-64
+
+
+Input: 143-gga_c_rge2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.052417; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.09040280E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.09040280E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.60277814E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.60277814E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 3.15435765E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 3.15435765E-30; 1e-64
+
+
+Input: 144-gga_x_rpw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.260947; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.67009493E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.67009493E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.88060108E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.88060108E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 3.31025826E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.31025826E-14; 1e-64
+
+
+Input: 145-gga_x_kt1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.205372; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -4.83375391E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.83375391E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.34131121E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.34131121E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.27371890E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.27371890E-28; 1e-64
+
+
+Input: 146-gga_xc_kt2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.352820; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.83392991E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -4.83392991E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.78528615E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.78528615E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.27371890E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.27371890E-28; 1e-64
+
+
+Input: 147-gga_c_wl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045774; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.86569037E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.86569037E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.73471349E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.73471349E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -8.64244925E-11; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -8.64244925E-11; 1e-64
+
+
+Input: 148-gga_c_wi.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.007771; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 4.68041255E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 4.68041255E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 4.32961136E-03; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 4.32961136E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.95026418E-27; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.95026418E-27; 1e-64
+
+
+Input: 149-gga_x_mb88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.137071; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -8.59906121E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -8.59906121E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.41233857E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.41233857E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.48070066E-09; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.48070066E-09; 1e-64
+
+
+Input: 150-gga_x_sogga.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.167968; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.49633086E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.49633086E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.45438389E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.45438389E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.93397160E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.93397160E-27; 1e-64
+
+
+Input: 151-gga_x_sogga11.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.118631; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.86092703E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.86092703E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 8.10779669E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; 8.10779669E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -6.02025789E-25; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.02025789E-25; 1e-64
+
+
+Input: 152-gga_c_sogga11.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.158209; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.69528791E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.69528791E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.10614606E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.10614606E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.03298792E-25; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.03298792E-25; 1e-64
+
+
+Input: 153-gga_c_wi0.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.047557; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.12304719E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.12304719E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.08661243E-03; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.08661243E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.16817094E-26; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.16817094E-26; 1e-64
+
+
+Input: 154-gga_xc_th1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.464476; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.13473331E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.13473331E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 7.22011555E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; 7.22011555E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.04800943E-04; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.04800943E-04; 1e-64
+
+
+Input: 155-gga_xc_th2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.418512; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.87928180E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.87928180E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.55766873E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.55766873E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.19574311E-08; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.19574311E-08; 1e-64
+
+
+Input: 156-gga_xc_th3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.441341; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.71517357E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.71517357E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.43420788E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.43420788E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 4.10191741E-08; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 4.10191741E-08; 1e-64
+
+
+Input: 157-gga_xc_th4.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.411161; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.20896436E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.20896436E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.41174171E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.41174171E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.60059811E-08; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.60059811E-08; 1e-64
+
+
+Input: 158-gga_x_c09x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.191961; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.53148429E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.53148429E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.18416393E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.18416393E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.30452823E-23; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.30452823E-23; 1e-64
+
+
+Input: 159-gga_c_sogga11_x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.144156; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.20266856E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.20266856E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.59801129E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 1.59801129E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.87037179E-26; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.87037179E-26; 1e-64
+
+
+Input: 160-gga_x_lb.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.115720; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.02169333E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.02169333E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -5.73740041E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -5.73740041E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 161-gga_xc_hcth_93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.301621; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.27147185E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 4.27147185E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.60797769E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.60797769E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.05863185E-26; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.05863185E-26; 1e-64
+
+
+Input: 162-gga_xc_hcth_120.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.298641; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 2.69647235E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 2.69647235E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.65431412E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.65431412E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 3.54923429E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.54923429E-27; 1e-64
+
+
+Input: 163-gga_xc_hcth_147.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.302239; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 2.88036864E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 2.88036864E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.63925860E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.63925860E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 4.61440644E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 4.61440644E-28; 1e-64
+
+
+Input: 164-gga_xc_hcth_407.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.302665; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.50277392E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 4.50277392E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.63254312E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.63254312E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.35339636E-26; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.35339636E-26; 1e-64
+
+
+Input: 165-gga_xc_edf1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.294424; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.29220534E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.29220534E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.62219761E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.62219761E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.89294853E-09; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.89294853E-09; 1e-64
+
+
+Input: 166-gga_xc_xlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.291834; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.85943428E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.85943428E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.84955662E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.84955662E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.06906588E-09; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.06906588E-09; 1e-64
+
+
+Input: 167-gga_xc_b97.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.050603; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.10854591E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.10854591E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.24439064E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.24439064E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -6.23856635E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -6.23856635E-28; 1e-64
+
+
+Input: 168-gga_xc_b97_1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.028311; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.19704472E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.19704472E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.25430724E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.25430724E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.48953160E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.48953160E-28; 1e-64
+
+
+Input: 169-gga_xc_b97_2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.033395; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.42313711E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -4.42313711E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.95030659E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -1.95030659E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.77636137E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.77636137E-27; 1e-64
+
+
+Input: 170-gga_xc_b97_d.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.300043; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.25997655E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -4.25997655E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.31103119E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.31103119E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.60975366E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.60975366E-27; 1e-64
+
+
+Input: 171-gga_xc_b97_k.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.764305; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.19010801E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.19010801E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.99660685E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -1.99660685E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.06999114E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.06999114E-28; 1e-64
+
+
+Input: 172-gga_xc_b97_3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.960297; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -8.24220491E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -8.24220491E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.74211821E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.74211821E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.90311378E-26; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.90311378E-26; 1e-64
+
+
+Input: 173-gga_xc_pbe1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.289343; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.68958894E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.68958894E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.90015889E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.90015889E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.38456014E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.38456014E-27; 1e-64
+
+
+Input: 174-gga_xc_mpwlyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.289189; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.70933863E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.70933863E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.86047060E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.86047060E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -4.26012143E-24; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -4.26012143E-24; 1e-64
+
+
+Input: 175-gga_xc_pbelyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.289088; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.48830195E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.48830195E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -3.01612221E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.01612221E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -3.86634194E-24; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.86634194E-24; 1e-64
+
+
+Input: 176-gga_xc_sb98_1a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.001846; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.28011003E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.28011003E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.11885736E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.11885736E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -6.62925936E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -6.62925936E-28; 1e-64
+
+
+Input: 177-gga_xc_sb98_1b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.019655; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -3.31667941E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.31667941E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.04236246E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.04236246E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.30233384E-27; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.30233384E-27; 1e-64
+
+
+Input: 178-gga_xc_sb98_1c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.053533; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.10306799E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.10306799E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.26049750E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.26049750E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -5.13878250E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -5.13878250E-28; 1e-64
+
+
+Input: 179-gga_xc_sb98_2a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.049272; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.32821171E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.32821171E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.40293138E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.40293138E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -8.88801563E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -8.88801563E-28; 1e-64
+
+
+Input: 180-gga_xc_sb98_2b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.982298; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -8.66763848E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -8.66763848E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.09597787E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.09597787E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -8.49980845E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -8.49980845E-28; 1e-64
+
+
+Input: 181-gga_xc_sb98_2c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.018860; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.09352903E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.09352903E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.19121898E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.19121898E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -3.35273416E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.35273416E-28; 1e-64
+
+
+Input: 182-gga_x_lbm.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.11733578E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.11733578E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -5.39129380E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -5.39129380E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 183-gga_x_ol2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.241990; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -5.06124060E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -5.06124060E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.66313407E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.66313407E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 3.61945907E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.61945907E+00; 1e-64
+
+
+Input: 184-gga_x_apbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.242914; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.01832247E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.01832247E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.79051710E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.79051710E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.16975247E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.16975247E-27; 1e-64
+
+
+Input: 185-gga_k_apbe.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.088836; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.46838795E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.46838795E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.07350311E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.07350311E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 186-gga_c_apbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040784; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.28971125E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.28971125E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.16149381E-03; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -9.16149381E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.36943966E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.36943966E-30; 1e-64
+
+
+Input: 187-gga_k_tw1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.083181; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.46546240E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.46546240E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.08238791E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.08238791E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 188-gga_k_tw2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.070857; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.46634854E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.46634854E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 3.91188962E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.91188962E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 189-gga_k_tw3.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.083261; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.46470042E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.46470042E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.10511555E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.10511555E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 190-gga_k_tw4.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.083318; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.46422292E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.46422292E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.11980585E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.11980585E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 191-gga_x_htbs.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.214633; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.33173200E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.33173200E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.18944789E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.18944789E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.05337888E-26; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.05337888E-26; 1e-64
+
+
+Input: 192-gga_x_airy.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.120945; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 1.37973412E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 1.37973412E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.32617306E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.32617306E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 5.61267446E-10; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 5.61267446E-10; 1e-64
+
+
+Input: 193-gga_x_lag.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045008; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.67451901E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.67451901E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 1.86636445E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; 1.86636445E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 5.61267447E-10; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 5.61267447E-10; 1e-64
+
+
+Input: 194-gga_xc_mohlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.259728; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -5.06188118E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -5.06188118E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.43121010E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.43121010E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.61504288E-24; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.61504288E-24; 1e-64
+
+
+Input: 195-gga_xc_mohlyp2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.298595; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -7.51799220E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -7.51799220E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.16194498E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.16194498E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.61659103E-24; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.61659103E-24; 1e-64
+
+
+Input: 196-gga_xc_th_fl.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.554995; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.08986873E+00; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.08986873E+00; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -4.69322736E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.69322736E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 197-gga_xc_th_fc.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.744406; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.20468559E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.20468559E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -4.53655059E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.53655059E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.58696387E-04; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.58696387E-04; 1e-64
+
+
+Input: 198-gga_xc_th_fcfo.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.769519; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 7.33549805E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 7.33549805E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -4.43568037E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.43568037E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -5.73722749E-04; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -5.73722749E-04; 1e-64
+
+
+Input: 199-gga_xc_th_fco.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.745394; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.59718338E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 4.59718338E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -4.46878090E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.46878090E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -3.32067249E-04; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.32067249E-04; 1e-64
+
+
+Input: 200-gga_c_optc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042190; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.06465617E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.06465617E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.36700317E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.36700317E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.60204306E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.60204306E-30; 1e-64
+
+
+Input: 201-mgga_x_lta.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.559983; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 7.05366026E-17; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 7.05366026E-17; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -3.24228460E-16; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.24228460E-16; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 202-mgga_x_tpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.250002; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.16632488E+04; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.16632488E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.36804488E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.36804488E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.38479403E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.38479403E-27; 1e-64
+
+
+Input: 203-mgga_x_m06_l.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.264208; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.48119124E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.48119124E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -3.97797377E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.97797377E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.56911175E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.56911175E-24; 1e-64
+
+
+Input: 204-mgga_x_gvt4.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.259064; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.01247858E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.01247858E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.86666858E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.86666858E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.26992472E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.26992472E-24; 1e-64
+
+
+Input: 205-mgga_x_tau_hcth.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.216989; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 1.73903018E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 1.73903018E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -9.31109453E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -9.31109453E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -6.51396091E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.51396091E-24; 1e-64
+
+
+Input: 206-mgga_x_br89.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.252835; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.01511143E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.01511143E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.99449177E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.99449177E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.59328569E-15; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.59328569E-15; 1e-64
+
+
+Input: 207-mgga_x_bj06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.00000337E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.00000337E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -6.79166898E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -6.79166898E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 208-mgga_x_tb09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -5.51916758E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -5.51916758E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.87421480E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.87421480E+00; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 209-mgga_x_rpp09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.00000337E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.00000337E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -6.79166898E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -6.79166898E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 212-mgga_x_revtpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.249982; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.55732504E+04; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.55732504E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.29806270E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.29806270E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.17461010E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.17461010E-27; 1e-64
+
+
+Input: 213-mgga_x_pkzb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.232561; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.67511872E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.67511872E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.05712078E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.05712078E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.08652229E-29; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.08652229E-29; 1e-64
+
+
+Input: 214-mgga_x_m05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.233595; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.61507322E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.61507322E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.00022253E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.00022253E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.13455897E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.13455897E-28; 1e-64
+
+
+Input: 215-mgga_x_m05_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.243256; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.00831018E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.00831018E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.74054327E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.74054327E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.22649231E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.22649231E-27; 1e-64
+
+
+Input: 216-mgga_x_m06_hf.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.019029; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 2.79455701E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 2.79455701E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.13577749E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.13577749E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.64297803E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.64297803E-24; 1e-64
+
+
+Input: 217-mgga_x_m06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.910839; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.27831341E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.27831341E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -3.10876004E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.10876004E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -9.82585733E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.82585733E-24; 1e-64
+
+
+Input: 218-mgga_x_m06_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.566615; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.14076942E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.14076942E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.15262245E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.15262245E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.96025824E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.96025824E-24; 1e-64
+
+
+Input: 219-mgga_x_m08_hx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.614624; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.36861662E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.36861662E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.54742877E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.54742877E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.84938249E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 6.84938249E-28; 1e-64
+
+
+Input: 220-mgga_x_m08_so.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.563087; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.16334586E+04; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.16334586E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.58099554E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.58099554E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -8.04804800E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -8.04804800E-28; 1e-64
+
+
+Input: 231-mgga_c_tpss.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045860; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.13577602E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.13577602E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.28224201E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.28224201E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.20341053E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -7.20341053E-28; 1e-64
+
+
+Input: 232-mgga_c_vsxc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042437; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.13610259E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 3.13610259E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.75927350E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -7.75927350E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.71024508E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.71024508E-23; 1e-64
+
+
+Input: 233-mgga_c_m06_l.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.040540; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.44654427E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.44654427E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.28548947E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.28548947E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.42510121E-17; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -7.42510121E-17; 1e-64
+
+
+Input: 234-mgga_c_m06_hf.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050002; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.33008803E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.33008803E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.26004349E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 1.26004349E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.35168956E-16; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.35168956E-16; 1e-64
+
+
+Input: 235-mgga_c_m06.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046167; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.39026560E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.39026560E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.22435011E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -6.22435011E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 5.51426957E-17; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 5.51426957E-17; 1e-64
+
+
+Input: 236-mgga_c_m06_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.044858; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -8.96433016E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -8.96433016E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.10092788E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 1.10092788E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 4.13406283E-17; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.13406283E-17; 1e-64
+
+
+Input: 237-mgga_c_m05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.045325; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 7.01777952E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 7.01777952E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.00930921E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.00930921E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 6.61791836E-18; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 6.61791836E-18; 1e-64
+
+
+Input: 238-mgga_c_m05_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.042231; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 2.06319159E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.06319159E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.41190880E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.41190880E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.60772711E-16; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.60772711E-16; 1e-64
+
+
+Input: 239-mgga_c_pkzb.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050763; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.02816841E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.02816841E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.28545801E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.28545801E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 6.49582916E-26; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 6.49582916E-26; 1e-64
+
+
+Input: 240-mgga_c_bc95.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046006; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 5.40170140E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 5.40170140E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.02937783E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.02937783E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 4.18461727E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.18461727E-28; 1e-64
+
+
+Input: 500-gga_k_vw.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.000000; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 1.01853917E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.01853917E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 3.01882257E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.01882257E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 501-gga_k_ge2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.116139; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.44144575E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.44144575E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 6.00121053E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 6.00121053E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 502-gga_k_golden.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.827251; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.62251938E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.62251938E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.13680062E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 1.13680062E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 503-gga_k_yt65.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.471695; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.53198257E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.53198257E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 8.68460837E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.68460837E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 504-gga_k_baltin.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 5.893917; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.89412983E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.89412983E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.94181997E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 1.94181997E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 505-gga_k_lieb.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.415332; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.51763053E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.51763053E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 8.25923185E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.25923185E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 506-gga_k_absr1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 2.487262; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; -7.64710023E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; -7.64710023E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.90976768E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.90976768E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 507-gga_k_absr2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 2.780997; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; -4.18448044E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; -4.18448044E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.93094339E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.93094339E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 508-gga_k_gr.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.504321; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.34222078E+00; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.34222078E+00; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.98308857E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.98308857E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 509-gga_k_ludena.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.000000; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 1.01853917E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.01853917E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 3.01882257E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.01882257E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 510-gga_k_gp85.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.000000; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 1.01853917E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 1.01853917E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 3.01882257E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.01882257E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 511-gga_k_pearson.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.912013; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.44112810E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.44112810E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.65739887E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.65739887E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 512-gga_k_ol1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.976442; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.41451518E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.41451518E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.82364300E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.82364300E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 513-gga_k_ol2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.117822; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.44334713E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.44334713E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 6.00247876E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 6.00247876E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 514-gga_k_fr_b88.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.084777; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.47722709E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.47722709E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.27990844E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.27990844E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 515-gga_k_fr_pw86.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.080698; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.44629836E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.44629836E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.01322705E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.01322705E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 516-gga_k_dk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.124933; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.45174062E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.45174062E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 6.21111656E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 6.21111656E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 517-gga_k_perdew.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.318019; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.21778598E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.21778598E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.16618682E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 1.16618682E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 518-gga_k_vsk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.380795; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.44066621E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.44066621E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.59170579E-02; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 1.59170579E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 519-gga_k_vjks.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 3.778458; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.46045226E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.46045226E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; -2.36939839E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; -2.36939839E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 520-gga_k_ernzerhof.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.275519; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.44427758E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.44427758E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 9.54311311E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 9.54311311E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 521-gga_k_lc94.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.095302; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.47054737E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.47054737E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.59206260E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.59206260E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 522-gga_k_llp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.081106; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.47310644E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.47310644E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.31639427E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.31639427E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 523-gga_k_thakkar.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 4.102867; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 4.41991525E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.41991525E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 4.66575743E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.66575743E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 524-gga_x_wpbeh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.225554; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.62155629E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.62155629E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.70197032E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.70197032E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.00865034E-24; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.00865034E-24; 1e-64
+
+
+Input: 525-gga_x_hjs_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.223767; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.58458738E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.58458738E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.68761863E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.68761863E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.37751591E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.37751591E-27; 1e-64
+
+
+Input: 526-gga_x_hjs_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.170777; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.50140718E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.50140718E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.45769370E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.45769370E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.44876285E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.44876285E-27; 1e-64
+
+
+Input: 527-gga_x_hjs_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.190233; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.88380906E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.88380906E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.50948255E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.50948255E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.03290333E-19; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.03290333E-19; 1e-64
+
+
+Input: 528-gga_x_hjs_b97x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.173879; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.24075747E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.24075747E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.18014078E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.18014078E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -7.55395149E-27; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -7.55395149E-27; 1e-64
+
+
+Input: 529-gga_x_ityh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.969019; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.43677655E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.43677655E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.52213301E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.52213301E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -7.32206453E-02; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -7.32206453E-02; 1e-64
+
diff --git a/testsuite/libxc/05-Li.inp b/testsuite/libxc/05-Li.inp
new file mode 100644
index 0000000..b4cfde0
--- /dev/null
+++ b/testsuite/libxc/05-Li.inp
@@ -0,0 +1,14 @@
+# $Id: 05-Li.inp 616 2011-08-19 17:06:49Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+TheoryLevel = independent_particles
+NuclearCharge = 3
+
+%Orbitals
+ 1 | 0 | 1 | 1
+ 2 | 0 | 1 | 0
+%
+
+SpinMode = polarized
diff --git a/testsuite/libxc/05-Li.test b/testsuite/libxc/05-Li.test
new file mode 100644
index 0000000..1099bc8
--- /dev/null
+++ b/testsuite/libxc/05-Li.test
@@ -0,0 +1,2189 @@
+# $Id: 05-Li.test 772 2013-01-21 15:19:51Z micael $
+
+Test : Libxc: Li atom with spin-polarization
+TestGroups : libxc
+Enabled : Yes
+
+
+Input: 05-Li.inp
+
+
+Input: 000-none.inp
+
+Input: 001-lda_x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.881629; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.54130830E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.64306664E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -7.19274063E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.02699179E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 002-lda_c_wigner.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.144109; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.52915993E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -5.52915993E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.60669107E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.60669107E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 003-lda_c_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.181700; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.08748898E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.08748898E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.16585140E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.16585140E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 004-lda_c_hl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.187393; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.01281683E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.01281683E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.01650392E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.01650392E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 005-lda_c_gl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.213545; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.33986167E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.25952159E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.07131373E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.05773631E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 006-lda_c_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.940814; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.27065415E+00; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.32153332E+00; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.59637032E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.51349590E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 007-lda_c_vwn.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.168779; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.10031269E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.02748544E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.34300567E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.51630451E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 008-lda_c_vwn_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.226267 ; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.32053097E-01 ; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.24883229E-01 ; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.47102791E-01 ; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.40993559E-02 ; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 009-lda_c_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.167071; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.10475410E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.01291158E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.17239345E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.53160208E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 010-lda_c_pz_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.167108; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.10487999E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.01300462E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.17239345E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.53160208E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 011-lda_c_ob_pz.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.162485; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.09474921E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.00328904E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.20586991E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.34104123E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 012-lda_c_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.167970; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.09486625E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.02225375E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.30041773E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.52054095E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 013-lda_c_pw_mod.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.167970; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.09486095E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.02224868E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.30040178E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.52055290E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 014-lda_c_ob_pw.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.163866; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.08348971E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.01087726E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.24971906E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.41983406E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 017-lda_c_vbh.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.221982; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.26991843E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.17929941E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.29355287E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.37916393E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 020-lda_xc_teter93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.049969; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.65232778E+00; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.74773869E+00; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.98996629E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.27933141E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 022-lda_c_ml1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.079215; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -4.68381203E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.42486792E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.74349952E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -6.83881471E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 023-lda_c_ml2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.038732; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.05548594E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.05825291E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.14412710E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.16650339E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 024-lda_c_gombas.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.186494; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.05938987E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.05938987E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -4.90128491E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.90128491E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 025-lda_c_pw_rpa.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.225084; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.31865011E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.24704063E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.40672800E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.39996762E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 027-lda_c_rc04.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.138241; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -7.90307239E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.33025285E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.34907473E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.08299874E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 028-lda_c_vwn_1.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.168394; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.11134939E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.01699739E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.16309116E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.50655475E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 029-lda_c_vwn_2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.168744; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.10076592E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.02706016E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.32584874E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.51549729E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 030-lda_c_vwn_3.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.168760; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.10053481E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.02727779E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.33413587E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.51584082E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 031-lda_c_vwn_4.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.168855; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.09973102E-01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.02803227E-01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.38343814E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.51715568E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 050-lda_k_tf.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.114242; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.28652083E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 3.99935714E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 5.96927544E-06; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 7.87963019E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 051-lda_k_lp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.423374; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39799135E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.13500527E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 6.17173825E-06; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.14688743E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 084-gga_c_op_xalpha.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.085814; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.28449188E-02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -4.86919187E-02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.75121964E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.94448656E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 085-gga_c_op_g96.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.068955; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.86241214E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.50716093E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -5.30715832E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.19869400E-04; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.94408651E-13; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 8.34342486E-27; 1e-64
+
+
+Input: 086-gga_c_op_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.070738; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.84563477E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.47263800E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -8.92391494E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.52471184E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.57576727E-13; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 2.69581490E-29; 1e-64
+
+
+Input: 087-gga_c_op_b88.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.068975; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.99643631E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.60276623E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.86938561E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -8.62729091E-04; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.82253456E-13; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.62575604E-27; 1e-64
+
+
+Input: 088-gga_c_ft97.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.055454; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.07574898E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.36154798E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -3.66121913E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.33299101E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -7.79890786E-35; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 8.38067110E-27; 1e-64
+
+
+Input: 089-gga_c_spbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.070218; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.94158492E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.94164278E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.13969896E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.72057989E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -5.75955272E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -5.75955272E-23; 1e-64
+
+
+Input: 090-gga_x_ssb_sw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.137128; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.76359538E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.21800856E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.24830938E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.82637864E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.21962327E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.84489861E-26; 1e-64
+
+
+Input: 091-gga_x_ssb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.250038; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.27662816E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -7.80433466E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.23112025E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.84465999E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.34209287E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.41788533E-26; 1e-64
+
+
+Input: 092-gga_x_ssb_d.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.279398; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -8.15151353E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.71070290E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.25046284E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.03853787E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.36954001E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.47151163E-26; 1e-64
+
+
+Input: 093-gga_xc_hcth_407p.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.222354; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 5.60874103E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 6.65903924E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 4.90429144E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.71811511E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.40803199E-20; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.53582373E-25; 1e-64
+
+
+Input: 094-gga_xc_hcth_p76.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -3.173340; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.01209522E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.06360828E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.95044653E+01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.92445184E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.75133733E-19; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.28993114E-25; 1e-64
+
+
+Input: 095-gga_xc_hcth_p14.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.260756; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.15512838E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 2.08086278E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.21563070E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.12913936E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 9.46601647E-22; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.16908639E-25; 1e-64
+
+
+Input: 096-gga_xc_b97_gga1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.226199; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 6.45620471E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 7.44124297E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 3.33165135E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.72216679E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -4.68135032E-21; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -4.49818586E-25; 1e-64
+
+
+Input: 097-gga_xc_hcth_a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.443088; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 5.42854483E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 5.26521224E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 3.68152696E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.25626970E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -3.39156975E-21; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.30813026E-25; 1e-64
+
+
+Input: 098-gga_x_bpccac.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.164818; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.19034646E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.11235488E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.26025144E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.46416409E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.60711494E-31; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 5.45120318E-22; 1e-64
+
+
+Input: 099-gga_c_revtca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.062564; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.54283026E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 3.54288139E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.75501069E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.85420332E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 4.32801594E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.32801594E-29; 1e-64
+
+
+Input: 100-gga_c_tca.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.066270; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.54287323E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 3.54292332E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -8.22516486E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.70300126E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.17556263E-29; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.17556263E-29; 1e-64
+
+
+Input: 101-gga_x_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.135960; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.11066065E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.04101558E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.24915556E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.35719833E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.17721968E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.73822706E-26; 1e-64
+
+
+Input: 102-gga_x_pbe_r.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.163702; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.16721180E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.09163479E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.50149009E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.43472138E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.22105730E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.79965953E-26; 1e-64
+
+
+Input: 103-gga_x_b86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.162269; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.27891072E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.20238752E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.34989671E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.40459260E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.94201939E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.15129296E-26; 1e-64
+
+
+Input: 104-gga_x_herman.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.246035; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.03197156E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.95394426E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 4.73301473E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.56045256E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 5.60549598E-04; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.15903182E+02; 1e-64
+
+
+Input: 105-gga_x_b86_mgc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.155294; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.31392064E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.24025088E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.26985069E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.35672553E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 8.56311306E-19; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.13090769E-13; 1e-64
+
+
+Input: 106-gga_x_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.157343; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.28699439E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.22432225E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.17428577E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.33837486E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 7.78555651E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.34041058E-08; 1e-64
+
+
+Input: 107-gga_x_g96.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.162575; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.16632734E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.12436958E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.12670887E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.34511654E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.17609647E-08; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -9.39261097E-03; 1e-64
+
+
+Input: 108-gga_x_pw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.172404; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.55036376E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.39590248E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.19807840E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.22759892E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.58515025E-18; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.79574166E-13; 1e-64
+
+
+Input: 109-gga_x_pw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.142665; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.27669275E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.21513942E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.26035921E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.32099356E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.40729524E-30; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.59572599E-22; 1e-64
+
+
+Input: 110-gga_x_optx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.160775; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -5.17371953E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.65406073E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.72503231E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.74143432E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -6.24267335E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.09270853E-25; 1e-64
+
+
+Input: 111-gga_x_dk87_r1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.152361; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.47725479E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.39041662E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.02082564E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.24927597E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.66935338E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 4.58327572E-09; 1e-64
+
+
+Input: 112-gga_x_dk87_r2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.152024; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.47463504E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.38722055E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.03420081E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.24978453E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.93667646E-13; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.09472479E-07; 1e-64
+
+
+Input: 113-gga_x_lg93.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.162058; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.94438965E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.82493741E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.21189966E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.29125226E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.22344316E-22; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.14801227E-15; 1e-64
+
+
+Input: 114-gga_x_ft97_a.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.169115; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.97035265E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.89632485E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.42049414E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.48418095E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 7.89589021E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.40021562E-08; 1e-64
+
+
+Input: 115-gga_x_ft97_b.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.167838; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.96006115E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.88654072E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.41989427E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.48228760E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 7.89589021E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.40021562E-08; 1e-64
+
+
+Input: 116-gga_x_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.044791; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.22763974E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.18436207E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.21442045E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.26792219E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.87035869E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -7.52269101E-26; 1e-64
+
+
+Input: 117-gga_x_rpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.169416; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.19034641E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.11235484E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.29755385E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.46437095E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.02365757E-31; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.61052178E-23; 1e-64
+
+
+Input: 118-gga_x_wc.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.093492; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.90501224E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.85513242E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.23907802E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.20725174E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.20477739E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.71814747E-25; 1e-64
+
+
+Input: 119-gga_x_mpw91.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.152311; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.30586479E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.24349638E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.10562305E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.33044046E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 9.10444113E-30; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.98352492E-22; 1e-64
+
+
+Input: 120-gga_x_am05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.943206; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.33617837E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.17190276E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -9.22386074E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.21242409E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 3.28168424E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.81915630E-08; 1e-64
+
+
+Input: 121-gga_x_pbea.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.112464; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.03660882E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.97436887E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.16046181E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.28270784E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.94331671E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -8.74886414E-25; 1e-64
+
+
+Input: 122-gga_x_mpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.145545; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.13764617E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.06522403E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.26413406E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.38910936E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -8.60250243E-33; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.65132059E-27; 1e-64
+
+
+Input: 123-gga_x_xpbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.156102; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.24443144E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.16947402E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.32100893E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.39227104E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.69329842E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.68449257E-26; 1e-64
+
+
+Input: 125-gga_x_bayesian.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.134449; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.89410207E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.81770073E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.47415836E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.39240699E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.67079864E-31; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.08256256E-24; 1e-64
+
+
+Input: 126-gga_x_pbe_jsjr.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.073383; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.48998329E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.43842996E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.22874530E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.30089880E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.15857809E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.83459427E-26; 1e-64
+
+
+Input: 130-gga_c_pbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.057022; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 7.65498071E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 7.65503821E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -8.62856181E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.14225488E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.05677625E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.05677625E-28; 1e-64
+
+
+Input: 131-gga_c_lyp.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.063736; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 8.37440992E+01; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 4.73688972E+01; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.57299592E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -6.85929688E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.15147205E-22; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.96050811E-29; 1e-64
+
+
+Input: 132-gga_c_p86.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.057356; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 7.22705884E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 7.22713180E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.75137187E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.59923241E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 6.25432766E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 6.25432766E-23; 1e-64
+
+
+Input: 133-gga_c_pbe_sol.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.072145; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.66569622E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.66575780E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.46811467E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.72062188E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.22570224E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -4.22570224E-28; 1e-64
+
+
+Input: 134-gga_c_pw91.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.064252; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.63019834E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.63025659E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -8.57056930E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.96743866E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.21224541E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.21224541E-28; 1e-64
+
+
+Input: 135-gga_c_am05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.147399; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.43403944E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.38444506E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.14259356E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.66044322E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -2.01780791E-34; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.14282039E-28; 1e-64
+
+
+Input: 136-gga_c_xpbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.060889; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.20845824E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.20851411E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.73489857E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.00832415E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.34321530E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.34321530E-28; 1e-64
+
+
+Input: 137-gga_c_lm.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.596898; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.08716557E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.98054519E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 6.39381734E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.06971396E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.03459726E-16; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.95932843E-11; 1e-64
+
+
+Input: 138-gga_c_pbe_jrgx.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.080613; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 6.08138376E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.08144719E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.85718435E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.50292698E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -6.24042234E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -6.24042234E-28; 1e-64
+
+
+Input: 139-gga_x_optb88_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.108590; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.86001054E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.80786716E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.09869156E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.28953492E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.69119294E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.73030811E-08; 1e-64
+
+
+Input: 140-gga_x_pbek1_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.150223; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.14167453E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.06879451E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.36446583E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.39814665E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.36874764E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.01464779E-26; 1e-64
+
+
+Input: 141-gga_x_optpbe_vdw.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.110874; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.73980505E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.67870881E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.37855172E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.36282052E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.55692617E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.16932924E-23; 1e-64
+
+
+Input: 142-gga_x_rge2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.070477; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.27958881E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.23076826E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.29064258E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.34645622E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.56782859E-35; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.02302886E-26; 1e-64
+
+
+Input: 143-gga_c_rge2.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.066300; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 7.05793470E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 7.05799483E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.17229059E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.88525644E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -3.21599803E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.21599803E-28; 1e-64
+
+
+Input: 144-gga_x_rpw86.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.199237; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.99781697E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.84001019E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.21778089E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.19053756E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.56367901E-18; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.71723696E-13; 1e-64
+
+
+Input: 145-gga_x_kt1.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.226637; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -4.03847213E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.88638718E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -7.12446808E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.04598424E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.01273503E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.00494394E-27; 1e-64
+
+
+Input: 146-gga_xc_kt2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.458946; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.03871788E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.88663603E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.53858797E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.40823244E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.01273503E-32; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.00494394E-27; 1e-64
+
+
+Input: 147-gga_c_wl.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.053054; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.10313700E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 9.85192442E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.12261534E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.07428693E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 5.03422133E-11; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.10514303E-26; 1e-64
+
+
+Input: 148-gga_c_wi.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.013605; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.14055439E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 3.14055439E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.01590826E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.01590826E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 3.05676288E-25; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 3.05676288E-25; 1e-64
+
+
+Input: 149-gga_x_mb88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.985675; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -7.03272904E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.78625611E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -8.11698731E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.17819422E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 7.78555651E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -4.34041058E-08; 1e-64
+
+
+Input: 150-gga_x_sogga.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.040975; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.22291465E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.18013699E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.09622644E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.26089742E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.98695184E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.29936073E-23; 1e-64
+
+
+Input: 151-gga_x_sogga11.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.969995; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.52060771E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.46416798E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.76621008E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.70579857E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -9.91491796E-31; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -5.02147909E-21; 1e-64
+
+
+Input: 152-gga_c_sogga11.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.237435; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.45236461E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.45237180E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -2.04006235E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.68586930E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.03735262E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.03735262E-24; 1e-64
+
+
+Input: 153-gga_c_wi0.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.064704; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.01361284E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.01361284E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.95450667E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -7.95450667E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -6.54771340E-24; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -6.54771340E-24; 1e-64
+
+
+Input: 154-gga_xc_th1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.107378; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.22109488E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -4.81145791E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 1.98086317E+00; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; 1.66895755E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 7.11157226E-03; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.44061959E-02; 1e-64
+
+
+Input: 155-gga_xc_th2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.456294; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -6.54064785E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -7.27383386E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.40590183E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.82140819E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.18238183E-06; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.98854278E-06; 1e-64
+
+
+Input: 156-gga_xc_th3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.475569; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -8.80197697E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.18738398E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -6.33627806E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.18988710E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -8.81979101E-07; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.57800126E-06; 1e-64
+
+
+Input: 157-gga_xc_th4.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.355279; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 3.24450930E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 3.14728704E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -3.25569508E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -4.19739994E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.43596703E-06; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.10084295E-06; 1e-64
+
+
+Input: 158-gga_x_c09x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.074273; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.25161926E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.20456714E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.72316805E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.33312329E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.35416933E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.17341665E-20; 1e-64
+
+
+Input: 159-gga_c_sogga11_x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.200014; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -2.74590165E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -2.74584581E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -7.68800344E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 8.09947994E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.71889307E-25; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.71889307E-25; 1e-64
+
+
+Input: 160-gga_x_lb.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.036223; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.03250192E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.12782602E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -4.42495475E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.19409913E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 161-gga_xc_hcth_93.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.227402 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.72882423E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 5.61730677E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 2.42292276E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.79822137E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 4.34172814E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.45646278E-21 ; 1e-64
+
+
+Input: 162-gga_xc_hcth_120.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.223341 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 3.75394775E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 5.07805026E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 1.84784507E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.83291837E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.98814803E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.27349886E-22 ; 1e-64
+
+
+Input: 163-gga_xc_hcth_147.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.226936 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.01475842E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 5.34734220E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 1.44612442E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.82625217E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 8.55582823E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 8.91992617E-22 ; 1e-64
+
+
+Input: 164-gga_xc_hcth_407.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.223833 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 4.27931537E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 5.35550128E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 3.03687269E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.70499478E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.41238918E-24 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.37664097E-21 ; 1e-64
+
+
+Input: 165-gga_xc_edf1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.233941; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.08490855E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.06732392E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.08090220E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.64620861E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.52111868E-13; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -8.48016397E-08; 1e-64
+
+
+Input: 166-gga_xc_xlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.235010; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.35730288E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.32706277E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.99284866E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.42242195E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.62117181E-14; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.13377644E-08; 1e-64
+
+
+Input: 167-gga_xc_b97.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.801439 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.00944826E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -9.81199742E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 7.17629043E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.11169030E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.74033774E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.54648038E-22 ; 1e-64
+
+
+Input: 168-gga_xc_b97_1.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.764979 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.09909379E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.07229842E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 1.45667969E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.07631127E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 3.30001229E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.34529468E-22 ; 1e-64
+
+
+Input: 169-gga_xc_b97_2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.766200 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -3.75368984E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.22289691E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 2.08929835E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.95560438E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 4.37218242E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 6.41227095E-22 ; 1e-64
+
+
+Input: 170-gga_xc_b97_d.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.216294 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.20089660E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -6.89827060E+00; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 3.22998771E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.57795388E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 7.67048774E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 1.07948196E-21 ; 1e-64
+
+
+Input: 171-gga_xc_b97_k.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.318206 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.10699366E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.14239398E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -1.51011184E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.17666962E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -2.17806184E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -2.86863961E-22 ; 1e-64
+
+
+Input: 172-gga_xc_b97_3.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.641158 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -7.72536499E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -7.91998329E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 1.26728407E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.85157524E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.32447205E-24 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.20132341E-21 ; 1e-64
+
+
+Input: 173-gga_xc_pbe1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.222039; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.54422068E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.47456946E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.23685061E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.65514911E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; -1.52223215E-28; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.75344721E-26; 1e-64
+
+
+Input: 174-gga_xc_mpwlyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.228652; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.23218318E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.20182408E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.93320737E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.42099793E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.01329549E-22; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -5.98352527E-22; 1e-64
+
+
+Input: 175-gga_xc_pbelyp1w.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.227007; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.04871862E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.00598931E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.15873874E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.47338104E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 8.52089315E-23; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -3.74115784E-26; 1e-64
+
+
+Input: 176-gga_xc_sb98_1a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.726677 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -9.51704018E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -9.20309773E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 4.89913409E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.54883563E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.29486185E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.12453220E-22 ; 1e-64
+
+
+Input: 177-gga_xc_sb98_1b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.733369 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -2.17737872E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.62504522E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 4.64234742E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.78906875E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.79269476E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 5.19084175E-22 ; 1e-64
+
+
+Input: 178-gga_xc_sb98_1c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.805818 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.00132199E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -9.68717259E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 8.30019724E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.11567595E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.89688768E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.61629012E-22 ; 1e-64
+
+
+Input: 179-gga_xc_sb98_2a.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.780864 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.07525490E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.05843343E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 3.10998443E-03; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.01770299E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.94313744E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.93645554E-22 ; 1e-64
+
+
+Input: 180-gga_xc_sb98_2b.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.677195 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -6.80078451E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -6.58800971E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 6.52501585E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.74642832E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.71661661E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.74539291E-22 ; 1e-64
+
+
+Input: 181-gga_xc_sb98_2c.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.744757 ; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -9.43550891E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -9.23084918E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; 9.89757053E-02; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -2.98309981E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 3.09149824E-25 ; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 3.66368889E-22 ; 1e-64
+
+
+Input: 182-gga_x_lbm.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.17595723E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.29237590E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -4.39276832E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.08671646E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 183-gga_x_ol2.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.155575; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -4.13342843E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -4.34289644E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 1.44598823E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.11263552E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.30969331E-04; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.53777269E+02; 1e-64
+
+
+Input: 184-gga_x_apbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.169138; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.46561940E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.38659387E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.25640618E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.37712278E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.83772298E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.07842516E-26; 1e-64
+
+
+Input: 185-gga_k_apbe.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.125253; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39291407E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.11941485E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.06786506E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.62258572E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 186-gga_c_apbe.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.050476; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 8.05019082E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 8.05024616E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -8.16335078E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -3.29078134E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.47702600E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.47702600E-28; 1e-64
+
+
+Input: 187-gga_k_tw1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.111086; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39069259E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.11689335E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.07736275E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60947616E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 188-gga_k_tw2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.083279; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39136544E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.11772856E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 9.94836505E-06; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60194091E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 189-gga_k_tw3.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.110911; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39011400E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.11622941E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.09042741E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60725048E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 190-gga_k_tw4.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.110812; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.38975141E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.11581342E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.09903220E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60584672E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 191-gga_x_htbs.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.114730; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.90501224E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.85513242E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.29754255E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.21887455E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -5.08826356E-31; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.73372072E-23; 1e-64
+
+
+Input: 192-gga_x_airy.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.957516; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 1.11470735E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 1.54782183E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.00533198E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.36720349E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.91733939E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.55780124E-08; 1e-64
+
+
+Input: 193-gga_x_lag.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.069682; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.00028855E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.81720857E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.55513809E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.45301675E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 2.91733939E-14; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.55780124E-08; 1e-64
+
+
+Input: 194-gga_xc_mohlyp.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.162330; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -4.25204760E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.96498350E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.64361825E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.69113068E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.75736023E-23; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -9.86290976E-26; 1e-64
+
+
+Input: 195-gga_xc_mohlyp2.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.245853; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -6.25796873E+02; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -5.76812843E+02; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.38655371E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -3.93882433E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 5.75736023E-23; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; -1.41198730E-25; 1e-64
+
+
+Input: 196-gga_xc_th_fl.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.645273; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -3.11647455E+00; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -3.23926861E+00; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.55182023E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -5.32482069E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 197-gga_xc_th_fc.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.916246; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; 1.94008076E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; 1.54133038E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -2.33898396E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -6.01184228E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 2.79049348E-07; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.05310683E-02; 1e-64
+
+
+Input: 198-gga_xc_th_fcfo.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.907800; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.52064146E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -2.09144770E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -3.04690001E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -6.00760337E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.98429440E-02; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 4.03737329E-02; 1e-64
+
+
+Input: 199-gga_xc_th_fco.inp
+
+match ; Exc ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.891584; 1e-64
+match ; vxc_up(r1) ; LINE(xc/v_xc_up, 8, 20) ; -1.05688606E+03; 1e-64
+match ; vxc_dn(r1) ; LINE(xc/v_xc_dn, 8, 20) ; -1.58558772E+03; 1e-64
+match ; vxc_up(ri) ; LINE(xc/v_xc_up, 162, 20) ; -3.04180579E-01; 1e-64
+match ; vxc_dn(ri) ; LINE(xc/v_xc_dn, 162, 20) ; -5.85103399E-01; 1e-64
+match ; vxc_up(rmax) ; LINE(xc/v_xc_up, 207, 20) ; 1.11797323E-02; 1e-64
+match ; vxc_dn(rmax) ; LINE(xc/v_xc_dn, 207, 20) ; 2.34479586E-02; 1e-64
+
+
+Input: 200-gga_c_optc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.053133; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.68855150E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 4.14761897E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -8.98541596E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.31470062E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 7.73311785E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.48833925E-28; 1e-64
+
+
+Input: 201-mgga_x_lta.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.787691; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 2.11606424E-16; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 1.10039754E-16; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.53322488E-15; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; 5.04095398E-17; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 202-mgga_x_tpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.173745; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.52384089E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.01307437E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.24812878E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.63680764E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.17663545E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.52348508E-26; 1e-64
+
+
+Input: 203-mgga_x_m06_l.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.172972; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.84392524E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.75960722E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -4.56294755E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -4.23988581E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 6.42196750E-29; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.72364882E-22; 1e-64
+
+
+Input: 204-mgga_x_gvt4.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.158222; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -7.37163230E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -6.82924124E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -4.69183709E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.98190178E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 9.29014837E-29; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -2.49302061E-22; 1e-64
+
+
+Input: 205-mgga_x_tau_hcth.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.107197; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 1.41858832E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 1.45987619E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.49457564E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.99439692E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.66599637E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 7.15614927E-22; 1e-64
+
+
+Input: 206-mgga_x_br89.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.172489; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.02272116E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.23063702E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.73330002E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -9.82681627E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 4.27714065E-06; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 8.24579359E-14; 1e-64
+
+
+Input: 207-mgga_x_bj06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.00000443E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.81193548E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -5.60949313E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -6.02381625E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 208-mgga_x_tb09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.62006808E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -7.65677612E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.79878754E+00; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.66337170E+00; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 209-mgga_x_rpp09.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000000; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -3.00000443E+00; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -3.12013607E+00; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -5.60949305E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.79938269E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 0.00000000E+00; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 212-mgga_x_revtpss.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.170766; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.27162960E+04; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.33697697E+04; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.22223648E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.70554568E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.41630444E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -6.09351843E-26; 1e-64
+
+
+Input: 213-mgga_x_pkzb.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.142830; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.18542301E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.09607347E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.29311499E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.78627452E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.54210563E-34; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.50589683E-26; 1e-64
+
+
+Input: 214-mgga_x_m05.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.157863; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.13679063E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.10948615E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -7.73615599E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.35517425E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.09188912E-33; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.60632662E-26; 1e-64
+
+
+Input: 215-mgga_x_m05_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.179288; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.64071645E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.59638550E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -4.21437134E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.02944796E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -8.19760195E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.64809895E-25; 1e-64
+
+
+Input: 216-mgga_x_m06_hf.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; 0.000667; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; 2.28236085E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; 2.22447445E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 1.49834428E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; 1.80051102E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.30952357E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 6.19890900E-22; 1e-64
+
+
+Input: 217-mgga_x_m06.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.566615; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.04473422E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.00902666E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -2.67120100E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.73977511E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -4.02146290E-28; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 1.07935563E-21; 1e-64
+
+
+Input: 218-mgga_x_m06_2x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.993710; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -7.46818917E+02; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -7.30559389E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.80306041E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.11789371E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -8.02281554E-29; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.15331973E-22; 1e-64
+
+
+Input: 219-mgga_x_m08_hx.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.072378; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -7.64869994E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.86547634E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; 1.26535256E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -1.52903594E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.06454515E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.19834298E-26; 1e-64
+
+
+Input: 220-mgga_x_m08_so.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.988074; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -9.49921065E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.31989200E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -8.62288083E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -5.68377372E-02; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.26051679E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -3.05144386E-26; 1e-64
+
+
+Input: 231-mgga_c_tpss.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.054864; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.30066364E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.30080543E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -9.46755805E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -2.11558571E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.79720940E-17; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -3.68344350E-28; 1e-64
+
+
+Input: 232-mgga_c_vsxc.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.073165; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.87194803E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 2.10992177E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 8.40992060E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 6.63165309E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 2.22607839E-23; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.19491147E-21; 1e-64
+
+
+Input: 233-mgga_c_m06_l.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.047708; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -8.95083990E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -8.99578120E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 7.11711948E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 1.63821632E-01; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -3.45990678E-21; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 3.53623783E-15; 1e-64
+
+
+Input: 234-mgga_c_m06_hf.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.070985; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -8.15807283E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.00955168E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -6.32057481E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.59359401E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 6.53383391E-21; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -6.43747906E-15; 1e-64
+
+
+Input: 235-mgga_c_m06.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.067306; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -1.42269123E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -1.58860423E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 2.16917610E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 6.72817667E-03; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 2.67101188E-21; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -2.62619654E-15; 1e-64
+
+
+Input: 236-mgga_c_m06_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.060301; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; -5.07283500E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; -7.21880258E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.23161309E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; 5.77013058E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 2.03361632E-21; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -1.96886312E-15; 1e-64
+
+
+Input: 237-mgga_c_m05.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.049919; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 4.12811672E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.10662980E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 1.92431586E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -8.21175127E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -6.99915852E-22; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; -8.31504243E-17; 1e-64
+
+
+Input: 238-mgga_c_m05_2x.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.046422; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 1.26448440E+03; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 1.26896555E+03; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 5.77572892E-01; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -5.88353378E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; 1.70034410E-20; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 2.02001874E-15; 1e-64
+
+
+Input: 239-mgga_c_pkzb.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.060993; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 5.76568131E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 6.90435674E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; 2.04484796E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -4.55507704E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -1.71108262E-28; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 4.39505429E-25; 1e-64
+
+
+Input: 240-mgga_c_bc95.inp
+
+match ; Ec ; GREP(xc/info, "Exchange-correlation energy", 35) ; -0.062266; 1e-64
+match ; vc_up(r1) ; LINE(xc/v_c_up, 8, 20) ; 3.38477411E+02; 1e-64
+match ; vc_dn(r1) ; LINE(xc/v_c_dn, 8, 20) ; 3.14119218E+02; 1e-64
+match ; vc_up(ri) ; LINE(xc/v_c_up, 162, 20) ; -1.61655308E-02; 1e-64
+match ; vc_dn(ri) ; LINE(xc/v_c_dn, 162, 20) ; -1.33101905E-02; 1e-64
+match ; vc_up(rmax) ; LINE(xc/v_c_up, 207, 20) ; -4.17591431E-30; 1e-64
+match ; vc_dn(rmax) ; LINE(xc/v_c_dn, 207, 20) ; 1.91534391E-27; 1e-64
+
+
+Input: 500-gga_k_vw.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.323054; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 7.73416073E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 8.70095107E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75357495E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 5.87202066E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 501-gga_k_ge2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.150136; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.37245595E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.09603437E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.00810936E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.53207693E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 502-gga_k_golden.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 11.807568; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.50995214E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.25071795E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 5.12557594E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 9.57599171E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 503-gga_k_yt65.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.978852; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.44120405E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.17337616E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 3.56684265E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 9.05403432E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 504-gga_k_baltin.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 14.293716; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.71619643E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.48274331E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 9.80177580E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 1.11418639E-02; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 505-gga_k_lieb.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.847483; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.43030599E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.16111581E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 3.31974975E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.97129280E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 506-gga_k_absr1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 5.567987; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; -5.80630510E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; -7.77640034E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75111561E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 2.62561302E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 507-gga_k_absr2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 6.297126; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; -3.17708843E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; -4.57691463E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75159315E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 3.25598343E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 508-gga_k_gr.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 8.092632; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.29735761E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 3.30181893E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75276910E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 4.80827058E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 509-gga_k_ludena.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.323054; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 7.73416073E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 8.70095107E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75357495E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 5.87202066E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 510-gga_k_gp85.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.323054; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 7.73416073E+01; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 8.70095107E+01; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75357495E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 5.87202066E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 511-gga_k_pearson.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.704115; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.37221472E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.09581981E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 5.96931102E-06; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.47853921E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 512-gga_k_ol1.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.827173; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.35200635E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.07353977E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.29440173E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.33906974E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 513-gga_k_ol2.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.154309; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.37389969E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.09778445E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.00813832E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.53569214E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 514-gga_k_fr_b88.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.110129; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39962575E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.12755302E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.39867138E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.61382866E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 515-gga_k_fr_pw86.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.104548; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.37614114E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.09902468E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.53222297E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.62183979E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 516-gga_k_dk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.103574; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.38027343E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.10431623E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.55420909E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.62335458E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 517-gga_k_perdew.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 8.261619; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.20262253E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 3.90479002E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.77095023E-07; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 7.27597976E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 518-gga_k_vsk.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.538012; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.37186401E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.09540412E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.75665939E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.52754954E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 519-gga_k_vjks.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 9.513653; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.38688795E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.11328640E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; -9.67770260E-04; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.46354751E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 520-gga_k_ernzerhof.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.436249; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.37460633E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.09827140E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 1.44252817E-03; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.58342943E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 521-gga_k_lc94.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.130578; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39455366E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.12162555E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.78812635E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60600151E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 522-gga_k_llp.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.100376; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.39649682E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.12393421E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.48510521E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60164578E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 523-gga_k_thakkar.inp
+
+match ; Ek ; GREP(xc/info, "Kinetic Energy", 35, 1) ; 10.147186; 1e-64
+match ; tau_up(r1) ; LINE(xc/app_tau_up, 9, 20) ; 3.35610867E+02; 1e-64
+match ; tau_dn(r1) ; LINE(xc/app_tau_dn, 9, 20) ; 4.07283924E+02; 1e-64
+match ; tau_up(ri) ; LINE(xc/app_tau_up, 163, 20) ; 2.93361155E-05; 1e-64
+match ; tau_dn(ri) ; LINE(xc/app_tau_dn, 163, 20) ; 8.60979372E-03; 1e-64
+match ; tau_up(rmax) ; LINE(xc/app_tau_up, 208, 20) ; 0.00000000E+00; 1e-64
+match ; tau_dn(rmax) ; LINE(xc/app_tau_dn, 208, 20) ; 0.00000000E+00; 1e-64
+
+
+Input: 524-gga_x_wpbeh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.138606; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.14167290E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.04595197E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.28936729E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.30260766E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.74173639E-30; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 2.17333157E-21; 1e-64
+
+
+Input: 525-gga_x_hjs_pbe.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.135970; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.11147565E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.04171735E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.24942091E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.35645832E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -2.15021106E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; -1.39688981E-25; 1e-64
+
+
+Input: 526-gga_x_hjs_pbe_sol.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.044792; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.22705968E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.18378531E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.21458814E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.26806472E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -3.81265309E-32; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 4.94624028E-25; 1e-64
+
+
+Input: 527-gga_x_hjs_b88.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.075610; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.53928710E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -1.49368337E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.14293047E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.26485710E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.33583821E-21; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 5.12463722E-18; 1e-64
+
+
+Input: 528-gga_x_hjs_b97x.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -2.045157; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -1.01424107E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -9.74150264E+02; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.58467773E-01; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -3.30532436E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; -1.17284131E-31; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 4.10133212E-24; 1e-64
+
+
+Input: 529-gga_x_ityh.inp
+
+match ; Ex ; GREP(xc/info, "Exchange-correlation energy", 35) ; -1.769154; 1e-64
+match ; vx_up(r1) ; LINE(xc/v_x_up, 8, 20) ; -2.08650434E+03; 1e-64
+match ; vx_dn(r1) ; LINE(xc/v_x_dn, 8, 20) ; -2.03683611E+03; 1e-64
+match ; vx_up(ri) ; LINE(xc/v_x_up, 162, 20) ; -1.34607506E-02; 1e-64
+match ; vx_dn(ri) ; LINE(xc/v_x_dn, 162, 20) ; -2.13123607E-01; 1e-64
+match ; vx_up(rmax) ; LINE(xc/v_x_up, 207, 20) ; 1.53722345E-08; 1e-64
+match ; vx_dn(rmax) ; LINE(xc/v_x_dn, 207, 20) ; 3.98040224E+01; 1e-64
+
diff --git a/testsuite/libxc/Makefile.am b/testsuite/libxc/Makefile.am
new file mode 100644
index 0000000..7a2ec53
--- /dev/null
+++ b/testsuite/libxc/Makefile.am
@@ -0,0 +1,171 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+sharedir = $(pkgdatadir)/testsuite/libxc
+
+dist_share_DATA = \
+ 01-H.inp \
+ 01-H.test \
+ 02-H_spin.inp \
+ 02-H_spin.test \
+ 03-He.inp \
+ 03-He.test \
+ 04-He_spin.inp \
+ 04-He_spin.test \
+ 05-Li.inp \
+ 05-Li.test
+ 000-none.inp \
+ 001-lda_x.inp \
+ 002-lda_c_wigner.inp \
+ 003-lda_c_rpa.inp \
+ 004-lda_c_hl.inp \
+ 005-lda_c_gl.inp \
+ 006-lda_c_xalpha.inp \
+ 007-lda_c_vwn.inp \
+ 008-lda_c_vwn_rpa.inp \
+ 009-lda_c_pz.inp \
+ 010-lda_c_pz_mod.inp \
+ 011-lda_c_ob_pz.inp \
+ 012-lda_c_pw.inp \
+ 013-lda_c_pw_mod.inp \
+ 014-lda_c_ob_pw.inp \
+ 017-lda_c_vbh.inp \
+ 020-lda_xc_teter93.inp \
+ 022-lda_c_ml1.inp \
+ 023-lda_c_ml2.inp \
+ 024-lda_c_gombas.inp \
+ 101-gga_x_pbe.inp \
+ 102-gga_x_pbe_r.inp \
+ 103-gga_x_b86.inp \
+ 104-gga_x_herman.inp \
+ 105-gga_x_b86_mgc.inp \
+ 106-gga_x_b88.inp \
+ 107-gga_x_g96.inp \
+ 108-gga_x_pw86.inp \
+ 109-gga_x_pw91.inp \
+ 110-gga_x_optx.inp \
+ 111-gga_x_dk87_r1.inp \
+ 112-gga_x_dk87_r2.inp \
+ 113-gga_x_lg93.inp \
+ 114-gga_x_ft97_a.inp \
+ 115-gga_x_ft97_b.inp \
+ 116-gga_x_pbe_sol.inp \
+ 117-gga_x_rpbe.inp \
+ 118-gga_x_wc.inp \
+ 119-gga_x_mpw91.inp \
+ 120-gga_x_am05.inp \
+ 121-gga_x_pbea.inp \
+ 122-gga_x_mpbe.inp \
+ 123-gga_x_xpbe.inp \
+ 125-gga_x_bayesian.inp \
+ 126-gga_x_pbe_jsjr.inp \
+ 130-gga_c_pbe.inp \
+ 131-gga_c_lyp.inp \
+ 132-gga_c_p86.inp \
+ 133-gga_c_pbe_sol.inp \
+ 134-gga_c_pw91.inp \
+ 135-gga_c_am05.inp \
+ 136-gga_c_xpbe.inp \
+ 137-gga_c_lm.inp \
+ 138-gga_c_pbe_jrgx.inp \
+ 139-gga_x_optb88_vdw.inp \
+ 140-gga_x_pbek1_vdw.inp \
+ 141-gga_x_optpbe_vdw.inp \
+ 142-gga_x_rge2.inp \
+ 143-gga_c_rge2.inp \
+ 144-gga_x_rpw86.inp \
+ 145-gga_x_kt1.inp \
+ 146-gga_xc_kt2.inp \
+ 147-gga_c_wl.inp \
+ 148-gga_c_wi.inp \
+ 149-gga_x_mb88.inp \
+ 160-gga_x_lb.inp \
+ 161-gga_xc_hcth_93.inp \
+ 162-gga_xc_hcth_120.inp \
+ 163-gga_xc_hcth_147.inp \
+ 164-gga_xc_hcth_407.inp \
+ 165-gga_xc_edf1.inp \
+ 166-gga_xc_xlyp.inp \
+ 167-gga_xc_b97.inp \
+ 168-gga_xc_b97_1.inp \
+ 169-gga_xc_b97_2.inp \
+ 170-gga_xc_b97_d.inp \
+ 171-gga_xc_b97_k.inp \
+ 172-gga_xc_b97_3.inp \
+ 173-gga_xc_pbe1w.inp \
+ 174-gga_xc_mpwlyp1w.inp \
+ 175-gga_xc_pbelyp1w.inp \
+ 176-gga_xc_sb98_1a.inp \
+ 177-gga_xc_sb98_1b.inp \
+ 178-gga_xc_sb98_1c.inp \
+ 179-gga_xc_sb98_2a.inp \
+ 180-gga_xc_sb98_2b.inp \
+ 181-gga_xc_sb98_2c.inp \
+ 183-gga_x_ol2.inp \
+ 184-gga_x_apbe.inp \
+ 185-gga_k_apbe.inp \
+ 186-gga_c_apbe.inp \
+ 187-gga_k_tw1.inp \
+ 188-gga_k_tw2.inp \
+ 189-g90_k_tw4.inp \
+ 189-gga_k_tw3.inp \
+ 190-gga_k_tw4.inp \
+ 191-gga_x_htbs.inp \
+ 192-gga_x_airy.inp \
+ 193-gga_x_lag.inp \
+ 201-mgga_x_lta.inp \
+ 202-mgga_x_tpss.inp \
+ 203-mgga_x_m06l.inp \
+ 204-mgga_x_gvt4.inp \
+ 205-mgga_x_tau_hcth.inp \
+ 205-mgga_x_tau_htch.inp \
+ 206-mgga_x_br89.inp \
+ 207-mgga_x_bj06.inp \
+ 208-mgga_x_tb09.inp \
+ 209-mgga_x_rpp10.inp \
+ 231-mgga_c_tpss.inp \
+ 232-mgga_c_vsxc.inp \
+ 500-gga_k_vw.inp \
+ 501-gga_k_ge2.inp \
+ 502-gga_k_golden.inp \
+ 503-gga_k_yt65.inp \
+ 504-gga_k_baltin.inp \
+ 505-gga_k_lieb.inp \
+ 506-gga_k_absr1.inp \
+ 507-gga_k_absr2.inp \
+ 508-gga_k_gr.inp \
+ 509-gga_k_ludena.inp \
+ 510-gga_k_gp85.inp \
+ 511-gga_k_pearson.inp \
+ 512-gga_k_ol1.inp \
+ 513-gga_k_ol2.inp \
+ 514-gga_k_fr_b88.inp \
+ 515-gga_k_fr_pw86.inp \
+ 516-gga_k_dk.inp \
+ 517-gga_k_perdew.inp \
+ 518-gga_k_vsk.inp \
+ 519-gga_k_vjks.inp \
+ 520-gga_k_ernzerhof.inp \
+ 521-gga_k_lc94.inp \
+ 522-gga_k_llp.inp \
+ 523-gga_k_thakkar.inp
+
+CLEANFILES = *~ *.bak
diff --git a/testsuite/libxc/Makefile.in b/testsuite/libxc/Makefile.in
new file mode 100644
index 0000000..0400a9a
--- /dev/null
+++ b/testsuite/libxc/Makefile.in
@@ -0,0 +1,579 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = testsuite/libxc
+DIST_COMMON = $(dist_share_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(dist_share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sharedir = $(pkgdatadir)/testsuite/libxc
+dist_share_DATA = \
+ 01-H.inp \
+ 01-H.test \
+ 02-H_spin.inp \
+ 02-H_spin.test \
+ 03-He.inp \
+ 03-He.test \
+ 04-He_spin.inp \
+ 04-He_spin.test \
+ 05-Li.inp \
+ 05-Li.test
+
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/libxc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu testsuite/libxc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-dist_shareDATA: $(dist_share_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sharedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sharedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+ done
+
+uninstall-dist_shareDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(sharedir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(sharedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_shareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_shareDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_shareDATA
+
+ 000-none.inp \
+ 001-lda_x.inp \
+ 002-lda_c_wigner.inp \
+ 003-lda_c_rpa.inp \
+ 004-lda_c_hl.inp \
+ 005-lda_c_gl.inp \
+ 006-lda_c_xalpha.inp \
+ 007-lda_c_vwn.inp \
+ 008-lda_c_vwn_rpa.inp \
+ 009-lda_c_pz.inp \
+ 010-lda_c_pz_mod.inp \
+ 011-lda_c_ob_pz.inp \
+ 012-lda_c_pw.inp \
+ 013-lda_c_pw_mod.inp \
+ 014-lda_c_ob_pw.inp \
+ 017-lda_c_vbh.inp \
+ 020-lda_xc_teter93.inp \
+ 022-lda_c_ml1.inp \
+ 023-lda_c_ml2.inp \
+ 024-lda_c_gombas.inp \
+ 101-gga_x_pbe.inp \
+ 102-gga_x_pbe_r.inp \
+ 103-gga_x_b86.inp \
+ 104-gga_x_herman.inp \
+ 105-gga_x_b86_mgc.inp \
+ 106-gga_x_b88.inp \
+ 107-gga_x_g96.inp \
+ 108-gga_x_pw86.inp \
+ 109-gga_x_pw91.inp \
+ 110-gga_x_optx.inp \
+ 111-gga_x_dk87_r1.inp \
+ 112-gga_x_dk87_r2.inp \
+ 113-gga_x_lg93.inp \
+ 114-gga_x_ft97_a.inp \
+ 115-gga_x_ft97_b.inp \
+ 116-gga_x_pbe_sol.inp \
+ 117-gga_x_rpbe.inp \
+ 118-gga_x_wc.inp \
+ 119-gga_x_mpw91.inp \
+ 120-gga_x_am05.inp \
+ 121-gga_x_pbea.inp \
+ 122-gga_x_mpbe.inp \
+ 123-gga_x_xpbe.inp \
+ 125-gga_x_bayesian.inp \
+ 126-gga_x_pbe_jsjr.inp \
+ 130-gga_c_pbe.inp \
+ 131-gga_c_lyp.inp \
+ 132-gga_c_p86.inp \
+ 133-gga_c_pbe_sol.inp \
+ 134-gga_c_pw91.inp \
+ 135-gga_c_am05.inp \
+ 136-gga_c_xpbe.inp \
+ 137-gga_c_lm.inp \
+ 138-gga_c_pbe_jrgx.inp \
+ 139-gga_x_optb88_vdw.inp \
+ 140-gga_x_pbek1_vdw.inp \
+ 141-gga_x_optpbe_vdw.inp \
+ 142-gga_x_rge2.inp \
+ 143-gga_c_rge2.inp \
+ 144-gga_x_rpw86.inp \
+ 145-gga_x_kt1.inp \
+ 146-gga_xc_kt2.inp \
+ 147-gga_c_wl.inp \
+ 148-gga_c_wi.inp \
+ 149-gga_x_mb88.inp \
+ 160-gga_x_lb.inp \
+ 161-gga_xc_hcth_93.inp \
+ 162-gga_xc_hcth_120.inp \
+ 163-gga_xc_hcth_147.inp \
+ 164-gga_xc_hcth_407.inp \
+ 165-gga_xc_edf1.inp \
+ 166-gga_xc_xlyp.inp \
+ 167-gga_xc_b97.inp \
+ 168-gga_xc_b97_1.inp \
+ 169-gga_xc_b97_2.inp \
+ 170-gga_xc_b97_d.inp \
+ 171-gga_xc_b97_k.inp \
+ 172-gga_xc_b97_3.inp \
+ 173-gga_xc_pbe1w.inp \
+ 174-gga_xc_mpwlyp1w.inp \
+ 175-gga_xc_pbelyp1w.inp \
+ 176-gga_xc_sb98_1a.inp \
+ 177-gga_xc_sb98_1b.inp \
+ 178-gga_xc_sb98_1c.inp \
+ 179-gga_xc_sb98_2a.inp \
+ 180-gga_xc_sb98_2b.inp \
+ 181-gga_xc_sb98_2c.inp \
+ 183-gga_x_ol2.inp \
+ 184-gga_x_apbe.inp \
+ 185-gga_k_apbe.inp \
+ 186-gga_c_apbe.inp \
+ 187-gga_k_tw1.inp \
+ 188-gga_k_tw2.inp \
+ 189-g90_k_tw4.inp \
+ 189-gga_k_tw3.inp \
+ 190-gga_k_tw4.inp \
+ 191-gga_x_htbs.inp \
+ 192-gga_x_airy.inp \
+ 193-gga_x_lag.inp \
+ 201-mgga_x_lta.inp \
+ 202-mgga_x_tpss.inp \
+ 203-mgga_x_m06l.inp \
+ 204-mgga_x_gvt4.inp \
+ 205-mgga_x_tau_hcth.inp \
+ 205-mgga_x_tau_htch.inp \
+ 206-mgga_x_br89.inp \
+ 207-mgga_x_bj06.inp \
+ 208-mgga_x_tb09.inp \
+ 209-mgga_x_rpp10.inp \
+ 231-mgga_c_tpss.inp \
+ 232-mgga_c_vsxc.inp \
+ 500-gga_k_vw.inp \
+ 501-gga_k_ge2.inp \
+ 502-gga_k_golden.inp \
+ 503-gga_k_yt65.inp \
+ 504-gga_k_baltin.inp \
+ 505-gga_k_lieb.inp \
+ 506-gga_k_absr1.inp \
+ 507-gga_k_absr2.inp \
+ 508-gga_k_gr.inp \
+ 509-gga_k_ludena.inp \
+ 510-gga_k_gp85.inp \
+ 511-gga_k_pearson.inp \
+ 512-gga_k_ol1.inp \
+ 513-gga_k_ol2.inp \
+ 514-gga_k_fr_b88.inp \
+ 515-gga_k_fr_pw86.inp \
+ 516-gga_k_dk.inp \
+ 517-gga_k_perdew.inp \
+ 518-gga_k_vsk.inp \
+ 519-gga_k_vjks.inp \
+ 520-gga_k_ernzerhof.inp \
+ 521-gga_k_lc94.inp \
+ 522-gga_k_llp.inp \
+ 523-gga_k_thakkar.inp
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/testsuite/pseudopotentials/01-non_rel.01-ae.inp b/testsuite/pseudopotentials/01-non_rel.01-ae.inp
new file mode 100644
index 0000000..9d1bb03
--- /dev/null
+++ b/testsuite/pseudopotentials/01-non_rel.01-ae.inp
@@ -0,0 +1,12 @@
+# $Id: 01-non_rel.01-ae.inp 624 2011-08-26 17:46:59Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 3
+
+%Orbitals
+"He"
+ 2 | 0 | 1
+ 2 | 1 | 0
+%
diff --git a/testsuite/pseudopotentials/01-non_rel.02-ham.inp b/testsuite/pseudopotentials/01-non_rel.02-ham.inp
new file mode 100644
index 0000000..4bb47db
--- /dev/null
+++ b/testsuite/pseudopotentials/01-non_rel.02-ham.inp
@@ -0,0 +1,10 @@
+# $Id: 01-non_rel.02-ham.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 2 | 0 | 0.0 | ham
+ 2 | 1 | 0.0 | ham
+%
+
diff --git a/testsuite/pseudopotentials/01-non_rel.03-tm.inp b/testsuite/pseudopotentials/01-non_rel.03-tm.inp
new file mode 100644
index 0000000..1e5fe73
--- /dev/null
+++ b/testsuite/pseudopotentials/01-non_rel.03-tm.inp
@@ -0,0 +1,11 @@
+# $Id: 01-non_rel.03-tm.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 2 | 0 | 3.20 | tm
+ 2 | 1 | 3.90 | tm
+%
+
+LLocal = 1
diff --git a/testsuite/pseudopotentials/01-non_rel.04-mrpp.inp b/testsuite/pseudopotentials/01-non_rel.04-mrpp.inp
new file mode 100644
index 0000000..044c675
--- /dev/null
+++ b/testsuite/pseudopotentials/01-non_rel.04-mrpp.inp
@@ -0,0 +1,11 @@
+# $Id: 01-non_rel.04-mrpp.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 1 | 0 | 1.50 | mrpp
+ 2 | 1 | 3.90 | tm
+%
+
+ODEIntTolerance = 1e-14
diff --git a/testsuite/pseudopotentials/01-non_rel.test b/testsuite/pseudopotentials/01-non_rel.test
new file mode 100644
index 0000000..9669516
--- /dev/null
+++ b/testsuite/pseudopotentials/01-non_rel.test
@@ -0,0 +1,163 @@
+# $Id: 01-non_rel.test 759 2012-11-13 13:37:34Z fnog $
+
+Test : Pseudopotentials: non-relativistic Li
+Programs : ape
+TestGroups : all; ps
+Enabled : Yes
+
+Input: 01-non_rel.01-ae.inp
+
+Input: 01-non_rel.02-ham.inp
+
+#Coefficient
+match; 2s cl coefficient ; GREP(pp/info, 'State: 2s', 11, 3) ; 0.1270413205; 4e-08
+match; 2p cl coefficient ; GREP(pp/info, 'State: 2p', 11, 3) ; -0.9176124519; 6e-08
+
+#Pseudo-Wavefunctions
+match; 2s Wavefunction (small r) ; LINE(pp/wf-2s, 98, 20) ; 1.62110929E-01; 2e-7
+match; 2s Wavefunction (large r) ; LINE(pp/wf-2s, 176, 20) ; 7.43959970E-02; 6e-08
+match; 2s Wavefunction Deriv. (small r) ; LINE(pp/wf-2s, 98, 39) ; 4.39386921E-04; 5e-10
+match; 2s Wavefunction Deriv. (large r) ; LINE(pp/wf-2s, 176, 39) ; -3.39767921E-02; 7e-08
+match; 2p Wavefunction (small r) ; LINE(pp/wf-2p, 98, 20) ; 2.66407882E-03; 2e-9
+match; 2p Wavefunction (large r) ; LINE(pp/wf-2p, 176, 20) ; 7.89279392E-02; 3e-08
+match; 2p Wavefunction Deriv. (small r) ; LINE(pp/wf-2p, 98, 39) ; 1.80992242E-01; 3e-07
+match; 2p Wavefunction Deriv. (large r) ; LINE(pp/wf-2p, 176, 39) ; -2.38711960E-02; 3e-08
+
+#Pseudopotentials
+match; s Pseudopotential (small r) ; LINE(pp/pp-s, 98, 20) ; 1.61388503E-02; 3e-7
+match; s Pseudopotential (large r) ; LINE(pp/pp-s, 176, 20) ; -1.96480256E-01; 6e-08
+match; p Pseudopotential (small r) ; LINE(pp/pp-p, 98, 20) ; -9.93950077E-01; 6e-08
+match; p Pseudopotential (large r) ; LINE(pp/pp-p, 176, 20) ; -1.96480256E-01; 6e-08
+
+# Self-Consistency tests
+match; 2s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2) ; 1.0000049; 2e-7
+match; 2s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 2) ; 0.9999925; 4e-07
+match; 2p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3) ; 0.9998836; 3e-07
+match; 2p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 3) ; 0.9998173; 1e-7
+
+#KB projectors
+match; Vanderbilt function v0 ; GREP(kb/info, "Vanderbilt function", 20, 2) ; -0.491383; 1e-6
+match; Vanderbilt function v1 ; GREP(kb/info, "Vanderbilt function", 32, 2) ; -0.057906; 1e-6
+match; Vanderbilt function v2 ; GREP(kb/info, "Vanderbilt function", 44, 2) ; 0.001118; 1e-6
+match; Vanderbilt function v3 ; GREP(kb/info, "Vanderbilt function", 56, 2) ; -0.000010; 1e-6
+match; 2s KB Energy ; GREP(kb/info, "KB Energy", 13, 1) ; 1.0840; 1e-4
+match; 2p KB Energy ; GREP(kb/info, "KB Energy", 13, 2) ; -0.4609; 1e-4
+match; 2s KB Cosine ; GREP(kb/info, "KB Energy", 28, 1) ; 0.0761; 1e-4
+match; 2p KB Cosine ; GREP(kb/info, "KB Energy", 28, 2) ; -0.2732; 1e-4
+match; Local component ; LINE(kb/kb-local, 98, 20) ; -4.91376898E-01; 1e-9
+match; s component ; LINE(kb/kb-s, 98, 20) ; 9.97505464E-01; 2e-6
+match; p component ; LINE(kb/kb-p, 98, 20) ; -1.06336086E-02; 3e-09
+
+#KB tests
+match; 2s Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 3) ; -0.1215; 1e-4
+match; 2s Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 3) ; -0.0050; 1e-4
+match; 2p Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 7) ; -0.0248; 1e-4
+match; 2p Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 7) ; 0.0000; 1e-4
+match; Local localization radius ; GREP(kb/info, "Localization", 11, 1) ; 3.77; 1e-2
+match; s localization radius ; GREP(kb/info, "Localization", 11, 2) ; 4.06; 1e-2
+match; p localization radius ; GREP(kb/info, "Localization", 11, 3) ; 3.77; 1e-2
+
+
+
+Input: 01-non_rel.03-tm.inp
+
+#TM coefficients
+match; 2s c0 Coefficient ; GREP(pp/info, 'State: 2s', 12, 4) ; -1.808723298E+00; 4e-07
+match; 2s c2 Coefficient ; GREP(pp/info, 'State: 2s', 37, 4) ; 8.939576408E-02; 2e-07
+match; 2s c4 Coefficient ; GREP(pp/info, 'State: 2s', 12, 5) ; -1.598320346E-03; 7e-09
+match; 2s c6 Coefficient ; GREP(pp/info, 'State: 2s', 37, 5) ; -3.559101726E-03; 6e-09
+match; 2s c8 Coefficient ; GREP(pp/info, 'State: 2s', 12, 6) ; 5.110750306E-04; 9e-10
+match; 2s c10 Coefficient ; GREP(pp/info, 'State: 2s', 37, 6) ; -2.910104696E-05; 6e-11
+match; 2s c12 Coefficient ; GREP(pp/info, 'State: 2s', 12, 7) ; 6.159461706E-07; 2e-12
+match; 2p c0 Coefficient ; GREP(pp/info, 'State: 2p', 12, 4) ; -1.864359619E+00; 2e-07
+match; 2p c2 Coefficient ; GREP(pp/info, 'State: 2p', 37, 4) ; -1.625117447E-01; 2e-07
+match; 2p c4 Coefficient ; GREP(pp/info, 'State: 2p', 12, 5) ; -3.772866762E-03; 6e-09
+match; 2p c6 Coefficient ; GREP(pp/info, 'State: 2p', 37, 5) ; 1.560284072E-03; 4e-09
+match; 2p c8 Coefficient ; GREP(pp/info, 'State: 2p', 12, 6) ; -1.259326609E-04; 4e-10
+match; 2p c10 Coefficient ; GREP(pp/info, 'State: 2p', 37, 6) ; 4.490670003E-06; 2e-11
+match; 2p c12 Coefficient ; GREP(pp/info, 'State: 2p', 12, 7) ; -6.155189767E-08; 2e-13
+
+#Pseudo-Wavefunctions
+match; 2s Wavefunction (small r) ; LINE(pp/wf-2s, 98, 20) ; 1.63866382E-01; 6e-08
+match; 2s Wavefunction (large r) ; LINE(pp/wf-2s, 176, 20) ; 7.43968063E-02; 2e-9
+match; 2s Wavefunction Deriv. (small r) ; LINE(pp/wf-2s, 98, 39) ; 4.31266155E-04; 8e-10
+match; 2s Wavefunction Deriv. (large r) ; LINE(pp/wf-2s, 176, 39) ; -3.39791608E-02; 10e-09
+match; 2p Wavefunction (small r) ; LINE(pp/wf-2p, 98, 20) ; 2.28147416E-03; 3e-10
+match; 2p Wavefunction (large r) ; LINE(pp/wf-2p, 176, 20) ; 7.89278284E-02; 2e-08
+match; 2p Wavefunction Deriv. (small r) ; LINE(pp/wf-2p, 98, 39) ; 1.54979061E-01; 2e-08
+match; 2p Wavefunction Deriv. (large r) ; LINE(pp/wf-2p, 176, 39) ; -2.38711625E-02; 2e-08
+
+#Pseudopotentials
+match; s Pseudopotential (small r) ; LINE(pp/pp-s, 98, 20) ; 8.99447885E-03; 5e-07
+match; s Pseudopotential (large r) ; LINE(pp/pp-s, 176, 20) ; -1.96479556E-01; 1e-9
+match; p Pseudopotential (small r) ; LINE(pp/pp-p, 98, 20) ; -1.00755293E+00; 5e-07
+match; p Pseudopotential (large r) ; LINE(pp/pp-p, 176, 20) ; -1.96479556E-01; 1e-9
+
+# Self-Consistency tests
+match; 2s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2) ; 1.0000840; 7e-7
+match; 2s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 2) ; 1.0002728; 9e-7
+match; 2p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3) ; 1.0001018; 2e-6
+match; 2p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 3) ; 0.9998261; 2e-6
+
+#KB projectors
+match; 2s KB Energy ; GREP(kb/info, "KB Energy", 13, 1) ; 0.6677; 1e-4
+match; 2s KB Cosine ; GREP(kb/info, "KB Energy", 28, 1) ; 0.2916; 1e-4
+match; Local component ; LINE(kb/kb-local, 98, 20) ; -1.00755293E+00; 5e-07
+match; s component ; LINE(kb/kb-s, 98, 20) ; 8.55690887E-01; 8e-08
+
+#KB tests
+match; 2s Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 3) ; -0.2936; 1e-4
+match; 2s Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 3) ; -0.0235; 1e-4
+match; Local localization radius ; GREP(kb/info, "Localization", 11, 1) ; 3.50; 1e-2
+match; s localization radius ; GREP(kb/info, "Localization", 11, 2) ; 3.50; 1e-2
+
+
+
+Input: 01-non_rel.04-mrpp.inp
+
+#MRPP coefficients
+match; 1s c0 Coefficient ; GREP(pp/info, 'State: 1s', 12, 4) ; 1.635114668E+00; 2e-4
+match; 1s c2 Coefficient ; GREP(pp/info, 'State: 1s', 37, 4) ; -2.994218142E+00; 8e-04
+match; 1s c4 Coefficient ; GREP(pp/info, 'State: 1s', 12, 5) ; -1.793068461E+00; 10e-04
+match; 1s c6 Coefficient ; GREP(pp/info, 'State: 1s', 37, 5) ; 8.333206393E+00; 8e-03
+match; 1s c8 Coefficient ; GREP(pp/info, 'State: 1s', 12, 6) ; -1.027185895E+01; 2e-02
+match; 1s c10 Coefficient ; GREP(pp/info, 'State: 1s', 37, 6) ; 6.530396865E+00; 9e-03
+match; 1s c12 Coefficient ; GREP(pp/info, 'State: 1s', 12, 7) ; -2.322136664E+00; 4e-03
+match; 1s c14 Coefficient ; GREP(pp/info, 'State: 1s', 37, 7) ; 4.394289869E-01; 7e-04
+match; 1s c16 Coefficient ; GREP(pp/info, 'State: 1s', 12, 8) ; -3.458127299E-02; 6e-05
+
+#Pseudo-Wavefunctions
+match; 1s Wavefunction (small r) ; LINE(pp/wf-1s, 98, 20) ; 5.12671851E+00; 7e-04
+match; 1s Wavefunction (large r) ; LINE(pp/wf-1s, 176, 20) ; 8.09427729E-05; 5e-11
+match; 1s Wavefunction Deriv. (small r) ; LINE(pp/wf-1s, 98, 39) ; -4.52040525E-01; 2e-4
+match; 1s Wavefunction Deriv. (large r) ; LINE(pp/wf-1s, 176, 39) ; -1.68554533E-04; 9e-11
+match; 2s Wavefunction (small r) ; LINE(pp/wf-2s, 98, 20) ; -8.79634135E-01; 2e-4
+match; 2s Wavefunction (large r) ; LINE(pp/wf-2s, 176, 20) ; 7.43968063E-02; 2e-9
+match; 2s Wavefunction Deriv. (small r) ; LINE(pp/wf-2s, 98, 39) ; 9.28707574E-02; 4e-05
+match; 2s Wavefunction Deriv. (large r) ; LINE(pp/wf-2s, 176, 39) ; -3.39791608E-02; 10e-09
+
+#Pseudopotentials
+match; s Pseudopotential (small r) ; LINE(pp/pp-s, 98, 20) ; -1.42710129E+01; 3e-03
+match; s Pseudopotential (large r) ; LINE(pp/pp-s, 176, 20) ; -5.89436918E-01; 8e-09
+match; p Pseudopotential (small r) ; LINE(pp/pp-p, 98, 20) ; -4.26411075E+00; 2e-4
+match; p Pseudopotential (large r) ; LINE(pp/pp-p, 176, 20) ; -5.89436918E-01; 8e-09
+
+# Self-Consistency tests
+match; 1s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2) ; 1.0000062; 1e-7
+match; 1s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 2) ; 0.9994669; 2e-6
+match; 2s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3) ; 0.9789089; 8e-05
+match; 2s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 3) ; 1.0062758; 7e-07
+match; 2p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 4) ; 1.0001018; 2e-6
+match; 2p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 4) ; 0.9998261; 2e-6
+
+#KB projectors
+match; 2s KB Energy ; GREP(kb/info, "KB Energy", 13, 1) ; -8.5809; 2e-3
+match; 2s KB Cosine ; GREP(kb/info, "KB Energy", 28, 1) ; -0.7969; 2e-4
+match; Local component ; LINE(kb/kb-local, 98, 20) ; -1.98941279E+00; 2e-8
+match; s component ; LINE(kb/kb-s, 98, 20) ; -9.20806271E+00; 2e-3
+
+#KB tests
+match; 2s Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 3) ; -0.1036; 1e-4
+match; 2s Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 3) ; -0.0022; 1e-4
+match; Local localization radius ; GREP(kb/info, "Localization", 11, 1) ; 3.01; 1e-2
+match; s localization radius ; GREP(kb/info, "Localization", 11, 2) ; 1.92; 1e-2
diff --git a/testsuite/pseudopotentials/02-scalar_rel.01-ae.inp b/testsuite/pseudopotentials/02-scalar_rel.01-ae.inp
new file mode 100644
index 0000000..9fd9f35
--- /dev/null
+++ b/testsuite/pseudopotentials/02-scalar_rel.01-ae.inp
@@ -0,0 +1,17 @@
+# $Id: 02-scalar_rel.01-ae.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+WaveEquation = scalar_rel
+NuclearCharge = 24
+
+%Orbitals
+"Ar"
+ 4 | 0 | 1 | 0
+ 3 | 2 | 5 | 0
+ 4 | 1 | 0 | 0
+%
+
+ODEIntTolerance = 1e-14
+EigenSolverTolerance = 1e-9
diff --git a/testsuite/pseudopotentials/02-scalar_rel.02-hamann.inp b/testsuite/pseudopotentials/02-scalar_rel.02-hamann.inp
new file mode 100644
index 0000000..2200ecf
--- /dev/null
+++ b/testsuite/pseudopotentials/02-scalar_rel.02-hamann.inp
@@ -0,0 +1,10 @@
+# $Id: 02-scalar_rel.02-hamann.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 4 | 0 | 1.80 | ham
+ 4 | 1 | 2.40 | ham
+ 3 | 2 | 0.40 | ham
+%
diff --git a/testsuite/pseudopotentials/02-scalar_rel.03-tm.inp b/testsuite/pseudopotentials/02-scalar_rel.03-tm.inp
new file mode 100644
index 0000000..4e5e58b
--- /dev/null
+++ b/testsuite/pseudopotentials/02-scalar_rel.03-tm.inp
@@ -0,0 +1,10 @@
+# $Id: 02-scalar_rel.03-tm.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 4 | 0 | 2.80 | tm
+ 4 | 1 | 3.75 | tm
+ 3 | 2 | 1.20 | tm
+%
diff --git a/testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp b/testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp
new file mode 100644
index 0000000..c62db2b
--- /dev/null
+++ b/testsuite/pseudopotentials/02-scalar_rel.04-mrpp.inp
@@ -0,0 +1,13 @@
+# $Id: 02-scalar_rel.04-mrpp.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 3 | 0 | 1.75 | mrpp
+ 3 | 1 | 1.85 | mrpp
+ 3 | 2 | 1.20 | tm
+%
+
+ODEIntTolerance = 1e-14
+EigensolverTolerance = 1e-9
diff --git a/testsuite/pseudopotentials/02-scalar_rel.test b/testsuite/pseudopotentials/02-scalar_rel.test
new file mode 100644
index 0000000..2706cff
--- /dev/null
+++ b/testsuite/pseudopotentials/02-scalar_rel.test
@@ -0,0 +1,161 @@
+# $Id: 02-scalar_rel.test 759 2012-11-13 13:37:34Z fnog $
+
+Test : Pseudopotentials: scalar-relativistic Cr
+Programs : ape
+TestGroups : all; ps
+Enabled : Yes
+
+Input: 02-scalar_rel.01-ae.inp
+
+Input: 02-scalar_rel.02-hamann.inp
+
+#Coefficient
+match; 4s cl coefficient ; GREP(pp/info, 'State: 4s', 11, 3) ; 0.5520610001; 3e-08
+match; 4p cl coefficient ; GREP(pp/info, 'State: 4p', 11, 3) ; -0.1847719420; 2e-08
+match; 3d cl coefficient ; GREP(pp/info, 'State: 3d', 11, 3) ; -29.1184260790; 5e-08
+
+#Pseudo-Wavefunctions
+match; 4s Wavefunction (small r) ; LINE(pp/wf-4s, 417, 20) ; 1.34984676E-01; 6e-08
+match; 4s Wavefunction (large r) ; LINE(pp/wf-4s, 664, 20) ; 2.54037703E-03; 4e-10
+match; 4s Wavefunction Deriv. (small r) ; LINE(pp/wf-4s, 417, 39) ; 9.50751559E-03; 3e-09
+match; 4s Wavefunction Deriv. (large r) ; LINE(pp/wf-4s, 664, 39) ; -1.60970309E-03; 3e-10
+match; 4p Wavefunction (small r) ; LINE(pp/wf-4p, 417, 20) ; 8.76717229E-03; 8e-09
+match; 4p Wavefunction (large r) ; LINE(pp/wf-4p, 664, 20) ; 1.27542362E-02; 9e-09
+match; 4p Wavefunction Deriv. (small r) ; LINE(pp/wf-4p, 417, 39) ; 8.64750597E-02; 2e-07
+match; 4p Wavefunction Deriv. (large r) ; LINE(pp/wf-4p, 664, 39) ; -4.78717172E-03; 4e-09
+match; 3d Wavefunction (small r) ; LINE(pp/wf-3d, 417, 20) ; 1.87785152E-01; 5e-7
+match; 3d Wavefunction (large r) ; LINE(pp/wf-3d, 664, 20) ; 7.47223254E-04; 3e-10
+match; 3d Wavefunction Deriv. (small r) ; LINE(pp/wf-3d, 417, 39) ; 3.53744519E+00; 2e-06
+match; 3d Wavefunction Deriv. (large r) ; LINE(pp/wf-3d, 664, 39) ; -4.52908888E-04; 2e-10
+
+#Pseudopotentials
+match; s Pseudopotential (small r) ; LINE(pp/pp-s, 417, 20) ; -3.95109059E+00; 6e-07
+match; s Pseudopotential (large r) ; LINE(pp/pp-s, 664, 20) ; -5.89061581E-01; 2e-09
+match; p Pseudopotential (small r) ; LINE(pp/pp-p, 417, 20) ; -5.03574106E+00; 3e-07
+match; p Pseudopotential (large r) ; LINE(pp/pp-p, 664, 20) ; -5.89061581E-01; 2e-09
+match; d Pseudopotential (small r) ; LINE(pp/pp-d, 417, 20) ; -3.32737720E+01; 8e-06
+match; d Pseudopotential (large r) ; LINE(pp/pp-d, 664, 20) ; -5.89061581E-01; 2e-09
+
+# Self-Consistency tests
+match; 4s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2) ; 1.0000005; 1e-7
+match; 4s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 2) ; 0.9999974; 1e-7
+match; 4p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3) ; 1.0000088; 2e-07
+match; 4p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 3) ; 1.0000142; 1e-7
+match; 3d Norm test ; GREP(pp/info, 'Self-Consistency', 27, 4) ; 1.0261953; 3e-07
+match; 3d Slope test ; GREP(pp/info, 'Self-Consistency', 39, 4) ; 1.0156860; 2e-7
+
+
+Input: 02-scalar_rel.03-tm.inp
+
+#TM coefficients
+match; 4s c0 Coefficient ; GREP(pp/info, 'State: 4s', 12, 4) ; -2.148329883E+00; 2e-07
+match; 4s c2 Coefficient ; GREP(pp/info, 'State: 4s', 37, 4) ; 3.560820263E-01; 7e-08
+match; 4s c4 Coefficient ; GREP(pp/info, 'State: 4s', 12, 5) ; -2.535888188E-02; 10e-09
+match; 4s c6 Coefficient ; GREP(pp/info, 'State: 4s', 37, 5) ; -1.104829098E-02; 2e-09
+match; 4s c8 Coefficient ; GREP(pp/info, 'State: 4s', 12, 6) ; 2.317756951E-03; 4e-10
+match; 4s c10 Coefficient ; GREP(pp/info, 'State: 4s', 37, 6) ; -1.760860323E-04; 4e-11
+match; 4s c12 Coefficient ; GREP(pp/info, 'State: 4s', 12, 7) ; 4.886869103E-06; 2e-12
+match; 4p c0 Coefficient ; GREP(pp/info, 'State: 4p', 12, 4) ; -2.513821558E+00; 4e-07
+match; 4p c2 Coefficient ; GREP(pp/info, 'State: 4p', 37, 4) ; -3.901149277E-02; 7e-08
+match; 4p c4 Coefficient ; GREP(pp/info, 'State: 4p', 12, 5) ; -2.174138752E-04; 8e-10
+match; 4p c6 Coefficient ; GREP(pp/info, 'State: 4p', 37, 5) ; -7.343334319E-04; 2e-09
+match; 4p c8 Coefficient ; GREP(pp/info, 'State: 4p', 12, 6) ; 8.416218174E-05; 2e-10
+match; 4p c10 Coefficient ; GREP(pp/info, 'State: 4p', 37, 6) ; -3.657388932E-06; 7e-12
+match; 4p c12 Coefficient ; GREP(pp/info, 'State: 4p', 12, 7) ; 5.794497763E-08; 2e-13
+match; 3d c0 Coefficient ; GREP(pp/info, 'State: 3d', 12, 4) ; 2.535538823E+00; 4e-08
+match; 3d c2 Coefficient ; GREP(pp/info, 'State: 3d', 37, 4) ; -3.461785830E+00; 8e-08
+match; 3d c4 Coefficient ; GREP(pp/info, 'State: 3d', 12, 5) ; -1.331551265E+00; 6e-08
+match; 3d c6 Coefficient ; GREP(pp/info, 'State: 3d', 37, 5) ; 4.581550270E+00; 3e-07
+match; 3d c8 Coefficient ; GREP(pp/info, 'State: 3d', 12, 6) ; -3.755777081E+00; 2e-7
+match; 3d c10 Coefficient ; GREP(pp/info, 'State: 3d', 37, 6) ; 1.386040590E+00; 8e-08
+match; 3d c12 Coefficient ; GREP(pp/info, 'State: 3d', 12, 7) ; -1.980530082E-01; 2e-08
+
+#Pseudo-Wavefunctions
+match; 4s Wavefunction (small r) ; LINE(pp/wf-4s, 417, 20) ; 1.17105809E-01; 2e-08
+match; 4s Wavefunction (large r) ; LINE(pp/wf-4s, 664, 20) ; 2.54038381E-03; 8e-10
+match; 4s Wavefunction Deriv. (small r) ; LINE(pp/wf-4s, 417, 39) ; 8.43717630E-03; 2e-09
+match; 4s Wavefunction Deriv. (large r) ; LINE(pp/wf-4s, 664, 39) ; -1.60970739E-03; 6e-10
+match; 4p Wavefunction (small r) ; LINE(pp/wf-4p, 417, 20) ; 8.19908838E-03; 3e-09
+match; 4p Wavefunction (large r) ; LINE(pp/wf-4p, 664, 20) ; 1.27544779E-02; 6e-09
+match; 4p Wavefunction Deriv. (small r) ; LINE(pp/wf-4p, 417, 39) ; 8.08610240E-02; 3e-08
+match; 4p Wavefunction Deriv. (large r) ; LINE(pp/wf-4p, 664, 39) ; -4.78726242E-03; 2e-09
+match; 3d Wavefunction (small r) ; LINE(pp/wf-3d, 417, 20) ; 1.25036179E-01; 5e-09
+match; 3d Wavefunction (large r) ; LINE(pp/wf-3d, 664, 20) ; 7.47911236E-04; 3e-10
+match; 3d Wavefunction Deriv. (small r) ; LINE(pp/wf-3d, 417, 39) ; 2.37987455E+00; 9e-08
+match; 3d Wavefunction Deriv. (large r) ; LINE(pp/wf-3d, 664, 39) ; -4.53325890E-04; 2e-10
+
+#Pseudopotentials
+match; s Pseudopotential (small r) ; LINE(pp/pp-s, 417, 20) ; -3.84775064E+00; 2e-07
+match; s Pseudopotential (large r) ; LINE(pp/pp-s, 664, 20) ; -5.89059066E-01; 1e-9
+match; p Pseudopotential (small r) ; LINE(pp/pp-p, 417, 20) ; -4.99663658E+00; 3e-07
+match; p Pseudopotential (large r) ; LINE(pp/pp-p, 664, 20) ; -5.89059066E-01; 1e-9
+match; d Pseudopotential (small r) ; LINE(pp/pp-d, 417, 20) ; -2.90900013E+01; 7e-07
+match; d Pseudopotential (large r) ; LINE(pp/pp-d, 664, 20) ; -5.89059066E-01; 1e-9
+
+# Self-Consistency tests
+match; 4s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2) ; 1.0000046; 2e-07
+match; 4s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 2) ; 1.0000070; 2e-07
+match; 4p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3) ; 1.0000209; 5e-07
+match; 4p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 3) ; 1.0000260; 6e-07
+match; 3d Norm test ; GREP(pp/info, 'Self-Consistency', 27, 4) ; 1.0185009; 5e-7
+match; 3d Slope test ; GREP(pp/info, 'Self-Consistency', 39, 4) ; 1.0112568; 3e-07
+
+
+Input: 02-scalar_rel.04-mrpp.inp
+
+#MRPP coefficients
+match; 3s c0 Coefficient ; GREP(pp/info, 'State: 3s', 12, 4) ; 2.964208664E-01; 4e-05
+match; 3s c2 Coefficient ; GREP(pp/info, 'State: 3s', 37, 4) ; 7.030598763E-01; 2e-04
+match; 3s c4 Coefficient ; GREP(pp/info, 'State: 3s', 12, 5) ; -9.885863484E-02; 4e-05
+match; 3s c6 Coefficient ; GREP(pp/info, 'State: 3s', 37, 5) ; -2.728335971E+00; 3e-04
+match; 3s c8 Coefficient ; GREP(pp/info, 'State: 3s', 12, 6) ; 3.089656036E+00; 3e-04
+match; 3s c10 Coefficient ; GREP(pp/info, 'State: 3s', 37, 6) ; -1.583154469E+00; 2e-04
+match; 3s c12 Coefficient ; GREP(pp/info, 'State: 3s', 12, 7) ; 4.352817933E-01; 5e-05
+match; 3s c14 Coefficient ; GREP(pp/info, 'State: 3s', 37, 7) ; -6.251029555E-02; 8e-06
+match; 3s c16 Coefficient ; GREP(pp/info, 'State: 3s', 12, 8) ; 3.696001261E-03; 5e-07
+match; 3p c0 Coefficient ; GREP(pp/info, 'State: 3p', 12, 4) ; 1.492624197E+00; 7e-04
+match; 3p c2 Coefficient ; GREP(pp/info, 'State: 3p', 37, 4) ; -1.417164547E+00; 2e-03
+match; 3p c4 Coefficient ; GREP(pp/info, 'State: 3p', 12, 5) ; -2.869079078E-01; 7e-04
+match; 3p c6 Coefficient ; GREP(pp/info, 'State: 3p', 37, 5) ; 2.549562719E-01; 5e-03
+match; 3p c8 Coefficient ; GREP(pp/info, 'State: 3p', 12, 6) ; -3.815003444E-03; 5e-03
+match; 3p c10 Coefficient ; GREP(pp/info, 'State: 3p', 37, 6) ; -4.639034644E-02; 3e-03
+match; 3p c12 Coefficient ; GREP(pp/info, 'State: 3p', 12, 7) ; 1.801294597E-02; 6e-04
+match; 3p c14 Coefficient ; GREP(pp/info, 'State: 3p', 37, 7) ; -2.856764866E-03; 8e-05
+match; 3p c16 Coefficient ; GREP(pp/info, 'State: 3p', 12, 8) ; 1.710468676E-04; 4e-06
+
+#Pseudo-Wavefunctions
+match; 3s Wavefunction (small r) ; LINE(pp/wf-3s, 417, 20) ; 1.35476012E+00; 5e-05
+match; 3s Wavefunction (large r) ; LINE(pp/wf-3s, 664, 20) ; 1.44007409E-10; 9e-18
+match; 3s Wavefunction Deriv. (small r) ; LINE(pp/wf-3s, 417, 39) ; 1.92212283E-01; 3e-05
+match; 3s Wavefunction Deriv. (large r) ; LINE(pp/wf-3s, 664, 39) ; -3.48142540E-10; 2e-17
+match; 3p Wavefunction (small r) ; LINE(pp/wf-3p, 417, 20) ; 4.44207650E-01; 3e-04
+match; 3p Wavefunction (large r) ; LINE(pp/wf-3p, 664, 20) ; 1.12556937E-08; 5e-15
+match; 3p Wavefunction Deriv. (small r) ; LINE(pp/wf-3p, 417, 39) ; 4.25629221E+00; 3e-03
+match; 3p Wavefunction Deriv. (large r) ; LINE(pp/wf-3p, 664, 39) ; -2.16294135E-08; 9e-15
+match; 4s Wavefunction (small r) ; LINE(pp/wf-4s, 417, 20) ; -4.38290980E-01; 3e-05
+match; 4s Wavefunction (large r) ; LINE(pp/wf-4s, 664, 20) ; 2.54038381E-03; 8e-10
+match; 4s Wavefunction Deriv. (small r) ; LINE(pp/wf-4s, 417, 39) ; 1.31121919E-02; 2e-05
+match; 4s Wavefunction Deriv. (large r) ; LINE(pp/wf-4s, 664, 39) ; -1.60970739E-03; 6e-10
+match; 4p Wavefunction (small r) ; LINE(pp/wf-4p, 417, 20) ; -8.22915748E-02; 7e-05
+match; 4p Wavefunction (large r) ; LINE(pp/wf-4p, 664, 20) ; 1.27544779E-02; 6e-09
+match; 4p Wavefunction Deriv. (small r) ; LINE(pp/wf-4p, 417, 39) ; -7.83015027E-01; 6e-04
+match; 4p Wavefunction Deriv. (large r) ; LINE(pp/wf-4p, 664, 39) ; -4.78726242E-03; 2e-09
+
+#Pseudopotentials
+match; s Pseudopotential (small r) ; LINE(pp/pp-s, 417, 20) ; -1.46336620E+01; 9e-04
+match; s Pseudopotential (large r) ; LINE(pp/pp-s, 664, 20) ; -1.37447115E+00; 1e-8
+match; p Pseudopotential (small r) ; LINE(pp/pp-p, 417, 20) ; -2.27848552E+01; 9e-03
+match; p Pseudopotential (large r) ; LINE(pp/pp-p, 664, 20) ; -1.37447115E+00; 1e-8
+match; d Pseudopotential (small r) ; LINE(pp/pp-d, 417, 20) ; -3.83616305E+01; 5e-04
+match; d Pseudopotential (large r) ; LINE(pp/pp-d, 664, 20) ; -1.37447115E+00; 1e-8
+
+# Self-Consistency tests
+match; 3s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2) ; 1.0000014; 1e-7
+match; 3s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 2) ; 0.9999723; 1e-7
+match; 3p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3) ; 0.9979314; 9e-06
+match; 3p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 3) ; 1.0010903; 7e-07
+match; 4s Norm test ; GREP(pp/info, 'Self-Consistency', 27, 5) ; 0.9965879; 2e-04
+match; 4s Slope test ; GREP(pp/info, 'Self-Consistency', 39, 5) ; 1.0001836; 2e-06
+match; 4p Norm test ; GREP(pp/info, 'Self-Consistency', 27, 6) ; 1.0185006; 3e-07
+match; 4p Slope test ; GREP(pp/info, 'Self-Consistency', 39, 6) ; 1.0112567; 2e-07
+
diff --git a/testsuite/pseudopotentials/03-rel.01-ae.inp b/testsuite/pseudopotentials/03-rel.01-ae.inp
new file mode 100644
index 0000000..305968c
--- /dev/null
+++ b/testsuite/pseudopotentials/03-rel.01-ae.inp
@@ -0,0 +1,15 @@
+# $Id: 03-rel.01-ae.inp 624 2011-08-26 17:46:59Z micael $
+
+Title = "Xenon"
+CalculationMode = ae
+Verbose = 40
+
+WaveEquation = dirac
+
+XCFunctional = lda_x + lda_c_pw
+XCCorrections = rel_x
+
+NuclearCharge = 54
+%Orbitals
+"Xe"
+%
diff --git a/testsuite/pseudopotentials/03-rel.02-hamann.inp b/testsuite/pseudopotentials/03-rel.02-hamann.inp
new file mode 100644
index 0000000..b0bf346
--- /dev/null
+++ b/testsuite/pseudopotentials/03-rel.02-hamann.inp
@@ -0,0 +1,9 @@
+# $Id: 03-rel.02-hamann.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 5 | 0 | 1.1 | ham
+ 5 | 1 | 1.1 | ham
+%
diff --git a/testsuite/pseudopotentials/03-rel.03-tm.inp b/testsuite/pseudopotentials/03-rel.03-tm.inp
new file mode 100644
index 0000000..3619304
--- /dev/null
+++ b/testsuite/pseudopotentials/03-rel.03-tm.inp
@@ -0,0 +1,12 @@
+# $Id: 03-rel.03-tm.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 5 | 0 | 1.80 | tm
+ 5 | 1 | 0.5 | 1.95 | tm
+ 5 | 1 | 1.5 | 2.10 | tm
+%
+
+LLocal = 1
diff --git a/testsuite/pseudopotentials/03-rel.04-rtm.inp b/testsuite/pseudopotentials/03-rel.04-rtm.inp
new file mode 100644
index 0000000..8774701
--- /dev/null
+++ b/testsuite/pseudopotentials/03-rel.04-rtm.inp
@@ -0,0 +1,10 @@
+# $Id: 03-rel.04-rtm.inp 703 2012-04-26 09:26:17Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 5 | 0 | 1.80 | rtm
+ 5 | 1 | 0.5 | 1.95 | rtm
+ 5 | 1 | 1.5 | 2.10 | rtm
+%
diff --git a/testsuite/pseudopotentials/03-rel.05-mrpp.inp b/testsuite/pseudopotentials/03-rel.05-mrpp.inp
new file mode 100644
index 0000000..240bde0
--- /dev/null
+++ b/testsuite/pseudopotentials/03-rel.05-mrpp.inp
@@ -0,0 +1,15 @@
+# $Id: 03-rel.05-mrpp.inp 743 2012-06-06 14:08:21Z micael $
+
+CalculationMode = pp
+Verbose = 40
+
+%PPComponents
+ 4 | 0 | 1.20 | mrpp
+ 4 | 1 | 0.5 | 1.25 | mrpp
+ 4 | 1 | 1.5 | 1.30 | mrpp
+ 4 | 2 | 1.0 | rtm
+%
+
+LLocal = 0
+ODEIntTolerance = 1e-14
+ODEMaxSteps = 5000000
diff --git a/testsuite/pseudopotentials/03-rel.test b/testsuite/pseudopotentials/03-rel.test
new file mode 100644
index 0000000..a4aaefe
--- /dev/null
+++ b/testsuite/pseudopotentials/03-rel.test
@@ -0,0 +1,268 @@
+# $Id: 03-rel.test 759 2012-11-13 13:37:34Z fnog $
+
+Test : Pseudopotentials: fully-relativistic Xe
+Programs : ape
+TestGroups : all; ps
+Enabled : Yes
+
+Input: 03-rel.01-ae.inp
+
+Input: 03-rel.02-hamann.inp
+
+#Coefficient
+match; 5s0.5 cl coefficient; GREP(pp/info, 'State: 5s0.5', 11, 3); 4.2778599671; 2e-06
+match; 5p0.5 cl coefficient; GREP(pp/info, 'State: 5p0.5', 11, 3); 4.7178687967; 10e-07
+match; 5p1.5 cl coefficient; GREP(pp/info, 'State: 5p1.5', 11, 3); 5.9665319267; 8e-07
+
+#Pseudo-Wavefunctions
+match; 5s0.5 Large Wavefunction (small r); LINE(pp/wf-5s0.5, 836, 20); 2.21257335E-01; 6e-07
+match; 5s0.5 Large Wavefunction (large r); LINE(pp/wf-5s0.5, 1117, 20); 1.01132586E-05; 9e-11
+match; 5s0.5 Small Wavefunction (small r); LINE(pp/wf-5s0.5, 836, 38); 1.52239482E-03; 3e-09
+match; 5s0.5 Small Wavefunction (large r); LINE(pp/wf-5s0.5, 1117, 38); -4.81704538E-08; 4e-13
+match; 5s0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 56); 4.17183732E-01; 8e-07
+match; 5s0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 56); -1.32019175E-05; 10e-11
+match; 5s0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 74); 2.93989753E-03; 2e-08
+match; 5s0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 74); 6.31724239E-08; 5e-13
+
+match; 5p0.5 Large Wavefunction (small r); LINE(pp/wf-5p0.5, 836, 20); 1.31101706E-01; 5e-07
+match; 5p0.5 Large Wavefunction (large r); LINE(pp/wf-5p0.5, 1117, 20); 1.87502508E-04; 9e-10
+match; 5p0.5 Small Wavefunction (small r); LINE(pp/wf-5p0.5, 836, 38); 3.18869899E-03; 4e-08
+match; 5p0.5 Small Wavefunction (large r); LINE(pp/wf-5p0.5, 1117, 38); -4.99901485E-07; 2e-12
+match; 5p0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5p0.5, 836, 56); 3.50322694E-01; 2e-06
+match; 5p0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5p0.5, 1117, 56); -1.74450499E-04; 7e-10
+match; 5p0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5p0.5, 836, 74); 2.93469537E-03; 2e-07
+match; 5p0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5p0.5, 1117, 74); 4.57759637E-07; 2e-12
+
+match; 5p1.5 Large Wavefunction (small r); LINE(pp/wf-5p1.5, 836, 20); 1.11921195E-01; 6e-07
+match; 5p1.5 Large Wavefunction (large r); LINE(pp/wf-5p1.5, 1117, 20); 3.04048377E-04; 2e-09
+match; 5p1.5 Small Wavefunction (small r); LINE(pp/wf-5p1.5, 836, 38); 2.82025045E-04; 3e-09
+match; 5p1.5 Small Wavefunction (large r); LINE(pp/wf-5p1.5, 1117, 38); -1.07881098E-06; 4e-12
+match; 5p1.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5p1.5, 836, 56); 3.00745019E-01; 4e-06
+match; 5p1.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5p1.5, 1117, 56); -2.65311625E-04; 10e-10
+match; 5p1.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5p1.5, 836, 74); 9.16512587E-04; 10e-09
+match; 5p1.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5p1.5, 1117, 74); 9.62610490E-07; 4e-12
+
+#Pseudopotentials
+match; s0.5 Pseudopotential (small r); LINE(pp/pp-s0.5, 836, 20); 1.01800311E+00; 2e-05
+match; s0.5 Pseudopotential (large r); LINE(pp/pp-s0.5, 1117, 20); -7.98767323E-01; 3e-08
+match; p0.5 Pseudopotential (small r); LINE(pp/pp-p0.5, 836, 20); -1.10955558E+00; 7e-06
+match; p0.5 Pseudopotential (large r); LINE(pp/pp-p0.5, 1117, 20); -7.98767323E-01; 3e-08
+match; p1.5 Pseudopotential (small r); LINE(pp/pp-p1.5, 836, 20); -9.39967377E-01; 2e-05
+match; p1.5 Pseudopotential (large r); LINE(pp/pp-p1.5, 1117, 20); -7.98767323E-01; 3e-08
+
+# Self-Consistency tests
+match; 5s0.5 Norm test ; GREP(pp/info, 'Self-Consistency', 27, 2); 0.9999957; 1e-7
+match; 5s0.5 Slope test; GREP(pp/info, 'Self-Consistency', 39, 2); 1.0000563; 2e-07
+match; 5p0.5 Norm test ; GREP(pp/info, 'Self-Consistency', 27, 3); 1.0000005; 1e-7
+match; 5p0.5 Slope test; GREP(pp/info, 'Self-Consistency', 39, 3); 1.0000583; 8e-03
+match; 5p1.5 Norm test ; GREP(pp/info, 'Self-Consistency', 27, 4); 0.9999977; 1e-7
+match; 5p1.5 Slope test; GREP(pp/info, 'Self-Consistency', 39, 4); 1.0000081; 2e-07
+
+#KB projectors
+match; Vanderbilt function v0 ; GREP(kb/info, "Vanderbilt function", 20, 2) ; -6.250497; 1e-6
+match; Vanderbilt function v1 ; GREP(kb/info, "Vanderbilt function", 32, 2) ; -0.146398; 1e-6
+match; Vanderbilt function v2 ; GREP(kb/info, "Vanderbilt function", 44, 2) ; 0.007144; 1e-6
+match; Vanderbilt function v3 ; GREP(kb/info, "Vanderbilt function", 56, 2) ; -0.000155; 1e-6
+match; 5s0.5 KB Energy ; GREP(kb/info, "KB Energy", 13, 1) ; -6.8842; 4e-04
+match; 5p0.5 KB Energy ; GREP(kb/info, "KB Energy", 13, 2) ; -4.4656; 4e-04
+match; 5p1.5 KB Energy ; GREP(kb/info, "KB Energy", 13, 3) ; -2.3609; 1e-4
+match; 5s0.5 KB Cosine ; GREP(kb/info, "KB Energy", 28, 1) ; -0.1160; 1e-4
+match; 5p0.5 KB Cosine ; GREP(kb/info, "KB Energy", 28, 2) ; -0.0889; 1e-4
+match; 5p1.5 KB Cosine ; GREP(kb/info, "KB Energy", 28, 3) ; -0.1792; 1e-4
+match; Local component ; LINE(kb/kb-local, 98, 20) ; -6.25049685E+00; 1e-8
+match; s0.5 component ; LINE(kb/kb-s0.5, 98, 20) ; 1.69592968E+00; 3e-06
+match; p0.5 component ; LINE(kb/kb-p0.5, 98, 20) ; 6.67336592E-04; 1e-8
+match; p1.5 component ; LINE(kb/kb-p1.5, 98, 20) ; 6.13100846E-04; 1e-8
+
+#KB tests
+match; 5s0.5 Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 3) ; -0.9875; 1e-4
+match; 5s0.5 Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 3) ; -0.0794; 1e-4
+match; 5p0.5 Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 7) ; -0.3071; 1e-4
+match; 5p0.5 Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 7) ; 0.0000; 1e-4
+match; 5p1.5 Local potential E0 ; GREP(kb/info, "Ghost state analysis", 35, 11) ; -0.3071; 1e-4
+match; 5p1.5 Local potential E1 ; GREP(kb/info, "Ghost state analysis", 51, 11) ; 0.0000; 1e-4
+match; Local localization radius ; GREP(kb/info, "Localization", 11, 1) ; 2.82; 1e-2
+match; s0.5 localization radius ; GREP(kb/info, "Localization", 11, 2) ; 2.67; 1e-2
+match; p0.5 localization radius ; GREP(kb/info, "Localization", 11, 3) ; 2.79; 1e-2
+match; p1.5 localization radius ; GREP(kb/info, "Localization", 11, 4) ; 2.76; 1e-2
+
+
+Input: 03-rel.03-tm.inp
+
+#TM coefficients
+match; 5s0.5 c0 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 4); -1.646261369E+00; 8e-06
+match; 5s0.5 c2 Coefficient; GREP(pp/info, 'State: 5s0.5', 37, 4); 1.301509344E+00; 2e-05
+match; 5s0.5 c4 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 5); -3.387853155E-01; 7e-06
+match; 5s0.5 c6 Coefficient; GREP(pp/info, 'State: 5s0.5', 37, 5); -1.209732156E-01; 10e-07
+match; 5s0.5 c8 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 6); 7.489878767E-02; 3e-07
+match; 5s0.5 c10 Coefficient; GREP(pp/info, 'State: 5s0.5', 37, 6); -1.402827872E-02; 10e-08
+match; 5s0.5 c12 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 7); 9.351971421E-04; 9e-09
+match; 5p0.5 c0 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 4); -1.187442553E+00; 6e-06
+match; 5p0.5 c2 Coefficient; GREP(pp/info, 'State: 5p0.5', 37, 4); 2.048795336E-01; 7e-06
+match; 5p0.5 c4 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 5); -5.996517610E-03; 4e-07
+match; 5p0.5 c6 Coefficient; GREP(pp/info, 'State: 5p0.5', 37, 5); -9.154708085E-02; 2e-06
+match; 5p0.5 c8 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 6); 3.321092835E-02; 7e-07
+match; 5p0.5 c10 Coefficient; GREP(pp/info, 'State: 5p0.5', 37, 6); -4.808952526E-03; 2e-07
+match; 5p0.5 c12 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 7); 2.601131671E-04; 7e-09
+match; 5p1.5 c0 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 4); -1.273923979E+00; 6e-06
+match; 5p1.5 c2 Coefficient; GREP(pp/info, 'State: 5p1.5', 37, 4); 1.563691353E-01; 6e-06
+match; 5p1.5 c4 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 5); -3.493043793E-03; 3e-07
+match; 5p1.5 c6 Coefficient; GREP(pp/info, 'State: 5p1.5', 37, 5); -6.320082005E-02; 2e-06
+match; 5p1.5 c8 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 6); 2.036818714E-02; 4e-07
+match; 5p1.5 c10 Coefficient; GREP(pp/info, 'State: 5p1.5', 37, 6); -2.611850473E-03; 6e-08
+match; 5p1.5 c12 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 7); 1.247310072E-04; 3e-09
+
+#Pseudo-Wavefunctions
+match; 5s0.5 Large Wavefunction (small r) ; LINE(pp/wf-5s0.5, 836, 20); 2.61127859E-01; 2e-06
+match; 5s0.5 Large Wavefunction (large r) ; LINE(pp/wf-5s0.5, 1117, 20); 1.01126869E-05; 2e-10
+match; 5s0.5 Small Wavefunction (small r) ; LINE(pp/wf-5s0.5, 836, 38); 0.00000000E+00; 1e-16
+match; 5s0.5 Small Wavefunction (large r) ; LINE(pp/wf-5s0.5, 1117, 38); 0.00000000E+00; 1e-16
+match; 5s0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 56); 2.91163581E-01; 2e-06
+match; 5s0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 56); -1.32011713E-05; 2e-10
+match; 5s0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 74); 0.00000000E+00; 1e-16
+match; 5s0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 74); 0.00000000E+00; 1e-16
+
+match; 5p0.5 Large Wavefunction (small r) ; LINE(pp/wf-5p0.5, 836, 20); 1.60535849E-01; 7e-07
+match; 5p0.5 Large Wavefunction (large r) ; LINE(pp/wf-5p0.5, 1117, 20); 1.87501086E-04; 3e-09
+match; 5p0.5 Small Wavefunction (small r) ; LINE(pp/wf-5p0.5, 836, 38); 0.00000000E+00; 1e-16
+match; 5p0.5 Small Wavefunction (large r) ; LINE(pp/wf-5p0.5, 1117, 38); 0.00000000E+00; 1e-16
+match; 5p0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5p0.5, 836, 56); 3.50544952E-01; 5e-07
+match; 5p0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5p0.5, 1117, 56); -1.74449176E-04; 2e-09
+match; 5p0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5p0.5, 836, 74); 0.00000000E+00; 1e-16
+match; 5p0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5p0.5, 1117, 74); 0.00000000E+00; 1e-16
+
+match; 5p1.5 Large Wavefunction (small r) ; LINE(pp/wf-5p1.5, 836, 20); 1.45536097E-01; 7e-07
+match; 5p1.5 Large Wavefunction (large r) ; LINE(pp/wf-5p1.5, 1117, 20); 3.04048479E-04; 4e-09
+match; 5p1.5 Small Wavefunction (small r) ; LINE(pp/wf-5p1.5, 836, 38); 0.00000000E+00; 1e-16
+match; 5p1.5 Small Wavefunction (large r) ; LINE(pp/wf-5p1.5, 1117, 38); 0.00000000E+00; 1e-16
+match; 5p1.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5p1.5, 836, 56); 3.11570947E-01; 6e-07
+match; 5p1.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5p1.5, 1117, 56); -2.65311715E-04; 4e-09
+match; 5p1.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5p1.5, 836, 74); 0.00000000E+00; 1e-16
+match; 5p1.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5p1.5, 1117, 74); 0.00000000E+00; 1e-16
+
+#Pseudopotentials
+match; s0.5 Pseudopotential (small r); LINE(pp/pp-s0.5, 836, 20); -9.90868154E-01; 4e-05
+match; s0.5 Pseudopotential (large r); LINE(pp/pp-s0.5, 1117, 20); -7.98767347E-01; 1e-9
+match; p0.5 Pseudopotential (small r); LINE(pp/pp-p0.5, 836, 20); -3.26875623E+00; 3e-05
+match; p0.5 Pseudopotential (large r); LINE(pp/pp-p0.5, 1117, 20); -7.98767347E-01; 1e-9
+match; p1.5 Pseudopotential (small r); LINE(pp/pp-p1.5, 836, 20); -3.42346142E+00; 3e-05
+match; p1.5 Pseudopotential (large r); LINE(pp/pp-p1.5, 1117, 20); -7.98767347E-01; 1e-9
+
+
+Input: 03-rel.04-rtm.inp
+#TM coefficients
+match; 5s0.5 c0 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 4); -1.646472516E+00; 8e-06
+match; 5s0.5 c2 Coefficient; GREP(pp/info, 'State: 5s0.5', 37, 4); 1.301803975E+00; 2e-05
+match; 5s0.5 c4 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 5); -3.389387184E-01; 7e-06
+match; 5s0.5 c6 Coefficient; GREP(pp/info, 'State: 5s0.5', 37, 5); -1.209395057E-01; 10e-07
+match; 5s0.5 c8 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 6); 7.489745516E-02; 3e-07
+match; 5s0.5 c10 Coefficient; GREP(pp/info, 'State: 5s0.5', 37, 6); -1.402886868E-02; 10e-08
+match; 5s0.5 c12 Coefficient; GREP(pp/info, 'State: 5s0.5', 12, 7); 9.352644327E-04; 9e-09
+match; 5p0.5 c0 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 4); -1.187646981E+00; 6e-06
+match; 5p0.5 c2 Coefficient; GREP(pp/info, 'State: 5p0.5', 37, 4); 2.050308078E-01; 7e-06
+match; 5p0.5 c4 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 5); -6.005376021E-03; 4e-07
+match; 5p0.5 c6 Coefficient; GREP(pp/info, 'State: 5p0.5', 37, 5); -9.157039859E-02; 2e-06
+match; 5p0.5 c8 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 6); 3.322004643E-02; 7e-07
+match; 5p0.5 c10 Coefficient; GREP(pp/info, 'State: 5p0.5', 37, 6); -4.810340832E-03; 2e-07
+match; 5p0.5 c12 Coefficient; GREP(pp/info, 'State: 5p0.5', 12, 7); 2.601914734E-04; 7e-09
+match; 5p1.5 c0 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 4); -1.274147419E+00; 6e-06
+match; 5p1.5 c2 Coefficient; GREP(pp/info, 'State: 5p1.5', 37, 4); 1.565280984E-01; 6e-06
+match; 5p1.5 c4 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 5); -3.500149380E-03; 3e-07
+match; 5p1.5 c6 Coefficient; GREP(pp/info, 'State: 5p1.5', 37, 5); -6.322369816E-02; 2e-06
+match; 5p1.5 c8 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 6); 2.037628894E-02; 4e-07
+match; 5p1.5 c10 Coefficient; GREP(pp/info, 'State: 5p1.5', 37, 6); -2.612961931E-03; 6e-08
+match; 5p1.5 c12 Coefficient; GREP(pp/info, 'State: 5p1.5', 12, 7); 1.247870628E-04; 3e-09
+
+#Pseudo-Wavefunctions
+match; 5s0.5 Large Wavefunction (small r) ; LINE(pp/wf-5s0.5, 836, 20); 2.61089640E-01; 2e-06
+match; 5s0.5 Large Wavefunction (large r) ; LINE(pp/wf-5s0.5, 1117, 20); 1.01126869E-05; 2e-10
+match; 5s0.5 Small Wavefunction (small r) ; LINE(pp/wf-5s0.5, 836, 38); 1.06252048E-03; 4e-09
+match; 5s0.5 Small Wavefunction (large r) ; LINE(pp/wf-5s0.5, 1117, 38); -4.81677309E-08; 5e-13
+match; 5s0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 56); 2.91179532E-01; 2e-06
+match; 5s0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 56); -1.32011713E-05; 2e-10
+match; 5s0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 74); 2.53439262E-03; 2e-08
+match; 5s0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 74); 6.31688531E-08; 6e-13
+
+match; 5p0.5 Large Wavefunction (small r) ; LINE(pp/wf-5p0.5, 836, 20); 1.60508982E-01; 7e-07
+match; 5p0.5 Large Wavefunction (large r) ; LINE(pp/wf-5p0.5, 1117, 20); 1.87501086E-04; 3e-09
+match; 5p0.5 Small Wavefunction (small r) ; LINE(pp/wf-5p0.5, 836, 38); 3.61768305E-03; 2e-08
+match; 5p0.5 Small Wavefunction (large r) ; LINE(pp/wf-5p0.5, 1117, 38); -4.99897694E-07; 6e-12
+match; 5p0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5p0.5, 836, 56); 3.50509272E-01; 5e-07
+match; 5p0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5p0.5, 1117, 56); -1.74449176E-04; 2e-09
+match; 5p0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5p0.5, 836, 74); 1.03986658E-03; 4e-08
+match; 5p0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5p0.5, 1117, 74); 4.57756165E-07; 5e-12
+
+match; 5p1.5 Large Wavefunction (small r) ; LINE(pp/wf-5p1.5, 836, 20); 1.45509271E-01; 7e-07
+match; 5p1.5 Large Wavefunction (large r) ; LINE(pp/wf-5p1.5, 1117, 20); 3.04048479E-04; 4e-09
+match; 5p1.5 Small Wavefunction (small r) ; LINE(pp/wf-5p1.5, 836, 38); 7.66195906E-05; 3e-09
+match; 5p1.5 Small Wavefunction (large r) ; LINE(pp/wf-5p1.5, 1117, 38); -1.07881134E-06; 2e-11
+match; 5p1.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5p1.5, 836, 56); 3.11535607E-01; 6e-07
+match; 5p1.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5p1.5, 1117, 56); -2.65311715E-04; 4e-09
+match; 5p1.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5p1.5, 836, 74); 2.70375582E-04; 2e-08
+match; 5p1.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5p1.5, 1117, 74); 9.62610815E-07; 10e-12
+
+#Pseudopotentials
+match; s0.5 Pseudopotential (small r); LINE(pp/pp-s0.5, 836, 20); -9.89753287E-01; 4e-05
+match; s0.5 Pseudopotential (large r); LINE(pp/pp-s0.5, 1117, 20); -7.98767327E-01; 1e-9
+match; p0.5 Pseudopotential (small r); LINE(pp/pp-p0.5, 836, 20); -3.26807685E+00; 3e-05
+match; p0.5 Pseudopotential (large r); LINE(pp/pp-p0.5, 1117, 20); -7.98767327E-01; 1e-9
+match; p1.5 Pseudopotential (small r); LINE(pp/pp-p1.5, 836, 20); -3.42266786E+00; 3e-05
+match; p1.5 Pseudopotential (large r); LINE(pp/pp-p1.5, 1117, 20); -7.98767327E-01; 1e-9
+
+
+Input: 03-rel.05-mrpp.inp
+
+#MRPP coefficients
+match; 4s0.5 c0 Coefficient; GREP(pp/info, 'State: 4s0.5', 12, 4); -1.838790875E-01; 6e-04
+match; 4s0.5 c2 Coefficient; GREP(pp/info, 'State: 4s0.5', 37, 4); 6.315488430E+00; 5e-03
+match; 4s0.5 c4 Coefficient; GREP(pp/info, 'State: 4s0.5', 12, 5); -7.977078821E+00; 2e-02
+match; 4s0.5 c6 Coefficient; GREP(pp/info, 'State: 4s0.5', 37, 5); -1.891723279E+01; 9e-03
+match; 4s0.5 c8 Coefficient; GREP(pp/info, 'State: 4s0.5', 12, 6); 5.726027034E+01; 2e-02
+match; 4s0.5 c10 Coefficient; GREP(pp/info, 'State: 4s0.5', 37, 6); -6.435031267E+01; 3e-02
+match; 4s0.5 c12 Coefficient; GREP(pp/info, 'State: 4s0.5', 12, 7); 3.767195690E+01; 2e-02
+match; 4s0.5 c14 Coefficient; GREP(pp/info, 'State: 4s0.5', 37, 7); -1.143625697E+01; 7e-03
+match; 4s0.5 c16 Coefficient; GREP(pp/info, 'State: 4s0.5', 12, 8); 1.426948909E+00; 9e-04
+match; 4p0.5 c0 Coefficient; GREP(pp/info, 'State: 4p0.5', 12, 4); 1.472911836E+00; 2e-03
+match; 4p0.5 c2 Coefficient; GREP(pp/info, 'State: 4p0.5', 37, 4); 3.984360662E-01; 6e-03
+match; 4p0.5 c4 Coefficient; GREP(pp/info, 'State: 4p0.5', 12, 5); -2.267869352E-02; 7e-04
+match; 4p0.5 c6 Coefficient; GREP(pp/info, 'State: 4p0.5', 37, 5); -1.580226343E+01; 5e-02
+match; 4p0.5 c8 Coefficient; GREP(pp/info, 'State: 4p0.5', 12, 6); 3.332933629E+01; 10e-02
+match; 4p0.5 c10 Coefficient; GREP(pp/info, 'State: 4p0.5', 37, 6); -3.231286201E+01; 10e-02
+match; 4p0.5 c12 Coefficient; GREP(pp/info, 'State: 4p0.5', 12, 7); 1.694713454E+01; 6e-02
+match; 4p0.5 c14 Coefficient; GREP(pp/info, 'State: 4p0.5', 37, 7); -4.668297740E+00; 2e-02
+match; 4p0.5 c16 Coefficient; GREP(pp/info, 'State: 4p0.5', 12, 8); 5.315762538E-01; 2e-03
+match; 4p1.5 c0 Coefficient; GREP(pp/info, 'State: 4p1.5', 12, 4); 1.384350800E+00; 2e-03
+match; 4p1.5 c2 Coefficient; GREP(pp/info, 'State: 4p1.5', 37, 4); 3.541046344E-01; 6e-03
+match; 4p1.5 c4 Coefficient; GREP(pp/info, 'State: 4p1.5', 12, 5); -1.791289927E-02; 6e-04
+match; 4p1.5 c6 Coefficient; GREP(pp/info, 'State: 4p1.5', 37, 5); -1.253672714E+01; 4e-02
+match; 4p1.5 c8 Coefficient; GREP(pp/info, 'State: 4p1.5', 12, 6); 2.447400258E+01; 8e-02
+match; 4p1.5 c10 Coefficient; GREP(pp/info, 'State: 4p1.5', 37, 6); -2.195150954E+01; 7e-02
+match; 4p1.5 c12 Coefficient; GREP(pp/info, 'State: 4p1.5', 12, 7); 1.064847976E+01; 4e-02
+match; 4p1.5 c14 Coefficient; GREP(pp/info, 'State: 4p1.5', 37, 7); -2.712631086E+00; 10e-03
+match; 4p1.5 c16 Coefficient; GREP(pp/info, 'State: 4p1.5', 12, 8); 2.856284308E-01; 2e-03
+
+#Pseudo-Wavefunctions
+match; 4s0.5 Large Wavefunction (small r) ; LINE(pp/wf-4s0.5, 836, 20); 2.16251448E+00; 4e-05
+match; 4s0.5 Large Wavefunction (large r) ; LINE(pp/wf-4s0.5, 1117, 20); 0.00000000E+00; 1e-16
+match; 4s0.5 Small Wavefunction (small r) ; LINE(pp/wf-4s0.5, 836, 38); 0.00000000E+00; 1e-16
+match; 4s0.5 Small Wavefunction (large r) ; LINE(pp/wf-4s0.5, 1117, 38); 0.00000000E+00; 1e-16
+match; 4s0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-4s0.5, 836, 56); 2.79264360E+00; 2e-03
+match; 4s0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-4s0.5, 1117, 56); 0.00000000E+00; 1e-16
+match; 4s0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-4s0.5, 836, 74); 0.00000000E+00; 1e-16
+match; 4s0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-4s0.5, 1117, 74); 0.00000000E+00; 1e-16
+match; 5s0.5 Large Wavefunction (small r) ; LINE(pp/wf-5s0.5, 836, 20); -8.21857211E-01; 3e-05
+match; 5s0.5 Large Wavefunction (large r) ; LINE(pp/wf-5s0.5, 1117, 20); 1.01126869E-05; 2e-10
+match; 5s0.5 Small Wavefunction (small r) ; LINE(pp/wf-5s0.5, 836, 38); 0.00000000E+00; 1e-16
+match; 5s0.5 Small Wavefunction (large r) ; LINE(pp/wf-5s0.5, 1117, 38); 0.00000000E+00; 1e-16
+match; 5s0.5 Large Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 56); 2.20051854E-01; 9e-04
+match; 5s0.5 Large Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 56); -1.32011713E-05; 2e-10
+match; 5s0.5 Small Wavefunction Deriv. (small r); LINE(pp/wf-5s0.5, 836, 74); 0.00000000E+00; 1e-16
+match; 5s0.5 Small Wavefunction Deriv. (large r); LINE(pp/wf-5s0.5, 1117, 74); 0.00000000E+00; 1e-16
+
+#Pseudopotentials
+match; s0.5 Pseudopotential (small r); LINE(pp/pp-s0.5, 836, 20); -3.73615231E+01; 2e-03
+match; s0.5 Pseudopotential (large r); LINE(pp/pp-s0.5, 1117, 20); -2.59599383E+00; 1e-8
+match; p0.5 Pseudopotential (small r); LINE(pp/pp-p0.5, 836, 20); -3.97455849E+01; 7e-04
+match; p0.5 Pseudopotential (large r); LINE(pp/pp-p0.5, 1117, 20); -2.59599383E+00; 1e-8
+match; p1.5 Pseudopotential (small r); LINE(pp/pp-p1.5, 836, 20); -3.81179518E+01; 2e-03
+match; p1.5 Pseudopotential (large r); LINE(pp/pp-p1.5, 1117, 20); -2.59599383E+00; 1e-8
diff --git a/testsuite/pseudopotentials/04-nlcc.01-ae.inp b/testsuite/pseudopotentials/04-nlcc.01-ae.inp
new file mode 100644
index 0000000..a649383
--- /dev/null
+++ b/testsuite/pseudopotentials/04-nlcc.01-ae.inp
@@ -0,0 +1,13 @@
+# $Id: 01-non_rel.01-ae.inp 614 2011-08-19 10:35:26Z micael $
+
+CalculationMode = ae
+Verbose = 40
+
+NuclearCharge = 29
+
+%Orbitals
+"Ar"
+ 4 | 0 | 1 | 0
+ 4 | 1 | 0 | 0
+ 3 | 2 | 5 | 5
+%
diff --git a/testsuite/pseudopotentials/04-nlcc.02-atom.inp b/testsuite/pseudopotentials/04-nlcc.02-atom.inp
new file mode 100644
index 0000000..8e85ff8
--- /dev/null
+++ b/testsuite/pseudopotentials/04-nlcc.02-atom.inp
@@ -0,0 +1,14 @@
+# Generalities
+Title = "Copper"
+CalculationMode = pp
+Verbose = 40
+
+# PseudoPotentials
+%PPComponents
+ 4 | 0 | 2.0 | tm
+ 4 | 1 | 2.0 | tm
+ 3 | 2 | 2.0 | tm
+%
+
+CoreCorrection = 1
+CoreCorrectionCutoff = 0.75
diff --git a/testsuite/pseudopotentials/04-nlcc.03-fhi.inp b/testsuite/pseudopotentials/04-nlcc.03-fhi.inp
new file mode 100644
index 0000000..86a3b44
--- /dev/null
+++ b/testsuite/pseudopotentials/04-nlcc.03-fhi.inp
@@ -0,0 +1,13 @@
+Title = "Copper"
+CalculationMode = pp
+Verbose = 40
+
+# PseudoPotentials
+%PPComponents
+ 4 | 0 | 2.0 | tm
+ 4 | 1 | 2.0 | tm
+ 3 | 2 | 2.0 | tm
+%
+
+CoreCorrection = 2
+
diff --git a/testsuite/pseudopotentials/04-nlcc.test b/testsuite/pseudopotentials/04-nlcc.test
new file mode 100644
index 0000000..fd058ce
--- /dev/null
+++ b/testsuite/pseudopotentials/04-nlcc.test
@@ -0,0 +1,39 @@
+# $Id: 01-non_rel.test 614 2011-08-19 10:35:26Z micael $
+
+Test : Pseudopotentials: non-linear core-corrections
+Programs : ape
+TestGroups : all; ps
+Enabled : Yes
+
+Input: 04-nlcc.01-ae.inp
+
+Input: 04-nlcc.02-atom.inp
+
+#Polynomial coefficients
+match; a coefficient ; GREP(pp/info, 'Polynomial', 8, 1) ; 4.6898574291; 8e-05
+match; b coefficient ; GREP(pp/info, 'Polynomial', 8, 2) ; -3.0252053421; 3e-04
+match; c coefficient ; GREP(pp/info, 'Polynomial', 8, 3) ; -0.0065194043; 3e-04
+
+#Core charge
+match; Integrated charge ; GREP(pp/info, 'Integrated', 26, 0) ; 9.630854189; 2e-04
+match; Core charge (r0) ; LINE(pp/core_correction, 8, 20) ; 8.66102584E+00; 7e-04
+match; Core charge (ri) ; LINE(pp/core_correction, 620, 20) ; 4.06105831E+00; 10e-05
+match; Core charge (rmax) ; LINE(pp/core_correction, 1007, 20) ; 0.00000000E+00; 1e-16
+
+
+Input: 04-nlcc.03-fhi.inp
+
+#Polynomial coefficients
+match; a coefficient ; GREP(pp/info, 'Polynomial', 8, 1) ; 76.0624055548; 4e-06
+match; b coefficient ; GREP(pp/info, 'Polynomial', 8, 2) ; 0.0000000000; 1e-16
+match; c coefficient ; GREP(pp/info, 'Polynomial', 8, 3) ; 0.0000000000; 1e-16
+match; d coefficient ; GREP(pp/info, 'Polynomial', 8, 4) ; -355.7358684911; 10e-01
+match; e coefficient ; GREP(pp/info, 'Polynomial', 8, 5) ; 81.8211114159; 4e+00
+match; f coefficient ; GREP(pp/info, 'Polynomial', 8, 6) ; 541.5262436980; 6e+00
+match; g coefficient ; GREP(pp/info, 'Polynomial', 8, 7) ; -340.3396950673; 3e+00
+
+#Core charge
+match; Integrated charge ; GREP(pp/info, 'Integrated', 26, 0) ; 9.167549715; 4e-04
+match; Core charge (r0) ; LINE(pp/core_correction, 8, 20) ; 6.05285391E+00; 3e-07
+match; Core charge (ri) ; LINE(pp/core_correction, 620, 20) ; 3.84256132E+00; 4e-04
+match; Core charge (rmax) ; LINE(pp/core_correction, 1007, 20) ; 0.00000000E+00; 1e-16
diff --git a/testsuite/pseudopotentials/05-pp_tests.01-ae_pp.inp b/testsuite/pseudopotentials/05-pp_tests.01-ae_pp.inp
new file mode 100644
index 0000000..f9fbaed
--- /dev/null
+++ b/testsuite/pseudopotentials/05-pp_tests.01-ae_pp.inp
@@ -0,0 +1,21 @@
+# $Id: 01-non_rel.01-ae.inp 614 2011-08-19 10:35:26Z micael $
+
+CalculationMode = ae + pp
+Verbose = 40
+
+NuclearCharge = 6
+
+%Orbitals
+"He"
+ 2 | 0 | 1 | 1
+ 2 | 1 | 2 | 0
+ 3 | 2 | 0 | 0
+%
+
+%PPComponents
+ 2 | 0 | 1.4 | tm
+ 2 | 1 | 1.4 | tm
+ 3 | 2 | 1.4 | tm
+%
+
+
diff --git a/testsuite/pseudopotentials/05-pp_tests.02-tests_1.inp b/testsuite/pseudopotentials/05-pp_tests.02-tests_1.inp
new file mode 100644
index 0000000..a185ee8
--- /dev/null
+++ b/testsuite/pseudopotentials/05-pp_tests.02-tests_1.inp
@@ -0,0 +1,6 @@
+# $Id: 01-non_rel.01-ae.inp 614 2011-08-19 10:35:26Z micael $
+
+CalculationMode = pp_test
+Verbose = 40
+
+PPTests = ld + dm
diff --git a/testsuite/pseudopotentials/05-pp_tests.03-tests_2.inp b/testsuite/pseudopotentials/05-pp_tests.03-tests_2.inp
new file mode 100644
index 0000000..c54274e
--- /dev/null
+++ b/testsuite/pseudopotentials/05-pp_tests.03-tests_2.inp
@@ -0,0 +1,12 @@
+# $Id: 01-non_rel.01-ae.inp 614 2011-08-19 10:35:26Z micael $
+
+CalculationMode = pp_test
+Verbose = 40
+
+PPTestSCF = yes
+
+%PPTestOrbitals
+ 2 | 0 | 1 | 0
+ 2 | 1 | 3 | 0
+ 3 | 2 | 0 | 0
+%
diff --git a/testsuite/pseudopotentials/05-pp_tests.test b/testsuite/pseudopotentials/05-pp_tests.test
new file mode 100644
index 0000000..83dd973
--- /dev/null
+++ b/testsuite/pseudopotentials/05-pp_tests.test
@@ -0,0 +1,38 @@
+# $Id: 01-non_rel.test 614 2011-08-19 10:35:26Z micael $
+
+Test : Pseudopotentials: tests
+Programs : ape
+TestGroups : all; ps
+Enabled : Yes
+
+Input: 05-pp_tests.01-ae_pp.inp
+
+
+Input: 05-pp_tests.02-tests_1.inp
+
+# Logarithmic derivatives
+match; AE s logarithmic derivative ; LINE(tests/ld-s, 20, 20) ; -9.49463313E-01; 4e-07
+match; PP s logarithmic derivative ; LINE(tests/ld-s, 20, 38) ; -9.49481427E-01; 8e-08
+match; AE p logarithmic derivative ; LINE(tests/ld-p, 20, 20) ; -7.67409654E-01; 4e-07
+match; PP p logarithmic derivative ; LINE(tests/ld-p, 20, 38) ; -7.67322871E-01; 9e-08
+match; AE d logarithmic derivative ; LINE(tests/ld-d, 20, 20) ; 1.13611570E-01; 4e-07
+match; PP d logarithmic derivative ; LINE(tests/ld-d, 20, 38) ; 1.13980194E-01; 3e-07
+
+#Dipole matrix elements
+match; AE 2s-3d dipole moment ; GREP(tests/info, 'States', 20, 1) ; 0.0003; 2e+00
+match; AE 2s-3d dipole moment ; GREP(tests/info, 'States', 31, 1) ; 1.6413; 1e-4
+
+
+Input: 05-pp_tests.03-tests_2.inp
+
+# Logarithmic derivatives
+match; AE s logarithmic derivative ; LINE(tests/ld-s, 20, 20) ; -9.22122439E-01; 4e-07
+match; PP s logarithmic derivative ; LINE(tests/ld-s, 20, 38) ; -9.51398346E-01; 2e-07
+match; AE p logarithmic derivative ; LINE(tests/ld-p, 20, 20) ; -7.36819070E-01; 4e-07
+match; PP p logarithmic derivative ; LINE(tests/ld-p, 20, 38) ; -7.70110210E-01; 2e-07
+match; AE d logarithmic derivative ; LINE(tests/ld-d, 20, 20) ; 1.18270750E-01; 7e-7
+match; PP d logarithmic derivative ; LINE(tests/ld-d, 20, 38) ; 1.06142540E-01; 6e-7
+
+#Dipole matrix elements
+match; AE 2s-3d dipole moment ; GREP(tests/info, 'States', 20, 1) ; 0.0003; 2e+00
+match; AE 2s-3d dipole moment ; GREP(tests/info, 'States', 31, 1) ; 1.6311; 1e-4
diff --git a/testsuite/pseudopotentials/Makefile.am b/testsuite/pseudopotentials/Makefile.am
new file mode 100644
index 0000000..516b60c
--- /dev/null
+++ b/testsuite/pseudopotentials/Makefile.am
@@ -0,0 +1,50 @@
+## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 M. Oliveira, F. Nogueira
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## $Id: Makefile.am 778 2013-07-11 15:49:39Z micael $
+
+sharedir = $(pkgdatadir)/testsuite/pseudopotentials
+
+dist_share_DATA = \
+ 01-non_rel.test \
+ 01-non_rel.01-ae.inp \
+ 01-non_rel.02-ham.inp \
+ 01-non_rel.03-tm.inp \
+ 01-non_rel.04-mrpp.inp \
+ 02-scalar_rel.test \
+ 02-scalar_rel.01-ae.inp \
+ 02-scalar_rel.02-hamann.inp \
+ 02-scalar_rel.03-tm.inp \
+ 02-scalar_rel.04-mrpp.inp \
+ 03-rel.test \
+ 03-rel.01-ae.inp \
+ 03-rel.02-hamann.inp \
+ 03-rel.03-tm.inp \
+ 03-rel.04-rtm.inp \
+ 03-rel.05-mrpp.inp \
+ 04-nlcc.test \
+ 04-nlcc.01-ae.inp \
+ 04-nlcc.02-atom.inp \
+ 04-nlcc.03-fhi.inp \
+ 05-pp_tests.test \
+ 05-pp_tests.01-ae_pp.inp \
+ 05-pp_tests.02-tests_1.inp \
+ 05-pp_tests.03-tests_2.inp
+
+CLEANFILES = *~ *.bak
diff --git a/testsuite/pseudopotentials/Makefile.in b/testsuite/pseudopotentials/Makefile.in
new file mode 100644
index 0000000..2c3996c
--- /dev/null
+++ b/testsuite/pseudopotentials/Makefile.in
@@ -0,0 +1,458 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = testsuite/pseudopotentials
+DIST_COMMON = $(dist_share_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acx.m4 \
+ $(top_srcdir)/m4/compilation_info.m4 \
+ $(top_srcdir)/m4/f90_module_flag.m4 $(top_srcdir)/m4/libxc.m4 \
+ $(top_srcdir)/m4/pspio.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(sharedir)"
+DATA = $(dist_share_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F90_MODULE_FLAG = @F90_MODULE_FLAG@
+FC = @FC@
+FCCPP = @FCCPP@
+FCFLAGS = @FCFLAGS@
+FCFLAGS_LIBXC = @FCFLAGS_LIBXC@
+FCFLAGS_PSPIO = @FCFLAGS_PSPIO@
+FCFLAGS_f90 = @FCFLAGS_f90@
+FCLIBS = @FCLIBS@
+GREP = @GREP@
+GSL_CFLAGS = @GSL_CFLAGS@
+GSL_CONFIG = @GSL_CONFIG@
+GSL_LIBS = @GSL_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBS_LIBXC = @LIBS_LIBXC@
+LIBS_PSPIO = @LIBS_PSPIO@
+LINK = @LINK@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKGCONFIG = @PKGCONFIG@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_FC = @ac_ct_FC@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sharedir = $(pkgdatadir)/testsuite/pseudopotentials
+dist_share_DATA = \
+ 01-non_rel.test \
+ 01-non_rel.01-ae.inp \
+ 01-non_rel.02-ham.inp \
+ 01-non_rel.03-tm.inp \
+ 01-non_rel.04-mrpp.inp \
+ 02-scalar_rel.test \
+ 02-scalar_rel.01-ae.inp \
+ 02-scalar_rel.02-hamann.inp \
+ 02-scalar_rel.03-tm.inp \
+ 02-scalar_rel.04-mrpp.inp \
+ 03-rel.test \
+ 03-rel.01-ae.inp \
+ 03-rel.02-hamann.inp \
+ 03-rel.03-tm.inp \
+ 03-rel.04-rtm.inp \
+ 03-rel.05-mrpp.inp \
+ 04-nlcc.test \
+ 04-nlcc.01-ae.inp \
+ 04-nlcc.02-atom.inp \
+ 04-nlcc.03-fhi.inp \
+ 05-pp_tests.test \
+ 05-pp_tests.01-ae_pp.inp \
+ 05-pp_tests.02-tests_1.inp \
+ 05-pp_tests.03-tests_2.inp
+
+CLEANFILES = *~ *.bak
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu testsuite/pseudopotentials/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu testsuite/pseudopotentials/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-dist_shareDATA: $(dist_share_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(sharedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sharedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \
+ done
+
+uninstall-dist_shareDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_share_DATA)'; test -n "$(sharedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(sharedir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(sharedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_shareDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_shareDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_shareDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_shareDATA
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ape.git
More information about the debian-science-commits
mailing list