Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/QChASM/AaronTools
Browse files Browse the repository at this point in the history
  • Loading branch information
vingman committed Aug 27, 2018
2 parents 329fb82 + 71e2fd1 commit a5a0c74
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 45 deletions.
23 changes: 13 additions & 10 deletions Catalysis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ sub new {
die "Cannot assign substituents to key atoms";
}
}

$self->ligand()->set_substituents($substituents->{ligand});
$self->ligand()->detect_backbone_subs( no_new_subs => $params{no_new_subs} );
#substrate subs
Expand Down Expand Up @@ -1498,18 +1497,18 @@ sub _detect_substituent {
my $self = shift;
my %params = @_;

my ($start, $end) = ($params{target}, $params{end});
my ($start, $end, $no_new_sub) = ($params{target}, $params{end}, $params{no_new_sub});

my $is_sub = $self->__detect_substituent($start, $end);

if ($is_sub) {
if ($is_sub && (! $no_new_sub)) {
my $to_sub = $self->{substituents}->{$start}->{sub};
$self->{substituents}->{$start} = $self->detect_substituent( target => $start,
end => $end );
$self->{substituents}->{$start}->{sub} = $to_sub;
}

return $is_sub;
return $is_sub && (! $no_new_sub);
}


Expand Down Expand Up @@ -1782,15 +1781,19 @@ sub detect_backbone_subs {
#backbone, if not make a new backbone
my $is_sub = 1;
if ($no_new_subs) {
unless (grep { $_ == $atom_connected}
keys %{ $self->{substituents} }) {
$is_sub = 0;
if (grep { $_ == $atom_connected}
keys %{ $self->{substituents} }) {
my $new_back_atoms = $self->_get_all_connected( $atom_connected,
$atom );
for my $atom_temp (@$new_back_atoms) {
$backbone{$atom_temp} = 1;
}
}
}

unless ($is_sub &&
$self->_detect_substituent(target => $atom_connected,
end => $atom)) {
unless($self->_detect_substituent(target => $atom_connected,
end => $atom,
no_new_sub => $no_new_subs)) {
my $new_back_atoms = $self->_get_all_connected( $atom_connected,
$atom );
for my $atom_temp (@$new_back_atoms) {
Expand Down
4 changes: 3 additions & 1 deletion FileReader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ sub grab_coords {
$constraints = [@constraints];
}
if ($_ =~ /\s+L:(\S+)/ || ($_ =~ /^L:(\S+)/)) { #Ligand atoms (L:14-26)
my @temp = map { $_ - 1 } split(/-/, $1);
my $temp = $1;
$temp =~ s/;$//g; #strip off trailing semicolon
my @temp = map { $_ - 1 } split(/-/, $temp);
$ligand = [$temp[0]..$temp[1]];
}
if ($_ =~ /\s+C:(\S+)/ || ($_ =~ /^C:(\S+)/)) { #Reaction Center (C:13)
Expand Down
34 changes: 31 additions & 3 deletions JobControl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ my $queue_type = $ENV{'QUEUE_TYPE'};

#Returns jobIDs of all jobs (queued or running) in current directory, returns 0 if no jobs in queue match current directory
#This could be improved by searching for $Path more carefully!
#Works for PBS (default) or LSF
#Works for PBS, LSF, Slurm and soon SGE
sub findJob {
my $Path = $_[0];
chomp($Path);
Expand Down Expand Up @@ -62,8 +62,29 @@ sub findJob {
push(@jobIDs,$array[0]);
}
}
}elsif ($queue_type =~ /SGE/i) {
my $qstat1 = `qstat -s pr -u $ENV{USER}`; #get qstat output for this user's jobs that are running/pending
my @jobs = ($qstat1 =~ m/^\s*?(\w+)/gm); #get the first column of qstat data, which contains job IDs
shift(@jobs); #the first line's first column is the header 'job-ID', so remove that
my $jlist = join(',', @jobs); #join these on commas so we can ask qstat for more info about them

my $qstat2 = `qstat -j $jlist`; #call qstat again, but this time get more info
my @lines = split(/\n/, $qstat2); #split each line into an array
my $job;

foreach my $i (0..$#lines) {
#it looks like job_number is always before the corresponding sge_o_workdir
if( $lines[$i] =~ m/job_number:\s+(\d+)/ ) {
$job = $1;
}
if( $lines[$i] =~ m/sge_o_workdir:\s+[\S]+$Path$/ ) {
#this will return all your jobs if you run it in your home directory because $Path is ''
push(@jobIDs, $job);
}
}
}


if(@jobIDs) {
return @jobIDs;
}
Expand All @@ -81,13 +102,15 @@ sub killJob {
$rv = system("qdel $job");
}elsif ($queue_type =~ /Slurm/i) {
$rv = system("scancel $job");
}elsif ($queue_type =~ /SGE/i) {
$rv = system("qdel $job >&/dev/null");
}
sleep(3);
return $rv;
}


#Works for LSF or PBS (default)
#Works for LSF, PBS, Slurm, and soon SGE
sub submit_job {
my %params = @_;

Expand Down Expand Up @@ -131,7 +154,7 @@ sub submit_job {


if ($job_found) {
print "Submitting $jobfile\n";
print " Submitting $jobfile\n";
open JOB, ">$jobfile" or die "cannot open $jobfile\n";
print JOB $job_content;
close (JOB);
Expand Down Expand Up @@ -164,6 +187,11 @@ sub submit_job {
print {*STDERR} "Submission denied for $jobname.job!\n";
$failed = 1;
}
} elsif($queue_type =~ /SGE/i) {
if(system("qsub $jobname.job >& /dev/null")) {
print {*STDERR} "Submission denied for $jobname.job!\n";
$failed = 1;
}
}
chdir($current);
}
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Ligands/BiOX.xyz
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
18
K:4,13;
C 0.903816 0.000000 2.400507
C 0.803816 0.000000 2.400507
C 3.177037 0.000000 2.550514
C 2.813944 0.000000 1.201250
N 1.427688 0.000000 1.117375
Expand All @@ -9,7 +9,7 @@ H 3.145268 -1.094449 0.829914
O 1.966020 0.000000 3.310760
H 3.690859 0.903215 2.876592
H 3.145268 1.094449 0.829914
C -0.903816 0.000000 2.400507
C -0.803816 0.000000 2.400507
C -3.177037 0.000000 2.550514
C -2.813944 0.000000 1.201250
N -1.427688 0.000000 1.117375
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions Ligands/NBD.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
15
K:1,2,4,5;
C -2.017031 0.652187 0.969063
C -1.187639 1.765595 0.962747
C -0.534768 1.816707 2.350987
C 0.377576 0.577591 2.331227
C -0.443981 -0.508189 2.326854
C -1.871666 0.016743 2.355847
C -1.688229 1.272435 3.222059
H -2.718211 0.549963 0.452381
H -1.256460 2.511551 0.437803
H -0.067174 2.649691 2.608195
H 1.322156 0.577591 2.442986
H -0.177899 -1.287299 2.483478
H -2.536449 -0.568971 2.580660
H -2.472071 1.889921 3.265791
H -1.385371 1.074895 4.117751
22 changes: 22 additions & 0 deletions Ligands/PIN.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
20
K:1,2;
O -0.938496 -1.630847 -1.237852
O -0.343964 -1.270457 1.194208
C -0.888849 -2.911605 -0.519289
C -1.066552 -2.525945 0.986751
C 0.473245 -3.524219 -0.794942
C -1.983239 -3.820064 -1.059109
C -2.522108 -2.247645 1.367209
C -0.465507 -3.547397 1.942921
H 1.159504 -2.946212 -0.453247
H 0.589201 -3.633511 -1.741062
H 0.532094 -4.380365 -0.364234
H -2.841178 -3.429092 -0.879647
H -1.926896 -4.678141 -0.631273
H -1.871681 -3.928068 -2.006665
H -2.893570 -1.602196 0.762783
H -2.558005 -1.904801 2.263080
H -3.027629 -3.062103 1.316960
H 0.448012 -3.715601 1.698853
H -0.965367 -4.365879 1.892672
H -0.500145 -3.205357 2.838792
26 changes: 26 additions & 0 deletions Ligands/TACN.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
24
K:1,2,3;
N -0.015037 -1.670895 -1.412810
N 2.122668 -0.539531 0.013103
N -0.025937 -1.673282 1.400163
C -0.284515 -2.973081 -0.707463
C 1.313815 -1.624471 -2.097232
H -0.727996 -1.558385 -2.133943
C 2.403365 -1.057745 1.386082
C 2.447945 -1.528502 -1.073579
H 2.722586 0.274346 -0.125536
C -0.814426 -2.741326 0.711276
C 1.364163 -2.108591 1.783966
H -0.526241 -1.440291 2.258390
H -1.004441 -3.576882 -1.272020
H 0.642132 -3.554649 -0.679927
H 1.471423 -2.499587 -2.744532
H 1.308831 -0.741159 -2.746945
H 2.360046 -0.200283 2.068158
H 3.412823 -1.486980 1.469540
H 3.378058 -1.253693 -1.584876
H 2.634086 -2.505288 -0.615961
H -1.857292 -2.403154 0.679994
H -0.799037 -3.687308 1.271378
H 1.424596 -2.296645 2.862203
H 1.580031 -3.065375 1.298228
36 changes: 36 additions & 0 deletions Ligands/TACN_star.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
33
K:1,2,3;
N -0.015037 -1.670895 -1.412810
N 2.122668 -0.539531 0.013103
N -0.025937 -1.673282 1.400163
C -0.284515 -2.973081 -0.707463
C 1.313815 -1.624471 -2.097232
C -1.077179 -1.503282 -2.487129
H -0.904012 -2.188220 -3.324952
H -2.076554 -1.718321 -2.084571
H -1.090333 -0.477951 -2.873909
C 2.403365 -1.057745 1.386082
C 2.447945 -1.528502 -1.073579
C 3.016183 0.672654 -0.193385
H 4.029394 0.485512 0.180055
H 3.097014 0.920431 -1.260680
H 2.613764 1.552939 0.320651
C -0.814426 -2.741326 0.711276
C 1.364163 -2.108591 1.783966
C -0.771222 -1.326204 2.678633
H -1.177244 -2.225098 3.156346
H -0.101013 -0.840945 3.401398
H -1.598235 -0.635262 2.479322
H -1.004441 -3.576882 -1.272020
H 0.642132 -3.554649 -0.679927
H 1.471423 -2.499587 -2.744532
H 1.308831 -0.741159 -2.746945
H 2.360046 -0.200283 2.068158
H 3.412823 -1.486980 1.469540
H 3.378058 -1.253693 -1.584876
H 2.634086 -2.505288 -0.615961
H -1.857292 -2.403154 0.679994
H -0.799037 -3.687308 1.271378
H 1.424596 -2.296645 2.862203
H 1.580031 -3.065375 1.298228

29 changes: 29 additions & 0 deletions Ligands/Tp.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
26
K:21,23,25;
B -3.183132 -0.062567 0.145157
H -4.307004 -0.144333 0.187246
C -3.455934 1.909433 -1.578502
C -2.603811 2.848024 -2.127646
C -1.340141 2.520958 -1.627219
H -4.531663 1.801551 -1.717316
H -2.855081 3.672290 -2.795141
H -0.386257 3.008403 -1.828718
C -3.248410 0.471724 2.722359
C -2.296935 0.506171 3.721557
C -1.084321 0.209383 3.093205
H -4.323821 0.636263 2.789572
H -2.419183 0.737123 4.779771
H -0.103762 0.116739 3.560132
C -3.248796 -2.612370 -0.478887
C -2.368799 -3.499833 -1.074760
C -1.200587 -2.758316 -1.290176
H -4.244503 -2.791037 -0.072999
H -2.539641 -4.547665 -1.321662
H -0.266440 -3.090168 -1.743324
N -1.409282 1.457271 -0.820238
N -2.732182 1.082887 -0.787594
N -1.274941 0.018656 1.781489
N -2.620850 0.176387 1.558450
N -1.353326 -1.500457 -0.853876
N -2.636194 -1.411801 -0.380624

50 changes: 26 additions & 24 deletions Ligands/achiral_ligands
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
BPE 1,2-Bis(4-pyridyl)ethane
DMPE 1,2-Bis(dimethylphosphino)ethane
DPPE 1,2-Bis(diphenylphosphino)ethane
Cp_star pentamethylcyclopentadiene
Cp cyclopentadiene
DPPP 1,3-Bis(diphenylphosphino)propane
DPPF 1,1′-Ferrocenediyl-bis(diphenylphosphine)
DMP 2,9-dimethyl phenanthroline
BenQuin Benzo[h]quinoline
COD cyclooctadiene
bpy 2,2′-bipyridine
dmb 4,4′-dimethyl-2,2′-bipyridine
Xphos 2-Dicyclohexylphosphino-2′,4′,6′-triisopropylbiphenyl
PhBP3 PhBP3 (from DOI: 10.1021/ja026433e)
tBu-PCP tetra(t-butyl)-2,6-bis(diphosphino)benzene (from DOI: 10.1126/science.1200514)
tBu-PNP tetra(t-butyl)-2,6-bis(diphosphino)pyridine (from DOI: 10.1021/ic901032c)
iPr-NC3C 2,3-di(bisisopropylamino) cyclopropyl carbene (′8′ from DOI: 10.1021/ja202007s)
Mes-NC5C (N,N′)-bis(mesityl) imidazolidinyl carbene (′6a′ from DOI: 10.1021/ja202007s)
iPrPh-NC5C (N,N′)-bis(2,6-diisopropylphenyl) imidazolidinyl carbene (′6b′ from DOI: 10.1021/ja202007s)
IMes 1,3-Dimesitylimidazol-2-ylidene (′5b′ from DOI: 10.1021/ja202007s)
Ad-HC5C (N,N′)-bis(adamantyl) dihydroimidazolyl carbene (′5c′ from DOI: 10.1021/ja202007s)
iPrPh-BIP (N,N′)-bis(2,6-diisoproylphenyl)imino pyridine (from DOI: 10.1039/b107490c)
tBu-PNPPyr tetra(t-butyl)-2,6-bis(diphosphino)pyridine (from DOI: 10.1021/ic901032c)
iPr-PNPEt {bis[2-(diisopropylphosphinomethyl)ethyl]amino}ethyl]amine (from DOI: 10.1021/ja504034q)
DPEphos DPEphos (from DOI: 10.1021/om201034m)
Xantphos Xantphos (from DOI: 10.1021/om201034m)
ACN acetonitrile
EDA ethylene diamine
BenQuin Benzo[h]quinoline
Milstein Milstein catalyst (from DOI: 10.1021/acscatal.7b01791)
PHNNP amine(imine)diphosphine (from DOI: 10.1021/om500479q)
CO carbonmonoxide
iPr-PNP2 {bis[2-(diisopropylphosphinomethyl)ethyl]amino}ethyl]amine (from DOI: 10.1021/ja504034q)
AcAce acetyl acetone
Xphos 2-Dicyclohexylphosphino-2′,4′,6′-triisopropylbiphenyl
DPEphos DPEphos (from DOI: 10.1021/om201034m)
Xantphos Xantphos (from DOI: 10.1021/om201034m)
JoshPhos tBu-Joshphos (from DOI: 10.1021/ol5027798)
SL-J212-1 SL-J212-1 (from DOI: 10.1021/om500329q)
SL-J212-2 SL-J212-2 (from DOI: 10.1021/om500329q)
DMP 2,9-dimethyl phenanthroline
BPY 2,2′-bipyridine
DMBPY 4,4′-dimethyl-2,2′-bipyridine
iPrPh-BIP (N,N′)-bis(2,6-diisoproylphenyl)imino pyridine (from DOI: 10.1039/b107490c)
TACN 1,4,7-triazacyclononane
TACN_star (N,N′,N′′)-trimethyl-1,4,7-triazacyclononane
Tp tris(pyrazolyl)borate
PyrOx PyrOx
PymdOx PymdOx
CO carbonyl
BiOX Bioxazoline (Reisman)
BDA 2,2'-bipyridine-6,6'-dicarboxylate
KASBAI 2,6-dicyclohexyl-4-(2,4,6-trimethylphenyl)-3,5-diphenyl-2,4,6-triaza-3,5-diborinanylidene (from DOI: 10.1021/ja052987g)
ACN acetonitrile
iPr-NC3C 2,3-di(bisisopropylamino) cyclopropyl carbene (′8′ from DOI: 10.1021/ja202007s)
Mes-NC5C (N,N′)-bis(mesityl) imidazolidinyl carbene (′6a′ from DOI: 10.1021/ja202007s)
iPrPh-NC5C (N,N′)-bis(2,6-diisopropylphenyl) imidazolidinyl carbene (′6b′ from DOI: 10.1021/ja202007s)
IMes 1,3-Dimesitylimidazol-2-ylidene (′5b′ from DOI: 10.1021/ja202007s)
Ad-HC5C (N,N′)-bis(adamantyl) dihydroimidazolyl carbene (′5c′ from DOI: 10.1021/ja202007s)
Cp_star pentamethylcyclopentadiene
Cp cyclopentadiene
COD cyclooctadiene
NBD 2,5-Norbornadiene
PIN pinacolate
AcAc acetyl acetone
7 changes: 5 additions & 2 deletions Ligands/chiral_ligands
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ RR-Me-iPrPh-NC5C (R,R)-(N,N')-bis(2,6-diisopropylphenyl)-dimethyl imidazolidinyl
SS-Me-iPrPh-NC5C (S,S)-(N,N')-bis(2,6-diisopropylphenyl)-dimethyl imidazolidinyl carbene ('7b' from DOI: 10.1021/ja202007s)
RR-Me-TBF (R,R)-Me-tbf ('2b' from DOI: 10.1021/om9003797)
SS-Me-TBF (S,S)-Me-tbf ('2b' from DOI: 10.1021/om9003797)
JoshPhos tBu-Joshphos (from DOI: 10.1021/ol5027798)
SL-J212-1 SL-J212-1 (from DOI: 10.1021/om500329q)
SL-J212-2 SL-J212-2 (from DOI: 10.1021/om500329q)
RR-norphos (2R,3R)-(−)-2,3-Bis(diphenylphosphino)bicyclo[2.2.1]hept-5-ene ((-)-Norphos)
SS-norphos (2S,3S)-(−)-2,3-Bis(diphenylphosphino)bicyclo[2.2.1]hept-5-ene ((+)-Norphos)
RR-QuinoxP (R,R)-QuinoxP* (from DOI: 10.1038/s41467-018-04693-9)
Expand All @@ -40,5 +43,5 @@ R-pFPh-StackPhos (R)-p-FPh-StackPhos
S-pFPh-StackPhos (S)-p-FPh-StackPhos
R-Me-StackPhos (R)-Me-StackPhos
S-Me-StackPhos (S)-Me-StackPhos
R-Ph-Mes-NC5C (4R,5R)-(N,N′)-bis(Mesityl) imidazolidinyl carbene (from DOI: 10.1021/jo800613h)
S-Ph-Mes-NC5C (4S,5S)-(N,N′)-bis(Mesityl) imidazolidinyl carbene (from DOI: 10.1021/jo800613h)
R-Ph-Mes-NC5C (4R,5R)-(N,N′)-bis(Mesityl) imidazolidinyl carbene (from DOI: 10.1021/jo800613h)
S-Ph-Mes-NC5C (4S,5S)-(N,N′)-bis(Mesityl) imidazolidinyl carbene (from DOI: 10.1021/jo800613h)
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ AaronTools provides a collection of tools for automating routine tasks encounter

These tools can be used either directly within a Perl script using AaronTools objects, or via a series of command-line scripts.

Documentation (still in progress!) is <a href="https://github.com/QChASM/AaronTools/wiki">available here.</a>
Documentation on installing and using AaronTools is <a href="https://github.com/QChASM/AaronTools/wiki">available here.</a>

If you have any questions, feel free to contact us at [email protected]
Loading

0 comments on commit a5a0c74

Please sign in to comment.