forked from enviPath/enviPy
Current Dev State
This commit is contained in:
223
static/js/ketcher2/script/ui/data/options-schema.js
Normal file
223
static/js/ketcher2/script/ui/data/options-schema.js
Normal file
@ -0,0 +1,223 @@
|
||||
/****************************************************************************
|
||||
* Copyright 2017 EPAM Systems
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
***************************************************************************/
|
||||
|
||||
import jsonschema from 'jsonschema';
|
||||
|
||||
const editor = {
|
||||
resetToSelect: {
|
||||
title: "Reset to Select Tool",
|
||||
enum: [true, 'paste', false],
|
||||
enumNames: ['on', 'After Paste', 'off'],
|
||||
default: 'paste'
|
||||
},
|
||||
rotationStep: {
|
||||
title: "Rotation Step, º",
|
||||
type: "integer",
|
||||
minimum: 1,
|
||||
maximum: 90,
|
||||
default: 15
|
||||
},
|
||||
};
|
||||
|
||||
const miew = {
|
||||
miewMode: {
|
||||
title: "Display mode",
|
||||
enum: ['lines', 'balls and sticks', 'licorice'],
|
||||
enumNames: ['Lines', 'Balls and Sticks', 'Licorice'],
|
||||
default: 'lines'
|
||||
},
|
||||
miewTheme: {
|
||||
title: "Background color",
|
||||
enum: ['light', 'dark'],
|
||||
enumNames: ['Light', 'Dark'],
|
||||
default: 'light'
|
||||
},
|
||||
miewAtomLabel: {
|
||||
title: "Label coloring",
|
||||
enum: ['no', 'bright', 'inverse', 'black and white', 'black'],
|
||||
enumNames: ['No', 'Bright', 'Inverse', 'Black and White', 'Black'],
|
||||
default: 'bright'
|
||||
},
|
||||
};
|
||||
|
||||
const render = {
|
||||
showValenceWarnings: {
|
||||
title: "Show valence warnings",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
atomColoring: {
|
||||
title: "Atom coloring",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
hideChiralFlag: {
|
||||
title: "Do not show the Chiral flag",
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
font: {
|
||||
title: "Font",
|
||||
type: "string",
|
||||
default: '30px Arial'
|
||||
},
|
||||
fontsz: {
|
||||
title: "Font size",
|
||||
type: "integer",
|
||||
default: 13,
|
||||
minimum: 1,
|
||||
maximum: 96
|
||||
},
|
||||
fontszsub: {
|
||||
title: "Sub font size",
|
||||
type: "integer",
|
||||
default: 13,
|
||||
minimum: 1,
|
||||
maximum: 96
|
||||
},
|
||||
// Atom
|
||||
carbonExplicitly: {
|
||||
title: "Display carbon explicitly",
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
showCharge: {
|
||||
title: "Display charge",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
showValence: {
|
||||
title: "Display valence",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
showHydrogenLabels: {
|
||||
title: "Show hydrogen labels",
|
||||
enum: ['off', 'Hetero', 'Terminal', 'Terminal and Hetero', 'on'],
|
||||
default: 'on',
|
||||
},
|
||||
// Bonds
|
||||
aromaticCircle: {
|
||||
title: "Aromatic Bonds as circle",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
doubleBondWidth: {
|
||||
title: "Double bond width",
|
||||
type: "integer",
|
||||
default: 6,
|
||||
minimum: 1,
|
||||
maximum: 96
|
||||
},
|
||||
bondThickness: {
|
||||
title: "Bond thickness",
|
||||
type: "integer",
|
||||
default: 2,
|
||||
minimum: 1,
|
||||
maximum: 96
|
||||
},
|
||||
stereoBondWidth: {
|
||||
title: "Stereo (Wedge) bond width",
|
||||
type: "integer",
|
||||
default: 6,
|
||||
minimum: 1,
|
||||
maximum: 96
|
||||
}
|
||||
};
|
||||
|
||||
const server = {
|
||||
'smart-layout': {
|
||||
title: "Smart-layout",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
'ignore-stereochemistry-errors': {
|
||||
title: "Ignore stereochemistry errors",
|
||||
type: "boolean",
|
||||
default: true
|
||||
},
|
||||
'mass-skip-error-on-pseudoatoms': {
|
||||
title: "Ignore pseudoatoms at mass",
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
'gross-formula-add-rsites': {
|
||||
title: "Add Rsites at mass calculation",
|
||||
type: "boolean",
|
||||
default: true
|
||||
}
|
||||
};
|
||||
|
||||
export const SERVER_OPTIONS = Object.keys(server);
|
||||
|
||||
const debug = {
|
||||
showAtomIds: {
|
||||
title: "Show atom Ids",
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
showBondIds: {
|
||||
title: "Show bonds Ids",
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
showHalfBondIds: {
|
||||
title: "Show half bonds Ids",
|
||||
type: "boolean",
|
||||
default: false
|
||||
},
|
||||
showLoopIds: {
|
||||
title: "Show loop Ids",
|
||||
type: "boolean",
|
||||
default: false
|
||||
}
|
||||
};
|
||||
|
||||
const optionsSchema = {
|
||||
title: "Settings",
|
||||
type: "object",
|
||||
required: [],
|
||||
properties: {
|
||||
...editor,
|
||||
...render,
|
||||
...miew,
|
||||
...server,
|
||||
...debug
|
||||
}
|
||||
};
|
||||
|
||||
export default optionsSchema;
|
||||
|
||||
export function getDefaultOptions() {
|
||||
return Object.keys(optionsSchema.properties).reduce((res, prop) => {
|
||||
res[prop] = optionsSchema.properties[prop].default;
|
||||
return res;
|
||||
}, {});
|
||||
}
|
||||
|
||||
export function validation(settings) {
|
||||
if (typeof settings !== 'object' || settings === null) return null;
|
||||
|
||||
const v = new jsonschema.Validator();
|
||||
const { errors } = v.validate(settings, optionsSchema);
|
||||
const errProps = errors.map(err => err.property.split('.')[1]);
|
||||
|
||||
return Object.keys(settings).reduce((res, prop) => {
|
||||
if (optionsSchema.properties[prop] && errProps.indexOf(prop) === -1)
|
||||
res[prop] = settings[prop];
|
||||
return res;
|
||||
}, {});
|
||||
}
|
||||
402
static/js/ketcher2/script/ui/data/sdata-schema.js
Normal file
402
static/js/ketcher2/script/ui/data/sdata-schema.js
Normal file
@ -0,0 +1,402 @@
|
||||
/****************************************************************************
|
||||
* Copyright 2017 EPAM Systems
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
***************************************************************************/
|
||||
|
||||
import { mapOf } from '../utils';
|
||||
|
||||
const radioButtonsSchema = {
|
||||
enum: [
|
||||
"Absolute",
|
||||
"Relative",
|
||||
"Attached"
|
||||
],
|
||||
default: "Absolute"
|
||||
};
|
||||
|
||||
const contextSchema = {
|
||||
title: 'Context',
|
||||
enum: [
|
||||
'Fragment',
|
||||
'Multifragment',
|
||||
'Bond',
|
||||
'Atom',
|
||||
'Group'
|
||||
],
|
||||
default: 'Fragment'
|
||||
};
|
||||
|
||||
const sData = {
|
||||
Fragment: {
|
||||
title: 'Fragment',
|
||||
type: 'Object',
|
||||
oneOf: [
|
||||
{
|
||||
key: 'FRG_STR',
|
||||
title: 'MDLBG_FRAGMENT_STEREO',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: 'Field name',
|
||||
enum: ["MDLBG_FRAGMENT_STEREO"],
|
||||
default: "MDLBG_FRAGMENT_STEREO"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: 'array',
|
||||
items: {
|
||||
enum: [
|
||||
"abs",
|
||||
"(+)-enantiomer",
|
||||
"(-)-enantiomer",
|
||||
"racemate",
|
||||
"steric",
|
||||
"rel",
|
||||
"R(a)",
|
||||
"S(a)",
|
||||
"R(p)",
|
||||
"S(p)"
|
||||
]
|
||||
},
|
||||
default: ["abs"]
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
},
|
||||
{
|
||||
key: 'FRG_COEFF',
|
||||
title: 'MDLBG_FRAGMENT_COEFFICIENT',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: "Field name",
|
||||
enum: ["MDLBG_FRAGMENT_COEFFICIENT"],
|
||||
default: "MDLBG_FRAGMENT_COEFFICIENT"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: "string",
|
||||
default: "",
|
||||
minLength: 1,
|
||||
invalidMessage: "Please, specify field name"
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
},
|
||||
{
|
||||
key: 'FRG_CHRG',
|
||||
title: 'MDLBG_FRAGMENT_CHARGE',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: 'Field name',
|
||||
enum: ["MDLBG_FRAGMENT_CHARGE"],
|
||||
default: "MDLBG_FRAGMENT_CHARGE"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: "string",
|
||||
default: "",
|
||||
minLength: 1,
|
||||
invalidMessage: "Please, specify field name"
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
},
|
||||
{
|
||||
key: 'FRG_RAD',
|
||||
title: 'MDLBG_FRAGMENT_RADICALS',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: "Field name",
|
||||
enum: ["MDLBG_FRAGMENT_RADICALS"],
|
||||
default: "MDLBG_FRAGMENT_RADICALS"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: "string",
|
||||
default: "",
|
||||
minLength: 1,
|
||||
invalidMessage: "Please, specify field name"
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
},
|
||||
]
|
||||
},
|
||||
Multifragment: {
|
||||
title: 'Multifragment',
|
||||
type: 'Object',
|
||||
oneOf: [
|
||||
{
|
||||
key: 'MLT_FRG',
|
||||
title: 'KETCHER_MULTIPLE_FRAGMENT',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: 'Field name',
|
||||
enum: ["KETCHER_MULTIPLE_FRAGMENT"],
|
||||
default: "KETCHER_MULTIPLE_FRAGMENT"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: 'array',
|
||||
items: {
|
||||
enum: [
|
||||
"aerosol",
|
||||
"alloy",
|
||||
"catenane",
|
||||
"complex",
|
||||
"composite",
|
||||
"co-polymer",
|
||||
"emulsion",
|
||||
"host-guest complex",
|
||||
"mixture",
|
||||
"rotaxane",
|
||||
"suspension"
|
||||
]
|
||||
},
|
||||
default: ["aerosol"]
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
}
|
||||
]
|
||||
},
|
||||
Bond: {
|
||||
title: 'Bond',
|
||||
type: 'Object',
|
||||
oneOf: [
|
||||
{
|
||||
key: 'SB_STR',
|
||||
title: 'MDLBG_STEREO_KEY',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: "Field name",
|
||||
enum: ["MDLBG_STEREO_KEY"],
|
||||
default: "MDLBG_STEREO_KEY"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: 'array',
|
||||
items: {
|
||||
enum: [
|
||||
"erythro",
|
||||
"threo",
|
||||
"alpha",
|
||||
"beta",
|
||||
"endo",
|
||||
"exo",
|
||||
"anti",
|
||||
"syn",
|
||||
"ECL",
|
||||
"STG"
|
||||
]
|
||||
},
|
||||
default: ["erythro"]
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
},
|
||||
{
|
||||
key: 'SB_BND',
|
||||
title: 'MDLBG_BOND_KEY',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: "Field name",
|
||||
enum: ["MDLBG_BOND_KEY"],
|
||||
default: "MDLBG_BOND_KEY"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: 'array',
|
||||
items: {
|
||||
enum: [
|
||||
"Value=4"
|
||||
]
|
||||
},
|
||||
default: ["Value=4"]
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
}
|
||||
]
|
||||
},
|
||||
Atom: {
|
||||
title: 'Atom',
|
||||
type: 'Object',
|
||||
oneOf: [
|
||||
{
|
||||
key: 'AT_STR',
|
||||
title: 'MDLBG_STEREO_KEY',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: "Field name",
|
||||
enum: ["MDLBG_STEREO_KEY"],
|
||||
default: "MDLBG_STEREO_KEY"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: 'array',
|
||||
items: {
|
||||
enum: [
|
||||
"RS",
|
||||
"SR",
|
||||
"P-3",
|
||||
"P-3-PI",
|
||||
"SP-4",
|
||||
"SP-4-PI",
|
||||
"T-4",
|
||||
"T-4-PI",
|
||||
"SP-5",
|
||||
"SP-5-PI",
|
||||
"TB-5",
|
||||
"TB-5-PI",
|
||||
"OC-6",
|
||||
"TP-6",
|
||||
"PB-7",
|
||||
"CU-8",
|
||||
"SA-8",
|
||||
"DD-8",
|
||||
"HB-9",
|
||||
"TPS-9"
|
||||
],
|
||||
},
|
||||
default: ["RS"]
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
}
|
||||
]
|
||||
},
|
||||
Group: {
|
||||
title: 'Group',
|
||||
type: 'Object',
|
||||
oneOf: [
|
||||
{
|
||||
key: 'GRP_STR',
|
||||
title: 'MDLBG_STEREO_KEY',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
fieldName: {
|
||||
title: "Field name",
|
||||
enum: ["MDLBG_STEREO_KEY"],
|
||||
default: "MDLBG_STEREO_KEY"
|
||||
},
|
||||
fieldValue: {
|
||||
title: "Field value",
|
||||
type: 'array',
|
||||
items: {
|
||||
enum: [
|
||||
"cis",
|
||||
"trans"
|
||||
]
|
||||
},
|
||||
default: ["cis"]
|
||||
},
|
||||
radiobuttons: radioButtonsSchema
|
||||
},
|
||||
required: ["fieldName", "fieldValue", "radiobuttons"]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
export const sdataCustomSchema = {
|
||||
key: 'Custom',
|
||||
properties: {
|
||||
type: { enum: ["DAT"] },
|
||||
context: {
|
||||
title: 'Context',
|
||||
enum: [
|
||||
'Fragment',
|
||||
'Multifragment',
|
||||
'Bond',
|
||||
'Atom',
|
||||
'Group'
|
||||
],
|
||||
default: 'Fragment'
|
||||
},
|
||||
fieldName: {
|
||||
title: 'Field name',
|
||||
type: "string",
|
||||
default: "",
|
||||
minLength: 1,
|
||||
invalidMessage: "Please, specify field name"
|
||||
},
|
||||
fieldValue: {
|
||||
title: 'Field value',
|
||||
type: "string",
|
||||
default: "",
|
||||
minLength: 1,
|
||||
invalidMessage: "Please, specify field value"
|
||||
},
|
||||
radiobuttons: {
|
||||
enum: [
|
||||
"Absolute",
|
||||
"Relative",
|
||||
"Attached"
|
||||
],
|
||||
default: "Absolute"
|
||||
}
|
||||
},
|
||||
required: ["context", "fieldName", "fieldValue", "radiobuttons"]
|
||||
};
|
||||
|
||||
export const sdataSchema = Object.keys(sData).reduce((acc, title) => {
|
||||
acc[title] = mapOf(sData[title], 'fieldName');
|
||||
Object.keys(acc[title]).forEach(fieldName => acc[title][fieldName].properties.context = contextSchema);
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
/**
|
||||
* Returns first key of passed object
|
||||
* @param obj { object }
|
||||
*/
|
||||
function firstKeyOf(obj) {
|
||||
return Object.keys(obj)[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns schema default values. Depends on passed arguments:
|
||||
* pass schema only -> returns default context
|
||||
* pass schema & context -> returns default fieldName
|
||||
* pass schema & context & fieldName -> returns default fieldValue
|
||||
* @param context? { string }
|
||||
* @param fieldName? { string }
|
||||
* @returns { string }
|
||||
*/
|
||||
export function getSdataDefault(context, fieldName) {
|
||||
if (!context && !fieldName)
|
||||
return firstKeyOf(sdataSchema);
|
||||
|
||||
if (!fieldName)
|
||||
return firstKeyOf(sdataSchema[context]);
|
||||
|
||||
return sdataSchema[context][fieldName] ?
|
||||
sdataSchema[context][fieldName].properties.fieldValue.default :
|
||||
'';
|
||||
}
|
||||
154
static/js/ketcher2/script/ui/data/templates.js
Normal file
154
static/js/ketcher2/script/ui/data/templates.js
Normal file
@ -0,0 +1,154 @@
|
||||
/****************************************************************************
|
||||
* Copyright 2017 EPAM Systems
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
***************************************************************************/
|
||||
|
||||
import molfile from '../../chem/molfile';
|
||||
|
||||
export default [
|
||||
'Benzene\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 6 6 0 0 0 999 V2000\n' +
|
||||
' 0.8660 2.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7320 1.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7320 0.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.8660 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 0.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 1.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
' 2 3 2 0 0 0\n' +
|
||||
' 3 4 1 0 0 0\n' +
|
||||
' 4 5 2 0 0 0\n' +
|
||||
' 5 6 1 0 0 0\n' +
|
||||
' 6 1 2 0 0 0\n' +
|
||||
'M END\n',
|
||||
'Cyclopentadiene\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 5 5 0 0 0 999 V2000\n' +
|
||||
' 0.0000 1.4257 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.8090 0.8379 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.5000 -0.1132 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -0.5000 -0.1132 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -0.8090 0.8379 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
' 2 3 2 0 0 0\n' +
|
||||
' 3 4 1 0 0 0\n' +
|
||||
' 4 5 2 0 0 0\n' +
|
||||
' 5 1 1 0 0 0\n' +
|
||||
'M END\n',
|
||||
|
||||
'Cyclohexane\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 6 6 0 0 0 999 V2000\n' +
|
||||
' 0.8660 2.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7320 1.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7320 0.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.8660 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 0.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 1.5000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
' 2 3 1 0 0 0\n' +
|
||||
' 3 4 1 0 0 0\n' +
|
||||
' 4 5 1 0 0 0\n' +
|
||||
' 5 6 1 0 0 0\n' +
|
||||
' 6 1 1 0 0 0\n' +
|
||||
'M END\n',
|
||||
|
||||
'Cyclopentane\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 5 5 0 0 0 999 V2000\n' +
|
||||
' 0.8090 1.5389 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.6180 0.9511 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.3090 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.3090 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 0.9511 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
' 2 3 1 0 0 0\n' +
|
||||
' 3 4 1 0 0 0\n' +
|
||||
' 4 5 1 0 0 0\n' +
|
||||
' 5 1 1 0 0 0\n' +
|
||||
'M END\n',
|
||||
|
||||
'Cyclopropane\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 3 3 0 0 0 999 V2000\n' +
|
||||
' -3.2250 -0.2750 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -2.2250 -0.2750 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -2.7250 0.5910 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
' 2 3 1 0 0 0\n' +
|
||||
' 1 3 1 0 0 0\n' +
|
||||
'M END\n',
|
||||
|
||||
'Cyclobutane\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 4 4 0 0 0 999 V2000\n' +
|
||||
' -3.8250 1.5500 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -3.8250 0.5500 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -2.8250 1.5500 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' -2.8250 0.5500 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
' 1 3 1 0 0 0\n' +
|
||||
' 3 4 1 0 0 0\n' +
|
||||
' 4 2 1 0 0 0\n' +
|
||||
'M END\n',
|
||||
|
||||
'Cycloheptane\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 7 7 0 0 0 999 V2000\n' +
|
||||
' 0.0000 1.6293 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.7835 2.2465 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7559 2.0242 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 2.1897 1.1289 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 0.6228 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7566 0.2224 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.7835 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 6 7 1 0 0 0\n' +
|
||||
' 5 7 1 0 0 0\n' +
|
||||
' 1 5 1 0 0 0\n' +
|
||||
' 4 6 1 0 0 0\n' +
|
||||
' 3 4 1 0 0 0\n' +
|
||||
' 2 3 1 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
'M END\n',
|
||||
|
||||
'Cyclooctane\n' +
|
||||
' Ketcher 11161218352D 1 1.00000 0.00000 0\n' +
|
||||
'\n' +
|
||||
' 8 8 0 0 0 999 V2000\n' +
|
||||
' 0.0000 0.7053 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.0000 1.7078 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.7053 2.4131 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 0.7056 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7079 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 2.4133 0.7053 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 2.4133 1.7078 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 1.7079 2.4131 0.0000 C 0 0 0 0 0 0 0 0 0\n' +
|
||||
' 8 3 1 0 0 0\n' +
|
||||
' 7 8 1 0 0 0\n' +
|
||||
' 6 7 1 0 0 0\n' +
|
||||
' 5 6 1 0 0 0\n' +
|
||||
' 4 5 1 0 0 0\n' +
|
||||
' 1 4 1 0 0 0\n' +
|
||||
' 2 3 1 0 0 0\n' +
|
||||
' 1 2 1 0 0 0\n' +
|
||||
'M END\n'
|
||||
].map(structStr => molfile.parse(structStr));
|
||||
Reference in New Issue
Block a user