Skip to content

Instantly share code, notes, and snippets.

View andersx's full-sized avatar
🤓
LFG

Anders Steen Christensen andersx

🤓
LFG
View GitHub Profile
@andersx
andersx / gradient.f
Last active August 29, 2015 14:20
Cleaned up the CHARMM gradient code a bit.
subroutine usualgrd(nn,nbeweg,ndim,izp,lmax,ind,period,doscf,
* x,ev,a,b,occ,shift,shift3,shift3A,shift3B,shiftE,shiftE2,
* dacc,boxsiz,xinvbox,grad,lldep,lcolspin,spinfac,spinshift)
use sccdftbsrc, only: mdim, ldim, lscc3rd, nndim
implicit none
real*8 deltax
parameter ( deltax = 0.00001 )
logical period,doscf,lcolspin,lldep ! MG_QC_UW1207,MG_UW1210
@andersx
andersx / g09_polar.py
Last active August 29, 2015 14:25
Script to extract isotropic and anisotropic polarizability from Gaussian 09 log files.
#!/usr/bin/env python2
#
# Written by Anders S. Christensen (2015) University of Wisconsin-Madison
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
@andersx
andersx / H-H_3ob-fixed.skf
Created January 28, 2016 15:35
Updated version of the 3ob-3-1 hydrogen Slater-Koster file H-H.skf, which fixes a bug in the value of L-max for hydrogen.
2.000000000000E-02, 550, 1
0.0 0.0 -0.23860040, -0.04106143, 0.4195 0.4195 0.4195, 0.0 0.0 1.0
1.008, 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.856190768489E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 9.998986543582E-01
0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000
@andersx
andersx / dlpno-ccsd(t)_water.inp
Last active February 16, 2018 16:11
ORCA DLPNO-CCSD(T)/def2-TZVP calculation for a water molecule with sane output and MDCI block settings.
# Just standard input here
! DLPNO-CCSD(T) def2-TZVP def2-TZVP/C TightSCF
# Number of processors
% pal nprocs 4 end
# Memory per core
% maxcore 2000
% mdci
# Loose cut-off
# TCutPairs 1e-3
# TCutPNO 1e-6
@andersx
andersx / long_sccpme.src
Created February 24, 2016 16:31
Bugfix for MPI parallel DFTB with PME (PMEW keyword) in CHARMM. Replace this file and recompile.
! PZ, MG_QC_UW1206 adapted
SUBROUTINE sccpme2a(x,nn,xE,nE,zE,recbasis,vol,shiftE,ksgrd,
& Kappa)
use sccdftbsrc, only: NNDIM
use sccdftb, only: MAXPTC
use sccpme_module
use sccpmeutil
implicit none
@andersx
andersx / smi2name
Created April 22, 2016 16:05
Python2 script to convert a smilesstring to a IUPAC name using Cinfony.
#!/usr/bin/env python2
from sys import argv, exit
from cinfony import webel, pybel
if len(argv) != 2:
print "Usage: smi2name <SMILES>"
exit(1)
smiles_string = argv[1]
@andersx
andersx / atomtypes.py
Last active April 23, 2016 18:13
Pybel/OpenBabel script to determine atomtypes and connectivity for an XYZ file.
#!/usr/bin/env python2
#
# The MIT License (MIT)
#
# Copyright (c) 2015-2016 Anders S. Christensen, University of Wisconsin-Madison
#
# 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
@andersx
andersx / coords_to_xyz.py
Created April 29, 2016 18:54
Script to convert TURBOMOLE $coord block to an xyz file in angstrom
#!/usr/bin/env python2
import sys
BOHR_TO_ANGSTROM = 0.52917721067
def get_lines(filename):
f = open(filename, "r")
lines = f.readlines()
f.close()
@andersx
andersx / Makefile
Last active July 22, 2016 18:24
Janky-ass CHARMM Makefile (license: public domain)
GNU_MPICH = /home/andersx/modules/mpich_gnu
INTEL_MPICH = /home/andersx/modules/mpich_intel
all: ifort-j4
all-ifort: ifort-j4 ifort-parallel-j4
all-gnu: gnu-j4 gnu-parallel-j4
ifort:
@andersx
andersx / dummyshitmodule.f
Last active August 6, 2016 13:57
charmmfix
#if 0==1
! This will never compile, but
! the configure script is happy. :(
module CharmmDFTB
end module CharmmDFTB
#endif