°æ¿éµ¼º½
ÕýÔÚ¼ÓÔØÖÐ...
¿Í»§¶ËAPPÏÂÔØ
怬
×¢²á
Ìû×Ó
Ìû×Ó
Óû§
±¾°æ
Ó¦¡¶ÍøÂ簲ȫ·¨¡·ÒªÇó£¬×Ô2017Äê10ÔÂ1ÈÕÆð£¬Î´½øÐÐʵÃûÈÏÖ¤½«²»µÃʹÓû¥ÁªÍø¸úÌû·þÎñ¡£Îª±£ÕÏÄúµÄÕʺÅÄܹ»Õý³£Ê¹Óã¬Ç뾡¿ì¶ÔÕʺŽøÐÐÊÖ»úºÅÑéÖ¤£¬¸ÐлÄúµÄÀí½âÓëÖ§³Ö£¡
24СʱÈÈÃŰæ¿éÅÅÐаñ
>
ÂÛ̳¸üÐÂÈÕÖ¾
(3997)
>
»ù½ðÉêÇë
(676)
>
³æÓÑ»¥Ê¶
(373)
>
ÎÄÏ×ÇóÖú
(213)
>
µ¼Ê¦ÕÐÉú
(107)
>
¿¼²©
(83)
>
ÕÐÆ¸ÐÅÏ¢²¼¸æÀ¸
(66)
>
ÂÛÎĵÀºØÆí¸£
(61)
>
ÐÝÏйàË®
(61)
>
ÂÛÎÄͶ¸å
(44)
>
²©ºóÖ®¼Ò
(41)
>
ÂÌÉ«ÇóÖú(¸ßÐüÉÍ)
(38)
>
˶²©¼ÒÔ°
(38)
>
½Ìʦ֮¼Ò
(32)
>
¿¼ÑÐ
(28)
>
¹«Åɳö¹ú
(20)
Сľ³æÂÛ̳-ѧÊõ¿ÆÑл¥¶¯Æ½Ì¨
»
¼ÆËãÄ£ÄâÇø
»
·Ö×ÓÄ£Äâ
»
Monte Carlo
»
¡¾Ô´´¡¿MAPSÖй¹Öþ³¬¾§°ûµÄpython³ÌÐò
3
1/1
·µ»ØÁбí
²é¿´: 730 | »Ø¸´: 2
Ö»¿´Â¥Ö÷
@ËûÈË
´æµµ
лظ´ÌáÐÑ
(ºöÂÔ)
ÊÕ²Ø
ÔÚAPPÖв鿴
zyj8119
ľ³æ
(ÖøÃûдÊÖ)
Ä£ÄâEPI: 10
Ó¦Öú: 65
(³õÖÐÉú)
¹ó±ö: 0.003
½ð±Ò: 915.1
É¢½ð: 1440
ºì»¨: 35
Ìû×Ó: 2936
ÔÚÏß: 1329.4Сʱ
³æºÅ: 664177
×¢²á: 2008-11-29
ÐÔ±ð: GG
רҵ: ÀíÂۺͼÆË㻯ѧ
[½»Á÷]
¡¾Ô´´¡¿MAPSÖй¹Öþ³¬¾§°ûµÄpython³ÌÐò
ÒÑÓÐ2È˲ÎÓë
CODE:
#!/usr/bin/python
###########################################################################
# buildCluster.py - description
# -------------------------------
# begin : Fri Dec 15 16:11:04 CET 2006
# copyright : (C) 2006 by Scienomics
# email : Joerg-Ruediger.Hill@scienomics.com
###########################################################################
#
###########################################################################
# #
# This program and all subroutines, data, and files used by it are #
# protected by copyright and hence may not be used, copied, modified #
# transmitted, inspected, or executed by any means including the use #
# of electronic data processing equipment, xerography, or any other #
# methods without the express written permission of the copyright #
# holder. #
# #
# Copyright (C) 2006 Scienomics S. A. #
# #
###########################################################################
#
# $Id: buildCluster.py,v 1.10 2010/03/29 15:15:56 jrh Exp $
# $Log: buildCluster.py,v $
# Revision 1.10 2010/03/29 15:15:56 jrh
# Moved to new way of retrieving plugin objects
#
# Revision 1.9 2008/10/20 09:25:06 lperi
# Clear undo stack (bug 2562).
#
# Revision 1.8 2008/10/14 15:21:17 jrh
# Fixed bug 2520
#
# Revision 1.7 2008/01/16 12:21:18 jrh
# Moved to Qt4
#
# Revision 1.6 2007/01/16 10:28:26 jrh
# Removed automatic creation of cell since this might crash
#
# Revision 1.5 2006/12/15 16:07:31 jrh
# Added header and documentation
#
#
import Maps
import MapsChemistryDataModel
import MapsViewer
from PyQt4 import *
class ClusterBuilder:
""" This class implements a cluster generating algorithm
by cutting atoms from a periodic system based on a
distance criterion. The class takes either the active
molecule or asks the user to load a molecule if no
active molecule is found, puts a molecule into a box
at density 1.0 if the system is not periodic already,
and builds a cluster by copying all atoms which are
within 5 Ang from the central atom to a new model.
"""
app=Maps.MapsApp.getContainer()
cdm=MapsChemistryDataModel.ChemistryDataModel.get()
viewerPlugin=MapsViewer.ViewerPlugin.get()
project=None
molecule=None
def loadMolecule(self):
activeViewer=self.viewerPlugin.getActiveViewer()
if activeViewer != None:
self.molecule=activeViewer.getMolecule()
projectName=self.cdm.findProjectNameForMolecule(self.molecule)
self.project=self.cdm.findProjectByName(projectName)
QtGui.qApp.processEvents()
return(0)
else:
QtGui.QMessageBox.information(self.app, "Note", "Please load a molecule from the\nfollowing dialog.")
# Load a molecule from an existing file
dialog=self.app.fileDialog
dialog.setFileMode(QtGui.QFileDialog.ExistingFile)
dialog.setWindowTitle("Open file")
filters=QtCore.QStringList()
filters.append("All files (*)")
dialog.setFilters(filters)
dialog.selectFile("")
if dialog.exec_(Maps.FileDialog.DATA) == QtGui.QDialog.Accepted:
fileName=str(dialog.selectedFiles()[0])
self.app.openDocumentFile(fileName, None, "")
projects=self.cdm.getProjects()
self.project=projects[0]
molecules=self.project.getMolecules()
self.molecule=molecules[0]
self.viewerPlugin.start(self.molecule)
QtGui.qApp.processEvents()
return(0)
else:
return(1)
def createSuperCell(self):
# Create a 3 x 3 x 3 super cell. If the system is not periodic tell
# the user and exit
if not self.molecule.isPeriodic():
QtGui.QMessageBox.information(self.app, "Note", "Please use a periodic system with this script.")
return(0);
else:
cell=self.molecule.getActiveConformation().getUnitcell()
cell.setDuplicate(3, 3, 3, 1)
cell.makeSuperCell(1)
QtGui.qApp.processEvents()
return(1)
def cutCluster(self):
# Cut a cluster by finding the atom closest to the center of the
# super cell and including all atoms at a distance of up to
# 5.0 Ang from this atom
center=self.molecule.calculateCenterOfGravity(self.molecule.atoms)
min=100.0
centerAtom=None
for atom in self.molecule.atoms:
pos=atom.getCoordinates()
diff=pos-center
if diff.abs() < min:
min=diff.abs()
centerAtom=atom
viewer=self.viewerPlugin.getActiveViewer()
# Clear the undo stack to prevent a discontinuity
# in the recorded editing actions which could
# cause a crash
viewer.clearUndoStack()
viewer.setSelectionMode(MapsViewer.Viewer.DISTANCE, 5.0)
viewer.selectAtoms(centerAtom, 1)
viewer.copy()
# Create a new model in the same project and paste the cluster
# in there
cluster=MapsChemistryDataModel.Molecule(self.cdm)
cluster.setName("Cluster")
self.project.addMolecule(cluster)
self.viewerPlugin.start(cluster)
clusterViewer=self.viewerPlugin.getActiveViewer()
clusterViewer.paste()
clusterViewer.centerMolecule()
clusterViewer.getMoleculeRenderer().setSelection(cluster.atoms, 0)
QtGui.qApp.processEvents()
def run(self):
if not self.loadMolecule():
if self.createSuperCell():
self.cutCluster()
#-------------------------
if __name__ == '__main__':
builder=ClusterBuilder()
builder.run()
»Ø¸´´ËÂ¥
» ±¾ÌûÒÑ»ñµÃµÄºì»¨£¨×îÐÂ10¶ä£©
liuying287
» ²ÂÄãϲ»¶
5¸ö%2F£¬·Ç¹Ì¶¨¶Î22¸ö×Öĸ
ÒѾÓÐ9È˻ظ´
ÃæÉϵÄË®ºÜÉî
ÒѾÓÐ15È˻ظ´
¹úÉç¿ÆÍ¨Ñ¶ÆÀÉó
ÒѾÓÐ4È˻ظ´
ÉúÃü¿ÚC13ÃæÉÏ»áÆÀʱ¼ä
ÒѾÓÐ11È˻ظ´
ÄÚÐÄØÑ·¦
ÒѾÓÐ16È˻ظ´
ÉúÃü¿ÚÃæÉÏ»áÆÀ½áÊøÁËÂð´ó¼ÒÓÐÖªµÀ½á¹ûÂð£¿ÏÖÔÚ»¹Ã»Óнá¹ûÕý³£²»£¿
ÒѾÓÐ9È˻ظ´
ͶӢÎÄÆÚ¿¯ÈçºÎ²éÖØ
ÒѾÓÐ6È˻ظ´
²»ÒªÔÙÊý¹ú×ÔÈ»ÉêÇëÊéµÄ filecode µÄ·Ö¸ô·û¸öÊýÁË
ÒѾÓÐ21È˻ظ´
²®°·Éϼ׻ùÇóÖú
ÒѾÓÐ7È˻ظ´
¿ç³ö°æÉçÉÌͶ¸å
ÒѾÓÐ5È˻ظ´
¸ß¼¶»Ø¸´
ºÃºÃѧϰ£¬ÌìÌìÏòÉÏ¡£
1Â¥
2010-12-26 17:30:30
ÒÑÔÄ
»Ø¸´´ËÂ¥
¹Ø×¢TA
¸øTA·¢ÏûÏ¢
ËÍTAºì»¨
TAµÄ»ØÌû
liuying287
ËÍÏÊ»¨Ò»¶ä
2Â¥
2012-03-22 16:11:27
ÒÑÔÄ
»Ø¸´´ËÂ¥
¹Ø×¢TA
¸øTA·¢ÏûÏ¢
ËÍTAºì»¨
TAµÄ»ØÌû
juwendy
Ìú³æ
(ÕýʽдÊÖ)
Ó¦Öú: 2
(Ó×¶ùÔ°)
½ð±Ò: 4898.8
Ìû×Ó: 422
ÔÚÏß: 399.4Сʱ
³æºÅ: 796719
×¢²á: 2009-06-18
רҵ: ÑÒÍÁÓë»ù´¡¹¤³Ì
¶¥Ò»¸ö£¬Ö§³ÖÂ¥Ö÷¡£
»Ø¸´´ËÂ¥
3Â¥
2012-03-22 21:09:32
ÒÑÔÄ
»Ø¸´´ËÂ¥
¹Ø×¢TA
¸øTA·¢ÏûÏ¢
ËÍTAºì»¨
TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª
µÚÒ»ÐÔÔÀí
Á¿×Ó»¯Ñ§
¼ÆËãÄ£Äâ
·Ö×ÓÄ£Äâ
·ÂտģÄâ
³ÌÐòÓïÑÔ
ÎÒÒª¶©ÔÄÂ¥Ö÷
zyj8119
µÄÖ÷Ìâ¸üÐÂ
3
1/1
·µ»ØÁбí
Èç¹û»ØÌûÄÚÈݺ¬ÓÐÐû´«ÐÅÏ¢£¬ÇëÈçʵѡÖС£·ñÔòÕʺŽ«±»È«ÂÛ̳½ûÑÔ
ÆÕͨ±íÇé
Áú
ÍÃ
Ȣ
è
¸ß¼¶»Ø¸´
(¿ÉÉÏ´«¸½¼þ)
°Ù¶ÈÍøÅÌ
|
360ÔÆÅÌ
|
ǧÒ×ÍøÅÌ
|
»ªÎªÍøÅÌ
ÔÚд°¿ÚÒ³ÃæÖдò¿ª×Ô¼ºÏ²»¶µÄÍøÅÌÍøÕ¾£¬½«ÎļþÉÏ´«ºó£¬È»ºó½«ÏÂÔØÁ´½Ó¸´ÖƵ½Ìû×ÓÄÚÈÝÖоͿÉÒÔÁË¡£
×î¾ßÈËÆøÈÈÌûÍÆ¼ö
[²é¿´È«²¿]
×÷Õß
»Ø/¿´
×îºó·¢±í
[
»ù½ðÉêÇë
]
5¸ö%2F£¬·Ç¹Ì¶¨¶Î22¸ö×Öĸ
+8
jaasxulu
2026-07-15
9/450
2026-07-18 17:40
by
dxcgbm
[
»ù½ðÉêÇë
]
ÃæÉϵÄË®ºÜÉî
+10
²¼²¼ºÍÒ»¶þ
2026-07-18
15/750
2026-07-18 17:07
by
6543yes
[
»ù½ðÉêÇë
]
¹úÉç¿ÆÍ¨Ñ¶ÆÀÉó
+3
DZˮ¹Ú¾ü123
2026-07-18
4/200
2026-07-18 16:29
by
×î°®±à×ë´Çµä
[
»ù½ðÉêÇë
]
ÉúÃü¿ÚC13ÃæÉÏ»áÆÀʱ¼ä
+7
luckinging
2026-07-14
11/550
2026-07-17 20:43
by
³æ²·1988
[
½Ìʦ֮¼Ò
]
ÄÚÐÄØÑ·¦
+16
Ë®±ùÔÂÔÂÒ°ÍÃ
2026-07-12
16/800
2026-07-17 19:25
by
otani
[
»ù½ðÉêÇë
]
ÉúÃü¿ÚÃæÉÏ»áÆÀ½áÊøÁËÂð´ó¼ÒÓÐÖªµÀ½á¹ûÂð£¿ÏÖÔÚ»¹Ã»Óнá¹ûÕý³£²»£¿
+6
±ÌË®00
2026-07-16
9/450
2026-07-17 15:21
by
jaasxulu
[
ÂÛÎÄͶ¸å
]
ͶӢÎÄÆÚ¿¯ÈçºÎ²éÖØ
10
+5
²»ÖªµÀȡʲôÃû×
2026-07-15
6/300
2026-07-17 09:07
by
bobvan
[
»ù½ðÉêÇë
]
²»ÒªÔÙÊý¹ú×ÔÈ»ÉêÇëÊéµÄ filecode µÄ·Ö¸ô·û¸öÊýÁË
+14
sadpencil
2026-07-12
21/1050
2026-07-17 00:15
by
wangze12014
[
Óлú½»Á÷
]
²®°·Éϼ׻ùÇóÖú
100
+4
002tmumu
2026-07-14
7/350
2026-07-16 19:47
by
002tmumu
[
ÂÛÎÄͶ¸å
]
¿ç³ö°æÉçÉÌͶ¸å
20
+5
ÄߺÃ520
2026-07-13
5/250
2026-07-16 17:24
by
ÎÞÊÓ¾üÍÅ
[
»ù½ðÉêÇë
]
ÉúÉúÃüѧ²¿»áÆÀ
+4
wuke100666
2026-07-15
4/200
2026-07-16 00:12
by
À²À²Ð¡ÄÝ×Ó
[
»ù½ðÉêÇë
]
H¿Ú£¬ÃæÉÏ£¬Ê±¼ä´Á7ÔÂ7ÈÕ¡£
+3
plumage5
2026-07-15
3/150
2026-07-15 21:06
by
6543yes
[
»ù½ðÉêÇë
]
Сľ³æÃ»ÂäÁË£¬³ýÁËÆíµ»Ìû×Ó£¬¼¸ºõ¿´²»µ½ÓмÛÖµµÄÌû×Ó
+13
botar
2026-07-14
14/700
2026-07-15 19:28
by
º®Á÷32
[
»ù½ðÉêÇë
]
»áÆÀ
+5
ÎÞÃûÕßµÇɽ
2026-07-15
5/250
2026-07-15 18:15
by
¸Ü¾ÍÊÇÄã¶Ô
[
»ù½ðÉêÇë
]
E¿Ú»áÆÀ
+11
²¼²¼ºÍÒ»¶þ
2026-07-13
13/650
2026-07-15 16:34
by
Kittylucky
[
»ù½ðÉêÇë
]
E¿ÚÇàC»áÆÀ½áÊøÁËÂð£¿
40
+3
ССÊ鳿c
2026-07-14
9/450
2026-07-15 16:04
by
°²¾²µÄÖªÁË
[
ÂÛÎÄͶ¸å
]
ũҵ»úеѧ±¨Í¶¸åÖÜÆÚ
+3
G0DLIN
2026-07-14
7/350
2026-07-15 09:26
by
xs74101122
[
»ù½ðÉêÇë
]
¹ú×ÔÈ»ÃæÉÏD¿ÚÆíµ»
+4
monkeynana
2026-07-14
4/200
2026-07-15 09:14
by
°×Ë®Öó
[
»ù½ðÉêÇë
]
ûÊÕµ½ÏûÏ¢£¬ÔÙ´ÎÅãÅÜ
+3
Ìì¿ÕÐdz½fly
2026-07-14
3/150
2026-07-14 19:14
by
6543yes
[
»ù½ðÉêÇë
]
Ã÷ÌìE¿ÚÃæÉÏ»áÆÀ
+8
²¼²¼ºÍÒ»¶þ
2026-07-12
9/450
2026-07-13 22:59
by
QTSorange
ÐÅÏ¢Ìáʾ
¹Ø±Õ
ÇëÌî´¦ÀíÒâ¼û
¹Ø±Õ
È·¶¨