15 #include <utility/string_util.hh>
17 #include <utility/vector1.hh>
26 CtabBase(connection_table_lines,molecule_container,mol_data)
32 core::Size atom_count = atoi(counts_line.substr(0,3).c_str());
33 core::Size bond_count = atoi(counts_line.substr(3,3).c_str());
39 assert(version_tag ==
"V2000");
46 if(line_number <= last_atom)
49 }
else if(line_number <= last_bond)
70 core::Real x_coord = atof(atom_line.substr(0,10).c_str());
71 core::Real y_coord = atof(atom_line.substr(10,10).c_str());
72 core::Real z_coord = atof(atom_line.substr(20,10).c_str());
74 std::string element_name = atom_line.substr(31,3).c_str();
75 if(element_name.at(1)==
' ') {
76 element_name=element_name.substr(0,1);
77 }
else if (element_name.at(2)==
' ') {
78 element_name=element_name.substr(0,2);
81 std::string atom_number_string= utility::to_string<core::Size>(atom_number);
88 std::string element_id = element_name+ atom_number_string;
89 utility::add_spaces_left_align(element_id,4);
91 core::Size charge = atoi(atom_line.substr(36,3).c_str());
97 residue->set_ideal_xyz(element_id,coordinates);
103 core::Size atom1_index = atoi(bond_line.substr(0,3).c_str());
104 core::Size atom2_index = atoi(bond_line.substr(3,3).c_str());
114 residue->add_bond(atom1_id,atom2_id,bond_type);