Skip to content

Instantly share code, notes, and snippets.

View johnmay's full-sized avatar

John Mayfield johnmay

View GitHub Profile
@johnmay
johnmay / pom.xml
Created July 13, 2023 14:42
JavaEE/Jakarta Maven Cross-Compile
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<id>JavaEE to Jakarta</id>
<phase>generate-sources</phase>
<goals>
<goal>replace</goal>
import sys
import daylight
from daylight import Smiles, Smirks
def output(smiin, smirks, smiout, comment):
print ("%s\t%s\t%s\t%s" % (smiin, smirks, smiout, comment))
def main(fname):
file = open(fname, 'r')
c12cccc1C=CC=C2.*[Zr](*)(Cl)Cl.c12cccc1C=CC=C2 |m:9:0.1.2.3.4,11:14.15.16.17.18| h5-
c12cccc1C=CC=C2.*[Zr](*)(Cl)Cl.c12cccc1C=CC=C2 |m:9:0.4.5.6.7.8,11:14.18.19.20.21.22| h6-
c12cccc1C=CC=C2.*[Zr](*)(Cl)Cl.c12cccc1C=CC=C2 |m:9:5.6.7.8,11:19.20.21.22| h4-
[Fe]
NextMove03242216572D
1 0 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 Fe 0 0 0 0 0 15
M END
$$$$
[FeH]
NextMove03242216572D
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
typedef struct array_list
{
char *arrayType;
size_t arraySize;
void *address;
bridged
CDK 0322221734
8 9 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
@johnmay
johnmay / gist:5f8270b14dcc330f1933541709896a6d
Created March 22, 2022 13:39
7 valent carbon SMILES to InChI
Testing a 7 valent carbon
SMILES_IN = C(C)(C)(C)(C)(C)(C)C
INCHI_OUT = InChI=1S/C8H21/c1-8(2,3,4,5,6)7/h1-7H3
*** Open Babel Warning in InChI code
#1 :Accepted unusual valence(s): C(7)
CDK yes
ChemDraw yes
OpenBabel yes
[john@***** scratch]$ more tmp.txt
* Input_File: "tmp.inchi"
Structure: 1. (No struct name)
InChI=1S/C5H5N/c1-2-4-6-5-3-1/h1-5H
AuxInfo=1/0/N:1,2,3,4,5,6/E:(2,3)(4,5)/rA:6CCCCCN/rB:d1;s1;s2;d3;d4s5;/rC:;;;;;;
[john@talkie scratch]$ INCHI-1-BIN/linux/64bit/inchi-1 tmp.txt -OutputSDF output.sdf
InChI version 1, Software v. 1.06 (inchi-1 executable)
Linux 64-bit Build (gcc 4.8.5 20150623 (Red Hat 4.8.5-39)) of Dec 19 2020 21:02:16
Opened log file 'tmp.txt.log'
[john@***** scratch]$ INCHI-1-BIN/linux/64bit/inchi-1 -inchi2struct tmp.inchi -OutputSDF output.sdf
InChI version 1, Software v. 1.06 (inchi-1 executable)
Linux 64-bit Build (gcc 4.8.5 20150623 (Red Hat 4.8.5-39)) of Dec 19 2020 21:02:16
Opened log file 'tmp.inchi.log'
Opened input file 'tmp.inchi'
Opened output file 'output.sdf'
Opened problem file 'tmp.inchi.prb'
The command line used:
"INCHI-1-BIN/linux/64bit/inchi-1 -inchi2struct tmp.inchi -OutputSDF output.sdf"
@johnmay
johnmay / Human_Body.cdxml
Created April 16, 2021 20:30
Human_Body.cdxml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE CDXML SYSTEM "http://www.cambridgesoft.com/xml/cdxml.dtd" >
<CDXML
CreationProgram="ChemDraw 14.0.0.118"
Name="Human_Body.cdx"
BoundingBox="5.57 2.92 538.65 658.35"
WindowPosition="0 0"
WindowSize="0 0"
FractionalWidths="yes"
InterpretChemically="yes"