SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


abinitio:ase_atoms

module ase.atoms

<html><head><title>Python: module ase.atoms</title></head><body bgcolor=“#f0f0f8”><br> <br> <p> <table summary=“section” border=“0” cellpadding=“2” cellspacing=“0” width=“100%”> <tbody>

<tr><td>&nbsp;</td> <td width=“100%”><br> <dl> <dd> <dl></dl> </dd> </dl> <p> <table summary=“section” border=“0” cellpadding=“2” cellspacing=“0” width=“100%”> <tbody><tr bgcolor=“#ffc8d8”> <td colspan=“3” valign=“bottom”>&nbsp;<br> <font color=“#000000” face=“helvetica, arial”><a name=“Atoms”>class <strong>Atoms</strong></a>(<a href=“builtin.html#object”>builtin.object</a>)</font></td></tr>

<tr bgcolor=“#ffc8d8”><td rowspan=“2”><tt>&nbsp;&nbsp;&nbsp;</tt></td> <td colspan=“2”><tt><a href=“#Atoms”>Atoms</a>&nbsp;<a href=“builtin.html#object”>object</a>.<br> &nbsp;<br> The&nbsp;<a href=“#Atoms”>Atoms</a>&nbsp;<a href=“builtin.html#object”>object</a>&nbsp;can&nbsp;represent&nbsp;an&nbsp;isolated&nbsp;molecule,&nbsp;or&nbsp;a<br> periodically&nbsp;repeated&nbsp;structure.&nbsp;&nbsp;It&nbsp;has&nbsp;a&nbsp;unit&nbsp;cell&nbsp;and<br> there&nbsp;may&nbsp;be&nbsp;periodic&nbsp;boundary&nbsp;conditions&nbsp;along&nbsp;any&nbsp;of&nbsp;the&nbsp;three<br> unit&nbsp;cell&nbsp;axes.<br> &nbsp;<br> Information&nbsp;about&nbsp;the&nbsp;atoms&nbsp;(atomic&nbsp;numbers&nbsp;and&nbsp;position)&nbsp;is<br> stored&nbsp;in&nbsp;ndarrays.&nbsp;&nbsp;Optionally,&nbsp;there&nbsp;can&nbsp;be&nbsp;information&nbsp;about<br> tags,&nbsp;momenta,&nbsp;masses,&nbsp;magnetic&nbsp;moments&nbsp;and&nbsp;charges.<br> &nbsp;<br> In&nbsp;order&nbsp;to&nbsp;calculate&nbsp;energies,&nbsp;forces&nbsp;and&nbsp;stresses,&nbsp;a&nbsp;calculator<br> <a href=“builtin.html#object”>object</a>&nbsp;has&nbsp;to&nbsp;attached&nbsp;to&nbsp;the&nbsp;atoms&nbsp;<a href=“builtin.html#object”>object</a>.<br> &nbsp;<br> Parameters:<br> &nbsp;<br> symbols:&nbsp;str&nbsp;(formula)&nbsp;or&nbsp;list&nbsp;of&nbsp;str<br>&nbsp;&nbsp;&nbsp;&nbsp;Can&nbsp;be&nbsp;a&nbsp;string&nbsp;formula,&nbsp;a&nbsp;list&nbsp;of&nbsp;symbols&nbsp;or&nbsp;a&nbsp;list&nbsp;of<br> &nbsp;&nbsp;&nbsp;&nbsp;Atom&nbsp;objects.&nbsp;&nbsp;Examples:&nbsp;'H2O',&nbsp;'COPt12',&nbsp;['H',&nbsp;'H',&nbsp;'O'],<br> &nbsp;&nbsp;&nbsp;&nbsp;[Atom('Ne',&nbsp;(x,&nbsp;y,&nbsp;z)),&nbsp;…].<br> positions:&nbsp;list&nbsp;of&nbsp;xyz-positions<br> &nbsp;&nbsp;&nbsp;&nbsp;Atomic&nbsp;positions.&nbsp;&nbsp;Anything&nbsp;that&nbsp;can&nbsp;be&nbsp;converted&nbsp;to&nbsp;an<br> &nbsp;&nbsp;&nbsp;&nbsp;ndarray&nbsp;of&nbsp;shape&nbsp;(n,&nbsp;3)&nbsp;will&nbsp;do:&nbsp;[(x1,y1,z1),&nbsp;(x2,y2,z2),<br> &nbsp;&nbsp;&nbsp;&nbsp;…].<br> scaled_positions:&nbsp;list&nbsp;of&nbsp;scaled-positions<br> &nbsp;&nbsp;&nbsp;&nbsp;Like&nbsp;positions,&nbsp;but&nbsp;given&nbsp;in&nbsp;units&nbsp;of&nbsp;the&nbsp;unit&nbsp;cell.<br> &nbsp;&nbsp;&nbsp;&nbsp;Can&nbsp;not&nbsp;be&nbsp;set&nbsp;at&nbsp;the&nbsp;same&nbsp;time&nbsp;as&nbsp;positions.<br> numbers:&nbsp;list&nbsp;of&nbsp;int<br> &nbsp;&nbsp;&nbsp;&nbsp;Atomic&nbsp;numbers&nbsp;(use&nbsp;only&nbsp;one&nbsp;of&nbsp;symbols/numbers).<br> tags:&nbsp;list&nbsp;of&nbsp;int<br> &nbsp;&nbsp;&nbsp;&nbsp;Special&nbsp;purpose&nbsp;tags.<br> momenta:&nbsp;list&nbsp;of&nbsp;xyz-momenta<br> &nbsp;&nbsp;&nbsp;&nbsp;Momenta&nbsp;for&nbsp;all&nbsp;atoms.<br> masses:&nbsp;list&nbsp;of&nbsp;float<br> &nbsp;&nbsp;&nbsp;&nbsp;Atomic&nbsp;masses&nbsp;in&nbsp;atomic&nbsp;units.<br> magmoms:&nbsp;list&nbsp;of&nbsp;float&nbsp;or&nbsp;list&nbsp;of&nbsp;xyz-values<br> &nbsp;&nbsp;&nbsp;&nbsp;Magnetic&nbsp;moments.&nbsp;&nbsp;Can&nbsp;be&nbsp;either&nbsp;a&nbsp;single&nbsp;value&nbsp;for&nbsp;each&nbsp;atom<br> &nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;collinear&nbsp;calculations&nbsp;or&nbsp;three&nbsp;numbers&nbsp;for&nbsp;each&nbsp;atom&nbsp;for<br> &nbsp;&nbsp;&nbsp;&nbsp;non-collinear&nbsp;calculations.<br> charges:&nbsp;list&nbsp;of&nbsp;float<br> &nbsp;&nbsp;&nbsp;&nbsp;Atomic&nbsp;charges.<br> cell:&nbsp;3×3&nbsp;matrix<br> &nbsp;&nbsp;&nbsp;&nbsp;Unit&nbsp;cell&nbsp;vectors.&nbsp;&nbsp;Can&nbsp;also&nbsp;be&nbsp;given&nbsp;as&nbsp;just&nbsp;three<br> &nbsp;&nbsp;&nbsp;&nbsp;numbers&nbsp;for&nbsp;orthorhombic&nbsp;cells.&nbsp;&nbsp;Default&nbsp;value:&nbsp;[1,&nbsp;1,&nbsp;1].<br> celldisp:&nbsp;Vector<br> &nbsp;&nbsp;&nbsp;&nbsp;Unit&nbsp;cell&nbsp;displacement&nbsp;vector.&nbsp;To&nbsp;visualize&nbsp;a&nbsp;displaced&nbsp;cell<br> &nbsp;&nbsp;&nbsp;&nbsp;around&nbsp;the&nbsp;center&nbsp;of&nbsp;mass&nbsp;of&nbsp;a&nbsp;Systems&nbsp;of&nbsp;atoms.&nbsp;Default&nbsp;value<br> &nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;(0,0,0)<br> pbc:&nbsp;one&nbsp;or&nbsp;three&nbsp;bool<br> &nbsp;&nbsp;&nbsp;&nbsp;Periodic&nbsp;boundary&nbsp;conditions&nbsp;flags.&nbsp;&nbsp;Examples:&nbsp;True,<br> &nbsp;&nbsp;&nbsp;&nbsp;False,&nbsp;0,&nbsp;1,&nbsp;(1,&nbsp;1,&nbsp;0),&nbsp;(True,&nbsp;False,&nbsp;False).&nbsp;&nbsp;Default<br> &nbsp;&nbsp;&nbsp;&nbsp;value:&nbsp;False.<br> constraint:&nbsp;constraint&nbsp;<a href=“builtin.html#object”>object</a>(s)<br> &nbsp;&nbsp;&nbsp;&nbsp;Used&nbsp;for&nbsp;applying&nbsp;one&nbsp;or&nbsp;more&nbsp;constraints&nbsp;during&nbsp;structure<br> &nbsp;&nbsp;&nbsp;&nbsp;optimization.<br> calculator:&nbsp;calculator&nbsp;<a href=“builtin.html#object”>object</a><br> &nbsp;&nbsp;&nbsp;&nbsp;Used&nbsp;to&nbsp;attach&nbsp;a&nbsp;calculator&nbsp;for&nbsp;calculating&nbsp;energies&nbsp;and&nbsp;atomic<br> &nbsp;&nbsp;&nbsp;&nbsp;forces.<br> info:&nbsp;dict&nbsp;of&nbsp;key-value&nbsp;pairs<br> &nbsp;&nbsp;&nbsp;&nbsp;Dictionary&nbsp;of&nbsp;key-value&nbsp;pairs&nbsp;with&nbsp;additional&nbsp;information<br> &nbsp;&nbsp;&nbsp;&nbsp;about&nbsp;the&nbsp;system.&nbsp;&nbsp;The&nbsp;following&nbsp;keys&nbsp;may&nbsp;be&nbsp;used&nbsp;by&nbsp;ase:<br> &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;spacegroup:&nbsp;Spacegroup&nbsp;instance<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;unit_cell:&nbsp;'conventional'&nbsp;|&nbsp;'primitive'&nbsp;|&nbsp;int&nbsp;|&nbsp;3&nbsp;ints<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;adsorbate_info:<br> &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;Items&nbsp;in&nbsp;the&nbsp;info&nbsp;attribute&nbsp;survives&nbsp;copy&nbsp;and&nbsp;slicing&nbsp;and&nbsp;can<br> &nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;store&nbsp;to&nbsp;and&nbsp;retrieved&nbsp;from&nbsp;trajectory&nbsp;files&nbsp;given&nbsp;that&nbsp;the<br> &nbsp;&nbsp;&nbsp;&nbsp;key&nbsp;is&nbsp;a&nbsp;string,&nbsp;the&nbsp;value&nbsp;is&nbsp;picklable&nbsp;and,&nbsp;if&nbsp;the&nbsp;value&nbsp;is&nbsp;a<br> &nbsp;&nbsp;&nbsp;&nbsp;user-defined&nbsp;<a href=“builtin.html#object”>object</a>,&nbsp;its&nbsp;base&nbsp;class&nbsp;is&nbsp;importable.&nbsp;&nbsp;One&nbsp;should<br> &nbsp;&nbsp;&nbsp;&nbsp;not&nbsp;make&nbsp;any&nbsp;assumptions&nbsp;about&nbsp;the&nbsp;existence&nbsp;of&nbsp;keys.<br> &nbsp;<br> Examples:<br> &nbsp;<br> These&nbsp;three&nbsp;are&nbsp;equivalent:<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;d&nbsp;=&nbsp;1.104&nbsp;&nbsp;#&nbsp;N2&nbsp;bondlength<br> &gt;&gt;&gt;&nbsp;a&nbsp;=&nbsp;<a href=“#Atoms”>Atoms</a>('N2',&nbsp;[(0,&nbsp;0,&nbsp;0),&nbsp;(0,&nbsp;0,&nbsp;d)])<br> &gt;&gt;&gt;&nbsp;a&nbsp;=&nbsp;<a href=“#Atoms”>Atoms</a>(numbers=[7,&nbsp;7],&nbsp;positions=[(0,&nbsp;0,&nbsp;0),&nbsp;(0,&nbsp;0,&nbsp;d)])<br> &gt;&gt;&gt;&nbsp;a&nbsp;=&nbsp;<a href=“#Atoms”>Atoms</a>([Atom('N',&nbsp;(0,&nbsp;0,&nbsp;0)),&nbsp;Atom('N',&nbsp;(0,&nbsp;0,&nbsp;d)])<br> &nbsp;<br> FCC&nbsp;gold:<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;a&nbsp;=&nbsp;4.05&nbsp;&nbsp;#&nbsp;Gold&nbsp;lattice&nbsp;constant<br> &gt;&gt;&gt;&nbsp;b&nbsp;=&nbsp;a&nbsp;/&nbsp;2<br> &gt;&gt;&gt;&nbsp;fcc&nbsp;=&nbsp;<a href=“#Atoms”>Atoms</a>('Au',<br> …&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cell=[(0,&nbsp;b,&nbsp;b),&nbsp;(b,&nbsp;0,&nbsp;b),&nbsp;(b,&nbsp;b,&nbsp;0)],<br> …&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pbc=True)<br> &nbsp;<br> Hydrogen&nbsp;wire:<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;d&nbsp;=&nbsp;0.9&nbsp;&nbsp;#&nbsp;H-H&nbsp;distance<br> &gt;&gt;&gt;&nbsp;L&nbsp;=&nbsp;7.0<br> &gt;&gt;&gt;&nbsp;h&nbsp;=&nbsp;<a href=“#Atoms”>Atoms</a>('H',&nbsp;positions=[(0,&nbsp;L&nbsp;/&nbsp;2,&nbsp;L&nbsp;/&nbsp;2)],<br> …&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cell=(d,&nbsp;L,&nbsp;L),<br> …&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pbc=(1,&nbsp;0,&nbsp;0))<br>&nbsp;</tt></td></tr> <tr><td>&nbsp;</td> <td width=“100%”>Methods defined here:<br> <dl><dt><a name=“Atoms-add”><strong>add</strong></a>(self, other)</dt></dl>

<dl><dt><a name=“Atoms-delitem”><strong>delitem</strong></a>(self, i)</dt></dl>

<dl><dt><a name=“Atoms-eq”><strong>eq</strong></a>(self, other)</dt><dd><tt>Check&nbsp;for&nbsp;identity&nbsp;of&nbsp;two&nbsp;atoms&nbsp;objects.<br> &nbsp;<br> Identity&nbsp;means:&nbsp;same&nbsp;positions,&nbsp;atomic&nbsp;numbers,&nbsp;unit&nbsp;cell&nbsp;and<br> periodic&nbsp;boundary&nbsp;conditions.</tt></dd></dl>

<dl><dt><a name=“Atoms-getitem”><strong>getitem</strong></a>(self, i)</dt><dd><tt>Return&nbsp;a&nbsp;subset&nbsp;of&nbsp;the&nbsp;atoms.<br> &nbsp;<br> i&nbsp;–&nbsp;scalar&nbsp;integer,&nbsp;list&nbsp;of&nbsp;integers,&nbsp;or&nbsp;slice&nbsp;<a href=“builtin.html#object”>object</a><br> describing&nbsp;which&nbsp;atoms&nbsp;to&nbsp;return.<br> &nbsp;<br> If&nbsp;i&nbsp;is&nbsp;a&nbsp;scalar,&nbsp;return&nbsp;an&nbsp;Atom&nbsp;<a href=“builtin.html#object”>object</a>.&nbsp;If&nbsp;i&nbsp;is&nbsp;a&nbsp;list&nbsp;or&nbsp;a<br> slice,&nbsp;return&nbsp;an&nbsp;<a href=“#Atoms”>Atoms</a>&nbsp;<a href=“builtin.html#object”>object</a>&nbsp;with&nbsp;the&nbsp;same&nbsp;cell,&nbsp;pbc,&nbsp;and<br> other&nbsp;associated&nbsp;info&nbsp;as&nbsp;the&nbsp;original&nbsp;<a href=“#Atoms”>Atoms</a>&nbsp;<a href=“builtin.html#object”>object</a>.&nbsp;The<br> indices&nbsp;of&nbsp;the&nbsp;constraints&nbsp;will&nbsp;be&nbsp;shuffled&nbsp;so&nbsp;that&nbsp;they&nbsp;match<br> the&nbsp;indexing&nbsp;in&nbsp;the&nbsp;subset&nbsp;returned.</tt></dd></dl>

<dl><dt><a name=“Atoms-iadd”><strong>iadd</strong></a> = <a href=“#Atoms-extend”>extend</a>(self, other)</dt></dl>

<dl><dt><a name=“Atoms-imul”><strong>imul</strong></a>(self, m)</dt><dd><tt>In-place&nbsp;repeat&nbsp;of&nbsp;atoms.</tt></dd></dl>

<dl><dt><a name=“Atoms-init”><strong>init</strong></a>(self, symbols<font color=“#909090”>=None</font>, positions<font color=“#909090”>=None</font>, numbers<font color=“#909090”>=None</font>, tags<font color=“#909090”>=None</font>, momenta<font color=“#909090”>=None</font>, masses<font color=“#909090”>=None</font>, magmoms<font color=“#909090”>=None</font>, charges<font color=“#909090”>=None</font>, scaled_positions<font color=“#909090”>=None</font>, cell<font color=“#909090”>=None</font>, pbc<font color=“#909090”>=None</font>, celldisp<font color=“#909090”>=None</font>, constraint<font color=“#909090”>=None</font>, calculator<font color=“#909090”>=None</font>, info<font color=“#909090”>=None</font>)</dt></dl>

<dl><dt><a name=“Atoms-len”><strong>len</strong></a>(self)</dt></dl>

<dl><dt><a name=“Atoms-mul”><strong>mul</strong></a> = <a href=“#Atoms-repeat”>repeat</a>(self, rep)</dt></dl>

<dl><dt><a name=“Atoms-ne”><strong>ne</strong></a>(self, other)</dt></dl>

<dl><dt><a name=“Atoms-repr”><strong>repr</strong></a>(self)</dt></dl>

<dl><dt><a name=“Atoms-append”><strong>append</strong></a>(self, atom)</dt><dd><tt>Append&nbsp;atom&nbsp;to&nbsp;end.</tt></dd></dl>

<dl><dt><a name=“Atoms-center”><strong>center</strong></a>(self, vacuum<font color=“#909090”>=None</font>, axis<font color=“#909090”>=None</font>)</dt><dd><tt>Center&nbsp;atoms&nbsp;in&nbsp;unit&nbsp;cell.<br> &nbsp;<br> Centers&nbsp;the&nbsp;atoms&nbsp;in&nbsp;the&nbsp;unit&nbsp;cell,&nbsp;so&nbsp;there&nbsp;is&nbsp;the&nbsp;same<br> amount&nbsp;of&nbsp;vacuum&nbsp;on&nbsp;all&nbsp;sides.<br> &nbsp;<br> Parameters:<br> &nbsp;<br> vacuum&nbsp;(default:&nbsp;None):&nbsp;If&nbsp;specified&nbsp;adjust&nbsp;the&nbsp;amount&nbsp;of<br> vacuum&nbsp;when&nbsp;centering.&nbsp;&nbsp;If&nbsp;vacuum=10.0&nbsp;there&nbsp;will&nbsp;thus&nbsp;be&nbsp;10<br> Angstrom&nbsp;of&nbsp;vacuum&nbsp;on&nbsp;each&nbsp;side.<br> &nbsp;<br> axis&nbsp;(default:&nbsp;None):&nbsp;If&nbsp;specified,&nbsp;only&nbsp;act&nbsp;on&nbsp;the&nbsp;specified<br> axis.&nbsp;&nbsp;Default:&nbsp;Act&nbsp;on&nbsp;all&nbsp;axes.</tt></dd></dl>

<dl><dt><a name=“Atoms-copy”><strong>copy</strong></a>(self)</dt><dd><tt>Return&nbsp;a&nbsp;copy.</tt></dd></dl>

<dl><dt><a name=“Atoms-edit”><strong>edit</strong></a>(self)</dt><dd><tt>Modify&nbsp;atoms&nbsp;interactively&nbsp;through&nbsp;ag&nbsp;viewer.<br> &nbsp;<br> Conflicts&nbsp;leading&nbsp;to&nbsp;undesirable&nbsp;behaviour&nbsp;might&nbsp;arise<br> when&nbsp;matplotlib&nbsp;has&nbsp;been&nbsp;pre-imported&nbsp;with&nbsp;certain<br> incompatible&nbsp;backends&nbsp;and&nbsp;while&nbsp;trying&nbsp;to&nbsp;use&nbsp;the<br> plot&nbsp;feature&nbsp;inside&nbsp;the&nbsp;interactive&nbsp;ag.&nbsp;To&nbsp;circumvent,<br> please&nbsp;set&nbsp;matplotlib.use('gtk')&nbsp;before&nbsp;calling&nbsp;this<br> method.</tt></dd></dl>

<dl><dt><a name=“Atoms-extend”><strong>extend</strong></a>(self, other)</dt><dd><tt>Extend&nbsp;atoms&nbsp;<a href=“builtin.html#object”>object</a>&nbsp;by&nbsp;appending&nbsp;atoms&nbsp;from&nbsp;*other*.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_angle”><strong>get_angle</strong></a>(self, list)</dt><dd><tt>Get&nbsp;angle&nbsp;formed&nbsp;by&nbsp;three&nbsp;atoms.<br> &nbsp;<br> calculate&nbsp;angle&nbsp;between&nbsp;the&nbsp;vectors&nbsp;list[1]-&gt;list[0]&nbsp;and<br> list[1]-&gt;list[2],&nbsp;where&nbsp;list&nbsp;contains&nbsp;the&nbsp;atomic&nbsp;indexes&nbsp;in<br> question.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_angular_momentum”><strong>get_angular_momentum</strong></a>(self)</dt><dd><tt>Get&nbsp;total&nbsp;angular&nbsp;momentum&nbsp;with&nbsp;respect&nbsp;to&nbsp;the&nbsp;center&nbsp;of&nbsp;mass.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_array”><strong>get_array</strong></a>(self, name, copy<font color=“#909090”>=True</font>)</dt><dd><tt>Get&nbsp;an&nbsp;array.<br> &nbsp;<br> Returns&nbsp;a&nbsp;copy&nbsp;unless&nbsp;the&nbsp;optional&nbsp;argument&nbsp;copy&nbsp;is&nbsp;false.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_atomic_numbers”><strong>get_atomic_numbers</strong></a>(self)</dt><dd><tt>Get&nbsp;integer&nbsp;array&nbsp;of&nbsp;atomic&nbsp;numbers.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_calculation_done”><strong>get_calculation_done</strong></a>(self)</dt><dd><tt>Let&nbsp;the&nbsp;calculator&nbsp;calculate&nbsp;its&nbsp;thing,<br> using&nbsp;the&nbsp;current&nbsp;input.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_calculator”><strong>get_calculator</strong></a>(self)</dt><dd><tt>Get&nbsp;currently&nbsp;attached&nbsp;calculator&nbsp;<a href=“builtin.html#object”>object</a>.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_cell”><strong>get_cell</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;three&nbsp;unit&nbsp;cell&nbsp;vectors&nbsp;as&nbsp;a&nbsp;3×3&nbsp;ndarray.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_celldisp”><strong>get_celldisp</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;unit&nbsp;cell&nbsp;displacement&nbsp;vectors&nbsp;.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_center_of_mass”><strong>get_center_of_mass</strong></a>(self, scaled<font color=“#909090”>=False</font>)</dt><dd><tt>Get&nbsp;the&nbsp;center&nbsp;of&nbsp;mass.<br> &nbsp;<br> If&nbsp;scaled=True&nbsp;the&nbsp;center&nbsp;of&nbsp;mass&nbsp;in&nbsp;scaled&nbsp;coordinates<br> is&nbsp;returned.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_charges”><strong>get_charges</strong></a>(self)</dt><dd><tt>Get&nbsp;calculated&nbsp;charges.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_chemical_formula”><strong>get_chemical_formula</strong></a>(self, mode<font color=“#909090”>='hill'</font>)</dt><dd><tt>Get&nbsp;the&nbsp;chemial&nbsp;formula&nbsp;as&nbsp;a&nbsp;string&nbsp;based&nbsp;on&nbsp;the&nbsp;chemical&nbsp;symbols.<br> &nbsp;<br> Parameters:<br> &nbsp;<br> mode:<br> &nbsp;&nbsp;&nbsp;&nbsp;There&nbsp;are&nbsp;three&nbsp;different&nbsp;modes&nbsp;available:<br> &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;'all':&nbsp;The&nbsp;list&nbsp;of&nbsp;chemical&nbsp;symbols&nbsp;are&nbsp;contracted&nbsp;to&nbsp;at&nbsp;string,<br> &nbsp;&nbsp;&nbsp;&nbsp;e.g.&nbsp;['C',&nbsp;'H',&nbsp;'H',&nbsp;'H',&nbsp;'O',&nbsp;'H']&nbsp;becomes&nbsp;'CHHHOH'.<br> &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;'reduce':&nbsp;The&nbsp;same&nbsp;as&nbsp;'all'&nbsp;where&nbsp;repeated&nbsp;elements&nbsp;are&nbsp;contracted<br> &nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;a&nbsp;single&nbsp;symbol&nbsp;and&nbsp;a&nbsp;number,&nbsp;e.g.&nbsp;'CHHHOCHHH'&nbsp;is&nbsp;reduced&nbsp;to<br> &nbsp;&nbsp;&nbsp;&nbsp;'CH3OCH3'.<br> &nbsp;<br> &nbsp;&nbsp;&nbsp;&nbsp;'hill':&nbsp;The&nbsp;list&nbsp;of&nbsp;chemical&nbsp;symbols&nbsp;are&nbsp;contracted&nbsp;to&nbsp;a&nbsp;string<br> &nbsp;&nbsp;&nbsp;&nbsp;following&nbsp;the&nbsp;Hill&nbsp;notation&nbsp;(alphabetical&nbsp;order&nbsp;with&nbsp;C&nbsp;and&nbsp;H<br> &nbsp;&nbsp;&nbsp;&nbsp;first),&nbsp;e.g.&nbsp;'CHHHOCHHH'&nbsp;is&nbsp;reduced&nbsp;to&nbsp;'C2H6O'&nbsp;and&nbsp;'SOOHOHO'&nbsp;to<br> &nbsp;&nbsp;&nbsp;&nbsp;'H2O4S'.&nbsp;This&nbsp;is&nbsp;default.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_chemical_symbols”><strong>get_chemical_symbols</strong></a>(self, reduce<font color=“#909090”>=False</font>)</dt><dd><tt>Get&nbsp;list&nbsp;of&nbsp;chemical&nbsp;symbol&nbsp;strings.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_dihedral”><strong>get_dihedral</strong></a>(self, list)</dt><dd><tt>Calculate&nbsp;dihedral&nbsp;angle.<br> &nbsp;<br> Calculate&nbsp;dihedral&nbsp;angle&nbsp;between&nbsp;the&nbsp;vectors&nbsp;list[0]-&gt;list[1]<br> and&nbsp;list[2]-&gt;list[3],&nbsp;where&nbsp;list&nbsp;contains&nbsp;the&nbsp;atomic&nbsp;indexes<br> in&nbsp;question.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_dipole_moment”><strong>get_dipole_moment</strong></a>(self)</dt><dd><tt>Calculate&nbsp;the&nbsp;electric&nbsp;dipole&nbsp;moment&nbsp;for&nbsp;the&nbsp;atoms&nbsp;<a href=“builtin.html#object”>object</a>.<br> &nbsp;<br> Only&nbsp;available&nbsp;for&nbsp;calculators&nbsp;which&nbsp;has&nbsp;a&nbsp;<a href=“#Atoms-get_dipole_moment”>get_dipole_moment</a>()<br> method.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_distance”><strong>get_distance</strong></a>(self, a0, a1, mic<font color=“#909090”>=False</font>)</dt><dd><tt>Return&nbsp;distance&nbsp;between&nbsp;two&nbsp;atoms.<br> &nbsp;<br> Use&nbsp;mic=True&nbsp;to&nbsp;use&nbsp;the&nbsp;Minimum&nbsp;Image&nbsp;Convention.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_forces”><strong>get_forces</strong></a>(self, apply_constraint<font color=“#909090”>=True</font>)</dt><dd><tt>Calculate&nbsp;atomic&nbsp;forces.<br> &nbsp;<br> Ask&nbsp;the&nbsp;attached&nbsp;calculator&nbsp;to&nbsp;calculate&nbsp;the&nbsp;forces&nbsp;and&nbsp;apply<br> constraints.&nbsp;&nbsp;Use&nbsp;*apply_constraint=False*&nbsp;to&nbsp;get&nbsp;the&nbsp;raw<br> forces.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_initial_charges”><strong>get_initial_charges</strong></a>(self)</dt><dd><tt>Get&nbsp;array&nbsp;of&nbsp;initial&nbsp;charges.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_initial_magnetic_moments”><strong>get_initial_magnetic_moments</strong></a>(self)</dt><dd><tt>Get&nbsp;array&nbsp;of&nbsp;initial&nbsp;magnetic&nbsp;moments.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_isotropic_pressure”><strong>get_isotropic_pressure</strong></a>(self, stress)</dt><dd><tt>Get&nbsp;the&nbsp;current&nbsp;calculated&nbsp;pressure,&nbsp;assume&nbsp;isotropic&nbsp;medium.<br> in&nbsp;Bar</tt></dd></dl>

<dl><dt><a name=“Atoms-get_kinetic_energy”><strong>get_kinetic_energy</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;kinetic&nbsp;energy.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_magnetic_moment”><strong>get_magnetic_moment</strong></a>(self)</dt><dd><tt>Get&nbsp;calculated&nbsp;total&nbsp;magnetic&nbsp;moment.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_magnetic_moments”><strong>get_magnetic_moments</strong></a>(self)</dt><dd><tt>Get&nbsp;calculated&nbsp;local&nbsp;magnetic&nbsp;moments.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_masses”><strong>get_masses</strong></a>(self)</dt><dd><tt>Get&nbsp;array&nbsp;of&nbsp;masses.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_momenta”><strong>get_momenta</strong></a>(self)</dt><dd><tt>Get&nbsp;array&nbsp;of&nbsp;momenta.</tt></dd></dl>

<dl><dt><a name=“Atoms-get_moments_of_inertia”><strong>get_moments_of_inertia</strong></a>(self, vectors<font color=“#909090”>=False</font>)</dt><dd><tt>Get&nbsp;the&nbsp;moments&nbsp;of&nbsp;inertia&nbsp;along&nbsp;the&nbsp;principal&nbsp;axes.<br> &nbsp;<br> The&nbsp;three&nbsp;principal&nbsp;moments&nbsp;of&nbsp;inertia&nbsp;are&nbsp;computed&nbsp;from&nbsp;the<br> eigenvalues&nbsp;of&nbsp;the&nbsp;symmetric&nbsp;inertial&nbsp;tensor.&nbsp;Periodic&nbsp;boundary<br> conditions&nbsp;are&nbsp;ignored.&nbsp;Units&nbsp;of&nbsp;the&nbsp;moments&nbsp;of&nbsp;inertia&nbsp;are<br> amu*angstrom2.</tt></dd></dl> <dl><dt><a name=“Atoms-get_name”><strong>get_name</strong></a>(self)</dt></dl> <dl><dt><a name=“Atoms-get_number_of_atoms”><strong>get_number_of_atoms</strong></a>(self)</dt><dd><tt>Returns&nbsp;the&nbsp;number&nbsp;of&nbsp;atoms.<br> &nbsp;<br> Equivalent&nbsp;to&nbsp;len(atoms)&nbsp;in&nbsp;the&nbsp;standard&nbsp;ASE&nbsp;<a href=“#Atoms”>Atoms</a>&nbsp;class.</tt></dd></dl> <dl><dt><a name=“Atoms-get_pbc”><strong>get_pbc</strong></a>(self)</dt><dd><tt>Get&nbsp;periodic&nbsp;boundary&nbsp;condition&nbsp;flags.</tt></dd></dl> <dl><dt><a name=“Atoms-get_positions”><strong>get_positions</strong></a>(self, wrap<font color=“#909090”>=False</font>)</dt><dd><tt>Get&nbsp;array&nbsp;of&nbsp;positions.&nbsp;If&nbsp;wrap==True,&nbsp;wraps&nbsp;atoms&nbsp;back<br> into&nbsp;unit&nbsp;cell.</tt></dd></dl> <dl><dt><a name=“Atoms-get_potential_energies”><strong>get_potential_energies</strong></a>(self)</dt><dd><tt>Calculate&nbsp;the&nbsp;potential&nbsp;energies&nbsp;of&nbsp;all&nbsp;the&nbsp;atoms.<br> &nbsp;<br> Only&nbsp;available&nbsp;with&nbsp;calculators&nbsp;supporting&nbsp;per-atom&nbsp;energies<br> (e.g.&nbsp;classical&nbsp;potentials).</tt></dd></dl> <dl><dt><a name=“Atoms-get_potential_energy”><strong>get_potential_energy</strong></a>(self)</dt><dd><tt>Calculate&nbsp;potential&nbsp;energy.</tt></dd></dl> <dl><dt><a name=“Atoms-get_reciprocal_cell”><strong>get_reciprocal_cell</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;three&nbsp;reciprocal&nbsp;lattice&nbsp;vectors&nbsp;as&nbsp;a&nbsp;3×3&nbsp;ndarray.<br> &nbsp;<br> Note&nbsp;that&nbsp;the&nbsp;commonly&nbsp;used&nbsp;factor&nbsp;of&nbsp;2&nbsp;pi&nbsp;for&nbsp;Fourier<br> transforms&nbsp;is&nbsp;not&nbsp;included&nbsp;here.</tt></dd></dl> <dl><dt><a name=“Atoms-get_scaled_positions”><strong>get_scaled_positions</strong></a>(self)</dt><dd><tt>Get&nbsp;positions&nbsp;relative&nbsp;to&nbsp;unit&nbsp;cell.<br> &nbsp;<br> <a href=“#Atoms”>Atoms</a>&nbsp;outside&nbsp;the&nbsp;unit&nbsp;cell&nbsp;will&nbsp;be&nbsp;wrapped&nbsp;into&nbsp;the&nbsp;cell&nbsp;in<br> those&nbsp;directions&nbsp;with&nbsp;periodic&nbsp;boundary&nbsp;conditions&nbsp;so&nbsp;that&nbsp;the<br> scaled&nbsp;coordinates&nbsp;are&nbsp;between&nbsp;zero&nbsp;and&nbsp;one.</tt></dd></dl> <dl><dt><a name=“Atoms-get_stress”><strong>get_stress</strong></a>(self, voigt<font color=“#909090”>=True</font>)</dt><dd><tt>Calculate&nbsp;stress&nbsp;tensor.<br> &nbsp;<br> Returns&nbsp;an&nbsp;array&nbsp;of&nbsp;the&nbsp;six&nbsp;independent&nbsp;components&nbsp;of&nbsp;the<br> symmetric&nbsp;stress&nbsp;tensor,&nbsp;in&nbsp;the&nbsp;traditional&nbsp;Voigt&nbsp;order<br> (xx,&nbsp;yy,&nbsp;zz,&nbsp;yz,&nbsp;xz,&nbsp;xy)&nbsp;or&nbsp;as&nbsp;a&nbsp;3×3&nbsp;matrix.&nbsp;&nbsp;Default&nbsp;is&nbsp;Voigt<br> order.</tt></dd></dl> <dl><dt><a name=“Atoms-get_stresses”><strong>get_stresses</strong></a>(self)</dt><dd><tt>Calculate&nbsp;the&nbsp;stress-tensor&nbsp;of&nbsp;all&nbsp;the&nbsp;atoms.<br> &nbsp;<br> Only&nbsp;available&nbsp;with&nbsp;calculators&nbsp;supporting&nbsp;per-atom&nbsp;energies&nbsp;and<br> stresses&nbsp;(e.g.&nbsp;classical&nbsp;potentials).&nbsp;&nbsp;Even&nbsp;for&nbsp;such&nbsp;calculators<br> there&nbsp;is&nbsp;a&nbsp;certain&nbsp;arbitrariness&nbsp;in&nbsp;defining&nbsp;per-atom&nbsp;stresses.</tt></dd></dl> <dl><dt><a name=“Atoms-get_tags”><strong>get_tags</strong></a>(self)</dt><dd><tt>Get&nbsp;integer&nbsp;array&nbsp;of&nbsp;tags.</tt></dd></dl> <dl><dt><a name=“Atoms-get_temperature”><strong>get_temperature</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;temperature.&nbsp;in&nbsp;Kelvin</tt></dd></dl> <dl><dt><a name=“Atoms-get_total_energy”><strong>get_total_energy</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;total&nbsp;energy&nbsp;-&nbsp;potential&nbsp;plus&nbsp;kinetic&nbsp;energy.</tt></dd></dl> <dl><dt><a name=“Atoms-get_velocities”><strong>get_velocities</strong></a>(self)</dt><dd><tt>Get&nbsp;array&nbsp;of&nbsp;velocities.</tt></dd></dl> <dl><dt><a name=“Atoms-get_volume”><strong>get_volume</strong></a>(self)</dt><dd><tt>Get&nbsp;volume&nbsp;of&nbsp;unit&nbsp;cell.</tt></dd></dl> <dl><dt><a name=“Atoms-has”><strong>has</strong></a>(self, name)</dt><dd><tt>Check&nbsp;for&nbsp;existence&nbsp;of&nbsp;array.<br> &nbsp;<br> name&nbsp;must&nbsp;be&nbsp;one&nbsp;of:&nbsp;'tags',&nbsp;'momenta',&nbsp;'masses',&nbsp;'magmoms',<br> 'charges'.</tt></dd></dl> <dl><dt><a name=“Atoms-new_array”><strong>new_array</strong></a>(self, name, a, dtype<font color=“#909090”>=None</font>, shape<font color=“#909090”>=None</font>)</dt><dd><tt>Add&nbsp;new&nbsp;array.<br> &nbsp;<br> If&nbsp;*shape*&nbsp;is&nbsp;not&nbsp;*None*,&nbsp;the&nbsp;shape&nbsp;of&nbsp;*a*&nbsp;will&nbsp;be&nbsp;checked.</tt></dd></dl> <dl><dt><a name=“Atoms-pop”><strong>pop</strong></a>(self, i<font color=“#909090”>=-1</font>)</dt><dd><tt>Remove&nbsp;and&nbsp;return&nbsp;atom&nbsp;at&nbsp;index&nbsp;*i*&nbsp;(default&nbsp;last).</tt></dd></dl> <dl><dt><a name=“Atoms-rattle”><strong>rattle</strong></a>(self, stdev<font color=“#909090”>=0.001</font>, seed<font color=“#909090”>=42</font>)</dt><dd><tt>Randomly&nbsp;displace&nbsp;atoms.<br> &nbsp;<br> This&nbsp;method&nbsp;adds&nbsp;random&nbsp;displacements&nbsp;to&nbsp;the&nbsp;atomic&nbsp;positions,<br> taking&nbsp;a&nbsp;possible&nbsp;constraint&nbsp;into&nbsp;account.&nbsp;&nbsp;The&nbsp;random&nbsp;numbers&nbsp;are<br> drawn&nbsp;from&nbsp;a&nbsp;normal&nbsp;distribution&nbsp;of&nbsp;standard&nbsp;deviation&nbsp;stdev.<br> &nbsp;<br> For&nbsp;a&nbsp;parallel&nbsp;calculation,&nbsp;it&nbsp;is&nbsp;important&nbsp;to&nbsp;use&nbsp;the&nbsp;same<br> seed&nbsp;on&nbsp;all&nbsp;processors!</tt></dd></dl> <dl><dt><a name=“Atoms-repeat”><strong>repeat</strong></a>(self, rep)</dt><dd><tt>Create&nbsp;new&nbsp;repeated&nbsp;atoms&nbsp;<a href=“builtin.html#object”>object</a>.<br> &nbsp;<br> The&nbsp;*rep*&nbsp;argument&nbsp;should&nbsp;be&nbsp;a&nbsp;sequence&nbsp;of&nbsp;three&nbsp;positive<br> integers&nbsp;like&nbsp;*(2,3,1)*&nbsp;or&nbsp;a&nbsp;single&nbsp;integer&nbsp;(*r*)&nbsp;equivalent<br> to&nbsp;*(r,r,r)*.</tt></dd></dl> <dl><dt><a name=“Atoms-rotate”><strong>rotate</strong></a>(self, v, a<font color=“#909090”>=None</font>, center<font color=“#909090”>=(0, 0, 0)</font>, rotate_cell<font color=“#909090”>=False</font>)</dt><dd><tt>Rotate&nbsp;atoms&nbsp;based&nbsp;on&nbsp;a&nbsp;vector&nbsp;and&nbsp;an&nbsp;angle,&nbsp;or&nbsp;two&nbsp;vectors.<br> &nbsp;<br> Parameters:<br> &nbsp;<br> v:<br> &nbsp;&nbsp;&nbsp;&nbsp;Vector&nbsp;to&nbsp;rotate&nbsp;the&nbsp;atoms&nbsp;around.&nbsp;Vectors&nbsp;can&nbsp;be&nbsp;given&nbsp;as<br> &nbsp;&nbsp;&nbsp;&nbsp;strings:&nbsp;'x',&nbsp;'-x',&nbsp;'y',&nbsp;…&nbsp;.<br> &nbsp;<br> a&nbsp;=&nbsp;None:<br> &nbsp;&nbsp;&nbsp;&nbsp;Angle&nbsp;that&nbsp;the&nbsp;atoms&nbsp;is&nbsp;rotated&nbsp;around&nbsp;the&nbsp;vecor&nbsp;'v'.&nbsp;If&nbsp;an&nbsp;angle<br> &nbsp;&nbsp;&nbsp;&nbsp;is&nbsp;not&nbsp;specified,&nbsp;the&nbsp;length&nbsp;of&nbsp;'v'&nbsp;is&nbsp;used&nbsp;as&nbsp;the&nbsp;angle<br> &nbsp;&nbsp;&nbsp;&nbsp;(default).&nbsp;The&nbsp;angle&nbsp;can&nbsp;also&nbsp;be&nbsp;a&nbsp;vector&nbsp;and&nbsp;then&nbsp;'v'&nbsp;is&nbsp;rotated<br> &nbsp;&nbsp;&nbsp;&nbsp;into&nbsp;'a'.<br> &nbsp;<br> center&nbsp;=&nbsp;(0,&nbsp;0,&nbsp;0):<br> &nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;center&nbsp;is&nbsp;kept&nbsp;fixed&nbsp;under&nbsp;the&nbsp;rotation.&nbsp;Use&nbsp;'COM'&nbsp;to&nbsp;fix<br> &nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;center&nbsp;of&nbsp;mass,&nbsp;'COP'&nbsp;to&nbsp;fix&nbsp;the&nbsp;center&nbsp;of&nbsp;positions&nbsp;or<br> &nbsp;&nbsp;&nbsp;&nbsp;'COU'&nbsp;to&nbsp;fix&nbsp;the&nbsp;center&nbsp;of&nbsp;cell.<br> &nbsp;<br> rotate_cell&nbsp;=&nbsp;False:<br> &nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;true&nbsp;the&nbsp;cell&nbsp;is&nbsp;also&nbsp;rotated.<br> &nbsp;<br> Examples:<br> &nbsp;<br> Rotate&nbsp;90&nbsp;degrees&nbsp;around&nbsp;the&nbsp;z-axis,&nbsp;so&nbsp;that&nbsp;the&nbsp;x-axis&nbsp;is<br> rotated&nbsp;into&nbsp;the&nbsp;y-axis:<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;a&nbsp;=&nbsp;pi&nbsp;/&nbsp;2<br> &gt;&gt;&gt;&nbsp;atoms.<a href=“#Atoms-rotate”>rotate</a>('z',&nbsp;a)<br> &gt;&gt;&gt;&nbsp;atoms.<a href=“#Atoms-rotate”>rotate</a>1)<br> &gt;&gt;&gt;&nbsp;atoms.<a href=“#Atoms-rotate”>rotate</a>('x',&nbsp;'y')</tt></dd></dl> <dl><dt><a name=“Atoms-rotate_dihedral”><strong>rotate_dihedral</strong></a>(self, list, angle, mask<font color=“#909090”>=None</font>)</dt><dd><tt>Rotate&nbsp;dihedral&nbsp;angle.<br> &nbsp;<br> Complementing&nbsp;the&nbsp;two&nbsp;routines&nbsp;above:&nbsp;rotate&nbsp;a&nbsp;group&nbsp;by&nbsp;a<br> predefined&nbsp;dihedral&nbsp;angle,&nbsp;starting&nbsp;from&nbsp;its&nbsp;current<br> configuration</tt></dd></dl> <dl><dt><a name=“Atoms-rotate_euler”><strong>rotate_euler</strong></a>(self, center<font color=“#909090”>=(0, 0, 0)</font>, phi<font color=“#909090”>=0.0</font>, theta<font color=“#909090”>=0.0</font>, psi<font color=“#909090”>=0.0</font>)</dt><dd><tt>Rotate&nbsp;atoms&nbsp;via&nbsp;Euler&nbsp;angles.<br> &nbsp;<br> See&nbsp;e.g&nbsp;<a href=“http://mathworld.wolfram.com/EulerAngles.html”>http://mathworld.wolfram.com/EulerAngles.html</a>&nbsp;for&nbsp;explanation.<br> &nbsp;<br> Parameters:<br> &nbsp;<br> center&nbsp;:<br> &nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;point&nbsp;to&nbsp;rotate&nbsp;about.&nbsp;A&nbsp;sequence&nbsp;of&nbsp;length&nbsp;3&nbsp;with&nbsp;the<br> &nbsp;&nbsp;&nbsp;&nbsp;coordinates,&nbsp;or&nbsp;'COM'&nbsp;to&nbsp;select&nbsp;the&nbsp;center&nbsp;of&nbsp;mass,&nbsp;'COP'&nbsp;to<br> &nbsp;&nbsp;&nbsp;&nbsp;select&nbsp;center&nbsp;of&nbsp;positions&nbsp;or&nbsp;'COU'&nbsp;to&nbsp;select&nbsp;center&nbsp;of&nbsp;cell.<br> phi&nbsp;:<br> &nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;1st&nbsp;rotation&nbsp;angle&nbsp;around&nbsp;the&nbsp;z&nbsp;axis.<br> theta&nbsp;:<br> &nbsp;&nbsp;&nbsp;&nbsp;Rotation&nbsp;around&nbsp;the&nbsp;x&nbsp;axis.<br> psi&nbsp;:<br> &nbsp;&nbsp;&nbsp;&nbsp;2nd&nbsp;rotation&nbsp;around&nbsp;the&nbsp;z&nbsp;axis.</tt></dd></dl> <dl><dt><a name=“Atoms-set_angle”><strong>set_angle</strong></a>(self, list, angle, mask<font color=“#909090”>=None</font>)</dt><dd><tt>Set&nbsp;angle&nbsp;formed&nbsp;by&nbsp;three&nbsp;atoms.<br> &nbsp;<br> Sets&nbsp;the&nbsp;angle&nbsp;between&nbsp;vectors&nbsp;list[1]-&gt;list[0]&nbsp;and<br> list[1]-&gt;list[2].<br> &nbsp;<br> Same&nbsp;usage&nbsp;as&nbsp;in&nbsp;set_dihedral.</tt></dd></dl> <dl><dt><a name=“Atoms-set_array”><strong>set_array</strong></a>(self, name, a, dtype<font color=“#909090”>=None</font>, shape<font color=“#909090”>=None</font>)</dt><dd><tt>Update&nbsp;array.<br> &nbsp;<br> If&nbsp;*shape*&nbsp;is&nbsp;not&nbsp;*None*,&nbsp;the&nbsp;shape&nbsp;of&nbsp;*a*&nbsp;will&nbsp;be&nbsp;checked.<br> If&nbsp;*a*&nbsp;is&nbsp;*None*,&nbsp;then&nbsp;the&nbsp;array&nbsp;is&nbsp;deleted.</tt></dd></dl> <dl><dt><a name=“Atoms-set_atomic_numbers”><strong>set_atomic_numbers</strong></a>(self, numbers)</dt><dd><tt>Set&nbsp;atomic&nbsp;numbers.</tt></dd></dl> <dl><dt><a name=“Atoms-set_calculator”><strong>set_calculator</strong></a>(self, calc<font color=“#909090”>=None</font>)</dt><dd><tt>Attach&nbsp;calculator&nbsp;<a href=“builtin.html#object”>object</a>.</tt></dd></dl> <dl><dt><a name=“Atoms-set_cell”><strong>set_cell</strong></a>(self, cell, scale_atoms<font color=“#909090”>=False</font>, fix<font color=“#909090”>=None</font>)</dt><dd><tt>Set&nbsp;unit&nbsp;cell&nbsp;vectors.<br> &nbsp;<br> Parameters:<br> &nbsp;<br> cell&nbsp;:<br> &nbsp;&nbsp;&nbsp;&nbsp;Unit&nbsp;cell.&nbsp;&nbsp;A&nbsp;3×3&nbsp;matrix&nbsp;(the&nbsp;three&nbsp;unit&nbsp;cell&nbsp;vectors)&nbsp;or<br> &nbsp;&nbsp;&nbsp;&nbsp;just&nbsp;three&nbsp;numbers&nbsp;for&nbsp;an&nbsp;orthorhombic&nbsp;cell.<br> scale_atoms&nbsp;:&nbsp;bool<br> &nbsp;&nbsp;&nbsp;&nbsp;Fix&nbsp;atomic&nbsp;positions&nbsp;or&nbsp;move&nbsp;atoms&nbsp;with&nbsp;the&nbsp;unit&nbsp;cell?<br> &nbsp;&nbsp;&nbsp;&nbsp;Default&nbsp;behavior&nbsp;is&nbsp;to&nbsp;*not*&nbsp;move&nbsp;the&nbsp;atoms&nbsp;(scale_atoms=False).<br> &nbsp;<br> Examples:<br> &nbsp;<br> Two&nbsp;equivalent&nbsp;ways&nbsp;to&nbsp;define&nbsp;an&nbsp;orthorhombic&nbsp;cell:<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;a.<a href=“#Atoms-set_cell”>set_cell</a>([a,&nbsp;b,&nbsp;c])<br> &gt;&gt;&gt;&nbsp;a.<a href=“#Atoms-set_cell”>set_cell</a>([(a,&nbsp;0,&nbsp;0),&nbsp;(0,&nbsp;b,&nbsp;0),&nbsp;(0,&nbsp;0,&nbsp;c)])<br> &nbsp;<br> FCC&nbsp;unit&nbsp;cell:<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;a.<a href=“#Atoms-set_cell”>set_cell</a>([(0,&nbsp;b,&nbsp;b),&nbsp;(b,&nbsp;0,&nbsp;b),&nbsp;(b,&nbsp;b,&nbsp;0)])</tt></dd></dl> <dl><dt><a name=“Atoms-set_celldisp”><strong>set_celldisp</strong></a>(self, celldisp)</dt></dl> <dl><dt><a name=“Atoms-set_charges”><strong>set_charges</strong></a>(self, charges<font color=“#909090”>=None</font>)</dt><dd><tt>Deprecated&nbsp;method.&nbsp;Use&nbsp;set_initial_charges.</tt></dd></dl> <dl><dt><a name=“Atoms-set_chemical_symbols”><strong>set_chemical_symbols</strong></a>(self, symbols)</dt><dd><tt>Set&nbsp;chemical&nbsp;symbols.</tt></dd></dl> <dl><dt><a name=“Atoms-set_constraint”><strong>set_constraint</strong></a>(self, constraint<font color=“#909090”>=None</font>)</dt><dd><tt>Apply&nbsp;one&nbsp;or&nbsp;more&nbsp;constrains.<br> &nbsp;<br> The&nbsp;*constraint*&nbsp;argument&nbsp;must&nbsp;be&nbsp;one&nbsp;constraint&nbsp;<a href=“builtin.html#object”>object</a>&nbsp;or&nbsp;a<br> list&nbsp;of&nbsp;constraint&nbsp;objects.</tt></dd></dl> <dl><dt><a name=“Atoms-set_dihedral”><strong>set_dihedral</strong></a>(self, list, angle, mask<font color=“#909090”>=None</font>)</dt><dd><tt>set&nbsp;the&nbsp;dihedral&nbsp;angle&nbsp;between&nbsp;vectors&nbsp;list[0]-&gt;list[1]&nbsp;and<br> list[2]-&gt;list[3]&nbsp;by&nbsp;changing&nbsp;the&nbsp;atom&nbsp;indexed&nbsp;by&nbsp;list[3]<br> if&nbsp;mask&nbsp;is&nbsp;not&nbsp;None,&nbsp;all&nbsp;the&nbsp;atoms&nbsp;described&nbsp;in&nbsp;mask<br> (read:&nbsp;the&nbsp;entire&nbsp;subgroup)&nbsp;are&nbsp;moved<br> &nbsp;<br> example:&nbsp;the&nbsp;following&nbsp;defines&nbsp;a&nbsp;very&nbsp;crude<br> ethane-like&nbsp;molecule&nbsp;and&nbsp;twists&nbsp;one&nbsp;half&nbsp;of&nbsp;it&nbsp;by&nbsp;30&nbsp;degrees.<br> &nbsp;<br> &gt;&gt;&gt;&nbsp;atoms&nbsp;=&nbsp;<a href=“#Atoms”>Atoms</a>('HHCCHH',&nbsp;0)<br> &gt;&gt;&gt;&nbsp;atoms.<a href=“#Atoms-set_dihedral”>set_dihedral</a>([1,2,3,4],7*pi/6,mask=[0,0,0,1,1,1])</tt></dd></dl> <dl><dt><a name=“Atoms-set_distance”><strong>set_distance</strong></a>(self, a0, a1, distance, fix<font color=“#909090”>=0.5</font>)</dt><dd><tt>Set&nbsp;the&nbsp;distance&nbsp;between&nbsp;two&nbsp;atoms.<br> &nbsp;<br> Set&nbsp;the&nbsp;distance&nbsp;between&nbsp;atoms&nbsp;*a0*&nbsp;and&nbsp;*a1*&nbsp;to&nbsp;*distance*.<br> By&nbsp;default,&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;two&nbsp;atoms&nbsp;will&nbsp;be&nbsp;fixed.&nbsp;&nbsp;Use<br> *fix=0*&nbsp;to&nbsp;fix&nbsp;the&nbsp;first&nbsp;atom,&nbsp;*fix=1*&nbsp;to&nbsp;fix&nbsp;the&nbsp;second<br> atom&nbsp;and&nbsp;*fix=0.5*&nbsp;(default)&nbsp;to&nbsp;fix&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;bond.</tt></dd></dl> <dl><dt><a name=“Atoms-set_initial_charges”><strong>set_initial_charges</strong></a>(self, charges<font color=“#909090”>=None</font>)</dt><dd><tt>Set&nbsp;the&nbsp;initial&nbsp;charges.</tt></dd></dl> <dl><dt><a name=“Atoms-set_initial_magnetic_moments”><strong>set_initial_magnetic_moments</strong></a>(self, magmoms<font color=“#909090”>=None</font>)</dt><dd><tt>Set&nbsp;the&nbsp;initial&nbsp;magnetic&nbsp;moments.<br> &nbsp;<br> Use&nbsp;either&nbsp;one&nbsp;or&nbsp;three&nbsp;numbers&nbsp;for&nbsp;every&nbsp;atom&nbsp;(collinear<br> or&nbsp;non-collinear&nbsp;spins).</tt></dd></dl> <dl><dt><a name=“Atoms-set_masses”><strong>set_masses</strong></a>(self, masses<font color=“#909090”>='defaults'</font>)</dt><dd><tt>Set&nbsp;atomic&nbsp;masses.<br> &nbsp;<br> The&nbsp;array&nbsp;masses&nbsp;should&nbsp;contain&nbsp;a&nbsp;list&nbsp;of&nbsp;masses.&nbsp;&nbsp;In&nbsp;case<br> the&nbsp;masses&nbsp;argument&nbsp;is&nbsp;not&nbsp;given&nbsp;or&nbsp;for&nbsp;those&nbsp;elements&nbsp;of&nbsp;the<br> masses&nbsp;list&nbsp;that&nbsp;are&nbsp;None,&nbsp;standard&nbsp;values&nbsp;are&nbsp;set.</tt></dd></dl> <dl><dt><a name=“Atoms-set_momenta”><strong>set_momenta</strong></a>(self, momenta)</dt><dd><tt>Set&nbsp;momenta.</tt></dd></dl> <dl><dt><a name=“Atoms-set_pbc”><strong>set_pbc</strong></a>(self, pbc)</dt><dd><tt>Set&nbsp;periodic&nbsp;boundary&nbsp;condition&nbsp;flags.</tt></dd></dl> <dl><dt><a name=“Atoms-set_positions”><strong>set_positions</strong></a>(self, newpositions)</dt><dd><tt>Set&nbsp;positions,&nbsp;honoring&nbsp;any&nbsp;constraints.</tt></dd></dl> <dl><dt><a name=“Atoms-set_scaled_positions”><strong>set_scaled_positions</strong></a>(self, scaled)</dt><dd><tt>Set&nbsp;positions&nbsp;relative&nbsp;to&nbsp;unit&nbsp;cell.</tt></dd></dl> <dl><dt><a name=“Atoms-set_tags”><strong>set_tags</strong></a>(self, tags)</dt><dd><tt>Set&nbsp;tags&nbsp;for&nbsp;all&nbsp;atoms.&nbsp;If&nbsp;only&nbsp;one&nbsp;tag&nbsp;is&nbsp;supplied,&nbsp;it&nbsp;is<br> applied&nbsp;to&nbsp;all&nbsp;atoms.</tt></dd></dl> <dl><dt><a name=“Atoms-set_velocities”><strong>set_velocities</strong></a>(self, velocities)</dt><dd><tt>Set&nbsp;the&nbsp;momenta&nbsp;by&nbsp;specifying&nbsp;the&nbsp;velocities.</tt></dd></dl> <dl><dt><a name=“Atoms-translate”><strong>translate</strong></a>(self, displacement)</dt><dd><tt>Translate&nbsp;atomic&nbsp;positions.<br> &nbsp;<br> The&nbsp;displacement&nbsp;argument&nbsp;can&nbsp;be&nbsp;a&nbsp;float&nbsp;an&nbsp;xyz&nbsp;vector&nbsp;or&nbsp;an<br> nx3&nbsp;array&nbsp;(where&nbsp;n&nbsp;is&nbsp;the&nbsp;number&nbsp;of&nbsp;atoms).</tt></dd></dl> <dl><dt><a name=“Atoms-write”><strong>write</strong></a>(self, filename, format<font color=“#909090”>=None</font>, kwargs)</dt><dd><tt>Write&nbsp;yourself&nbsp;to&nbsp;a&nbsp;file.</tt></dd></dl>

<hr> Data descriptors defined here:<br> <dl><dt><strong>dict</strong></dt> <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd> </dl> <dl><dt><strong>weakref</strong></dt> <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd> </dl> <dl><dt><strong>calc</strong></dt> <dd><tt>Calculator&nbsp;object.</tt></dd> </dl> <dl><dt><strong>cell</strong></dt> <dd><tt>Attribute&nbsp;for&nbsp;direct&nbsp;manipulation&nbsp;of&nbsp;the&nbsp;unit&nbsp;cell.</tt></dd> </dl> <dl><dt><strong>constraints</strong></dt> <dd><tt>Constraints&nbsp;of&nbsp;the&nbsp;atoms.</tt></dd> </dl> <dl><dt><strong>numbers</strong></dt> <dd><tt>Attribute&nbsp;for&nbsp;direct&nbsp;manipulation&nbsp;of&nbsp;the&nbsp;atomic&nbsp;numbers.</tt></dd> </dl> <dl><dt><strong>pbc</strong></dt> <dd><tt>Attribute&nbsp;for&nbsp;direct&nbsp;manipulation&nbsp;of&nbsp;the&nbsp;periodic&nbsp;boundary&nbsp;condition&nbsp;flags.</tt></dd> </dl> <dl><dt><strong>positions</strong></dt> <dd><tt>Attribute&nbsp;for&nbsp;direct&nbsp;manipulation&nbsp;of&nbsp;the&nbsp;positions.</tt></dd> </dl> <hr> Data and other attributes defined here:<br> <dl><dt><strong>hash</strong> = None</dt></dl>

</td></tr></tbody></table></p></td></tr></tbody></table></p><p> <table summary=“section” border=“0” cellpadding=“2” cellspacing=“0” width=“100%”> <tbody><tr bgcolor=“#55aa55”> <td colspan=“3” valign=“bottom”>&nbsp;<br> <font color=“#ffffff” face=“helvetica, arial”><big><strong>Data</strong></big></font></td></tr>

<tr><td bgcolor=“#55aa55”><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td> <td width=“100%”><strong>atomic_masses</strong> = array([ 0. , 1.00794, 4.0026 , 6…. nan, nan, nan, nan])<br> <strong>atomic_numbers</strong> = {'Ac': 89, 'Ag': 47, 'Al': 13, 'Am': 95, 'Ar': 18, 'As': 33, 'At': 85, 'Au': 79, 'B': 5, 'Ba': 56, …}<br> <strong>chemical_symbols</strong> = ['X', 'H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar', 'K', …]</td></tr></tbody></table> </p></body></html>

1)
0,&nbsp;0,&nbsp;1),&nbsp;a)<br> &gt;&gt;&gt;&nbsp;atoms.<a href=“#Atoms-rotate”>rotate</a>('-z',&nbsp;-a)<br> &gt;&gt;&gt;&nbsp;atoms.<a href=“#Atoms-rotate”>rotate</a>((0,&nbsp;0,&nbsp;a
abinitio/ase_atoms.txt · 最終更新: 2022/08/24 11:04 by kimi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki