@datagrok/sequence-translator 1.10.2 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/package.json +1 -1
- package/src/polytool/conversion/pt-synthetic.ts +9 -5
- package/test-console-output-1.log +59 -60
- package/test-record-1.mp4 +0 -0
package/package.json
CHANGED
|
@@ -90,6 +90,8 @@ export function getNewMonomers(rdkit: RDModule, mLib: IMonomerLib, rule: RuleRea
|
|
|
90
90
|
// const monomer1 = mLib.getMonomer('PEPTIDE', rule.firstMonomers[0]);
|
|
91
91
|
// const monomer2 = mLib.getMonomer('PEPTIDE', rule.secondMonomers[0]);
|
|
92
92
|
let mol: RDMol | null = null;
|
|
93
|
+
reactionMembers[1] = reactionMembers[1].replace('[C:1]', '[1*]').replace('[C:2]', '[2*]').replace('[C:3]', '[3*]');
|
|
94
|
+
|
|
93
95
|
let pMolblock = '';
|
|
94
96
|
try {
|
|
95
97
|
mol = rdkit.get_mol(reactionMembers[1]);
|
|
@@ -146,16 +148,18 @@ export function getNewMonomers(rdkit: RDModule, mLib: IMonomerLib, rule: RuleRea
|
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
function modProduct(product: string): string {
|
|
149
|
-
const fullMol = product.replace('M RAD', 'M RGP');
|
|
151
|
+
const fullMol = product.replace('M RAD', 'M RGP').replace('M ISO', 'M RGP');
|
|
150
152
|
const lines = fullMol.split('\n');
|
|
151
|
-
const natoms = Number(lines[3].substring(0, 3));
|
|
152
|
-
const nbonds = Number(lines[3].substring(3, 6));
|
|
153
|
-
const rgpShift =
|
|
153
|
+
// const natoms = Number(lines[3].substring(0, 3));
|
|
154
|
+
// const nbonds = Number(lines[3].substring(3, 6));
|
|
155
|
+
const rgpShift = lines.findIndex((line) => line.startsWith('M RGP'));
|
|
154
156
|
|
|
155
157
|
const fAtom = Number(lines[rgpShift].substring(9, 13));
|
|
156
158
|
const sAtom = Number(lines[rgpShift].substring(17, 21));
|
|
159
|
+
const firstRgroupIndex = Number(lines[rgpShift].substring(13, 17));
|
|
160
|
+
const secondRgroupIndex = Number(lines[rgpShift].substring(21, 25));
|
|
157
161
|
|
|
158
|
-
lines[rgpShift] = lines[rgpShift].substring(0, 13) +
|
|
162
|
+
lines[rgpShift] = lines[rgpShift].substring(0, 13) + ` ${firstRgroupIndex}` + lines[rgpShift].substring(17, 21) + ` ${secondRgroupIndex}`;
|
|
159
163
|
|
|
160
164
|
lines[3 + fAtom] = lines[3 + fAtom].substring(0, 30) + ' R# 0 0 0 0 0 0 0 0 0 0 0 0';
|
|
161
165
|
lines[3 + sAtom] = lines[3 + sAtom].substring(0, 30) + ' R# 0 0 0 0 0 0 0 0 0 0 0 0';
|