544 lines
37 KiB
HTML
544 lines
37 KiB
HTML
<!DOCTYPE html>
|
||
<html class="writer-html5" lang="en" >
|
||
<head>
|
||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
<title>4.13.2. LAMMPS Atom and AtomVec Base Classes — LAMMPS documentation</title>
|
||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/sphinx-design.min.css" type="text/css" />
|
||
<link rel="stylesheet" href="_static/css/lammps.css" type="text/css" />
|
||
<link rel="shortcut icon" href="_static/lammps.ico"/>
|
||
<link rel="canonical" href="https://docs.lammps.org/Classes_atom.html" />
|
||
<!--[if lt IE 9]>
|
||
<script src="_static/js/html5shiv.min.js"></script>
|
||
<![endif]-->
|
||
|
||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||
<script src="_static/design-tabs.js?v=f930bc37"></script>
|
||
<script async="async" src="_static/mathjax/es5/tex-mml-chtml.js?v=cadf963e"></script>
|
||
<script src="_static/js/theme.js"></script>
|
||
<link rel="index" title="Index" href="genindex.html" />
|
||
<link rel="search" title="Search" href="search.html" />
|
||
<link rel="next" title="4.13.3. LAMMPS Input Base Class" href="Classes_input.html" />
|
||
<link rel="prev" title="4.13.1. LAMMPS Class" href="Classes_lammps.html" />
|
||
</head>
|
||
|
||
<body class="wy-body-for-nav">
|
||
<div class="wy-grid-for-nav">
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||
<div class="wy-side-scroll">
|
||
<div class="wy-side-nav-search" >
|
||
|
||
|
||
|
||
<a href="Manual.html">
|
||
|
||
<img src="_static/lammps-logo.png" class="logo" alt="Logo"/>
|
||
</a>
|
||
<div class="lammps_version">Version: <b>19 Nov 2024</b></div>
|
||
<div class="lammps_release">git info: </div>
|
||
<div role="search">
|
||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="Intro.html">1. Introduction</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Install.html">2. Install LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Build.html">3. Build LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Run_head.html">4. Run LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Commands.html">5. Commands</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Packages.html">6. Optional packages</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Speed.html">7. Accelerate performance</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Howto.html">8. Howto discussions</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Examples.html">9. Example scripts</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Tools.html">10. Auxiliary tools</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Errors.html">11. Errors</a></li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Programmer Guide</span></p>
|
||
<ul class="current">
|
||
<li class="toctree-l1"><a class="reference internal" href="Library.html">1. LAMMPS Library Interfaces</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Python_head.html">2. Use Python with LAMMPS</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Modify.html">3. Modifying & extending LAMMPS</a></li>
|
||
<li class="toctree-l1 current"><a class="reference internal" href="Developer.html">4. Information for Developers</a><ul class="current">
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_org.html">4.1. Source files</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_org.html#class-topology">4.2. Class topology</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_code_design.html">4.3. Code design</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_parallel.html">4.4. Parallel algorithms</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_atom.html">4.5. Accessing per-atom data</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_comm_ops.html">4.6. Communication patterns</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_flow.html">4.7. How a timestep works</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_write.html">4.8. Writing new styles</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_notes.html">4.9. Notes for developers and code maintainers</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_updating.html">4.10. Notes for updating code written for older LAMMPS versions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_plugins.html">4.11. Writing plugins</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_unittest.html">4.12. Adding tests for unit testing</a></li>
|
||
<li class="toctree-l2 current"><a class="reference internal" href="Classes.html">4.13. C++ base classes</a><ul class="current">
|
||
<li class="toctree-l3"><a class="reference internal" href="Classes_lammps.html">4.13.1. LAMMPS Class</a></li>
|
||
<li class="toctree-l3 current"><a class="current reference internal" href="#">4.13.2. LAMMPS Atom and AtomVec Base Classes</a></li>
|
||
<li class="toctree-l3"><a class="reference internal" href="Classes_input.html">4.13.3. LAMMPS Input Base Class</a></li>
|
||
</ul>
|
||
</li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_platform.html">4.14. Platform abstraction functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html">4.15. Utility functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#special-math-functions">4.16. Special Math functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#tokenizer-classes">4.17. Tokenizer classes</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#argument-parsing-classes">4.18. Argument parsing classes</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#file-reader-classes">4.19. File reader classes</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#memory-pool-classes">4.20. Memory pool classes</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#eigensolver-functions">4.21. Eigensolver functions</a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_utils.html#communication-buffer-coding-with-ubuf">4.22. Communication buffer coding with <em>ubuf</em></a></li>
|
||
<li class="toctree-l2"><a class="reference internal" href="Developer_grid.html">4.23. Use of distributed grids within style classes</a></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p class="caption" role="heading"><span class="caption-text">Command Reference</span></p>
|
||
<ul>
|
||
<li class="toctree-l1"><a class="reference internal" href="commands_list.html">Commands</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="fixes.html">Fix Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="computes.html">Compute Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="pairs.html">Pair Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="bonds.html">Bond Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="angles.html">Angle Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="dihedrals.html">Dihedral Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="impropers.html">Improper Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="dumps.html">Dump Styles</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="fix_modify_atc_commands.html">fix_modify AtC commands</a></li>
|
||
<li class="toctree-l1"><a class="reference internal" href="Bibliography.html">Bibliography</a></li>
|
||
</ul>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||
<a href="Manual.html">LAMMPS</a>
|
||
</nav>
|
||
|
||
<div class="wy-nav-content">
|
||
<div class="rst-content style-external-links">
|
||
<div role="navigation" aria-label="Page navigation">
|
||
<ul class="wy-breadcrumbs">
|
||
<li><a href="Manual.html" class="icon icon-home" aria-label="Home"></a></li>
|
||
<li class="breadcrumb-item"><a href="Developer.html"><span class="section-number">4. </span>Information for Developers</a></li>
|
||
<li class="breadcrumb-item"><a href="Classes.html"><span class="section-number">4.13. </span>C++ base classes</a></li>
|
||
<li class="breadcrumb-item active"><span class="section-number">4.13.2. </span>LAMMPS Atom and AtomVec Base Classes</li>
|
||
<li class="wy-breadcrumbs-aside">
|
||
<a href="https://www.lammps.org"><img src="_static/lammps-logo.png" width="64" height="16" alt="LAMMPS Homepage"></a> | <a href="Commands_all.html">Commands</a>
|
||
</li>
|
||
</ul><div class="rst-breadcrumbs-buttons" role="navigation" aria-label="Sequential page navigation">
|
||
<a href="Classes_lammps.html" class="btn btn-neutral float-left" title="4.13.1. LAMMPS Class" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="Classes_input.html" class="btn btn-neutral float-right" title="4.13.3. LAMMPS Input Base Class" accesskey="n">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
<hr/>
|
||
</div>
|
||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||
<div itemprop="articleBody">
|
||
|
||
<p><span class="math notranslate nohighlight">\(\renewcommand{\AA}{\text{Å}}\)</span></p>
|
||
<section id="lammps-atom-and-atomvec-base-classes">
|
||
<h1><span class="section-number">4.13.2. </span>LAMMPS Atom and AtomVec Base Classes<a class="headerlink" href="#lammps-atom-and-atomvec-base-classes" title="Link to this heading"></a></h1>
|
||
<dl class="cpp class">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4AtomE">
|
||
<span id="_CPPv3N9LAMMPS_NS4AtomE"></span><span id="_CPPv2N9LAMMPS_NS4AtomE"></span><span id="LAMMPS_NS::Atom"></span><span class="target" id="classLAMMPS__NS_1_1Atom"></span><span class="k"><span class="pre">class</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">Atom</span></span></span><span class="w"> </span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="k"><span class="pre">protected</span></span><span class="w"> </span><a class="reference internal" href="Classes_lammps.html#_CPPv4N9LAMMPS_NS8PointersE" title="LAMMPS_NS::Pointers"><span class="n"><span class="pre">Pointers</span></span></a><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4AtomE" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Class to provide access to atom data. </p>
|
||
<p><p>The Atom class provides access to atom style related global settings and
|
||
per-atom data that is stored with atoms and migrates with them from
|
||
sub-domain to sub-domain as atoms move around. This includes topology
|
||
data, which is stored with either one specific atom or all atoms involved
|
||
depending on the settings of the <a class="reference internal" href="newton.html"><span class="doc">newton command</span></a>.</p>
|
||
<p>The actual per-atom data is allocated and managed by one of the various
|
||
classes derived from the AtomVec class as determined by
|
||
the <a class="reference internal" href="atom_style.html"><span class="doc">atom_style command</span></a>. The pointers in the Atom class
|
||
are updated by the AtomVec class as needed.</p>
|
||
</p>
|
||
<div class="breathe-sectiondef docutils container">
|
||
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-functions">Public Functions</p>
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom4AtomEP6LAMMPS">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom4AtomEP6LAMMPS"></span><span id="_CPPv2N9LAMMPS_NS4Atom4AtomEP6LAMMPS"></span><span id="LAMMPS_NS::Atom::Atom__LAMMPSP"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1a0d2e320788dddcb5ef150c187679f905"></span><span class="sig-name descname"><span class="n"><span class="pre">Atom</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">class</span></span><span class="w"> </span><a class="reference internal" href="Classes_lammps.html#_CPPv4N9LAMMPS_NS6LAMMPSE" title="LAMMPS_NS::LAMMPS"><span class="n"><span class="pre">LAMMPS</span></span></a><span class="p"><span class="pre">*</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom4AtomEP6LAMMPS" title="Link to this definition"></a><br /></dt>
|
||
<dd><p><a class="reference internal" href="#classLAMMPS__NS_1_1Atom"><span class="std std-ref">Atom</span></a> class constructor</p>
|
||
<p>This resets and initializes all kinds of settings, parameters, and pointer variables for per-atom arrays. This also initializes the factory for creating instances of classes derived from the AtomVec base class, which correspond to the selected atom style.</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>_lmp</strong> – pointer to the base <a class="reference internal" href="Classes_lammps.html#classLAMMPS__NS_1_1LAMMPS"><span class="std std-ref">LAMMPS</span></a> class </p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom11find_customEPKcRiRi">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom11find_customEPKcRiRi"></span><span id="_CPPv2N9LAMMPS_NS4Atom11find_customEPKcRiRi"></span><span id="LAMMPS_NS::Atom::find_custom__cCP.iR.iR"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1a6f6bc746553cf0ac64e327aced14e958"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">find_custom</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="p"><span class="pre">*</span></span>, <span class="kt"><span class="pre">int</span></span><span class="p"><span class="pre">&</span></span>, <span class="kt"><span class="pre">int</span></span><span class="p"><span class="pre">&</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom11find_customEPKcRiRi" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Find a custom per-atom property with given name. </p>
|
||
<p><p>This function returns the list index of a custom per-atom property
|
||
with the name “name”, also returning by reference its data type and
|
||
number of values per atom.</p>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>name</strong> – Name of the property (w/o a “i_” or “d_” or “i2_” or “d2_” prefix) </p></li>
|
||
<li><p><strong>&flag</strong> – Returns data type of property: 0 for int, 1 for double </p></li>
|
||
<li><p><strong>&cols</strong> – Returns number of values: 0 for a single value, 1 or more for a vector of values </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>index of property in the respective list of properties </p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom17find_custom_ghostEPKcRiRiRi">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom17find_custom_ghostEPKcRiRiRi"></span><span id="_CPPv2N9LAMMPS_NS4Atom17find_custom_ghostEPKcRiRiRi"></span><span id="LAMMPS_NS::Atom::find_custom_ghost__cCP.iR.iR.iR"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1a3ce6ca4cdb300ea3ff044b800d1180ed"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">find_custom_ghost</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="p"><span class="pre">*</span></span>, <span class="kt"><span class="pre">int</span></span><span class="p"><span class="pre">&</span></span>, <span class="kt"><span class="pre">int</span></span><span class="p"><span class="pre">&</span></span>, <span class="kt"><span class="pre">int</span></span><span class="p"><span class="pre">&</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom17find_custom_ghostEPKcRiRiRi" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Find a custom per-atom property with given name and retrieve ghost property. </p>
|
||
<p><p>This function returns the list index of a custom per-atom property
|
||
with the name “name”, also returning by reference its data type,
|
||
number of values per atom, and if it is communicated to ghost particles.
|
||
Classes rarely need to check on ghost communication and so <cite>find_custom</cite>
|
||
is typically preferred to this function. See <a class="reference internal" href="pair_amoeba.html"><span class="doc">pair amoeba</span></a>
|
||
for an example where checking ghost communication is necessary.</p>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>name</strong> – Name of the property (w/o a “i_” or “d_” or “i2_” or “d2_” prefix) </p></li>
|
||
<li><p><strong>&flag</strong> – Returns data type of property: 0 for int, 1 for double </p></li>
|
||
<li><p><strong>&cols</strong> – Returns number of values: 0 for a single value, 1 or more for a vector of values </p></li>
|
||
<li><p><strong>&ghost</strong> – Returns whether property is communicated to ghost atoms: 0 for no, 1 for yes </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>index of property in the respective list of properties </p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom10add_customEPKciii">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom10add_customEPKciii"></span><span id="_CPPv2N9LAMMPS_NS4Atom10add_customEPKciii"></span><span id="LAMMPS_NS::Atom::add_custom__cCP.i.i.i"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1acd074d93188a3df2a43d08234b1691b9"></span><span class="k"><span class="pre">virtual</span></span><span class="w"> </span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">add_custom</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="p"><span class="pre">*</span></span>, <span class="kt"><span class="pre">int</span></span>, <span class="kt"><span class="pre">int</span></span>, <span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">ghost</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="m"><span class="pre">0</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom10add_customEPKciii" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Add a custom per-atom property with the given name and type and size. </p>
|
||
<p><p>This function will add a custom per-atom property with one or more values
|
||
with the name “name” to the list of custom properties.
|
||
This function is called, e.g. from <a class="reference internal" href="fix_property_atom.html"><span class="doc">fix property/atom</span></a>.</p>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>name</strong> – Name of the property (w/o a “i_” or “d_” or “i2_” or “d2_” prefix) </p></li>
|
||
<li><p><strong>flag</strong> – Data type of property: 0 for int, 1 for double </p></li>
|
||
<li><p><strong>cols</strong> – Number of values: 0 for a single value, 1 or more for a vector of values </p></li>
|
||
<li><p><strong>ghost</strong> – Whether property is communicated to ghost atoms: 0 for no, 1 for yes </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>index of property in the respective list of properties </p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom13remove_customEiii">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom13remove_customEiii"></span><span id="_CPPv2N9LAMMPS_NS4Atom13remove_customEiii"></span><span id="LAMMPS_NS::Atom::remove_custom__i.i.i"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1aecf945aa87239b81163cc602aa7c5549"></span><span class="k"><span class="pre">virtual</span></span><span class="w"> </span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">remove_custom</span></span></span><span class="sig-paren">(</span><span class="kt"><span class="pre">int</span></span>, <span class="kt"><span class="pre">int</span></span>, <span class="kt"><span class="pre">int</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom13remove_customEiii" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Remove a custom per-atom property of a given type and size. </p>
|
||
<p><p>This will remove a property that was requested, e.g. by the
|
||
<a class="reference internal" href="fix_property_atom.html"><span class="doc">fix property/atom</span></a> command. It frees the
|
||
allocated memory and sets the pointer to <code class="docutils literal notranslate"><span class="pre">nullptr</span></code> for the entry in
|
||
the list so it can be reused. The lists of these pointers are never
|
||
compacted or shrunk, so that indices to name mappings remain valid.</p>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>index</strong> – Index of property in the respective list of properties </p></li>
|
||
<li><p><strong>flag</strong> – Data type of property: 0 for int, 1 for double </p></li>
|
||
<li><p><strong>cols</strong> – Number of values: 0 for a single value, 1 or more for a vector of values </p></li>
|
||
</ul>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom7extractEPKc">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom7extractEPKc"></span><span id="_CPPv2N9LAMMPS_NS4Atom7extractEPKc"></span><span id="LAMMPS_NS::Atom::extract__cCP"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1aa12f2b783db9b4523ddbf9f01d132d88"></span><span class="kt"><span class="pre">void</span></span><span class="w"> </span><span class="p"><span class="pre">*</span></span><span class="sig-name descname"><span class="n"><span class="pre">extract</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="p"><span class="pre">*</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom7extractEPKc" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Provide access to internal data of the <a class="reference internal" href="#classLAMMPS__NS_1_1Atom"><span class="std std-ref">Atom</span></a> class by keyword</p>
|
||
<p><p>This function is a way to access internal per-atom data. This data is
|
||
distributed across MPI ranks and thus only the data for “local” atoms
|
||
are expected to be available. Whether also data for “ghost” atoms is
|
||
stored and up-to-date depends on various simulation settings.</p>
|
||
<p>This table lists a large part of the supported names, their data types,
|
||
length of the data area, and a short description.</p>
|
||
<table class="docutils align-default">
|
||
<thead>
|
||
<tr class="row-odd"><th class="head"><p>Name</p></th>
|
||
<th class="head"><p>Type</p></th>
|
||
<th class="head"><p>Items per atom</p></th>
|
||
<th class="head"><p>Description</p></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr class="row-even"><td><p>mass</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>per-type mass. This array is <strong>NOT</strong> a per-atom array
|
||
but of length <code class="docutils literal notranslate"><span class="pre">ntypes+1</span></code>, element 0 is ignored.</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>id</p></td>
|
||
<td><p>tagint</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>atom ID of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>type</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>atom type of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>mask</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>bitmask for mapping to groups. Individual bits are set
|
||
to 0 or 1 for each group.</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>image</p></td>
|
||
<td><p>imageint</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>3 image flags encoded into a single integer.
|
||
See <a class="reference internal" href="Library_utility.html#_CPPv425lammps_encode_image_flagsiii" title="lammps_encode_image_flags"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">lammps_encode_image_flags()</span></code></a>.</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>x</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>x-, y-, and z-coordinate of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>v</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>x-, y-, and z-component of the velocity of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>f</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>x-, y-, and z-component of the force on the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>molecule</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>molecule ID of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>q</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>charge of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>mu</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>dipole moment of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>omega</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>x-, y-, and z-component of rotational velocity of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>angmom</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>x-, y-, and z-component of angular momentum of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>torque</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>3</p></td>
|
||
<td><p>x-, y-, and z-component of the torque on the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>radius</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>radius of the (extended) particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>rmass</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>per-atom mass of the particles. <code class="docutils literal notranslate"><span class="pre">nullptr</span></code> if per-type masses are
|
||
used. See the <a class="reference internal" href="Library_properties.html#_CPPv422lammps_extract_settingPvPKc" title="lammps_extract_setting"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">rmass_flag</span></code></a> setting.</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>ellipsoid</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>1 if the particle is an ellipsoidal particle, 0 if not</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>line</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>1 if the particle is a line particle, 0 if not</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>tri</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>1 if the particle is a triangulated particle, 0 if not</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>body</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>1 if the particle is a body particle, 0 if not</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>quat</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>4</p></td>
|
||
<td><p>four quaternion components of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>temperature</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>temperature of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>heatflow</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>heatflow of the particles</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>i_name</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>single integer value defined by fix property/atom vector name</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>d_name</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>1</p></td>
|
||
<td><p>single double value defined by fix property/atom vector name</p></td>
|
||
</tr>
|
||
<tr class="row-odd"><td><p>i2_name</p></td>
|
||
<td><p>int</p></td>
|
||
<td><p>N</p></td>
|
||
<td><p>N integer values defined by fix property/atom array name</p></td>
|
||
</tr>
|
||
<tr class="row-even"><td><p>d2_name</p></td>
|
||
<td><p>double</p></td>
|
||
<td><p>N</p></td>
|
||
<td><p>N double values defined by fix property/atom array name</p></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<dl class="simple">
|
||
<dt><em>See also</em></dt><dd><p><a class="reference internal" href="Library_atoms.html#_CPPv419lammps_extract_atomPvPKc" title="lammps_extract_atom"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">lammps_extract_atom()</span></code></a>,
|
||
<a class="reference internal" href="Library_atoms.html#_CPPv428lammps_extract_atom_datatypePvPKc" title="lammps_extract_atom_datatype"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">lammps_extract_atom_datatype()</span></code></a>,
|
||
<a class="reference internal" href="Library_atoms.html#_CPPv424lammps_extract_atom_sizePvPKci" title="lammps_extract_atom_size"><code class="xref cpp cpp-func docutils literal notranslate"><span class="pre">lammps_extract_atom_size()</span></code></a></p>
|
||
</dd>
|
||
</dl>
|
||
</p>
|
||
<p><div class="admonition seealso">
|
||
<p class="admonition-title">See also</p>
|
||
<p><a class="reference internal" href="#classLAMMPS__NS_1_1Atom_1ae25da0ff714bd58c9ebf8f50e4edb81b"><span class="std std-ref">extract_datatype</span></a>, <a class="reference internal" href="#classLAMMPS__NS_1_1Atom_1a4574a4c98cce1efc6c5c71fc6f17da8f"><span class="std std-ref">extract_size</span></a></p>
|
||
</div>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>name</strong> – string with the keyword of the desired property. Typically the name of the pointer variable returned </p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>pointer to the requested data cast to <code class="docutils literal notranslate"><span class="pre">void</span> <span class="pre">*</span></code> or <code class="docutils literal notranslate"><span class="pre">nullptr</span></code></p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom16extract_datatypeEPKc">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom16extract_datatypeEPKc"></span><span id="_CPPv2N9LAMMPS_NS4Atom16extract_datatypeEPKc"></span><span id="LAMMPS_NS::Atom::extract_datatype__cCP"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1ae25da0ff714bd58c9ebf8f50e4edb81b"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">extract_datatype</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="p"><span class="pre">*</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom16extract_datatypeEPKc" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Provide data type info about internal data of the <a class="reference internal" href="#classLAMMPS__NS_1_1Atom"><span class="std std-ref">Atom</span></a> class</p>
|
||
<p><div class="versionadded">
|
||
<p><span class="versionmodified added">Added in version 18Sep2020.</span></p>
|
||
</div>
|
||
</p>
|
||
<p><div class="admonition seealso">
|
||
<p class="admonition-title">See also</p>
|
||
<p><a class="reference internal" href="#classLAMMPS__NS_1_1Atom_1aa12f2b783db9b4523ddbf9f01d132d88"><span class="std std-ref">extract</span></a> <a class="reference internal" href="#classLAMMPS__NS_1_1Atom_1a4574a4c98cce1efc6c5c71fc6f17da8f"><span class="std std-ref">extract_size</span></a></p>
|
||
</div>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><p><strong>name</strong> – string with the keyword of the desired property. </p>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>data type constant for desired property or -1 </p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
<dl class="cpp function">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom12extract_sizeEPKci">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom12extract_sizeEPKci"></span><span id="_CPPv2N9LAMMPS_NS4Atom12extract_sizeEPKci"></span><span id="LAMMPS_NS::Atom::extract_size__cCP.i"></span><span class="target" id="classLAMMPS__NS_1_1Atom_1a4574a4c98cce1efc6c5c71fc6f17da8f"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">extract_size</span></span></span><span class="sig-paren">(</span><span class="k"><span class="pre">const</span></span><span class="w"> </span><span class="kt"><span class="pre">char</span></span><span class="p"><span class="pre">*</span></span>, <span class="kt"><span class="pre">int</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom12extract_sizeEPKci" title="Link to this definition"></a><br /></dt>
|
||
<dd><p>Provide vector or array size info of internal data of the <a class="reference internal" href="#classLAMMPS__NS_1_1Atom"><span class="std std-ref">Atom</span></a> class</p>
|
||
<p><div class="versionadded">
|
||
<p><span class="versionmodified added">Added in version 19Nov2024.</span></p>
|
||
</div>
|
||
</p>
|
||
<p><div class="admonition seealso">
|
||
<p class="admonition-title">See also</p>
|
||
<p><a class="reference internal" href="#classLAMMPS__NS_1_1Atom_1aa12f2b783db9b4523ddbf9f01d132d88"><span class="std std-ref">extract</span></a> <a class="reference internal" href="#classLAMMPS__NS_1_1Atom_1ae25da0ff714bd58c9ebf8f50e4edb81b"><span class="std std-ref">extract_datatype</span></a></p>
|
||
</div>
|
||
</p>
|
||
<dl class="field-list simple">
|
||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||
<dd class="field-odd"><ul class="simple">
|
||
<li><p><strong>name</strong> – string with the keyword of the desired property. </p></li>
|
||
<li><p><strong>type</strong> – either LMP_SIZE_ROWS or LMP_SIZE_COLS for per-atom array or ignored </p></li>
|
||
</ul>
|
||
</dd>
|
||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||
<dd class="field-even"><p>size of the vector or size of the array for the requested dimension or -1 </p>
|
||
</dd>
|
||
</dl>
|
||
</dd></dl>
|
||
|
||
</div>
|
||
<dl class="cpp struct">
|
||
<dt class="sig sig-object cpp" id="_CPPv4N9LAMMPS_NS4Atom7PerAtomE">
|
||
<span id="_CPPv3N9LAMMPS_NS4Atom7PerAtomE"></span><span id="_CPPv2N9LAMMPS_NS4Atom7PerAtomE"></span><span id="LAMMPS_NS::Atom::PerAtom"></span><span class="target" id="structLAMMPS__NS_1_1Atom_1_1PerAtom"></span><span class="k"><span class="pre">struct</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PerAtom</span></span></span><a class="headerlink" href="#_CPPv4N9LAMMPS_NS4Atom7PerAtomE" title="Link to this definition"></a><br /></dt>
|
||
<dd></dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</section>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||
<a href="Classes_lammps.html" class="btn btn-neutral float-left" title="4.13.1. LAMMPS Class" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||
<a href="Classes_input.html" class="btn btn-neutral float-right" title="4.13.3. LAMMPS Input Base Class" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<div role="contentinfo">
|
||
<p>© Copyright 2003-2025 Sandia Corporation.</p>
|
||
</div>
|
||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
||
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||
|
||
|
||
</footer>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
<script>
|
||
jQuery(function () {
|
||
SphinxRtdTheme.Navigation.enable(false);
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html> |