-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #957 from papillot/fix-pdbqt
Fix PDBQT parser for wrong H elements interpolation
- Loading branch information
Showing
4 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ATOM 1 N GLN 52 42.237 16.800 35.823 1.00 0.00 -0.066 N | ||
ATOM 2 CA GLN 52 41.667 17.015 34.477 1.00 0.00 0.275 C | ||
ATOM 3 C GLN 52 40.148 17.010 34.446 1.00 0.00 0.249 C | ||
ATOM 4 O GLN 52 39.564 17.006 33.382 1.00 0.00 -0.271 OA | ||
ATOM 5 CB GLN 52 42.228 15.967 33.522 1.00 0.00 0.052 C | ||
ATOM 6 CG GLN 52 43.746 16.016 33.446 1.00 0.00 0.105 C | ||
ATOM 7 CD GLN 52 44.292 17.263 32.785 1.00 0.00 0.215 C | ||
ATOM 8 OE1 GLN 52 43.587 17.906 32.000 1.00 0.00 -0.274 OA | ||
ATOM 9 NE2 GLN 52 45.513 17.598 33.072 1.00 0.00 -0.370 N | ||
ATOM 10 H2 GLN 52 41.772 15.848 36.146 1.00 0.00 0.275 HD | ||
ATOM 11 H3 GLN 52 43.141 16.691 35.848 1.00 0.00 0.275 HD | ||
ATOM 12 H GLN 52 41.923 17.526 36.434 1.00 0.00 0.275 HD | ||
ATOM 13 2HE2 GLN 52 46.044 17.022 33.735 1.00 0.00 0.159 HD | ||
ATOM 14 1HE2 GLN 52 45.958 18.423 32.653 1.00 0.00 0.159 HD | ||
TER 15 GLN 52 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import StringStreamer from '../../src/streamer/string-streamer' | ||
import PdbqtParser from '../../src/parser/pdbqt-parser' | ||
import { Structure } from '../../src/ngl' | ||
|
||
|
||
import { join } from 'path' | ||
import * as fs from 'fs' | ||
|
||
|
||
describe('parser/pdb-parser', function () { | ||
describe('parsing', function () { | ||
it('translates PDBQT special atom types to elements', function() { | ||
const file = join(__dirname, '/../data/1xdn_gln.pdbqt') | ||
const str = fs.readFileSync(file, 'utf-8') | ||
const streamer = new StringStreamer(str) | ||
const pdbqtParser = new PdbqtParser(streamer) | ||
return pdbqtParser.parse().then(function (structure: Structure) { | ||
const ap = structure.getAtomProxy() | ||
ap.index = 3 | ||
expect(ap.element).toBe('O') | ||
ap.index = 12 | ||
expect(ap.element).toBe('H') | ||
}) | ||
}) | ||
}) | ||
}) |