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 / sccdftbsrc_ltm.F90
Last active August 6, 2016 18:03
Updated version of sccdftbsrc_ltm.src
module sccdftbsrc !Data required in SCCDFTB calculations
use chm_kinds
use dimens_fcm
#if KEY_DFTBPLUS==1
use charmm_dftb, only: CharmmDftb
use external_charges, only: ExternalCharges
use klopman_ohno, only: KlopmanOhno
use gsbpscc_potential, only: gsbpPot
@andersx
andersx / diels-alder.xyz
Created November 16, 2016 11:54
Double-ended growing string method output for Diels-Alder addition with restricted PM3 in MOPAC.
16
0.000000
C -3.465749 1.770886 -0.163111
C -3.495510 0.274438 -0.156039
C -2.369727 2.504185 -0.173519
C -2.429048 -0.501243 -0.157609
H -4.481770 -0.169305 -0.151008
H -1.424932 -0.100437 -0.161056
H -2.512978 -1.579124 -0.154330
H -4.433642 2.253450 -0.161103
@andersx
andersx / stringfile.xyz
Created November 18, 2016 11:45
Elimination reaction SH(-) + CH3-CH2Cl with the growing string method at the HF-3c level
10
0.000000
C 0.000000 0.000000 0.000000
C 0.000000 0.000000 1.450002
Cl 1.782414 0.000000 2.108029
S -3.756164 0.139964 -1.368081
H 0.520198 0.905237 -0.380275
H 0.519191 -0.905679 -0.380232
H -0.525688 -0.903840 1.823125
H -0.525636 0.903895 1.823071
@andersx
andersx / lsq.py
Created December 19, 2016 12:55
Script to get mean atomic contributions to heat-of-formation
#!/usr/bin/env python2
import ezpickle
import numpy as np
Q = dict()
Q ["H"] = 0
Q ["C"] = 1
Q ["N"] = 2
Q ["O"] = 3
Q ["S"] = 4
@andersx
andersx / test.f90
Created December 28, 2016 13:59
Print to std err/out from fortran
program test
use, intrinsic :: iso_fortran_env, only : stdout=>output_unit, &
stderr=>error_unit
implicit none
write (stdout, *) "Prints to stdout"
write (stderr, *) "Prints to stderr"
end program test
@andersx
andersx / test.f90
Created December 28, 2016 14:13
Unicode test F90
program test
use, intrinsic :: iso_fortran_env, only : stdout=>output_unit, &
stderr=>error_unit
implicit none
write (stdout, *) "Copyright (c) 2017, ΦΨ Quantum Mechanics Inc."
end program test
@andersx
andersx / gist:78ca03544aa60b7f537f486812dd4f8a
Created January 26, 2017 11:47
NMR + NBO calculation in G09
Entering Gaussian System, Link 0=/home/andersx/opt/g09/g09
Input=test.com
Output=test.log
Initial command:
/home/andersx/opt/g09/l1.exe "/home/andersx/scr/g09_dd8b31fe-e3b8-11e6-8ccf-c75eea5d46d6/Gau-11929.inp" -scrdir="/home/andersx/scr/g09_dd8b31fe-e3b8-11e6-8ccf-c75eea5d46d6/"
Entering Link 1 = /home/andersx/opt/g09/l1.exe PID= 11938.
Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2009,2013,
Gaussian, Inc. All Rights Reserved.
@andersx
andersx / xyz2symxyz
Last active January 26, 2017 14:30
Wrapper for SYMMOL to convert and XYZ file to a symmetrized XYZ
#!/usr/bin/env python2
# MIT License
#
# Copyright (c) 2017 Anders Steen Christensen
#
# 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 / calc_mopac_energy.hpp
Created February 1, 2017 12:14
Example to run mopac and get energy via C++
double calc_mopac_energy(OpenBabel::OBMol &mol) {
OpenBabel::OBConversion conv;
conv.SetInAndOutFormats("moo", "mop");
std::remove("temp.mop");
std::remove("temp.out");
std::remove("temp.arc");
std::ofstream ofs("temp.mop");
conv.Write(&mol, &ofs);
system("./run_mopac");
@andersx
andersx / reserve_my_own_node.sh
Created March 14, 2017 10:14
BASH script for aut node reserver run as "nohup ./reserve_my_own_node.sh &".
#!/usr/bin/env bash
while :
do
ssh -t alchemy slurm_node_reserve 22 4320
ssh -t alchemy slurm_node_extend 4320
sleep 60
done