00001 #ifndef VSEPRH 00002 #define VSEPRH 00003 /******************************************************************************* 00004 Copyright 2003 Petr Kulhanek 00005 00006 This file is part of Core plugin. 00007 00008 Core plugin is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 2 of the License, or 00011 (at your option) any later version. 00012 00013 Core plugin is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with Core plugin; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 *******************************************************************************/ 00022 /******************************************************************************* 00023 ** PROJECT: Project NEMESIS 00024 ** FILE: VSEPR 00025 ** FUNCTION: 00026 ** VERSION: 1.0 00027 ** LANGUAGE: CBuilder C++ 00028 ** TARGET COMPUTER: IBM PC 00029 ** PROGRAMMER: Petr Kulhánek 00030 ** HISTORY: 00031 VERSION DATE NOTE 00032 1.0 2003-01-22 00033 *******************************************************************************/ 00034 00038 // ----------------------------------------------------------------------------- 00039 00040 #include "CoreMainHeader.h" 00041 #include "Point.h" 00042 00043 // ----------------------------------------------------------------------------- 00044 00045 class CAtom; 00046 00047 // ----------------------------------------------------------------------------- 00048 00050 00051 enum EVSEPRType{ 00052 EVSEPR_UNKNOWN=-1, 00053 EVSEPR_A=0, 00054 EVSEPR_AB, 00055 EVSEPR_AB2E2, 00056 EVSEPR_AB2E3, 00057 EVSEPR_AB3E, 00058 EVSEPR_AB3E2, 00059 EVSEPR_AB4E, 00060 EVSEPR_AB4E2, 00061 EVSEPR_AB5, 00062 EVSEPR_AB6, 00063 }; 00064 00065 // ----------------------------------------------------------------------------- 00066 00068 00071 class NEMESIS_CORE_PACKAGE CVSEPR{ 00072 public: 00073 __fastcall CVSEPR(void); 00074 00075 EVSEPRType __fastcall DetermineType(CAtom* p_atom); 00076 CAtom* __fastcall AddAtom(CAtom* p_atom,EVSEPRType newtype,int z,double length,bool force); 00077 00078 private: 00079 double AngleTolerance; 00080 00081 bool __fastcall DetermineDirectionAB2E2(CPoint& dir,CAtom* p_atom); 00082 bool __fastcall DetermineDirectionAB2E3(CPoint& dir,CAtom* p_atom); 00083 00084 EVSEPRType __fastcall DetermineAB2Type(CAtom* p_atom); 00085 EVSEPRType __fastcall DetermineAB3Type(CAtom* p_atom); 00086 bool __fastcall DetermineDirection(CPoint& dir,CAtom* p_atom,EVSEPRType newtype,int subtype,bool force); 00087 bool __fastcall LastChanceDirection(CPoint& dir,CAtom* p_atom); 00088 }; 00089 00090 // ----------------------------------------------------------------------------- 00091 00092 #endif