18 #include <basic/Tracer.hh>
21 #include <utility/io/izstream.hh>
30 static basic::Tracer
tr(
"core.chemical");
42 CSDAtomTypetSet::n_atomtypes()
const {
48 std::map< std::string, int >::const_iterator
49 iter( atom_type_index_.find( atom_type_name ) );
50 return iter != atom_type_index_.end();
60 using namespace basic;
62 utility::io::izstream data( filename.c_str() );
64 if ( !data.good() ) utility_exit_with_message(
"Unable to open CSDAtomTypeSet file: "+filename );
67 while ( getline( data,line ) ) {
68 std::istringstream l( line );
71 utility_exit_with_message(
"bad line: "+line);
79 atoms_.push_back( csd_atom_type_ptr );
81 tr.Debug <<
"New CSD atom type: " << name << std::endl;
84 tr.Debug <<
"CSD atoms types added " <<
atoms_.size() << std::endl;
93 std::cout << (*i).first <<
" " << (*i).second << std::endl;
99 atom_type_name )
const {
100 std::map< std::string, int >::const_iterator
103 utility_exit_with_message(
"unrecognized csd_atom_type_name "+atom_type_name);
111 return *(
atoms_[ index ] );