Skip to content

Commit

Permalink
Passes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatsonlilly committed Dec 14, 2017
1 parent 164c84f commit 21203c2
Show file tree
Hide file tree
Showing 201 changed files with 92,705 additions and 94,059 deletions.
681 changes: 10 additions & 671 deletions LICENSE

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions Lilly_Medchem_Rules.rb
@@ -1,24 +1,5 @@
#!/usr/bin/env ruby

#**************************************************************************

# Copyright (C) 2012 Eli Lilly and Company

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

#*************************************************************************/

# Run the rejection/demerit rules

ianhome=File.dirname($0) # location for supporting files
Expand Down
54 changes: 33 additions & 21 deletions Molecule/ISIS_Atom_List.cc
@@ -1,21 +1,3 @@
/**************************************************************************
Copyright (C) 2011 Eli Lilly and Company
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************/
#include <stdlib.h>
#include <iomanip>
using namespace std;
Expand Down Expand Up @@ -125,7 +107,7 @@ ISIS_Atom_List::create_from_ALS_record (const IWString & buffer)
return 0;
}

const Element * e = get_element_from_symbol_no_case_conversion (token);
const Element * e = get_element_from_symbol_no_case_conversion(token);

if (NULL == e) // should not happen
{
Expand Down Expand Up @@ -206,6 +188,27 @@ ISIS_Atom_List::initialise_from_mdl_A_symbol ()
return 1;
}

/*
Marvin adds AH, which is any atom, including Hydrogen
*/

int
ISIS_Atom_List::initialise_from_mdl_AH_symbol ()
{
_normal_list = 1;

initialise_from_mdl_Q_symbol();

_element.add(get_element_from_atomic_number(6)); // C
_element.add(get_element_from_atomic_number(1)); // H

return 1;
}

/*
Really don't like this, I should do something better with the Q symbol. Fix sometime...
*/

int
ISIS_Atom_List::initialise_from_mdl_Q_symbol ()
{
Expand All @@ -225,6 +228,16 @@ ISIS_Atom_List::initialise_from_mdl_Q_symbol ()
return 1;
}

int
ISIS_Atom_List::initialise_from_mdl_QH_symbol ()
{
initialise_from_mdl_Q_symbol();

_element.add(get_element_from_atomic_number(1));

return 1;
}

int
ISIS_Atom_List::convert_not_atom_lists_to_organic_lists ()
{
Expand Down Expand Up @@ -308,8 +321,7 @@ ISIS_Atom_List::initialise_atom_list_from_symbol (const const_IWSubstring & s)
const_IWSubstring token;
while (mys.nextword(token, i, ','))
{
int notused;
const Element * e = get_element_from_symbol(token, notused);
const Element * e = get_element_from_symbol_no_case_conversion(token);
if (NULL == e)
{
cerr << "ISIS_Atom_List::initialise_atom_list_from_symbol:unrecognised element '" << token << "'\n";
Expand Down
8 changes: 4 additions & 4 deletions Molecule/Makefile
Expand Up @@ -11,12 +11,12 @@ LD = g++
CXXFLAGS = -O2 -I . -I ../include -ffast-math -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

# Some versions of gcc need the -std= directive, remove if it causes problems
CXXFLAGS = -O2 -I . -I ../include -ffast-math -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CXXFLAGS = -O2 -I . -I ../include -ffast-math -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DIW_IMPLEMENTATIONS_EXPOSED

# Auto check gcc version from Raj Guha
GCCVERSIONGTEQ4 := $(shell expr `gcc -dumpversion | cut -f1,2 -d.` \>= 4.3)
ifeq "$(GCCVERSIONGTEQ4)" "1"
CXXFLAGS += -std=gnu++0x
CXXFLAGS += -std=c++11
endif


Expand All @@ -26,11 +26,11 @@ CP = cp
COMMON_OBJECTS = molecule.o moleculeb.o moleculeh.o element.o atom.o bond.o bond_list.o output.o ostream_and_type.o rmele.o etrans.o aromatic.o rwmolecule.o \
smi.o mdl.o mdl_v30.o parse_smarts_tmp.o mdl_file_data.o mdl_molecule.o mdl_atom_record.o isis_link_atom.o ISIS_Atom_List.o atom_alias.o molecule_smarts.o\
smiles.o smiles_support.o \
moleculer.o pearlman.o moleculed.o path.o frag.o unique.o chiral_centre.o charge_assigner.o target.o careful_frag.o \
moleculer.o pearlman.o moleculed.o path.o frag.o unique.o chiral_centre.o charge_assigner.o donor_acceptor.o target.o careful_frag.o \
iwrnm.o iwrcb.o set_of_atoms.o symm_class_can_rank.o ring_bond_iterator.o cis_trans_bond.o ematch.o coordinates.o dihedral.o\
iwsubstructure.o csubstructure.o substructure_a.o substructure_env.o ss_atom_env.o ss_bonds.o ss_ring.o ss_ring_base.o ss_ring_sys.o iwqry_wstats.o substructure_results.o substructure_spec.o substructure_chiral.o\
rwsubstructure.o substructure_nmab.o molecule_to_query.o is_actually_chiral.o tokenise_atomic_smarts.o temp_detach_atoms.o path_scoring.o \
element_hits_needed.o misc2.o standardise.o toggle_kekule_form.o
element_hits_needed.o numass.o misc2.o standardise.o toggle_kekule_form.o

MC_FIRST_PASS_OBJECTS = mc_first_pass.o $(COMMON_OBJECTS)

Expand Down

0 comments on commit 21203c2

Please sign in to comment.