NAMD
Enumerations | Functions
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 800 of file colvarproxy_namd.C.

Function Documentation

e_pdb_field pdb_field_str2enum ( std::string const &  pdb_field_str)

Definition at line 811 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().

812 {
813  e_pdb_field pdb_field = e_pdb_none;
814 
815  if (colvarparse::to_lower_cppstr(pdb_field_str) ==
816  colvarparse::to_lower_cppstr("O")) {
817  pdb_field = e_pdb_occ;
818  }
819 
820  if (colvarparse::to_lower_cppstr(pdb_field_str) ==
821  colvarparse::to_lower_cppstr("B")) {
822  pdb_field = e_pdb_beta;
823  }
824 
825  if (colvarparse::to_lower_cppstr(pdb_field_str) ==
826  colvarparse::to_lower_cppstr("X")) {
827  pdb_field = e_pdb_x;
828  }
829 
830  if (colvarparse::to_lower_cppstr(pdb_field_str) ==
831  colvarparse::to_lower_cppstr("Y")) {
832  pdb_field = e_pdb_y;
833  }
834 
835  if (colvarparse::to_lower_cppstr(pdb_field_str) ==
836  colvarparse::to_lower_cppstr("Z")) {
837  pdb_field = e_pdb_z;
838  }
839 
840  if (pdb_field == e_pdb_none) {
841  cvm::error("Error: unsupported PDB field, \""+
842  pdb_field_str+"\".\n", INPUT_ERROR);
843  }
844 
845  return pdb_field;
846 }
e_pdb_field