101 |
|
return false; |
102 |
|
} |
103 |
|
|
104 |
< |
//exact graph matching is a NP complete problem, |
104 |
> |
//exact graph matching is a NP complete problem |
105 |
> |
/** @todo using sparse matrix to store the connectivities*/ |
106 |
|
for (unsigned int i =0 ; i < frag1.size(); ++i) |
107 |
|
{ |
108 |
< |
if (strcmp(mol.GetAtom(frag1[i])->GetType(), mol.GetAtom(frag2[i])->GetType()) ) |
108 |
> |
OBAtom* atom1 = mol.GetAtom(frag1[i]); |
109 |
> |
OBAtom* atom2 = mol.GetAtom(frag2[i]); |
110 |
> |
|
111 |
> |
if (atom1->GetAtomicNum() != atom2->GetAtomicNum()) |
112 |
|
{ |
113 |
|
return false; |
114 |
|
} |
202 |
|
int ai = 0; |
203 |
|
FOR_ATOMS_OF_MOL(atom, *pmol ) { |
204 |
|
os << identLevel1 << "atom[" << ai << "] {\n"; |
205 |
< |
os << identLevel2 << "type = " << "\"" << atom->GetType() << "\"" << ";\n"; |
205 |
> |
os << identLevel2 << "type = " << "\"" << etab.GetSymbol(atom->GetAtomicNum()) << "\"" << ";\n"; |
206 |
|
os << identLevel1 << "}\n"; |
207 |
|
atomMap[&(*atom)] = ai++; |
208 |
|
} |
284 |
|
for(vector<int>::iterator i = indices.begin();i != indices.end(); ++i) |
285 |
|
{ |
286 |
|
atom = mol.GetAtom(*i); |
287 |
< |
sprintf(buffer,"%15s%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f%15.5f", |
288 |
< |
atom->GetType(), |
287 |
> |
sprintf(buffer,"%-10s%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f%-15.5f", |
288 |
> |
etab.GetSymbol(atom->GetAtomicNum()), |
289 |
|
atom->GetX(), atom->GetY(), atom->GetZ(), |
290 |
|
0.0, 0.0, 0.0, |
291 |
|
0.0, 0.0, 0.0, 0.0, |