colvarproxy_namd.C File Reference

#include <errno.h>
#include "common.h"
#include "fstream_namd.h"
#include "BackEnd.h"
#include "InfoStream.h"
#include "Node.h"
#include "Molecule.h"
#include "PDB.h"
#include "PDBData.h"
#include "ReductionMgr.h"
#include "ScriptTcl.h"
#include <tcl.h>
#include "converse.h"
#include "DataExchanger.h"
#include "colvarmodule.h"
#include "colvaratoms.h"
#include "colvarproxy.h"
#include "colvarproxy_namd.h"
#include "colvarscript.h"

Go to the source code of this file.

Enumerations

enum  e_pdb_field {
  e_pdb_none, e_pdb_occ, e_pdb_beta, e_pdb_x,
  e_pdb_y, e_pdb_z, e_pdb_ntot
}

Functions

e_pdb_field pdb_field_str2enum (std::string const &pdb_field_str)

Enumeration Type Documentation

Enumerator:
e_pdb_none 
e_pdb_occ 
e_pdb_beta 
e_pdb_x 
e_pdb_y 
e_pdb_z 
e_pdb_ntot 

Definition at line 782 of file colvarproxy_namd.C.

00782                  {
00783   e_pdb_none,
00784   e_pdb_occ,
00785   e_pdb_beta,
00786   e_pdb_x,
00787   e_pdb_y,
00788   e_pdb_z,
00789   e_pdb_ntot
00790 };


Function Documentation

e_pdb_field pdb_field_str2enum ( std::string const &  pdb_field_str  ) 

Definition at line 793 of file colvarproxy_namd.C.

References e_pdb_beta, e_pdb_none, e_pdb_occ, e_pdb_x, e_pdb_y, and e_pdb_z.

Referenced by colvarproxy_namd::load_atoms(), and colvarproxy_namd::load_coords().

00794 {
00795   e_pdb_field pdb_field = e_pdb_none;
00796 
00797   if (colvarparse::to_lower_cppstr(pdb_field_str) ==
00798       colvarparse::to_lower_cppstr("O")) {
00799     pdb_field = e_pdb_occ;
00800   }
00801 
00802   if (colvarparse::to_lower_cppstr(pdb_field_str) ==
00803       colvarparse::to_lower_cppstr("B")) {
00804     pdb_field = e_pdb_beta;
00805   }
00806 
00807   if (colvarparse::to_lower_cppstr(pdb_field_str) ==
00808       colvarparse::to_lower_cppstr("X")) {
00809     pdb_field = e_pdb_x;
00810   }
00811 
00812   if (colvarparse::to_lower_cppstr(pdb_field_str) ==
00813       colvarparse::to_lower_cppstr("Y")) {
00814     pdb_field = e_pdb_y;
00815   }
00816 
00817   if (colvarparse::to_lower_cppstr(pdb_field_str) ==
00818       colvarparse::to_lower_cppstr("Z")) {
00819     pdb_field = e_pdb_z;
00820   }
00821 
00822   if (pdb_field == e_pdb_none) {
00823     cvm::error("Error: unsupported PDB field, \""+
00824                pdb_field_str+"\".\n", INPUT_ERROR);
00825   }
00826 
00827   return pdb_field;
00828 }


Generated on 3 Jun 2020 for NAMD by  doxygen 1.6.1