


{"id":397175,"date":"2024-12-11T21:04:09","date_gmt":"2024-12-11T21:04:09","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/"},"modified":"2024-12-11T21:13:43","modified_gmt":"2024-12-11T21:13:43","slug":"397175","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/","title":{"rendered":"Reply To: 2D inverse design grating coupler"},"content":{"rendered":"<p>&lt;p&gt;@rahul.sanghvi,&lt;\/p&gt;&lt;p&gt;If you set the <a href=\"https:\/\/optics.ansys.com\/hc\/en-us\/articles\/5771091294739-How-to-run-Lumerical-API-scripts-from-terminal-in-Linux\" rel=\"external noopener noreferrer\">environment for Lumerical API<\/a> in the cluster then you simply remove the PATH set in your script.&nbsp;&lt;\/p&gt;&lt;p&gt;Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the <strong>&ldquo;<\/strong><strong>install path<\/strong><strong>&ldquo;<\/strong> according to the path in your cluster)&lt;\/p&gt;<\/p>\n<pre>&lt;span style=\"color: #3598db;\"&gt;export PATH=\/&lt;span style=\"text-decoration: underline; color: #e03e2d;\"&gt;<strong>opt\/lumerical\/v242<\/strong>&lt;\/span&gt;\/bin:\/&lt;span style=\"text-decoration: underline; color: #e03e2d;\"&gt;<strong>opt\/lumerical\/v242<\/strong>&lt;\/span&gt;\/python\/bin:$PATH&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;export PYTHONPATH=$PYTHONPATH:\/&lt;span style=\"text-decoration: underline; color: #e03e2d;\"&gt;<strong>opt\/lumerical\/v242<\/strong>&lt;\/span&gt;\/api\/python&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;export QT_QPA_PLATFORM=offscreen &lt;\/span&gt;<\/pre>\n<p>&lt;p&gt;Example Python Script: save as lumtest.py, &ndash; without the path settings.&nbsp;&lt;\/p&gt;<\/p>\n<pre>&lt;span style=\"color: #3598db;\"&gt;import lumapi&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;fdtd = lumapi.FDTD(hide=True)&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;fdtd.addfdtd()&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;fdtd.addring()&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;fdtd.addmesh()&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;fdtd.addrect()&lt;\/span&gt;&lt;br&gt;&lt;span style=\"color: #3598db;\"&gt;fdtd.save(\"mytest.fsp\")&lt;\/span&gt;<\/pre>\n<p>&lt;p&gt;Then run the example script above in the cluster:&nbsp;&lt;\/p&gt;<\/p>\n<pre>&lt;span style=\"color: #3598db;\"&gt;cd \/{directory\/folder of you script}&lt;br&gt;python lumtest.py&lt;\/span&gt;<\/pre>\n<p>&lt;p&gt;If it creates (mytest.fsp) on the same folder as your script, then this confirms that you can run Lumerical API on the cluster.&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-397175","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reply To: 2D inverse design grating coupler | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-12-11T21:04:09+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-12-11T21:13:43+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: 2D inverse design grating coupler | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/397175\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/397175\\\/#listItem\",\"name\":\"Reply To: 2D inverse design grating coupler\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/397175\\\/#listItem\",\"position\":2,\"name\":\"Reply To: 2D inverse design grating coupler\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/397175\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/397175\\\/\",\"name\":\"Reply To: 2D inverse design grating coupler | Ansys Learning Forum\",\"description\":\"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \\u201cinstall path\\u201c according to the path in your cluster)export PATH=\\\/opt\\\/lumerical\\\/v242\\\/bin:\\\/\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/397175\\\/#breadcrumblist\"},\"datePublished\":\"2024-12-11T21:04:09+00:00\",\"dateModified\":\"2024-12-11T21:13:43+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reply To: 2D inverse design grating coupler | Ansys Learning Forum","description":"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/#listItem","name":"Reply To: 2D inverse design grating coupler"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/#listItem","position":2,"name":"Reply To: 2D inverse design grating coupler","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/","name":"Reply To: 2D inverse design grating coupler | Ansys Learning Forum","description":"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/#breadcrumblist"},"datePublished":"2024-12-11T21:04:09+00:00","dateModified":"2024-12-11T21:13:43+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"Reply To: 2D inverse design grating coupler | Ansys Learning Forum","og:description":"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/","article:published_time":"2024-12-11T21:04:09+00:00","article:modified_time":"2024-12-11T21:13:43+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: 2D inverse design grating coupler | Ansys Learning Forum","twitter:description":"@rahul.sanghvi,If you set the environment for Lumerical API in the cluster then you simply remove the PATH set in your script. Set environment to Lumerical 2024 R2.3 using the default install path and our bundled Python3: (change the \u201cinstall path\u201c according to the path in your cluster)export PATH=\/opt\/lumerical\/v242\/bin:\/"},"aioseo_meta_data":{"post_id":"397175","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2025-10-17 20:55:35","updated":"2026-08-13 10:30:53","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReply To: 2D inverse design grating coupler\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: 2D inverse design grating coupler","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/397175\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/397175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":2,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/397175\/revisions"}],"predecessor-version":[{"id":397177,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/397175\/revisions\/397177"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=397175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}