view release on metacpan or search on metacpan
examples/dftb3/PrepXyzACS.pl view on Meta::CPAN
# DMR: old school perl script that downloads a yaml and prints out some xyz
# files
use Modern::Perl;
use YAML::XS qw(Dump LoadFile);
use Path::Tiny;
use File::chdir;
my $yaml = "ct300296k_si_001.txt";
my $webyaml =
"http://pubs.acs.org/doi/suppl/10.1021/ct300296k/suppl_file/$yaml";
system("wget $webyaml") unless ( -e $yaml );
my $data = LoadFile($yaml);
examples/dftb3/dftb3.pl view on Meta::CPAN
#
# with BJ-damping,
# Stefan Grimme, Stephan Ehrlich and Lars Goerigk
# J. Comput. Chem. 32, 1456 (2011); DOI:10.1002/jcc.21759
#
# wget http://www.thch.uni-bonn.de/tc/downloads/DFT-D3/data/dftd3.tgz
#
# cd into directory and install with fortran compiler (e.g. gfortran or intel's ifort)
# may have to edit make file to use whichever compiler you have
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Path::Tiny;
my $hack = HackaMol->new( data => "examples/xyzs", );
my $i = 0;
my $scratch = path('tmp');
examples/dftb3/dftb3_in.pl view on Meta::CPAN
#!/usr/bin/env perl
# DMR May 27, 2014
#
# perl examples/dftd3_in.pl
#
# generate input.. for dftb3, input is an xyz file with atom symbols (not numbers)
#
# See examples/dftd3.pl for full script that writes input,
# runs program, and processes output.
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Path::Tiny;
my $hack = HackaMol->new( data => "examples/xyzs", );
foreach my $xyz ( grep {!/^symbol_/} $hack->data->children(qr/\.xyz$/) ) {
my $mol = $hack->read_file_mol($xyz);
my $sym_xyz = 'symbol_' . $xyz->basename;
examples/dftb3/dftb3_out.pl view on Meta::CPAN
#!/usr/bin/env perl
# DMR May 27, 2014
#
# perl examples/dftd3_out.pl
#
# process the output
#
# See examples/dftd3.pl for full script that writes input,
# runs program, and processes output.
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Path::Tiny;
my $hack = HackaMol->new( data => "examples/xyzs", );
foreach my $out ( $hack->data->children(qr/symbol_.+\.out$/) ) {
my $Calc = HackaMol::X::Calculator->new(
scratch => $hack->data,
examples/dftb3/dftb3_run.pl view on Meta::CPAN
#!/usr/bin/env perl
# DMR May 27, 2014
#
# perl examples/dftd3_run.pl
#
# run the program, generate output
#
# See examples/dftd3.pl for full script that writes input,
# runs program, and processes output.
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Path::Tiny;
my $hack = HackaMol->new( data => "examples/xyzs", );
foreach my $xyz ( $hack->data->children(qr/symbol_.+\.xyz$/) ) {
my $in = $xyz->basename ;
my $out = $in =~ s/\.xyz/\.out/r;
examples/g09/g09_in_ss-scan.pl view on Meta::CPAN
#!/usr/bin/env perl
# Demian Riccardi, June 3, 2014
#
# This example takes an xyz/pdb file of a molecule with a disulfide
# (or modified disulfide R-S-Hg-S-R), rotates the R-S...S-R from 0
# to 180 in steps of 10, and generates Gaussian 09 inputs for the
# B3PW91/[SDD/]6-31+G** level of theory.
#
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use lib 'basis_sets';
use YAML::XS;
use Path::Tiny;
##############################################################################
# load in the molecule and initialize charge and multiplicity #
##############################################################################
my $bldr = new HackaMol;
examples/g09/g09_in_ss-set.pl view on Meta::CPAN
#!/usr/bin/env perl
# Demian Riccardi, June 3, 2014
#
# This example takes an xyz/pdb file of a molecule with a disulfide
# (or modified disulfide R-S-Hg-S-R), rotates the R-S...S-R to a
# set angle passed at command line, and generates Gaussian 09 inputs
# for the B3PW91/[SDD/]6-31+G** level of theory.
#
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use lib 'basis_sets';
use YAML::XS;
use Path::Tiny;
###############################################################################
# load in the molecule and initialize charge and multiplicity #
###############################################################################
my $bldr = new HackaMol;
examples/g09/g09_out_pdb.pl view on Meta::CPAN
#!/usr/bin/env perl
# DMR April 30, 2014
#
# perl examples/g09_pdb.pl ~/some/path
#
# pull coordinates (all) and charges from Gaussian output (path submitted
# on commandline)
# write out pdbs in tmp directory with charges in the bfactor column..
#
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Math::Vector::Real;
use Path::Tiny;
use File::chdir;
my $path = shift || die "pass path to gaussian outputs";
my $hack = HackaMol->new( data => $path, );
examples/g09/g09_out_scfdone.pl view on Meta::CPAN
# and print in kcal/mol.
#
# The regex in output_map will return the last match. This is relevant
# for optimizations that will print an energy for each step. As
# an exercise, create a new script, based on this one, that takes
# output files from optimization runs (~/some/path/*_opt.out) and
# calculates the energy difference between the initial structure and
# the final structure.
#
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Path::Tiny;
my $path = shift || die "pass path to gaussian outputs";
my $hack = HackaMol->new( data => $path, );
foreach my $out ( $hack->data->children(qr/opt\.out$/) ) {
examples/g09/g09_out_xyz.pl view on Meta::CPAN
#!/usr/bin/env perl
# DMR April 30, 2014
#
# perl examples/g09_xyz.pl ~/some/path
#
# pull coordinates (all) from Gaussian output (path submitted
# on commandline)
# write out xyzs in tmp directory
#
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Math::Vector::Real;
use Path::Tiny;
use File::chdir;
my $path = shift || die "pass path to gaussian outputs";
my $hack = HackaMol->new( data => $path, );
lib/HackaMol/X/Calculator.pm view on Meta::CPAN
=head1 NAME
HackaMol::X::Calculator - Abstract calculator class for HackaMol
=head1 VERSION
version 0.012
=head1 SYNOPSIS
use Modern::Perl;
use HackaMol;
use HackaMol::X::Calculator;
use Path::Tiny;
my $path = shift || die "pass path to gaussian outputs";
my $hack = HackaMol->new( data => $path, );
foreach my $out ( $hack->data->children(qr/\.out$/) ) {