Пример #1
0
def MirrorImageConf():
	ac =    [[-1.5846,   -0.5216,    0.1338],
			[-1.1512,   -1.5146,   -0.0477 ],
			[-1.7781,   -0.4440,    1.2120 ],
			[-2.5555,   -0.4907,   -0.3770 ],
			[-0.6751,    0.5855,   -0.3509 ],
			[-1.1705,    1.5633,   -0.1896 ],
			[-0.5293,    0.5028,   -1.4463 ],
			[ 0.6751,    0.5854,    0.3509 ],
			[ 1.1705,    1.5633,    0.1895 ],
			[ 0.5294,    0.5028,    1.4463 ],
			[ 1.5846,   -0.5216,   -0.1338 ],
			[ 2.5554,   -0.4908,    0.3772 ],
			[ 1.1510,   -1.5146,    0.0475 ],
			[ 1.7783,   -0.4438,   -1.2120]]
	aa = [6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 1]
	bc =  [[  -1.5845,   -0.5216,   -0.1338],
		   [-1.7784,   -0.4438,   -1.2120 ],
		   [-1.1509,   -1.5146,    0.0474 ],
		   [-2.5553,   -0.4910,    0.3773 ],
		   [-0.6751,    0.5855,    0.3508 ],
		   [-0.5293,    0.5028,    1.4463 ],
		   [-1.1705,    1.5634,    0.1895 ],
		   [ 0.6751,    0.5855,   -0.3508 ],
		   [ 1.1705,    1.5633,   -0.1893 ],
		   [ 0.5294,    0.5030,   -1.4463 ],
		   [ 1.5845,   -0.5216,    0.1338 ],
		   [ 1.1510,   -1.5146,   -0.0478 ],
		   [ 2.5555,   -0.4908,   -0.3770 ],
		   [ 1.7780,   -0.4441,    1.2121 ]]
	ba = [6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 1]
	a = MolecularCoordinates.MolecularGeometry(aa,ac)
	b = MolecularCoordinates.MolecularGeometry(ba,bc)
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.001)
Пример #2
0
def LongLinearChainHetConf(n):
    # n represents the number of atoms in the chain
    atomtypes = [i for i in range(0, n)]
    atomcoor = [[i, 0, 0] for i in range(0, n)]
    a = MolecularCoordinates.MolecularGeometry(atomtypes, atomcoor)
    b = MolecularCoordinates.MolecularGeometry(atomtypes, atomcoor)
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.5)
Пример #3
0
def LongLinearChainHetConf(n):
	#n represents the number of atoms in the chain
	atomtypes = [i for i in range(0,n)]
	atomcoor = [[i,0,0] for i in range(0,n)]
	a = MolecularCoordinates.MolecularGeometry(atomtypes,atomcoor)
	b = MolecularCoordinates.MolecularGeometry(atomtypes,atomcoor)
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.5)
Пример #4
0
def MM4ReadMOLWrite():
    """ A test of MM4 reading and MOL, XYZ writing


	"""
    mg1 = MolecularCoordinates.readMM4File("JP10stochFixedStruct.out", 1)
    mg2 = MolecularCoordinates.readMM4File("JP10stochFixedStruct.out", 295)
    mg1a = MolecularCoordinates.readMM4File("JP10stochFixedStruct.out", 253)
    mg1.writeMOLFile("JP10_MM4_1.mol", "JP10_MM4_1")
    mg2.writeMOLFile("JP10_MM4_8.mol", "JP10_MM4_8")
    mg1a.writeMOLFile("JP10_MM4_7.mol", "JP10_MM4_7")
    mg1.perceiveConnectivity()
    mg1.writeMOLFile("JP10_MM4_1_conn.mol", "JP10_MM4_1", connectivity=True)
    mg1.writeXYZFile("JP10_MM4_1.xyz", "JP10_MM4_1")
    print MolecularCoordinates.checkConformationalEquivalence(mg1, mg1a, Atol=0.02)
    atomMap = {
        1: 1,
        2: 2,
        3: 3,
        4: 4,
        5: 5,
        6: 6,
        7: 7,
        8: 8,
        9: 9,
        10: 10,
        11: 11,
        12: 12,
        13: 13,
        14: 14,
        15: 15,
        16: 16,
        17: 17,
        18: 18,
        19: 19,
        20: 20,
        21: 21,
        22: 22,
        23: 23,
        24: 24,
        25: 25,
        26: 26,
    }  # "correct" mapping
    (distDevAbs, distDevRel) = MolecularCoordinates.calcDistanceDeviationsGivenMapping(mg1, mg1a, atomMap)
    distDevAbsMax = MolecularCoordinates.dictionaryMaxAbs(distDevAbs)
    distDevRelMax = MolecularCoordinates.dictionaryMaxAbs(distDevRel)
    print distDevAbsMax
Пример #5
0
def LongLinearChainHomConf(n):
    # n represents the number of atoms in the chain
    # all the atom-to-atom distances should be unique by the "binary" construction of the coordinates
    atomtypes = [1 for i in range(0, n)]
    atomcoor = [[2 ** i, 0, 0] for i in range(0, n)]
    a = MolecularCoordinates.MolecularGeometry(atomtypes, atomcoor)
    b = MolecularCoordinates.MolecularGeometry(atomtypes, atomcoor)
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.5)
Пример #6
0
def LongLinearChainHomConf(n):
	#n represents the number of atoms in the chain
	#all the atom-to-atom distances should be unique by the "binary" construction of the coordinates
	atomtypes = [1 for i in range(0,n)]
	atomcoor = [[2**i,0,0] for i in range(0,n)]
	a = MolecularCoordinates.MolecularGeometry(atomtypes,atomcoor)
	b = MolecularCoordinates.MolecularGeometry(atomtypes,atomcoor)
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.5)
Пример #7
0
def SimpleHomConf():
    a = MolecularCoordinates.MolecularGeometry(
        [1, 1, 1, 1, 1, 1, 1, 1],
        [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 0], [1, 1, 1]],
    )
    b = MolecularCoordinates.MolecularGeometry(
        [1, 1, 1, 1, 1, 1, 1, 1],
        [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1], [0, 1, 1], [1, 0, 1], [1, 1, 0], [1, 1, 1]],
    )
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.01)
Пример #8
0
def MM4ReadMOLWrite():
	""" A test of MM4 reading and MOL, XYZ writing


	"""
	mg1=MolecularCoordinates.readMM4File('JP10stochFixedStruct.out',1)
	mg2=MolecularCoordinates.readMM4File('JP10stochFixedStruct.out',295)
	mg1a=MolecularCoordinates.readMM4File('JP10stochFixedStruct.out',253)
	mg1.writeMOLFile('JP10_MM4_1.mol', 'JP10_MM4_1')
	mg2.writeMOLFile('JP10_MM4_8.mol', 'JP10_MM4_8')
	mg1a.writeMOLFile('JP10_MM4_7.mol', 'JP10_MM4_7')
	mg1.perceiveConnectivity()
	mg1.writeMOLFile('JP10_MM4_1_conn.mol', 'JP10_MM4_1', connectivity=True)
	mg1.writeXYZFile('JP10_MM4_1.xyz', 'JP10_MM4_1')
	print MolecularCoordinates.checkConformationalEquivalence(mg1, mg1a, Atol=0.02)
	atomMap = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8, 9:9, 10:10, 11:11, 12:12, 13:13, 14:14, 15:15, 16:16, 17:17, 18:18, 19:19, 20:20, 21:21, 22:22, 23:23, 24:24, 25:25, 26:26} #"correct" mapping
	(distDevAbs,distDevRel) = MolecularCoordinates.calcDistanceDeviationsGivenMapping(mg1, mg1a, atomMap)
	distDevAbsMax = MolecularCoordinates.dictionaryMaxAbs(distDevAbs)
	distDevRelMax = MolecularCoordinates.dictionaryMaxAbs(distDevRel)
	print distDevAbsMax
Пример #9
0
def MirrorImageConf():
    ac = [
        [-1.5846, -0.5216, 0.1338],
        [-1.1512, -1.5146, -0.0477],
        [-1.7781, -0.4440, 1.2120],
        [-2.5555, -0.4907, -0.3770],
        [-0.6751, 0.5855, -0.3509],
        [-1.1705, 1.5633, -0.1896],
        [-0.5293, 0.5028, -1.4463],
        [0.6751, 0.5854, 0.3509],
        [1.1705, 1.5633, 0.1895],
        [0.5294, 0.5028, 1.4463],
        [1.5846, -0.5216, -0.1338],
        [2.5554, -0.4908, 0.3772],
        [1.1510, -1.5146, 0.0475],
        [1.7783, -0.4438, -1.2120],
    ]
    aa = [6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 1]
    bc = [
        [-1.5845, -0.5216, -0.1338],
        [-1.7784, -0.4438, -1.2120],
        [-1.1509, -1.5146, 0.0474],
        [-2.5553, -0.4910, 0.3773],
        [-0.6751, 0.5855, 0.3508],
        [-0.5293, 0.5028, 1.4463],
        [-1.1705, 1.5634, 0.1895],
        [0.6751, 0.5855, -0.3508],
        [1.1705, 1.5633, -0.1893],
        [0.5294, 0.5030, -1.4463],
        [1.5845, -0.5216, 0.1338],
        [1.1510, -1.5146, -0.0478],
        [2.5555, -0.4908, -0.3770],
        [1.7780, -0.4441, 1.2121],
    ]
    ba = [6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 1]
    a = MolecularCoordinates.MolecularGeometry(aa, ac)
    b = MolecularCoordinates.MolecularGeometry(ba, bc)
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.001)
Пример #10
0
def AtomTypeSwapConf():
    a = MolecularCoordinates.MolecularGeometry([8, 1, 1], [[0, 0, 0], [1, 0, 0], [0, 1, 0]])
    b = MolecularCoordinates.MolecularGeometry([1, 8, 1], [[0, 0, 0], [1, 0, 0], [0, 1, 0]])
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.01)
Пример #11
0
def DistinctJP10Conf():
    a = MolecularCoordinates.readMOLFile("JP10A.mol")
    b = MolecularCoordinates.readMOLFile("JP10B.mol")
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.10)
Пример #12
0
def Buckminsterfullerene():
    a = MolecularCoordinates.readMOLFile("c60_c.mol")
    b = MolecularCoordinates.readMOLFile("c60_c.mol")
    return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.01)
Пример #13
0
def AtomTypeSwapConf():
	a = MolecularCoordinates.MolecularGeometry([8,1,1],[[0,0,0],[1,0,0],[0,1,0]])
	b = MolecularCoordinates.MolecularGeometry([1,8,1],[[0,0,0],[1,0,0],[0,1,0]])
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.01)
Пример #14
0
def DistinctJP10Conf():
	a = MolecularCoordinates.readMOLFile('JP10A.mol')
	b = MolecularCoordinates.readMOLFile('JP10B.mol')
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.10)
Пример #15
0
def Buckminsterfullerene():
	a = MolecularCoordinates.readMOLFile('c60_c.mol')
	b = MolecularCoordinates.readMOLFile('c60_c.mol')
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.01)
Пример #16
0
def SimpleHomConf():
	a = MolecularCoordinates.MolecularGeometry([1,1,1,1,1,1,1,1],[[0,0,0],[1,0,0],[0,1,0],[0,0,1],[0,1,1],[1,0,1],[1,1,0],[1,1,1]])
	b = MolecularCoordinates.MolecularGeometry([1,1,1,1,1,1,1,1],[[0,0,0],[1,0,0],[0,1,0],[0,0,1],[0,1,1],[1,0,1],[1,1,0],[1,1,1]])
	return MolecularCoordinates.checkConformationalEquivalence(b, a, Atol=0.01)