Molecule.C File Reference

#include "largefiles.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "InfoStream.h"
#include "Molecule.h"
#include "strlib.h"
#include "MStream.h"
#include "Communicate.h"
#include "Node.h"
#include "ObjectArena.h"
#include "Parameters.h"
#include "PDB.h"
#include "SimParameters.h"
#include "Hydrogen.h"
#include "UniqueSetIter.h"
#include "charm++.h"
#include "ComputeGridForce.h"
#include "GridForceGrid.h"
#include "MGridforceParams.h"
#include "Debug.h"
#include "CompressPsf.h"
#include "ParallelIOMgr.h"
#include <deque>
#include <algorithm>

Go to the source code of this file.

Defines

#define MIN_DEBUG_LEVEL   3
#define GROMACS_PAIR   1
#define GROMACS_EXCLUSIONS   1

Functions

int getLCPOTypeAmber (char atomType[11], int numBonds)
int getLCPOTypeCharmm (char atomType[11], int numBonds)

Define Documentation

#define GROMACS_EXCLUSIONS   1

Definition at line 64 of file Molecule.C.

#define GROMACS_PAIR   1

Definition at line 60 of file Molecule.C.

#define MIN_DEBUG_LEVEL   3

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 46 of file Molecule.C.


Function Documentation

int getLCPOTypeAmber ( char  atomType[11],
int  numBonds 
) [inline]

Definition at line 2585 of file Molecule.C.

02585                                                              {
02586 
02587   //Hydrogen
02588   if (atomType[0] == 'H' || atomType[0] == 'h') {
02589     return 0;
02590 
02591   //Carbon
02592   } else if (atomType[0] == 'C' || atomType[0] == 'c') {
02593     if (//Sp3 Carbon
02594       //atomType[1] == 'T')// ||
02595       strcmp(atomType, "CT" )==0 )
02596       //strcmp(atomType, "CP1" )==0 ||
02597       //strcmp(atomType, "CP2" )==0 ||
02598       //strcmp(atomType, "CP3" )==0 ||
02599       //strcmp(atomType, "CS"  )==0 )
02600       {
02601       if (numBonds == 1)
02602         return 1;
02603       else if (numBonds == 2)
02604         return 2;
02605       else if (numBonds == 3)
02606         return 3;
02607       else if (numBonds == 4)
02608         return 4;
02609       else
02610         return 1;
02611 
02612     } else {//Sp2 or other
02613       if (numBonds == 2)
02614         return 5;
02615       else if (numBonds == 3)
02616         return 6;
02617       else
02618         return 1;
02619     }
02620 
02621   //Nitrogen
02622   } else if (atomType[0] == 'N' || atomType[0] == 'n') {
02623     if ( strcmp(atomType, "N3"  ) == 0 ) { //Sp3 Nitrogen
02624       if (numBonds == 1)
02625         return 11;
02626       else if (numBonds == 2)
02627         return 12;
02628       else if (numBonds == 3)
02629         return 13;
02630       else
02631         return 11;
02632 
02633     } else {//SP2 Nitrogen
02634       if (numBonds == 1)
02635         return 14;
02636       else if (numBonds == 2)
02637         return 15;
02638       else if (numBonds == 3)
02639         return 16;
02640       else
02641         return 11;
02642     }
02643 
02644   //Oxygen
02645   } else if (atomType[0] == 'O' || atomType[0] == 'o') {
02646 
02647     if ( strcmp(atomType, "O" )==0) {//Sp2 Oxygen
02648       return 9;
02649     } else if (strcmp(atomType, "O2" )==0) {//Carboxylate Oxygen
02650       return 10;
02651     } else { // Sp3 Oxygen
02652       if (numBonds == 1)
02653         return 7;
02654       else if (numBonds == 2)
02655         return 8;
02656       else
02657         return 7;
02658     }
02659 
02660   //Sulfur
02661   } else if (atomType[0] == 'S' || atomType[0] == 's') {
02662     if ( strcmp(atomType, "SH" )==0) { //Sulfur 1 neighbor
02663       return 17;
02664     } else {
02665       return 18;
02666     }
02667 
02668   //Phosphorus
02669   } else if (atomType[0] == 'P' || atomType[0] == 'p') {
02670       if (numBonds == 3)
02671         return 19;
02672       else if (numBonds == 4)
02673         return 20;
02674       else
02675         return 19;
02676   } else if (atomType[0] == 'Z') { // ? just to agree with Amber mdread.f
02677     return 0;
02678   } else  if ( strcmp(atomType, "MG" )==0) { //Mg
02679     return 22;
02680   } else { // unknown atom type
02681     return 5;
02682   }
02683   return 5;
02684 } // getLCPOTypeAmber

int getLCPOTypeCharmm ( char  atomType[11],
int  numBonds 
) [inline]

Definition at line 2686 of file Molecule.C.

02686                                                               {
02687 
02688   //Hydrogen
02689   if (atomType[0] == 'H') {
02690     return 0;
02691 
02692   //Carbon
02693   } else if (atomType[0] == 'C') {
02694     if (//Sp3 Carbon
02695       atomType[1] == 'T' ||
02696       strcmp(atomType, "CP1" )==0 ||
02697       strcmp(atomType, "CP2" )==0 ||
02698       strcmp(atomType, "CP3" )==0 ||
02699       strcmp(atomType, "CS"  )==0 ) {
02700       if (numBonds == 1)
02701         return 1;
02702       else if (numBonds == 2)
02703         return 2;
02704       else if (numBonds == 3)
02705         return 3;
02706       else if (numBonds == 4)
02707         return 4;
02708       else
02709         return 1;
02710 
02711     } else if (//Sp2
02712       strcmp(atomType, "C"   )==0 ||
02713       strcmp(atomType, "CA"  )==0 ||
02714       strcmp(atomType, "CC"  )==0 ||
02715       strcmp(atomType, "CD"  )==0 ||
02716       strcmp(atomType, "CN"  )==0 ||
02717       strcmp(atomType, "CY"  )==0 ||
02718       strcmp(atomType, "C3"  )==0 ||
02719       strcmp(atomType, "CE1" )==0 ||
02720       strcmp(atomType, "CE2" )==0 ||
02721       strcmp(atomType, "CST" )==0 ||
02722       strcmp(atomType, "CAP" )==0 ||
02723       strcmp(atomType, "COA" )==0 ||
02724       strcmp(atomType, "CPT" )==0 ||
02725       strcmp(atomType, "CPH1")==0 ||
02726       strcmp(atomType, "CPH2")==0
02727       ) {
02728       if (numBonds == 2)
02729         return 5;
02730       else if (numBonds == 3)
02731         return 6;
02732       else
02733         return 1;
02734     } else { // other Carbon
02735         return 1;
02736     }
02737 
02738   //Nitrogen
02739   } else if (atomType[0] == 'N') {
02740     if (//Sp3 Nitrogen
02741       //strcmp(atomType, "N"   )==0 ||
02742       //strcmp(atomType, "NH1" )==0 ||
02743       //strcmp(atomType, "NH2" )==0 ||
02744       strcmp(atomType, "NH3" )==0 ||
02745       //strcmp(atomType, "NC2" )==0 ||
02746       //strcmp(atomType, "NY"  )==0 ||
02747       strcmp(atomType, "NP"  )==0
02748       ) {
02749       if (numBonds == 1)
02750         return 11;
02751       else if (numBonds == 2)
02752         return 12;
02753       else if (numBonds == 3)
02754         return 13;
02755       else
02756         return 11;
02757 
02758     } else if (//SP2 Nitrogen
02759       strcmp(atomType, "NY"  )==0 || //
02760       strcmp(atomType, "NC2" )==0 || //
02761       strcmp(atomType, "N"   )==0 || //
02762       strcmp(atomType, "NH1" )==0 || //
02763       strcmp(atomType, "NH2" )==0 || //
02764       strcmp(atomType, "NR1" )==0 ||
02765       strcmp(atomType, "NR2" )==0 ||
02766       strcmp(atomType, "NR3" )==0 ||
02767       strcmp(atomType, "NPH" )==0 ||
02768       strcmp(atomType, "NC"  )==0
02769       ) {
02770       if (numBonds == 1)
02771         return 14;
02772       else if (numBonds == 2)
02773         return 15;
02774       else if (numBonds == 3)
02775         return 16;
02776       else
02777         return 11;
02778     } else { // other Nitrogen
02779       return 11;
02780     }
02781 
02782   //Oxygen
02783   } else if (atomType[0] == 'O') {
02784     if (//Sp3 Oxygen
02785       strcmp(atomType, "OH1" )==0 ||
02786       strcmp(atomType, "OS"  )==0 ||
02787       strcmp(atomType, "OC"  )==0 || //
02788       strcmp(atomType, "OT"  )==0
02789       ) {
02790       if (numBonds == 1)
02791         return 7;
02792       else if (numBonds == 2)
02793         return 8;
02794       else
02795         return 7;
02796     } else if ( // Sp2 Oxygen
02797       strcmp(atomType, "O"   )==0 ||
02798       strcmp(atomType, "OB"  )==0 ||
02799       strcmp(atomType, "OST" )==0 ||
02800       strcmp(atomType, "OCA" )==0 ||
02801       strcmp(atomType, "OM"  )==0
02802       ) {
02803       return 9;
02804     } else if ( // SP1 Oxygen
02805       strcmp(atomType, "OC"  )==0
02806       ) {
02807       return 10;
02808     } else { // other Oxygen
02809       return 7;
02810     }
02811 
02812   //Sulfur
02813   } else if (atomType[0] == 'S') {
02814       if (numBonds == 1)
02815         return 17;
02816       else
02817         return 18;
02818 
02819   //Phosphorus
02820   } else if (atomType[0] == 'P') {
02821       if (numBonds == 3)
02822         return 19;
02823       else if (numBonds == 4)
02824         return 20;
02825       else
02826         return 19;
02827   } else { // unknown atom type
02828     return 5;
02829   }
02830   return 5;
02831 } // getLCPOTypeCharmm


Generated on 29 May 2020 for NAMD by  doxygen 1.6.1