Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View wesbarnett's full-sized avatar

Wes Barnett, PhD wesbarnett

View GitHub Profile
program main
implicit none
integer, parameter :: max_greeting_length=30
character(len=max_greeting_length), allocatable :: greeting[:]
integer :: IMAGE
allocate(greeting[*])
write(greeting,"(2(a,i2))") "Hello from image ", this_image()," of ",num_images()
sync all
! Created by Tobias Burnus 2010.
! https://gcc.gnu.org/wiki/CoarrayExample
program Hello_World
implicit none
integer :: i ! Local variable
character(len=20) :: name[*] ! scalar coarray
! Note: "name" is the local variable while "name[<index>]"
! accesses the variable on a remote image
[ bondedtypes ]
; bonds angles dihedrals impropers all_dihedrals nrexcl HH14 RemoveDih
1 1 3 1 1 3 1 0
[ NPA ]
[ atoms ]
C1 CH3_C 0.000 1
C C_C 0.000 1
C2 CH3_C 0.000 1
C3 CH3_C 0.000 1
@wesbarnett
wesbarnett / neopentane.pdb
Created April 15, 2015 13:19
Neopentane PDB File
COMPND NEOPENTANE
AUTHOR JAMES W. BARNETT
REMARK FOR USE WITH TRAPPEUA
HETATM 1 C1 NPA 1 0.487 -0.369 -1.673 1.00 0.00 C
HETATM 2 C NPA 1 -0.333 -0.352 -0.375 1.00 0.00 C
HETATM 3 C2 NPA 1 -1.783 -0.752 -0.681 1.00 0.00 C
HETATM 4 C3 NPA 1 0.272 -1.347 0.625 1.00 0.00 C
HETATM 5 C4 NPA 1 -0.307 1.059 0.228 1.00 0.00 C
END
@wesbarnett
wesbarnett / neopentane.rtp
Created April 15, 2015 13:21
Neopentane RTP File
[ bondedtypes ]
; bonds angles dihedrals impropers all_dihedrals nrexcl HH14 RemoveDih
1 1 3 1 1 3 1 0
[ NPA ]
[ atoms ]
C1 CH3_C 0.000 1
C C_C 0.000 1
C2 CH3_C 0.000 1
C3 CH3_C 0.000 1
@wesbarnett
wesbarnett / neopentane.top
Created April 15, 2015 13:51
Neopentane TraPPE-UA topology
; Include forcefield parameters
#include "trappeua.ff/forcefield.itp"
[ moleculetype ]
; Name nrexcl
Neopentane 3
[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB chargeB massB
; residue 1 NPA rtp NPA q 0.0

Server setup

AWS

  1. Visit https://aws.amazon.com and sign up for an account.
  2. Install and configure the aws-cli program according to here.

Then do:

@wesbarnett
wesbarnett / notes.md
Created January 22, 2024 13:42
Serverless Notes

Getting into the Serverless Mindset

Example of scaling EC2 instance used for serving http requests. Most applications don't have a perfectly constant load. Must provision for peak load, paying for it when idle. Solution would be to add EC2 Auto Scaling Group.

Must also make it highly available by spreading across availability zones.

Things I have to manage - application and code, infrastructure. Infrastructure best practices are often the same across customers.

Requests -> Business Logic -> Backend