Skip to content

Instantly share code, notes, and snippets.

Noel O'Boyle baoilleach

Block or report user

Report or block baoilleach

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View _gvimrc
set encoding=utf-8 " The encoding displayed.
set fileencoding=utf-8 " The encoding written to file.
autocmd FileType python set omnifunc=pythoncomplete#Complete
" If you prefer the Omni-Completion tip window to close when a selection is
" made, these lines close it on movement in insert mode or when leaving
" insert mode
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
" When you hit Enter the chosen omnicompletion is inserted
@baoilleach
baoilleach / updatesnap.sh
Created Aug 20, 2019
Update Open Babel snap
View updatesnap.sh
# Source me
rm -rf baoilleach-repo
git clone https://github.com/baoilleach/openbabel.git baoilleach-repo
cd baoilleach-repo
# git remote add geoffh https://github.com/openbabel/openbabel.git
git checkout snaps
git merge master
git push origin snaps
@baoilleach
baoilleach / peekable.py
Created Jun 27, 2019
A peekable Python iterator
View peekable.py
class Peekable:
def __init__(self, it):
self.it = it
self.finished = False
self.curr = None
self.nextval = next(it)
def __iter__(self):
return self
def __next__(self):
if self.finished:
@baoilleach
baoilleach / gcc2018mainz.txt
Last active Nov 14, 2018
#gcc2018mainz tweets from German Conference on Chemoinformatics (Mainz 2018)
View gcc2018mainz.txt
AkiraAiren Had a great time at the #gcc2018mainz! Thank all of you with who I had great talks. Still excited that I was awarded one of the two poster prices ☺! See you next year!
--> marwinsegler @AkiraAiren Well deserved!
--> Joao_F_Borges @AkiraAiren Congrats, @AkiraAiren !
--> BZdrazil @AkiraAiren Congratulations, well deserved;)
baoilleach #gcc2018mainz tweets in toto
https://t.co/THVgi8DP4T
--> RSC_CICAG @baoilleach Oddly, our tweets seem to have fallen off the list.
--> baoilleach @RSC_CICAG Yeah, I saw that. Don't know what's going on there. Maybe their fake news detector was triggered by some of the speakers' claims. I'll rerun today....
RSC_CICAG Next conference is already planned for 2019 #gcc2018mainz #gcc2019mainz https://t.co/KwdOxjf7tl
@baoilleach
baoilleach / 7thRDKitUGM.txt
Created Sep 25, 2018
Twitter #RDKitUGM2018 plus replies
View 7thRDKitUGM.txt
CzodrowskiPaul Very comprehensive summary of the #RDKitUGM2018! Kudos to Pat! https://t.co/dhwZhjFu0u
dr_greg_landrum After a really good #RDkitUGM2018 it was great to get out into the mountains today and concentrate on moving instead of chemInformatics. ;-) https://t.co/QoDAp3g3Qp
CzodrowskiPaul @wpwalters @dr_greg_landrum @AndreasBenderUK And kudos to all of you who came over from North, South America and even Japan! #RDKitUGM2018
dr_greg_landrum @AndreasBenderUK Thanks for hosting Andreas. Cambridge was a great place to have the meeting and the social events were exemplary! #RDKitUGM2018
--> wpwalters @dr_greg_landrum @AndreasBenderUK Loads of fun and lots of great science. Thanks to the organizers and all who participated.
--> CzodrowskiPaul @wpwalters @dr_greg_landrum @AndreasBenderUK And kudos to all of you who came over from North, South America and even Japan! #RDKitUGM2018
@baoilleach
baoilleach / aromaticity.rst
Last active Jul 16, 2018
Description of aromaticity in Open Babel...to be added to the docs
View aromaticity.rst

Handling of aromaticity

The purpose of this section is to give an overview of how Open Babel handles aromaticity. Given that atoms can be aromatic, bonds can be aromatic, and that molecules have a flag for aromaticity perceived, it's important to understand how these all work together.

How is aromaticity information stored?

Like many other toolkits, Open Babel stores aromaticity information separate from bond order information. This means that there isn't a special bond order to indicate aromatic bond. Instead, aromaticity is stored as a flag on an atom as well as a flag on a bond. You can access and set this information using the following API functions:

@baoilleach
baoilleach / 11thICCS_Noordwijkerhout.txt
Last active Jun 7, 2018
My notes from the 11th International Conference on Chemical Structures 2018
View 11thICCS_Noordwijkerhout.txt
https://twitter.com/baoilleach/status/1000988779287629824
=========================================================
#11thICCS Hitesh Patel presents SAVI - Synthetically accessible virtual inventory
Q: What can I make easily, reliably, safely and cheaply? Make a db of 1 billion mols where you know that this is the case. 1-step rxns. Freely available db.
Building blocks (Sigma) + transforms (LHASA) + cheminformatics engine (Xemistry) = SAVI.
Use some of the transforms used in LHASA (written in CHMTRN/PATRAN) but additional ones also.
Related: Enamine REAL db; CHIPMUNK db (TU Dortmund), ChemPass, ChemAxon Reactor, Proximal Lilly, Pfizer GVL, BI CLAIM
"CHMTRN/PATRAN transforms are smarter than SMARTS" - uses scores - if this, then dec score by 10, if that, then inc score; if the other, then kill the reaction
I think this is from the Corey group. Not sure of the details.
Original run (2016) resulted in 283M unique products from 14 transforms.
@baoilleach
baoilleach / geneticalgo.py
Last active May 24, 2018
Very simple genetic algorithm that manipulates SMILES
View geneticalgo.py
import random
random.seed(1)
from collections import defaultdict
import pybel
ob = pybel.ob
ob.obErrorLog.StopLogging()
def CreateValencyTable(mol):
common_valencies = defaultdict(lambda:defaultdict(set))
@baoilleach
baoilleach / randomsmiles.py
Last active Apr 26, 2018
Create random smiles
View randomsmiles.py
import random
import pybel
def create_mutants(A, B):
# Let's randomly choose a cross-over point in both A and B
# and generate four possible combinations
c1 = random.randint(0, len(A))
c2 = random.randint(0, len(B))
startA, endA = A[:c1], A[c1:]
startB, endB = B[:c2], B[c2:]
View test.cif
data_Ca2Al2SiO7
_cell_length_a 7.716
_cell_length_b 7.716
_cell_length_c 5.089
_cell_angle_alpha 90
_cell_angle_beta 90
_cell_angle_gamma 90
_cell_volume 302.982
_symmetry_space_group_name_H-M 'P -4 21 m'
_symmetry_int_tables_number 113
You can’t perform that action at this time.