Commit c41e9f92 authored by Samuel Tan's avatar Samuel Tan
Browse files

added README, removed dependency on periodictable

parent d731ad0e
ppqc stands for "Preprocessor for Quantum Chemistry"
and is a Python fork of Jason Rigby's qcpp
It attempts to extend the functionality of qcpp in the preparation of
input files for various computational chemistry programs, and at the same
time remain backwards compatible with qcpp.
To run ppqc, the task file must be given, e.g.
ppcq opt.gen
If there is only one argument,
it is assumed to be the task file.
It prints the input file in the correct format
to stdout, otherwise if a filename is supplied
it will write the results to a file.
Messages will be directed to stderr.
The task file details which xyz structure file to use,
what type of calculations are being prepared for, and
most importantly which software's input file format
to write to. The arguments currently implemented are:
-i path to xyz file
-o path to output file
-t path to task file
-s path to template file
Note that the optional arguments given override the values
in the task file. Lines beginning with '#' are treated as comments.
ppqc allows for more options to be specified in the task file.
For example, with GAMESS input files, any keyword can in the
$ groups can be replaced simply by specifying it in the task file.
E.g.
runtyp=optimize
This is not implemented for Psi4 input files since they don't
use "=" to assign values to keywords. But fear not, that
doesn't mean ppcq is any less powerful for Psi4.
Another feature that introduces a whole lot more flexibility
is the use of template files. ppcq works by merging 2 files together.
For each type of software/calculation combo, it has a default template
file, in which it inserts the xyz structure at the appropriate place.
Users can, and are encouraged to, make their own template files.
The structure of a template file is quite simple, here is a
Psi4 example:
===start template file===
# SAPT CALCULATION: ionic liquids single pair
memory 32 Gb
molecule dimer {
1 1
monomer_0
--
-1 1
monomer_1
units angstrom
no_reorient
symmetry c1
}
set globals {
basis aug-cc-pVDZ
scf_type DF
freeze_core True
guess sad
basis_guess 3-21G
}
energy('sapt2+3-ct')
===end template file===
As can be seen, ppcq looks for 'monomer_0' and 'monomer_1' and
then inserts the appropriate xyz numbers.
Softwarke currently supported:
Program Codename Description
=========================================================
Psi4 psi4sapt SAPT
GAMESS opt_gam Geometry optimisation
genefpinput EFP fragments, 1 & 2
int_e_gam FMO interaction energy (Zoe)
Todo
----
Geodesic (GAMESS)
#!/usr/bin/env python3
import numpy as np
import periodictable as ptab
#import periodictable as ptab
from operator import itemgetter
import itertools, sys, re, os
import molDB
### the various different fundamental components are described
### here as classes and functions
......@@ -20,12 +21,16 @@ class Atom(object):
self.x, self.y, self.z = self.coord
self.atom_id = atom_id
# fill in other info using imported module periodictable
self.ptabHandle = getattr(ptab, self.elem_sym)
if not atomic_num:
self.atomic_num = int(getattr(self.ptabHandle, "number"))
self.atomic_num = int(molDB.getAtomicNumber(self.elem_sym))
if not charge:
# should be 0 usually
self.charge = int(getattr(self.ptabHandle, "charge"))
self.charge = 0
# self.ptabHandle = getattr(ptab, self.elem_sym)
# if not atomic_num:
# self.atomic_num = int(getattr(self.ptabHandle, "number"))
# if not charge:
# # should be 0 usually
# self.charge = int(getattr(self.ptabHandle, "charge"))
def printAtom(self, fmt = None):
......
#!/usr/bin/env python3
from chemF import warning
#from chemF import warning
import chemF
import collections as col
# functions for accessing databases
......
#task=opt_gam
task=opt_gam
nfrag=2
mwords=300
memddi=100
......
"%PYTHON%" setup.py install
if errorlevel 1 exit 1
:: Add more build steps here, if they are necessary.
:: See
:: http://docs.continuum.io/conda/build.html
:: for a list of environment variables that are set during the build process.
#!/bin/bash
$PYTHON setup.py install
# Add more build steps here, if they are necessary.
# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.
package:
name: periodictable
version: "1.4.1"
source:
fn: periodictable-1.4.1.tar.gz
url: https://pypi.python.org/packages/source/p/periodictable/periodictable-1.4.1.tar.gz
md5: 7246b63cc0b6b1be6e86b6616f9e866e
# patches:
# List any patch files here
# - fix.patch
# build:
# noarch_python: True
# preserve_egg_dir: True
# entry_points:
# Put any entry points (scripts to be generated automatically) here. The
# syntax is module:function. For example
#
# - periodictable = periodictable:main
#
# Would create an entry point called periodictable that calls periodictable.main()
# If this is a new build for the same version, increment the build
# number. If you do not include this key, it defaults to 0.
# number: 1
requirements:
build:
- python
- setuptools
- pyparsing
- numpy
run:
- python
- pyparsing
- numpy
test:
# Python imports
imports:
- periodictable
# commands:
# You can put test commands to be run here. Use this to test that the
# entry points work.
# You can also put a file called run_test.py in the recipe that will be run
# at test time.
# requires:
# Put any additional test requirements here. For example
# - nose
about:
home: http://www.reflectometry.org/danse/elements.html
license: public domain
summary: 'Extensible periodic table of the elements'
# See
# http://docs.continuum.io/conda/build.html for
# more information about meta.yaml
ppqc 100644 → 100755
......@@ -183,4 +183,4 @@ def main():
#return a
# because we're still testing
# main()
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment