def test_write(self): """ test writing a pdbqs file """ writer = PdbqsWriter() writer.write('test_pdbqsWriter.pdbqs', self.mol, bondOrigin=('File',)) ans, errors = self.compare('Data/1crn.pdbqs', 'test_pdbqsWriter.pdbqs') self.assertEquals(errors, None) self.assertEquals(ans, True)
if len(item.name) == 1: item.name = 'A' else: item.name = 'A' + item.name[1:] elif hasattr(item, 'autodock_element'): item.autodock_element = item.autodock_element if splitAcceptors and item.autodock_element in self.acceptorList: #if item has a bond to a hydrogen: # change acceptor type 'XA' to 'XB' for 'B'oth 'A'cceptor and 'D'onor if 'H' in item.bonds.getAtoms().element: #O->OB;N->NB;S->SB item.autodock_element = item.element + 'B' d[item.autodock_element] = 1 type_list = d.keys() type_list.sort() mol.types = type_list if __name__ == "__main__": from MolKit import Read m = Read("/mgl/work4/rhuey/dev23/hsg1_no_conects.pdbq")[0] solP = SolvationParameterizer() ll = solP.addParameters(m.allAtoms) #NB: hydrogens get 0.0 0.0 print "len(notfound) = ", len(ll) for i in ll: print i.full_name(), from MolKit.pdbWriter import PdbqsWriter writer = PdbqsWriter() writer.write("/mgl/work4/rhuey/dev23/test_hsg1.pdbqs", m.allAtoms)
item.name = 'A' else: item.name = 'A' + item.name[1:] elif hasattr(item, 'autodock_element'): item.autodock_element = item.autodock_element if splitAcceptors and item.autodock_element in self.acceptorList: #if item has a bond to a hydrogen: # change acceptor type 'XA' to 'XB' for 'B'oth 'A'cceptor and 'D'onor if 'H' in item.bonds.getAtoms().element: #O->OB;N->NB;S->SB item.autodock_element = item.element + 'B' d[item.autodock_element] = 1 type_list = d.keys() type_list.sort() mol.types = type_list if __name__ == "__main__": from MolKit import Read m = Read("/mgl/work4/rhuey/dev23/hsg1_no_conects.pdbq")[0] solP = SolvationParameterizer() ll = solP.addParameters(m.allAtoms) #NB: hydrogens get 0.0 0.0 print "len(notfound) = ", len(ll) for i in ll: print i.full_name(), from MolKit.pdbWriter import PdbqsWriter writer = PdbqsWriter() writer.write("/mgl/work4/rhuey/dev23/test_hsg1.pdbqs", m.allAtoms)